From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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 3
(3,200 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 3
(3,147 Views)
Solution
Accepted by topic author 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 3
(3,124 Views)