--- In "Robert Bedichek" <> wrote:
>
> Dear Wiff,
>
> You don't say whether you are using full or half duplex. As
written, the
> code looks to me like it for full-duplex.
>
> I suggest you get an RS-232 to RS-485 dongle and use a PC to talk to
your
> device, to make sure you device works the way you think it does,
that all
> the wires are hooked up, communications parameters are correct, etc.
You
> could then get a scope picture of what working communication
sequence looks
> like and then compare with happens when you do the same thing on
your ARM
> system.
There are good free modbus tester tools available. Google for modbus
tester; one that I use is available from modbus.pl.
>
> Some devices require very limited time between bytes. I'm working
with a
> pump controller that requires there to be almost no dead time between
> certain bytes it receives. You might for such restrictions with your
> device.
ISTR that the ModbusRTU spec requires no more than 2.5 character
spacing between query and reply. I ended up using threads to make
sure that I didn't lose the response (a write thread, a listen thread,
and a watchdog thread.) You can get my modbus library at
<http://www.seiner.com/ts7000/modbus-0.0.2.tar.gz>
I only use half-duplex. At least with the TS 4 port serial board, you
have to turn the transmitter on and off manually with every transmission.
--Yan
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|