Opening and Closing VISA Session During TestStand Sequence

Updated Jul 12, 2018

Reported In

Software

  • TestStand

Driver

  • NI-VISA

Issue Details

I am using TestStand to call code modules that use the NI-VISA API. Should I open the VISA reference at the beginning of my test sequence and close at the end, or should I open and close in every VI that I run?

Solution

It is fine to open the reference to your VISA instrument only once at the beginning of your TestStand sequence, and close it at the end.

Additional Information

In order to make sure subsequent VISA commands are communicating with the same instrument, the VISA reference must be passed from the action step that opened the reference to each subsequent action step, including the one that contains VISA Close.This can be done by making the VISA reference a parameter, and then saving it to a variable within TestStand. 

WAS THIS ARTICLE HELPFUL?

Not Helpful