From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Ethernet Modbus I/O Servers on cRIO Demo

Code and Documents

Attachment

This simple example shows how a cRIO with LabVIEW Real-Time and Modbus I/O Servers installed can act as a Modbus master. The other part of this demo uses the LabVIEW Datalogging and Supervisory Control (DSC) module to access Modbus slave I/O servers on a desktop PC.

modbusexample.png

To get the demo up and running you will need to move all of the cRIO-based files to your hardware first. For more information on using the Modbus protocol with cRIO and DSC, visit the links below:

Developer Zone: How to turn a RT Target into a Modbus Slave using IO Servers

LabVIEW Help: Using Modbus I/O Servers (DSC Module or Real-Time Module)

Note: This example was written and tested in LabVIEW 2011 and has not been tested in older versions.

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors