Hello,
I am trying to debug a problem that I am seeing.
Basically, we have a system with a number of gpib instruments on it, that are being controlled thru LabView and TestStand.
We have drivers up and running for all the instruments, and they work okay in isolation, but when we try to run everything together we are seeing VISA hang.
The basic goal is to have a LabView Vi that runs in a loop to monitor an array of power supplies.
Simultaneously, other LabView vi's (controlled by TestStand) will read and write various instruments.
We implemented semaphores for the power supply drivers, so only one program at a time can have access to them (LabView monitor program, or TestStand) and this seems to work well.
However, it seems that whenever I do a VISA close of another instrument, while simultaneously doing VISA io to the power supplies, and the system will hang (I need to kill the LabView process to regain control).
I understand that only one program/thread should control a specific instrument at a time, but I had thought that as long as different threads were using different instruments, that they could open, read, write, and close independently (i.e. I shouldn't have to lock all gpib access when doing any gpib transactions). That appears to be the only way to prevent it from hanging, however. I am hoping to avoid adding semaphores for ~20 vi's.
So, my basic question is whether I can access different instruments from different vi's simultaneously.
I have done some reasearch, but seem to have found conflicting info.
This shows a multithreaded example, where different threads use the same interface
to talk to different instruments, it appears. This seems to indicate that
simultaneous access to the same controller is okay? They do use thread specific
gpib status indicators, though.
0340003BA7CCD71
This also suggests simultaneous visa is okay in labwindows.
This mentions that if you are using the same gpib card (which I am) then you can not do simultaneous IO to different instruments with LabView.
"As a specific example, the LabVIEW Runtime Engine has 4 threads to use to
distribute LabVIEW parallel processes by default."
I am usings LabView 7.1, VISA 3.3.1, TestStand 3.1 (but I can reproduce this using just LabView).
Thanks in advance.
Eric