NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

To Passing image from Teststand to simple GU

Dear All:I'm having a problem of getting the vision image from Teststand to simple IO GUI. 

One of the step of the Teststand sequence is to snap a photo from the cam and process the matching,

And I store it in the teststand local variable (Type:LabviewIOcontrol)So I can use that in other steps,

that works fine. But how could I get the Teststand image variable from the Labview simple IO GUI??

 

 (I understand how to transferring string, number, or array between Teststand and Labview by using UI-MSG.  just have no idea how to deal with object reference to get the image data I need to display in the GUI) 

 

Any example or idea will be really helpful for me. 

Thanks. 

Eric

Message Edited by EricLu on 10-09-2008 02:51 AM
0 Kudos
Message 1 of 5
(3,422 Views)

Hi

 

Maybe this example will help - http://zone.ni.com/devzone/cda/epd/p/id/2408

 

Regards

Ray Farmer

Regards
Ray Farmer
Message 2 of 5
(3,418 Views)

HI, Thanks for your example. but it's not the solution i need.

 

The example that you gave me, the VI get the Sequence Context from Teststand when Teststand call that VI.

What I need is: To get the vision image from function vi and pass it to Labiview GUI.

Interface as :  Labview GUI -> Teststand -> function vi

 

I have tried to use UIMsg to get the sequence reference, just don't know how to change the "Labview IO control(including a device number and session number)" Type to the "Vision Image" Type I need.

 

Or I have to save the image as the number array once i get hte image and then do the transfering things??

If so,what we use the Teststand type"labview IO control" for?  @@??

 

Thanks for  you reply. 🙂 

 

Best Regards, 

Eric

0 Kudos
Message 3 of 5
(3,356 Views)

Hello Eric,

 

    Is it possible that you show us how you store image in LabVIEWIOControl? Maybe we can examime the way you implement

    and think a way to transfer the image to LabVIEW GUI. As you can see from the TestStand Help, the LabVIEWIOControl is used

    to store some I/O controls with two elements, Device Name and Session Number. And for image type, how did you store in

    LabVIEWIOControl ? 

I/O Controls

 

Some of the LabVIEW I/O controls are represented as clusters with two elements, Device Name and Session Number. You can specify either a device name or a session number. The session number will always be used if it is not zero. The session number can be used in other development environments, such as LabWindows/CVI, as long as they are in the same process. You can use the TestStand data type, LabVIEWIOControl, to create variables for I/O controls.

The following I/O control references are represented this way: VISA, IVI, FieldPoint, Motion, DAQmx Task Name, and DAQmx Channel Name.

 

 

     Another way you may try is to store the "image reference out" as string data type. As you can see from the following figures, first we store the

     "image reference out" as string. And in second figure we use this string to get the image. Once the image is represented by string, you can pass

     the string to LabVIEW GUI easily.

 

Download All
0 Kudos
Message 4 of 5
(3,332 Views)
Dear Sir: 

Hi, In fact I am just new in teststand, and the reason I use LabviewIOcontrol as image type.

Because when i output the image, the teststand display the type is LabviewIOcontrol .

I did a test that I create a sequence file with 2 steps in it.

The first step, the vi reads a vision image from file and store it to teststand local variable (Type: IabviewIOcontrol).

And the second step, I dump the local variable to an indicator within another VI and check the image are transferred or not.

It works well, just I don't know how to change the Device Name and Session Number  to image in Labview..... 

 

I think I will take your second advice to build up the function first and try to find out the solution later on...

  

Thanks for your help. 

 

Best Regards,

 

Eric
Message Edited by EricLu on 10-26-2008 09:55 PM
0 Kudos
Message 5 of 5
(3,322 Views)