NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

replace teststand function like Seconds()

From reviewing the help pages and the discussion forum, I am pretty confident this is not possible, but thought I would give it a shot.
 
We have developed quite a bit of TestStand sequence code, and we access the Seconds() function call quite a bit for various reasons.  Of course this returns the PC's system time.  Unfortunately, now we have the new need to obtain the time from an IRIG card installed on the PC.  If the card is not installed, then we need to default to the PC's system time.
 
The optimal solution is to somehow replace the Seconds() functionality with our own functionality.
Next best solution would be to create a new function, say "OurVeryOwnSeconds()", that would implement our own functionality.
Worst would be to have to create a local, have a new step that calls our functionality to get the time, and then use the local in place of the Seconds() call in all the steps we have.  I haven't taken a count, but I believe we use Seconds() in hundreds and hundreds of places.  It obviously would be painful to perform this last option.
 
Any suggestions?  Thanks in advance for any ideas.
0 Kudos
Message 1 of 4
(3,401 Views)
Unfortunately, there is no way to customize the expressions provided with TestStand.  You will have to call a code module to provide the neccesary cusomizations.  If the sequence contains hundreds of such expressions, you may want to create a tool that automatically inserts such a step in the proper place.  However, due to the nature of expressions being in multiple places (especially places that a step cannot be inserted), it may be best to use the Find/Replace to do this manually.

Allen P.
NI
0 Kudos
Message 2 of 4
(3,388 Views)
As workaround : Wouldn't it be possible to use a program which synchronizes the PC's system time to the time of the IRIG card ?
0 Kudos
Message 3 of 4
(3,367 Views)
Thanks for the reply.  We were doing exactly that, but then found out that some 3rd-party software running on the PC that is critical to our applications depends on various timers that are tied to the PC system clock.  Changing the PC system clock which this software is running causes very bad results.
0 Kudos
Message 4 of 4
(3,357 Views)