To download NI software, including the products shown below, visit ni.com/downloads.
Overview
The following VI shows how to communicate with a device which uses the VT100 ASCII character set and control sequences (also known as escape sequences/characters). For more background on this VI and for more information on VT100 emulation please see Knowledgebase 4TMENICX: How to use LabVIEW as a Terminal Emulation (VT100) Program to Emulate an Ori.
Description
This VI uses the VISA Serial functions which require the VISA driver to be installed. The code then reads and writes to the port asynchronously. The read loop awaits until the device has sent some data followed up by the escape character. To continue communicating with the device in a timely manner the device will require a reply to its escape character. If LabVIEW doesn't reply to the device, the device will have a pre-determined timeout before continuing its function.
Caveats and Additional Notes
A terminal implementation described as VT100 typically does not implement the full set of escape sequences. If you did require a full terminal emulator, then you could consider Hyper Access which includes an ActiveX interface. This can then be controlled from LabVIEW.
For other issues with Serial communication consult your connections, termination characters and LabVIEW VI timing. For more information please see KnowledgeBase 3VLAULIZ: Why Does My Serial Instrument Work in Hyperterminal But Not in LabVIEW or VI.
Requirements
Steps to Implement or Execute Code
Additional Information or References
VI Snippet
**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.