NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get TS.StartTime from Post Step Callback

Solved!
Go to solution

Hi,

How can I get calling step "start time" in "post step callback"?

I'm trying with: RunState.Caller.Locals.ResultList[Runstate.CallingStep.StepIndex].TS.StartTime

but it is not working. Do I need to change this expression completely or it is just a matter of interfaces in Caller/Locals?

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
0 Kudos
Message 1 of 3
(2,645 Views)
Solution
Accepted by topic author bienieck

Hi Michał,

 

I'm not completely sure you can access TS.StartTime for the current step in the Post-Step callback, as the resultlist array element hasn't been populated at that point (TS 2014 - Step Execution)...

 

I think you might have to access it using the SequenceFilePostResultListEntry callback, using the following expression:

 

Parameters.Result.TS.StartTime

I hope this helps,

 

Charlie Rodway | Principal Software Engineer | Certified TestStand Architect (CTA)

Computer Controlled Solutions Ltd | NI Silver Alliance Partner | GDevCon#1 Sponsor

Message 2 of 3
(2,626 Views)

The error is expected behavior. The step's result has not yet been transferred to the ResultList. Reference to the step execution help entry:

StepExecution.PNG

 

You are acting on action number 21 while the result of the step is transferred to ResultList in action number 34.

Move your code to the Post ResultList Entry callback (action number 35) and it should work.

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