To download NI software, including the products shown below, visit ni.com/downloads.
SImple Vi to read a given value from a TCP/IP device using MODBUS protocol
The Vi opens a TCP master and reads a specified holding register, returning the value of that register.
Steps to Implement or Execute Code
Additional Information or References
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
can you send the whole vi?
I have been searching for material, (explanations, examples etc.) to create a vi that will read and control a plc from a remote location. By this I mean that a plc controlled device that uses an HMI for operator input, located at one location but monitored and controlled by a VI using Modbus TCP from a remote location, for the purpose of recording data and even simple commands such as run, stop, and standby.
I'm using LV 2014.(32 bit), I've added NI Modbus Lib 126.96.36.199 (only after updating my JKI Package Manager to 2019!).
This example is great but I am looking for more understanding behind the Modbus master/slave functions and how to use networked shared variables to create a data file for evaluation and data reduction.
So if anyone can share a tutorial or recommend an appropriate knowledge base article etc I would be very happy to dive into it