NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

From CVI, how do I get the fields from TestStand's UUT Information dialog box?

I want those four fields in my C code:

1. UUT Serial Number
2. UUT Part No.
3. Hardware revision
4. Operator ID
0 Kudos
Message 1 of 6
(3,001 Views)
Hi,

You can get the UUT Serial Number by accessing Runstate.Root.Locals.UUT.SerialNumber. ( see http://zone.ni.com/devzone/conceptd.nsf/webmain/2D6A74EF47D34B4F8625683900712517 ).

The Operator ID you can obtain from StationGlobals.TS.CurrentUser.LoginName.

As for the other two items they do not exist with the default TestStand environment.

Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 2 of 6
(3,001 Views)
I can't access the other two items? That's a lame dialog box.

Is there a way I can suppress it? If so, I'll just create my own more useful dialog box from CVI.
0 Kudos
Message 3 of 6
(3,001 Views)
Bmihura,

I'm sorry you feel that the dialog box is "lame". The reason you cannot access those other two items is because they do not exist by default, as Ray stated in his response. If you would like to create your own dialog box, you can do so and add two fields to prompt the user for the hardware revision and the part number. Then simply add two local variables to your process model to hold the resultant values of the hardware revision and the part number. Then later in your CVI code, if you want to access those fields, you can use the property path of "RunState.Root.Locals.UUT.PartNumber" and "RunState.Root.Locals.UUT.HardwareRevision" assuming that you create those two variables within the UUT container.

This dialog box does not prompt for
those values by default simply because there are many different types of users who need different information. If we were to create a dialog box that had all the potential fields that every customer might use, the dialog would become rather large and not useful to the majority of our customers. Instead, we chose to only add the basic information to the dialog box. As with most components of TestStand, if this out-of-the-box component does not fit your needs, you can always customize this as I stated above.

I hope this helps your development within TestStand.

Regards,
Shannon R
Applications Engineer
National Instruments
0 Kudos
Message 4 of 6
(3,001 Views)
Ah ha! I thought those two fields were standard to TestStand, but they must be just on my computer.

Those two fields *are* showing up in my "UUT Information" dialog box, so I apparently just need to figure out their "RunState.Root.Locals.UUT" variable names.
0 Kudos
Message 5 of 6
(3,001 Views)
Hi,

As Shannon has said, if they are part of the UUT container, then to access them you would use the lookup string
RunState.Root.Locals.UUT.PartNumber
and
RunState.Root.Locals.UUT.HardwareRevision

Hope this helps
Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 6 of 6
(3,001 Views)