NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand Label Control to Labview String Indicator

Solved!
Go to solution

Hello Community,

 

I am using TestStand 2016 32-bit & Labview 2016 32-bit

 

  1. I created a TSUI.ILabel in the "TestStand Simple UI Dependencies.lvlib:Teststand UI Data.ctl" Type Def, while using the TestStand Simple UI in Labview.
  2. On the Front Panel I created a TestStand UI Label Control
  3. On the Block Diagram I designed my code to have the label control connect to the CaptionSource_UserName of the Application Manager ConnectCaption

Now when a user logs into the TestStand Simple UI I can see the users name show up in the Label Control as "User: Bob". Since this is a TestStand Label Control being used in Labview, the type is a Variant. I tried using a Property Node to read the value in the Label, but I can not. I tried Variant to Data and Variant to Flatten String. Maybe I am not going about it correctly.

 

Is there a way to get convert "User: Bob" into a String? or is there a way I can test that a user is logged in or logged out?

 

Thank you

 

Download All
0 Kudos
Message 1 of 4
(3,561 Views)

How to convert a TestStand Label Control to a String in Labview?

I am trying to get the logged in User Name from the TestStand GUI into a Labview String.

0 Kudos
Message 2 of 4
(3,508 Views)
Solution
Accepted by MechUnit

In my TestStand UI, I have a User Changes Event.  From there, it's Application Manager -> GetEngine then IEngine.CurrentUser.LoginName

You may also want to check for error code 97, which would mean that a user isn't logged in.

 

Pulido Technologies LLC

 

 

Message 3 of 4
(3,485 Views)

To retrieve execution information in the form of a string, I use a "Label" indicator, then I create a local variable connected to the Caption property.

 

 

Label.JPG

0 Kudos
Message 4 of 4
(247 Views)