How to Obtain Current Time in TestStand?

Updated Dec 25, 2024

Environment

Software

  • TestStand

TestStand is NI's test management software, commonly used in validation and production tests. Test engineers often wish to include custom timing information in the test report to make it more insightful. In this article, we will guide you on how to obtain the current time of TestStand.

TestStand comes with three built-in Time functions: Date(), Time(), and Seconds(). We should use the Time() function to get the current time. You may perform the following instructions to save the current time as a local variable and display it using a message popup, from scratch:

  1. Launch TestStand
  2. Create a new sequence file by File>>New>>Sequence File
  3. Create a new local variable by right-clicking and select Insert Local>>String
    2024-12-25_13h04_26.png
  4. The default name of the local variable is local. For this article's demonstration purpose, the local variable will be named as CurrentTime.
  5. In MainSequence, insert a Statement with the following as the Expression:
    Locals.CurrentTime=Time() 

     

  6. In MainSequence, insert a Message Popup with the following as the Message Expression in the Text and Button tab of its Step Properties:
    Locals.CurrentTime

  7. You may run the sequence file now to observe a popup message appear while displaying the current time.