NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Measurement Value in Teststand Report Do Not Update When There is a Runtime Error

Hello everyone, 

 

I met a problem here when executing my sequence.

In the string limit test, I found that whenever there is a run time error happens in the VI, the measurement value will grab previously passed measurement value instead of a blank.

 

The example i have attached here can explain my scenario.

The sequence file executes two steps. 

1. Get user input for a string value-parameters.ABC. (parameters.ABC will become the string value limit for step 2)

2. In a VI, read the text file and get the text read to be a measurement value-parameters.XYZ to be compared with the string value limit obtained in step 1.

 

In the VI, i have set the location of the text file(Hello.txt) to be read and place Hello.txt in the said location.

The text file consist of a word "Hello". If i run the sequence file and key in "Hello" in the user response pop up message, the test sequence passed since the test limit and measured value is both "Hello".

Next, i try to simulate the scenario that annoyed me. I moved the text file to somewhere else. Others settings remained the same. I was then run the sequence file again. This time i get an error (please refer to Picture.png) because my VI couldn't find the text file. Nothing was get from the VI.

Theoritically I should get an empty string as my measurement value. However, i didn't get an empty string, instead i get a "Hello" in my report log as indicated in the Picture.png.

 

Why would this happenned? Can anyone please advise on this? Thanks a lot.

 

 

Download All
0 Kudos
Message 1 of 5
(2,826 Views)

Hi, 

 

One thing you could try is to set the unload options in step settings (under Run Options) to be "unload when sequence file is unloaded." Otherwise, you can programmatically unload all modules with RunState.Engine.UnloadAllModules() in an expression.

 

I noticed that if I unloaded the module between executions, the "Hello" didn't show up if there was an error. 

 

0 Kudos
Message 2 of 5
(2,783 Views)

Hi Roxana,

 

Thanks for your reply. 

I have tried both solutions that you have provided but doesn't seems work.

The condition can be reproduced by first purposely let the first UUT test passed. 

Then purposely create a runtime error and let the next UUT encountered error.

 

However, after trying both method, i can still see the hello there.

 

XJ

0 Kudos
Message 3 of 5
(2,780 Views)

After some more investigating, the behavior that you are seeing is expected because you have "Optimize Non-Reenterant Calls to this Sequence" option checked in the Sequence Properties. From the Help, "TestStand initializes the values of custom step properties in the sequence the first time it calls the sequence in an execution. TestStand reuses the values of the custom step properties when it calls the sequence again." If you disable this option, "TestStand initializes a new copy of each custom step property in a sequence each time it calls the sequence. TestStand performs this initialization so the sequence always begins executing with the initial property values the steps in the sequence specify." 

 

I tested this out with your sequence, and disabling this option took care of the issue that you were seeing. 

 

Thanks

0 Kudos
Message 4 of 5
(2,758 Views)

Hi Roxana,

 

Thank you for your reply.

The measurement value in the TestStand report doesn't show the previous passed step measurement anymore but an empty string(which is what i want).

You have solved my problem but i have noticed another problem.

 

I found that if i set to "ignore runtime error" at the run options, my test sequence passed. 

Which means when the sequence encountered the runtime error, it does not continue to execute the test step, it ignore the runtime error and give a passed. (please refer to attached picture)

 

I am expecting it to compare my test step string value limit with the empty string i get.

Could you please advise whether it is possible?

 

Thank you.

XJ

0 Kudos
Message 5 of 5
(2,727 Views)