NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing IMAQdx Session from Sequence Context

We are storing an IMAQdx Session in a TestStand Global variable which we pass successfully to and from LabVIEW VIs using IMAQdx I/O controls. 

We also want to access the  IMAQdx Session from the Sequence Context (the reason for this is a long story involving sub panels).  The TestStand - Get Property Value.vi doesn't provide a way to select reading a IMAQdx I/O control data type, but we can read the Device Name and Session Number individually.  That is how we handle getting an Image Ref from the sequence context.  In the Image ref case, we use two calls to the TestStand - Get Property Value.vi to get the Device Name string and the Session Number number, bundle those into a cluster, and then use the magical IMAQ Image Cluster to Image Datatype.vi to convert the cluster to an IMAQ Image datatype - this works fine.  We have not been able to find an analagous magical VI to convert our IMAQdx I/O Device Name and Session Number cluster into a datatype that the IMAQdx Snap.vi will accept as an input.

How can we access the IMAQdx I/O session from the sequence context and coerce it into a form that IMAQdx Snap.vi will accept?

See attached LabVIEW snippet.

Thanks,
Hans
0 Kudos
Message 1 of 5
(3,981 Views)
Hi Hans,

Do you currently get an error message or does it just not work?  If you get an error message, what is the error number and message?
0 Kudos
Message 2 of 5
(3,960 Views)
Hi Terry,

Sorry for the delay, I've been on holiday.  I am getting an error out of the Variant To Data vi. It's error # 91 - LabVIEW:  The data type of the variant is not compatible with the data type wired to the type input.

Hans
0 Kudos
Message 3 of 5
(3,915 Views)
Hello Hans,

One possible reason for why this is not working is that you are trying to convert a cluster to an I/O session, which I do not believe are compatible.  Instead of sending both the Device Name and Session Number, you might want to try starting out by just sending the device name (i.e. “cam0”) property value through to the IMAQdx Snap vi using flatten and unflatten string functions to see if this will give a working application.  I have attached a snapshot of how this would look.  Please let us know if you would like further clarification or assistance.  I hope this helps.

Best regards,

Vu D
Applications Engineer

Message 4 of 5
(3,898 Views)
Vu,
I am working with Hans on this application. I just tried your suggestion and it seems to snap fine by feeding only the name. So apparently the number is not used in the IOsession cluster? Thanks for the input.

David Jenkinson
0 Kudos
Message 5 of 5
(3,887 Views)