Using Modbus Devices with LabVIEW

LeftData logging Through Ethernet | 3 Ladder Logic Controllers Left

Date: 2016-07-22

Using Modbus Devices with LabVIEW

LabView with Modbus    LabVIEW stands for Laboratory Virtual Instrument Engineering Workbench and is a development environment for a graphical programming language developed by National Instruments. It’s used for simple and complex systems as it allows for logging, displaying and analysis of measurement data which you can easily acquire over different protocols and communication buses.  Today we’re going to be going over acquiring data from Modbus devices which communicate over serial and Ethernet buses.  With the LabVIEW compiler and libraries, you can easily develop advanced algorithms for data analysis.  With its drag and drop interface, you can easily set up a customized user interface for visualizing your system.  Here are some screenshots from some temperature monitoring and control applications. 

LabVIEW is widely used in data acquisition, test and measurement, instrument control, industrial automation and control, analysis and signal processing, embedded design, and much more. It can be used on many operating systems, including Microsoft windows, unix, linux, and MAC.   

LabVIEW offers integration with not only National Instruments but also third party data acquisition hardware like our ICP DAS Data Acquisition equipment. LabVIEW has an extensive library of built-in user interface controls, like graphs and charts. Once you acquire measurement data, you can apply comprehensive set of signal processing and math libraries for analysis or you can store the data for further review.

Data acquisition (abbreviated DAQ) is the process of sampling real world physical conditions and conversion of the resulting samples into digital numeric values that can be manipulated by a computer. This picture shows labview running on a PC connected to an Ethernet switch which is connected to an Modbus TCP and Ethernet based Thermocouple input and digital output module.  The LabView program takes the temperature data and is triggers a fan to turn on or off based on the temperature determined by the thermocouple sensor.  You can include many Modbus TCP devices in your network and the maximum number of devices depends on what is in your entire Ethernet network.

Modbus RTU is a widely used a serial based communication protocol that allows for communication between many devices connected to the same RS-485 or Ethernet network network.  Modbus RTU is widely used in industrial environments and in serial RS-485 networks supports up to 255 devices in one network. It is openly published, royalty-free and easy to deploy and maintain. For example, the M-7000 Modbus RTU based data acquisition remote I/O modules can be connected with the PC by a Modbus RTU to USB converter tM-7561 to send data to the PC and watch real time trends in the control center.

An example of a Current and Voltage input module communicable over Modbus RTU is our ICP DAS M-7017Z.  It can easily be used with LabVIEW through the Modbus RTU driver for your data acquisition projects and has 10 differential or 20 single ended analog inputs.  It supports 16-bit resolution for normal mode which is 10 samples per second and 12-bit resolution in fast mode which is 60 samples per second.  In case you just need to do some simple data logging, trend graphing, simple control logic, show the status on a screen and send email alarms based on conditions, we provide free EZ data Logger with our Modbus data acquisition equipment.

LabVIEW allows users to connect with third-party stand-alone instruments over just about any bus for flexible instrumentation and control systems.  It comes with math and analysis functions, drag-and-drop user interface elements, and many instrumentation drivers making it easy to visualize measurement data through a customized user interface so you can choose exactly how you’d like to store or report your data.    

For more information, please visit

ICP DAS USA is a provider of Industrial Data Communication, Automation Control and Test and Measurement products.  We specialize in PLC hardware, Ethernet controllers, distributed I/O modules, Industrial Ethernet Switches and protocol converters.  We provide programming services, training classes and free technical support.

LeftData logging Through Ethernet | 3 Ladder Logic Controllers Left