From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Reading Teststand Variable values dynamically in a loop in LABVIEW

Hi,
I'm using some Variables(StationGlobals) in Teststand and i'm reading those in LABVIEW (using ActiveX "Sequence Context and Property object")in a while loop.Since my variables needs to be updated dynamically,i'm following this procedure,but still want to know, is there any optimized way to handle this situation.

Regards
Murralidaran
0 Kudos
Message 1 of 4
(3,469 Views)
Murralidaran,

Could you please describe your application in a bit more detail?  Are you using array variables, container variables, or primitive variables?  If each variable is a separate entity of the station globals, then you would have to manually traverse each item.  However, for arrays you can acquire an array data type from the Get Property Value.vi and use LabVIEW's array manipulation tools to quickly update the contents of the array.

If you describe your set of variables in some more detail, I may be able to offer a more detailed explanation.

Thanks,

Tyler T.
0 Kudos
Message 2 of 4
(3,449 Views)
Hi,

Thanks for reply...
The variables i'm using are numeric ,so i had created "Number"datatype.My application is that i had written a Teststand(TS) Script(set of commands) where i will be providing different values to a particular variable in different steps of sequence.This varible is passed to a LABVIEW(LV) program where it reads continuously and for data handling from TS to LV where  i'm using ActiveX property continuously in loop.

Just i wanted to know if there are any other better ways to handle this..as variable updation is done through Stationglobals of TS and Activex in LV..Data updation may not happen sometimes at the desired instant of time..

One more question is that.. Is there any specified inter-step delay in TS(the reason for this question is..my application is time critical(a loop is expected to run at every 10 ms) and if such say any of kind of delay is there,then it may affect my application..

Cheers
Murralidaran
0 Kudos
Message 3 of 4
(3,442 Views)
Murralidaran,

It sounds like you are reading the variables properly.  StationGlobals are held in a file (StationGlobals.ini), so changing the StationGlobal variables will update the file.  I'm not quite sure if there would be any delay because the file write does not occur immediately (there is a copy held in memory), but you may want to compare the StationGlobals versus the FileGlobals or Locals.

There are no interstep delays.  The delay would only occur if you have Tracing enabled.  Go to Configure -> Station Options.  Under Execution, disable tracing to make sure you have the fastest possible execution speed.

Regards,

Tyler T
0 Kudos
Message 4 of 4
(3,425 Views)