NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read the current values from StationResults

Hello,
i´m using the simple-Labview which is included in TestStand with some modified parts.
For example i added four indicators which display:

StationGlobals.StationResults.NumberOfTestsTotal
StationGlobals.StationResults.NumberOfTests
StationGlobals.StationResults.NumberOfTestsFAIL
StationGlobals.StationResults.NumberOfTestsPASS

Then i added a button which resets the last three values to 0 in the UI and also in the StationGlobals.
When i then start a testrun after resetting the values, then i always read old values from the last three values.
1. resetting the globals to 0
2. Execute a test with result PASS -> all indicators are still 0
3. Execute a test with result FAIL -> indicator NumberOfTestsPASS goes on 1

The displayed value NumberOfTestsTotal is always correct and counts upo. Only the resetted values are one value "behind".

So my question is: Is there a command that makes teststand to write the StationGlobals so that i can read the correct value?

Thanks for all help
0 Kudos
Message 1 of 6
(3,565 Views)
I reset the StationGlobals.StationResults.* with the ApplicationManager-Reference with the attached Subvi (this is called three times for each variable).
Is there perhaps a problem inside this subvi?
Then i update my indiciators whith a thread-call (see screenshot update.jpg) which is executed in the model after the Mainsequence-callback.
Is this position perhaps the problem?
Thanks for any idea/help.

Download All
Message 2 of 6
(3,542 Views)
Hi,

i would suggest you NOT to uses global dataspaces tpo transmit data from the TS execution to the User Interface. There is a mechanism available since TS 3.0 which you are using already. This mechanism is the UIMessage Queue which is managed by the manager controls.
You can create and send UIMessages in your sequence by using the PostUIMessageEx-command from the thread-class. In you UI, you have to implement a function if you want to react on a special message (custom UIMessage). If you want to use a standard UIMessage, make sure that they are properly connected to visible controls by the the manager controls.

In your case, there is no default message so you have to implement a custom UIMessage.
I advise you to send the UIMessage from the processmodel since it is not known until the end of your client sequence what the result will look like.

hope this helps,
Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 3 of 6
(3,511 Views)

Hi OnlyOne,

Dont know if you have sorted this problem out yet.

But if you haven't, In you lookup strings you will need to remove the "StationGlobal." from the string because you already have a reference from the StationGlobals.

You only use the full string as in you JPG when you use the SequenceContext reference.

 

Regards

Ray

Regards
Ray Farmer
0 Kudos
Message 4 of 6
(3,473 Views)
Hi Ray,
i solved my problem by calling the thread-call at another position.

The lookupstring that you mentioned needs to be full-string because i use the SequenceContext-reference. I tried to remove the "StationGlobal." but then its not working anymore.
0 Kudos
Message 5 of 6
(3,449 Views)

Hi,

Glad to hear you have sorted your problem out.Smiley Happy.

You are right about the SequenceContext. Had another look at the JPG you attached and saw the SequenceContext reference.

It was the attached VI that made me suggest removing the StationGlobals from the string as this has an Engine.Globals api call which would of returned a StationGlobals reference. I had assumed the VI was the one being used in the JPG without really studying the picture.

Regards

Ray

Regards
Ray Farmer
0 Kudos
Message 6 of 6
(3,438 Views)