01-05-2018 04:33 PM
Hi,
I have am trying to read from multiple Modbus Serial slave devices (2 to start with) via a 4 port Modbus serial to ModbusTCP Gateway.The gateway has a web configuration page that allows me to configure each port individually (baud rate, parity etc.) along with modbus mapping/offset.
In labview modbus TCP master VI's i dont see an option to select "Unit ID". Similar to modbus serial VIs. Is there an alternate way to do this?
I can read from slave device on Com1 just fine from my labview master application, but nothing from device on port2. Diagnostics from the webpage tell that my request is also not getting to Com2.
Solved! Go to Solution.
01-08-2018 02:01 AM
Hi,
The slave address is a part of the TCP data (the CRC is not) Using different slave addresses to select a port at your gateway should work. At least with my Moxa gateway it does.
Kees
01-09-2018 12:21 PM
Setting the Unit ID via Property Node worked! I can now read for the 4 com ports using their corresponding slave addresses/unit IDs.
The LabVIEW context help for unit ID was throwing me off as it says "...specifies identification of a serial modbus slave.....ignores requests from TCP Mobdus Master instances....". Now I know that i not true 🙂 it works just the same both serial & TCP
05-04-2018 05:44 AM - edited 05-04-2018 06:10 AM
Hi Younus. I couldn't understand your way. Someones told me for 4 slave like in this VI;
but it is not working. Can you give me an example ? In the snippet, it is created for loop for 4 slave devices ID and inside the while loop, take the element ID number and write in sequentially to those Modbus Read holding Register vı. I think there is an error here. We need not for loop, instead of that, we have to define slave IDs separately?
05-11-2018 01:21 AM
I made some modifications on the basis of NI Modbus Library, and realized the communication between Modbus Slave and Master through multiple unit ID.So I publish the code using LabVIEW 2013.
Hope it works for you.
08-05-2020 06:23 PM
08-13-2020 03:37 AM
09-14-2020 05:11 PM
Well, same problem here. However, the web interface of my device doesn't have any option for setting up slave ids. Has anyone thought of using a serial port emulator? Does anybody think it's reasonable?
09-15-2020 02:11 AM
Hi,
With a Moxa MB3480 you can connect multiple slaves (at address x) through a TCP connection.
Within the Moxa you can set-up the slave addresses conversion.
Kees