NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Use time () as a precondition

Solved!
Go to solution

Hi,

Does anyone know if/ how you can use the string from time() as a precondition in a sequence? My workplace has a 2 shift pattern, so for all intents, I want to use any time up to 0300 on day 2 as the same day as  0800 on day 1. I want to call a checkout sequence to run in the first test if the working day, so will use date() as a precondition as well.

 

I have tried using the val() function, but it doesn't recognise the hh:mm:ss format.

 

Thanks

0 Kudos
Message 1 of 3
(990 Views)
Solution
Accepted by topic author JamesC22

Get Date:

 

// Return Numberic:
Date(true, Locals.Year, Locals.Month, Locals.Day)

 

 

Get Time:

 

// Return Numberic:
Time(true, Locals.Hour, Locals.Minute, Locals.Second)

 

 

0 Kudos
Message 2 of 3
(964 Views)
Solution
Accepted by topic author JamesC22

That's great, thank you

0 Kudos
Message 3 of 3
(905 Views)