EmbeddedRelated.com
Forums

Modbus RTU master on serial 485 with RCM3700 (Rabbit 3000)

Started by alexandre_gasne July 8, 2004
Hi !

I'm trying to do a modbus master in RTU mode using a RS485 serial
interface. This is based on RCM3700.

Has somebody ever adapted the sample given for the BL21xx in the FAQs
of Zworld site for the RCM3700 ? 'cause it doesnt seems to work "out
of the box"...

In fact, there is something sent on the serial interface :
------------------ - - -
----- ---------------
- - - -
(something like this for the function '17' 0x11...)

But no answer from my slave RTU modbus device...

I set parity and 7 databits.

Any Idea ? Any other sample to help me ?

thanks for help.


--- In rabbit-semi@rabb..., "alexandre_gasne"
<alexandre_gasne@y...> wrote:
> Hi !
>
> I'm trying to do a modbus master in RTU mode using a RS485 serial
> interface. This is based on RCM3700.
>
> Has somebody ever adapted the sample given for the BL21xx in the
FAQs
> of Zworld site for the RCM3700 ? 'cause it doesnt seems to
work "out
> of the box"...
>
> In fact, there is something sent on the serial interface :
> ------------------ - - -
> ----- ---------------
> - - - -
> (something like this for the function '17' 0x11...)
>
> But no answer from my slave RTU modbus device...
>
> I set parity and 7 databits.
>
> Any Idea ? Any other sample to help me ?
>
> thanks for help.


For RTU communication you must set 8 data bits. It's a must because
RTU is a binary protocol. 7 data bits is for ASCII modbus.

Pay attention: 8 data bits + parity = 9bits communication, which in
the old ZW library is done very pour (a long character delay for the
stop bit etc. to accomodate the old rabbits). New Rabbit processors
have an improved scheme to do that. Read the manuals.

Anyway, if you correctly set the 8 data bits and parity and stuff,
you may have luck with your existing library... regards,
raimond


Why not try softools ? ( the ansii C Rabbit people )

Bill Auerbach was recently asking for Integrated RS-485 beta-testers
to stand forward, ealier this month.
He might be willing to answer some questions for you.

http://groups.yahoo.com/group/softools
Ref: Post( 2864 ) on Wed 6/16/2004