To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example program shows how to implement a serial loopback test for the 485 protocol. You are able to use it in 4-wire mode or 2-wire auto mode only.
Description
Communication is done through the Serial port with VISA commands. This example is used to read data back from the LM92.
Requirements
Software
LabVIEW 2012 (or compatible)
NI-VISA
Hardware
LM92 Temperature Sensor
PIC16F877 Microcontroller
Instructions
1. Configure the serial port
2. Set the ASRL End Out property to specify that a termination character will be used to terminate write operations
3. Set the input buffer size
4. Set the XON/XOFF characters if XON/XOFF flow control is used
5. Read the bytes in the buffer and convert it to a temperature reading by dividing by 100
6. Display data on a graph
7. Close VISA session
Additional Information or References
**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.