NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Station Globals modified externally are not reflected

Hi,

 

I am having an UI developed in CVI(EXE1) which runs a teststand sequence. The flow of sequence is controlled by Station Globals.

 

The Station Globals i am trying to control from another user interface so that the flow in EXE1 will be exrcised. But some reason the updated station globals are not reflected in EXE1.

In the sequence i have used Engine.ReloadGloabls() but some reason the values are not reflected.

 

Anyone can help me out on this.

0 Kudos
Message 1 of 4
(2,800 Views)

Hey ramjeev,

 

Are you certain that the globals are being saved from the location you edited them before you call the Engine.ReloadGlobals()? Also, as mentioned in the function help here, you should clear or destroy your existing references to the globals before calling the ReloadGlobals() method. This is because any existing references will retain their values rather than being updated with the method call.

 

However, I'm not sure if this is the best approach for your application. Typically, Station Globals are used for configuration settings, particularly those that need to persist between executions. Since you're wanting to control this test sequence from another user interface, I wonder if UIMessages or a synchronization object such as a queue or notifier would be better for this purpose. Have you explored any of these options?

Daniel E.
TestStand Staff Product Support Engineer
National Instruments
CTA/CLD
0 Kudos
Message 2 of 4
(2,793 Views)

Daniel E,

 

Thank you for your response.

 

The main application reads status of some switches present on Automated Test Equipment(ATE) and stores them in station global variables so that the values are visible for all the threads running in a Batch execution. 

 

Coming to the other application which is updating the values, this is to mimic the behaviour of the station so that i can have the updated values in my staiton globals that enables me to excersise the sequence before actually going for integration with the ATE.

 

regards,

Ramjee

0 Kudos
Message 3 of 4
(2,784 Views)

Though you didn't specify, I'm assuming you are modifying the globals in a different process than the one you want to use them. If so, you need to make sure you save the globals first before doing ReloadGlobals(). So in the process modifying the globals you will need to do the following:

 

Engine.GlobalsFile.IncChangeCount(),

Engine.CommitGlobalsToDisk()

 

-Doug

0 Kudos
Message 4 of 4
(2,770 Views)