Can I Perform Modbus Communication with a CompactRIO and an NI 987x Module?Primary Software: LabVIEW Modules>>FPGA ModulePrimary Software Version: 8.6 Primary Software Fixed Version: N/A Secondary Software: N/A Hardware: Serial>>RS-232>>NI 9870, Serial>>RS-485>>NI 9871
Problem: I would like to perform Modbus I/O communication using cRIO with the NI 987x serial module. What can I do to achieve this? Solution: It is possible to communicate with a CompactRIO as a Modbus slave either through the built-in serial port on the chassis or through the NI 987x module. Since the NI 987x module is controlled with FPGA, VHDL code or LabVIEW FPGA code must be created that supports the Modbus protocol. The LabVIEW Modbus library has been wrapped for the NI 987x modules and LabVIEW FPGA in the Developer Zone Example Program: Modbus Communication Reference Example for C-Series Serial Modules. An easier way to communicate with a cRIO target would be through the built-in serial port on the controller. This requires both the LabVIEW Datalogging and Supervisory Control (DSC) and LabVIEW Real-Time. This port is controlled directly through the Real-Time host and does not require any FPGA or VHDL programming to use. To do this, You can create a Modbus I/O server in your project by right clicking your controller and selecting New I/O Server. After the window comes up asking which type of server to create, select Modbus Slave and then enter the appropriate settings you wish to use. Refer to DeveloperZone Tutorial: How to turn a RT Target into a Modbus Slave using IO Servers for more information on setting up a RT Target as a Modbus Slave device. Related Links: LabVIEW Datalogging and Supervisory Control (DSC) LabVIEW Real-Time Developer Zone Tutorial: Connect LabVIEW to Any Industrial Network and PLC: Modbus TCP and Modbus Serial DeveloperZone Tutorial: How to turn a RT Target into a Modbus Slave using IO Servers Developer Zone Example Program: Modbus Communication Reference Example for C-Series Serial Modules KnowledgeBase 21A5S83E: Do LabVIEW and LabVIEW Real-Time Support Modbus? Attachments:
Report Date: 11/03/2008 Last Updated: 04/10/2009 Document ID: 4R2I8DL1 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
