Example Code

Duplicate VISA Sessions - Serial Example

Code and Documents


The attached example shows how to take advantage of duplicate VISA sessions in LabVIEW. By default, if you attempt to open multiple VISA sessions to a device - a serial port in this case - LabVIEW knows you have one session already open and uses that session in all other cases. However, the attached example shows how to override this feature.

The example also shows how to implement a routine that would handle VISA Reads in one thread and VISA Writes in another.

Finally, this example also shows one implementation of the VISA Serial Character Event.

For the example to run successfully, attach your serial cable and place jumpers according to the tutorial linked below.

Related Links:
How To Do A Serial Loopback Test

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