Example Code

RS-485 Loopback Test 2 Wire Echo Using LabVIEW

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

    Driver

  • NI VISA

Code and Documents

Attachment

Overview

This VI will loop-back and echo your output as input for RS-485.

 

Description

The example allows to configure the VISA settings for a RS-485 and sets up the system for a loop-back test of the RS-485 controller. The controller sends a string via the port and reads the same string back on the same port after an adjustable delay.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Check the VISA settings
  2. type a string to write into the box or use the *IDN? identifier
  3. Run the VI and receive the loopback reading

 

Additional Information or References

This does not work for two-wire Auto mode.

 

485 Loopback Test 2 Wire Echo_FP.jpg

485 Loopback Test 2 Wire Echo_BD.jpg

 

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