From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-04-2005 10:37 AM
10-04-2005 11:11 AM
10-05-2005 11:41 AM
I've since realised the problem stems from not correctly closing each VISA session (jpg attached) Exiting LabVIEW clears the list. This came about from running a lower level VI on it's own during debug. Normally the VISA session would be closed at the level above.
The bug i'm looking for still remains.............
I'm calling a plug-in which contains VISA commands to complete a measurement from a Vector-Network-Analyser (VNA) using a plug-in architecture to support a change in instrument. The measurement sequence involves a number of calls to the plug-in, for example, for TTL trigger single-point measurement, the sequence is VISAwrite, VISAdiscard events, VISAenable event, VISAwrite, TTL Trig, VISAwait on event, VISAread stb, VISAdisable event, Data Read. For sweep measuremnts, gpib trigger etc, I call the same plug-in but select different cases from the plug-in to construct the desired sequence.
I've test harnessed all possible sequences without the plug-in reference structure, by simply chaining all the commands together in one long line....................and they all work fine. However, in my main application, if I select one sequence and run the test, all is fine, but when I switch to another sequence, i receive an error when VISA discard events executes (error -1073807346) (The given session or object is invalid).
My next step is to try opening and closing the VISA reference each time a test is requested, instead of openeing it when the software is started and closing the VISA session when the user exits.
Any further thoughts would be appreciated.
10-05-2005 01:32 PM
10-12-2005 03:59 AM
Attached is some example code for the measurement sequence. The general idea is:
discard any previous unwanted events from previous measurement(s)
Trigger measurement, and request notification that measurement has finished
wait on event (wait for measurement to complete)
discard event (as I've been notified that the measurement is complete)
read data
I've experimented with different combinations using VISAopen and VISAclosed, with the open/close both inside and outside the loop. So far all combinations result in a VISA session appearing below the bar of the resources menu shown in the .jpg posted earlier (1 entry for every iteration of the loop).
I'm using V3.0 of VISA, but I don't want to change as it may adversely effect other LabVIEW .exe applications I use on this PC.