02-16-2018 10:20 AM
Hello,
I want to read from and write to an industrial PLC (Proface AGP 3400) using the Modbus communication protocol.
Although the PLC was successfully pinged from the command line, LabVIEW nor NI MAX weren't able to locate the device on the LAN. Hence, Modbus communication could not be established as the PLC was not recognized during configuration. To assure that the problem was not on the PLC side, a third party Modbus explorer (Modbus Poll) was installed on the same master PC to explore for Modbus enabled devices. The communication over Modbus was successfully established and registers could be read as well as written.
I'm wondering, is there some configuration in labVIEW which avoids me from discovering the PLC?
Solved! Go to Solution.
02-19-2018 01:38 AM
Hi,
Should be no problem connecting to a ModBus device over TCP.
How to do establish the TCP connection ? Do you use the NI ModBus lib. ?
Kees
02-19-2018 03:33 AM
Hi Kees,
Thank you for the response.
Indeed, I intend to use the NI Modbus lib. However, I can't find the device and its items using the Distributed Systems Manager, while I can discover it when using the command line (see attached Figures) and a third party Modbus Software (Modbus Poll). So there might be a TCP connection problem in LabVIEW?
Cheers,
Niels
02-19-2018 05:43 AM
You can use the LIB (or even create your own VI for TCP/ModBus communication) but you have to known which commands and registers/bits your device is supporting.
If want to use it in another package you have to look further. I always communicate with known ModBus devices. Since they also have dedicated command I made the VI myself for serial and TCP.
Kees
02-19-2018 06:06 AM
I have a list of supported registers of the PLC and when I use ModbusPoll it works fine.
However, when I try LabVIEW/NI MAX I can't even discover the device on the network...
Niels
02-19-2018 08:43 AM
I don't think you will see this in MAX. At ethernet MAX will only discover T&M devices I think.
02-21-2018 09:47 AM
I figured it out. Apparently, the I/O server has to be hosted by the localhost (or another networked device such as a cRIO).
Thanks for helping!