Query

4 views
Skip to first unread message

Pavan Kumar

unread,
Dec 16, 2020, 1:49:16 AM12/16/20
to libm...@googlegroups.com
Hello,

I wanted to implement tcpip modbus communication using libmodbus source, here I am using my custom board with two ethernet ports (eth0,eth1), which API should I use to send
modbus data over eth0.

In "modbus_new_tcp("127.0.0.1", 1502);" API we are not giving any parameter to select particular ethernet port.

Please guide me as I am new to modbus protocol.

--
Thanks and Regards,
 Pavankumar

Chuck Watson

unread,
Dec 16, 2020, 10:05:32 AM12/16/20
to libm...@googlegroups.com

Yes, you are indirectly specifying a physical port.

 

By specifying a correct TCP address (not 127.0.0.1), you are indirectly specifying a physical port. On any system, an IP address is only configured for one port. There are nuances to this like redundancy but the IP address only works on only one physical port at a time at any instance in time.

 

This is all taken care of by the operating system, not libmodbus.

 

Chuck Watson BS, CEM, CMVP

Direct USA 724-799-1529

--
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.
Cette discussion peut être lue sur le Web à l'adresse https://groups.google.com/d/msgid/libmodbus/CAC7fO0m9gTxmL%3DqcSrBbzDcapXYKLXwvd8L%3DouqAB3L9at_7Tw%40mail.gmail.com.

image001.gif
Reply all
Reply to author
Forward
0 new messages