NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I use Runtime information in a sequence step

I am trying to use the TS.TotalTime from each step previous to a desired step in order to know how much time has expired and use it in calculations.  Is there a way to be able to set up getting this information when designing steps in a sequence before runtime?

0 Kudos
Message 1 of 7
(4,082 Views)

Hey Jim,

 

TS.TotalTime is a dynamic property, which means it's only available during execution. However, you can still create expressions which use dynamic properties as long as you know the name of the property you wish to use. Note that if you click the red checkmark next to an expression to check it for errors, it may tell you that the property could not be found. The expression will also appear in red. However, since these values will be available at runtime, the sequence should work properly.

Message 2 of 7
(4,081 Views)

I saw that when running a sequence and I did get the error when checking the post expression. 

 

I have to leave for the day, but I will try running that again first thing and reply the results to you.  Thanks!

0 Kudos
Message 3 of 7
(4,076 Views)

Daniel,

 

Will I simply be able to get the property with TS.TotalTime or will I have to refer to the ResultList array and use ResultList[step.stepindex].TS.TotalTime?

0 Kudos
Message 4 of 7
(4,060 Views)

Hey Jim,

 

You will need to get this value from the ResultList array. Here's a KnowledgeBase article which contains more detail about the various methods of getting this information: http://digital.ni.com/public.nsf/allkb/52933BCB633C8F28862576F0006BB959?OpenDocument

 

Let us know if there's anything else we can do to help!

0 Kudos
Message 5 of 7
(4,055 Views)

Daniel,

 

I found a way to make it work, but I have one last question.

 

Since there is an immediate syntax error, every time I start the sequence, I get the popup "Error exists, continue?" (basically).  Is it possible to prevent this error from appearing?

0 Kudos
Message 6 of 7
(4,053 Views)

Jim,

 

There certainly is a way. There's a #NoValidation tag that you can put in your expression which tells TestStand to not evaluate the expression for correctness. If you put this in your expression, you shouldn't see the error box. The #NoValidation tag appears at the bottom of this Help page: http://zone.ni.com/reference/en-XX/help/370052M-01/tsfundamentals/infotopics/operators_function_expr...

0 Kudos
Message 7 of 7
(4,051 Views)