Example Code

read ASCII modbus (strings) over Serial COM port (RS232)

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview
This example writes and reads ASCII modbus reigster values for any devices that requires communications over standard 7-bit ASCII modbus.

 

Description
This can be used as a SubVI with some slight modifications to communicate with ASCII modbus instruments.

The data bit is arbitrarily set to 7 for the ASCII modbus standard.

 

Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Set the right parameters for serial port and specify the modbus ASCII cmd.
  2. Run the VI.

 

Additional Information or References
VI Block Diagram
code.png

 

  **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.

Comments
chaskarvkc
Member
Member
on

Nice example