NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Teststand expression, Test() example

Solved!
Go to solution

This sounds like such a simple question...

But the documentation on Teststand is quite brief.

 

I cannot find a single example on how to use the Time() function as part of an 'expression' with non default parameters.

 

I want to store the "timeStanpInSeconds" value (Parameter #6).

 

Do I have to add a value for every single parameter when I run this function?

 

Thanks

0 Kudos
Message 1 of 5
(3,103 Views)
Solution
Accepted by topic author SetecTestDept

That parameter is not something that the function will return.  It's something you give to the function.  As far as I understand it you can throw a large number in there and it will tell you how many seconds are in the number if the number were converted to a timestamp.  So you should know what that number is before you pass it to the function.

Time(True,0,0,Locals.Seconds,0,Seconds(True))

Time(True,0,0,Locals.Seconds,0,123213211)

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 5
(3,063 Views)

A better way to say it is:

Time(True,Locals.Minutes,Locals.Hours,Locals.Seconds, 0, 12341234) will always yield 10:07:19

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 3 of 5
(3,062 Views)

OK, thanks for that... however the expression text/help (Teststand expression browser) is quite, actually COMPLETELY misleading:

 

Within the Time menu

Time()     Get the current time

 

Within it's description

Time()

This function returns the current time

Parameter 1: An optional...

...

Returns: A string containing the current time in localized format

0 Kudos
Message 4 of 5
(3,046 Views)

It will return the current time if you don't put parameters in for parameter 6.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 5 of 5
(3,030 Views)