NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Log the start time of each step to database

Hello,

 

i want to log the start time of each step to my sql datatbase. With the UUT start time it works (Str(Logging.StartDate.Month) + "-" + Str(Logging.StartDate.MonthDay) + "-" + Str(Logging.StartDate.Year) + " " + Str(Logging.StartTime.Hours) + ":" + Str(Logging.StartTime.Minutes) + ":" + Str(Logging.StartTime.Seconds)).

 

But how can i make it with the start time of the steps?

 

greetings

 

schwede

 

TS 3.0

0 Kudos
Message 1 of 11
(7,343 Views)

Hello Schwede,

 

you could check the following thread for some information how to get the step time duration, etc. with TestStand: http://forums.ni.com/ni/board/message?board.id=330&message.id=16146&requireLogin=False 

 

I hope this information helps.

 

Best regards,

 

Blase 

0 Kudos
Message 2 of 11
(7,327 Views)

Hello Blase,

 

thankyou, but this didn`t help. If i use this i must change every sequence (and step!). Smiley Surprised

 

I need an expression for the database option.

 

greetings

 

schwede

0 Kudos
Message 3 of 11
(7,325 Views)

 Hello,

you can get the the information from the

Logging.StepResult.TS.StartTime parameter.

 

i.e. copy the MODULE_TIME (included in the STEP_RESULTS) and paste it. Change the expression to Logging.StepResult.TS.StartTime

 

i hope this helps

 

Tobias

Message 4 of 11
(7,316 Views)

Hello,

 

how can I convert this informationen to datetime (like this: (Str(Logging.StartDate.Month) + "-" + Str(Logging.StartDate.MonthDay) + "-" + Str(Logging.StartDate.Year) + " " + Str(Logging.StartTime.Hours) + ":" + Str(Logging.StartTime.Minutes) + ":" + Str(Logging.StartTime.Seconds))?

 

thanks

 

schwede

0 Kudos
Message 5 of 11
(7,251 Views)
Hello Schwede,
 
Depending on how you want to interpret the data, there are a couple of ways this can be accomplished.  One way to do this is to use the Date() and Time() Functions as Pre-Expressions for each step that you would like the time information, after you have acquired this information you can save it to a local variable and then have it retrieved in the additional results section (the addition results section can only be found in TestStand 4.1).  If you are using TestStand 4.1, I have included an example below that demonstrates this idea.  The report will show the Date(month, day, and year) and Time(hours, minutes, seconds, and milliseconds).
 
The second place this can be found is in the ResultsList.   TestStand saves the time that a step begins execution (Locals.ResultsList[step index].TS.StartTime) as well as the total step execution time Local.ResultsList[step index].TS.TotalTime) in the TS container.  It should be noted that the StartTime is the time at which the step began executing; more specifically, the number of seconds since the TestStand Engine initialized.

A_Ryan
AES
National Instruments
Message 6 of 11
(7,143 Views)

Sorry,

 

but this is no solution. look at my answer before.

 

greetings schwede

0 Kudos
Message 7 of 11
(7,015 Views)

Schwede,

 

see attached Sequencefile for an example what Ryan is talking about.

We use Additional Results to transfer the Timestamps to the ResultList (which is the origin for "Logging" ). You can include the Locals.StepDate, Locals.StepTime with other methods as well to the ResultList. I used the PostExpression of the last Statement to draft this.

 

hope this helps,

Norbert 

 

[EDIT] PS: The SequenceFile is created in TS 4.1

Message Edited by Norbert B on 02-18-2009 07:37 AM
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 8 of 11
(7,008 Views)

Is there a way to creat one PreStep and PostStep func that that Test Stand executes for all the steps in a Seq?

Then StepStartTime and StepStopTime can be recorded in the Step data?

 

Thanks

 

0 Kudos
Message 9 of 11
(6,850 Views)

So I must modify all my sequences and steps. That is not the solution for me.

 

I use TS 3.0.

 

 

Message 10 of 11
(6,753 Views)