Connection timed out Error with Modbus RTU

407 views
Skip to first unread message

Anurag Sharma

unread,
Nov 28, 2013, 11:30:31 AM11/28/13
to libm...@googlegroups.com

Hi

I am trying to run unit-test-client and server with rtu protocol on two different machines connected by usb to serial ports.But the machines are unable to communicate.Following is the behaviour.Please help!
Thanks.

Client says:

Opening /dev/ttyUSB1 at 9600 bauds (N, 8, 1)
** UNIT TESTING **

TEST WRITE/READ:
[11][05][00][13][FF][00][7F][6F]
Waiting for a confirmation...
ERROR Connection timed out: select
0 bytes flushed
1/2 modbus_write_bit: FAILED

Server says:

Opening /dev/ttyUSB0 at 9600 bauds (N, 8, 1)
Waiting for a indication...

Torello Querci

unread,
Nov 28, 2013, 11:39:30 AM11/28/13
to libm...@googlegroups.com
Is the serial a RS232 or RS485? If it is RS232 you need to connect each end using a cross cable. In the case of 9PIN port you need to connect pin 2 with pin 3 on the other side.

Best Regards


2013/11/28 Anurag Sharma <anura...@gmail.com>

--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes libmodbus.
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse libmodbus+...@googlegroups.com.
Pour plus d'options, visitez le site https://groups.google.com/groups/opt_out .

Anurag Sharma

unread,
Nov 28, 2013, 12:17:23 PM11/28/13
to libm...@googlegroups.com
Thanks for the quick reply. I am using rs-232 to usb converters both sides and a cable(with female port both sides) in between.Yes cable might be the issue.I will check and come back.



--
Vous recevez ce message car vous êtes abonné à un sujet dans le groupe Google Groupes "libmodbus".
Pour vous désabonner de ce sujet, visitez le site https://groups.google.com/d/topic/libmodbus/kHpUDRp34vc/unsubscribe.
Pour vous désabonner de ce groupe et de tous ses sujets, envoyez un e-mail à l'adresse libmodbus+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages