LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MODBUS TCP SLAVE with multiple ethernet board

Hi,
 I've never ecountered this need before.
I'd like to communicate via MODBUS TCP with a labview application.
So in the target PC I have developed a slave VI and in my laptop I have the master.
The problem is that the slave PC has 2 ethernet board and I have to use the secondary board to communicate but I cannot find any settings on how to start the communication on the other board.
So I can communicate if I use the primary IP but not the secondary IP.
How to tell the slave application tu use the secondary IP to communicate
Any suggestion?
thank you
 
P.S.  Labview 2017 with NI Modbus library 1.2.1.42
0 Kudos
Message 1 of 6
(182 Views)

I guess you are using MB Ethernet Slave Demon.vi. You can modify the source code in order to pass the desired net address to Internecine Avoider.vi (circled in red below).

Another way with no progamming is using the firewall to block the 502 port on any other address.

 

Immagine.png

 

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 6
(175 Views)

I'm using the "Create TCP Slave.vi"

gepponline_0-1742811201671.png

 

Inside I've found a propery called "listening n et address" :

gepponline_1-1742811615929.png

As you can see inteh image I've tried adding it and setting a value to 0, 1 or 2 but nothing change 😞

 

 

0 Kudos
Message 3 of 6
(168 Views)

0, 1, 2 are not valid values. Use the String To IP function from the TCP palette to get the correct net address.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 4 of 6
(165 Views)
Still not working.
If I use localhost or the IP address of the first ethernet board i can communicate If I use the second ethernet board IP, I get error.
To debug I have connected a secondary USB ethernet with nothing connect to it.

0 Kudos
Message 5 of 6
(158 Views)
OK, Now I've connected the cable to the board and it seems to work.
I supposed it was an internal call but It's not.
I'll try it on the operating device. Thank you!
0 Kudos
Message 6 of 6
(156 Views)