From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-07-2019 10:35 PM - last edited on 11-05-2019 09:07 PM by Kristi_Martinez
I am still newbie in NI.
I have a task to establish modbus ethernet communication between labview and a controller.
From the material which I read, there are two options to achieve it: Shared Variable and Modbus library (Modbus Master and Slave). However, I am not sure what is the difference between these two.
Anyone can explain to me about differences and benefits of having one option over another. Thanks
Solved! Go to Solution.
05-08-2019 05:43 PM
MODBUS defines a communications protocol, that generally isn't specific to the communications mode. Shared Variables are a LabVIEW component that allows data to be passed between LabVIEW VIs without the normal intervening LabVIEW "wires", with the unique aspect, at least in LabVIEW, that these VIs can reside on different machines, connected by a network.
Now, there might be a method to "encode" or "decode" your modbus command and have it passed between LabVIEW programs running on multiple machines (requiring LabVIEW running on both ends) to communicate with whatever device you are trying to communicate with, but if you use the MODBUS library, you only need one computer running LabVIEW, the MODBUS "messages" are encoded to go to whatever remote ethernet enabled MODBUS device (PLC or other controllers). Presumably that remote device has an ethernet interface that allow MODBUS communication.
05-08-2019 06:14 PM
I recommend using this MODBUS library with LabVIEW (note that the download link is to the right, not at the bottom or in the article).
There are a few other MODBUS libraries out there but I tried 3 different ones and this is the one that gave me the least amount of problems.
05-08-2019 06:19 PM
And read the articles about LabVIEW Modbus. Modbus can be odd in addressing, etc. Overwrote an address in a not very robust device, bricking the particle counter. To the manufacturer's credit, the only charged us shipping to fix.