04-30-2009 05:28 PM
I am using TestStand 4.1.1 and Labview 8.6. I coded a VI with the "Elapsed Time" express VI. The "Set Start Time (s)" input is set to 0 so it should use the current time. The delay is set to 0.5s or longer by setting the input "Time Target (s)". I can loop the VI in Labview and it works fine every time. When I run it as a test in test stand it will run correctly the first time and fail every time after that. I changed the Time Target (s) input to as long as 10s and the same occurs. I opened it through Teststand set the input to 10s and it did not wait 10 sec, I would guess only a fraction of a second. When I replace the "Elapsed time" VI with the time delay VI it works fine.
The problem I see it that it works differently in Labview standalone vs. when run with Teststand. It appears to keep the current time variable in memory if run in Teststand but resets it each time it is run in Labview. Is this intended behaviour?
The fix I mentioned above using the time delay works fine for me for now.
05-01-2009 09:06 AM
Steve,
You are correct and this is expected behavior. Because the VI is not being released from memory when run in TestStand, as opposed to when run in LabVIEW, the Elapsed Time VI will behave differently. Try wiring a boolean "true" to the Auto Reset input of the Elapsed Time.
Regards,
Steven Zittrower
Applications Engineer
National Instruments
05-01-2009 10:08 AM
Steve,
For even more information on this issue and screenshots of a workaround please look at this KnowledgeBase article: Using the Elapsed Time Express VI in LabVIEW 8.0 (and Higher).
Regards,
Steven Zittrower
Applications Engineer
National Instruments
10-22-2010 12:50 AM
Hello,
I am facing exactly the same problem as described when using Elapsed Time with TestStand.
However, the application, I think "Elapsed Time" should be used for, is for measuring time which has passed between two calls.
So as a pure time delay it is like breaking a fly on the wheel.
Unfortunately the article in the post before does not solve the problem for 2 following TestStand calls of Elapsed Time.
With the second call the time is not reset and "Time has elapsed" is set too quick to TRUE and the loop is stopped.
I have found another way to work around this but I am now concerned whether I am not risking to loose system resources in particular memory.
I have placed before every call of my "Elapsed Time VI" in TestStand a TestStand step based on "Run VI asynchronously" linked to my "Elapsed Time VI". This makes sure that for every call a separate memory space is used.
Now the time measurement works fine.
My question now:
Is this a valid solution or is this dangerous and might cause instability due to memory leaks or similar?
Thanks a lot for your reply
Best Regards,
Carsten