Example Code

VISA Serial Events

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.

    Driver

  • NI-VISA

Code and Documents

Attachment

Description

This example uses the VISA Event Serial Character (0x3FFF2035) to detect when a character is received at the serial port.
It sends a string with VISA Write and then waits for a response, with VISA Wait On Event, and reads a given number of characters.

To use this example open the attached VI, and then select the VISA Resource Name, Number of Bytes to Read and Write Buffer, and then run the VI. 

For more Serial examples please see the related resources or the LabVIEW Example Finder. To navigate to the LabVIEW example finder open LabVIEW and select Help>>Find Examples. The Example Finder window will open, from there you can open Hardware Input and Output >> Serial to find additional Serial examples. 

 

Related Resources

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.