NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Change Locals.ContinueTesting ( at Runtime ) of Test UUTs in SequentialModel.seq

Hi,
I can modify Test UUTs local variables before I start an execution but not at runtime. I have a Visual C++ project that resembles the example in \TestStand\Examples\OperatorInterfaces\Simple MFC. I have modified the SequentialModel.seq TestUUTs sequence to not display the UUT dialog. ( skipped "PreUUT Callback" ) I skipped the PreUUT Callback so I wouldn't have to enter the UUT data every time and can rerun an execution infinitely until my program will stop it. I handle the UIMsg_BreakOnRunTimeError event and display an error box, set the Locals.ContinueTesting to false, and then resume execution. That way the next time Goto End of UUT Loop is called it will have the same effect as if I displayed the UUT dialog box and clicked cancel ( to not run another time ). I've tried numerous ways of setting the Locals.ContinueTesting variable but it seems that I can only change the local variables before I start execution. What is needed to be able to set those variables so I can exit the Test UUTs sequence? Thanks.
-G-
-G-
0 Kudos
Message 1 of 6
(3,934 Views)
Hi Grasshopper,


You should be able to set the Locals.ContinueTesting at runtime as well. My guess is you are trying to access the variable when its not in scope. ie when the execution has returned back to the process model sequence.

Try writing to a StationGlobal instead and have your process model check the state of the StationGlobal version.

Regards
Ray Farmer
Regards
Ray Farmer
Message 2 of 6
(3,933 Views)
Ray,
Your idea of using a station global works great. Thanks. Here's something else I ran into. I know the last step in my sequence and look for it when a Trace Event occurs. If the Trace Event is for that particular step then I know the sequence has completed ( not permanently, just that loop ) and I need to insert some information about the test parameters into the report. Currently, I get the execution, and then a report pointer from the execution. I then call Append using that report pointer and have the test parameter info as a string for the argument. I then continue with the execution and wait for the next time to insert text. My problem is that it appears to be doing it correctly ( returns an index from the Append ) but the inserted text isn't in the report. What else do I need to do to make it insert? Thanks.
-G-
-G-
0 Kudos
Message 3 of 6
(3,903 Views)
Hi,

Are you doing reporting on the fly?

After the TestReport called from the ProcessModel has completed the report is set with the current report string (Locals.Report) which is performed by a call to Report.Reset, which probably over writes any append you have done.

Regards
Ray Farmer
Regards
Ray Farmer
Message 4 of 6
(3,878 Views)
Okay, reporting on the fly fixes everything, well except one error I get but I'll bring it up in the next post. The Station Globals fix from before, could that be converted to a temporary global that I create when my application starts and TestStand could release when the sequence is closed? So far, I tried doing that by using the TS engine to call TemporaryGlobals and as a property object SetValBoolean with the PropOption_InsertIfMissing flag. I am trying to read that variable with FileGlobals.XXX. Is that not the proper syntax or is there something else I need to change? Thanks.
-G-
-G-
0 Kudos
Message 5 of 6
(3,842 Views)
Hi,

I haven't used the TemporaryGlobals before, but as you have to get a reference to the TemporaryGlobals by use of the Engine.TemporaryGlobals(), the Lookupstring used for the GetValBoolean would just be the variable name e.g. "MyVar" not "FileGlobals.MyVar".

Anyway FileGlobals and TemporaryGlobals are not the same.

Hope this helps

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