10-08-2009 08:58 AM
I have a number of test systems that use a parallel model with labview. We have a good number of instruments(PXI).
What is the prefered method for open,closing and passing instrument handles in teststand using labview?
Solved! Go to Solution.
10-08-2009 11:24 AM
Hi,
A few ways
1 Pass back the session handle as a U32, there are some TestStand VI's i the TestStand palette that you can use to do the conversation.
2 Pass back into a LabVIEWIOControl. TestStand handles these.
3 Do something fance such as using LVGOOP and leave the handle as an object property and leave it in memory. eg dont pass it back at all.
One thing you will have to watch out for is multiple executions trying to talk to the same instrument, so you have to use some lock/unlock or synchronisation to avoid thi happening.
Regards
Ray Farmer
10-08-2009 11:30 AM
10-08-2009 03:09 PM
Hi,
I will try to put something together over the weekend to explain this . It maybe just a document or it could be a simple example.
Regards
Ray Farmer
10-08-2009 03:30 PM
I'm always trying to find the best answer to this.
First, Why pass instrument handles at all? Why not Open, do operations, Close within each step? If the answer is speed then skip to the next question. But I have benchmarked VISA, for example, and there is no time penalty for doing this. On the other hand the PXI RF instruments and some Agilent PXI instruments I have used take 1 - 6 seconds per Open, ouch.
Isn't method three similar to the NI Session Manager? Is there any reason to not use Session Manager for this?
When you use methods 1 and 2, you want to open the handles in the Process model befor the parallel threads are created and then pass a copy down to each thread, right?
cc
10-09-2009 12:35 AM
Hi dowNow,
I had forgot about the SessionManager, so that's another way. Although, you dont have to return the instrument handle but you do need to keep the Session Manager handle back in TestStand to keep it in memory.
Maybe the action of method 3 is similar to Session Manager.
Using LVGOOP, when the object is first created you would perform the initialize and the object would store the instrument session handle. When the object is destoryed, the close would be performed.
Regards
Ray Farmer
10-09-2009 09:38 AM
10-09-2009 10:03 AM
10-09-2009 10:04 AM
Hi,
No, Below is a bit from the Session Manager Help
Currently, Session Manager supports the following instrument session types:
Regards
Ray Farmer
10-09-2009 10:16 AM
Juergen,
Sorry, I am getting my OOPs mixed up.
There's GOOP which is a toolkit by ENDEVO, try here for a trial download
http://www.flander.com/English/Endevo/Products/GoopDevSuite/tabid/8080/language/en-US/Default.aspx
and now LabVIEW comes with it's own OOP called LVOOP. do a search on the NI website for LVOOP
Hope this helps
Regards
Ray