06-22-2023 04:48 AM
06-22-2023 05:01 AM
Hi GerdW,
thank you a lot, that totally makes sense. My only trouble left is, that if the measurement finishes and I start another measurement, the elapsed time from the timer in the SubVI still does not get reset to 0 and therefore the second measurement does not execute correctly. Can i reset the timer each time the subvi is called?
06-22-2023 05:24 AM
Hi Sentec,
@SentecDE wrote:
Can i reset the timer each time the subvi is called?
Yes, sure.
Either reset the ElapsedTime ExpressVI in the first iteration of your subVI loop.
Or use your own ElapsedTime routine by using two GetTime functions and subtracting their values...
06-22-2023 07:46 AM - edited 06-22-2023 07:48 AM
06-26-2023 02:32 AM
Dear GerdW,
thank you a lot for your suggestion, it works fine, apart from one problem: as the "High Resolution Relative Seconds" placed outside of the loop is (I suppose) executed with the start of the program the difference between the two "Relative Seconds"-VIs calculated in the loop includes the timespan between executing the SubVI and starting the actual measurement. And although this are only several ms, it actually makes a difference of several percent for short measuring times (The longer the measuring time, the more it evens out).
Is there any possibility to get the exact time when the loop is started?
Best regards
Sentec
06-26-2023 02:39 AM
Hi Sentec,
@SentecDE wrote:
Is there any possibility to get the exact time when the loop is started?
Yes. All you need to do is to ensure proper DATAFLOW… 😄
In my user.library I have versions of those timing functions with additional error IO connectors, so I can easily enforce dataflow using the error wires. Then you read the HighRes timestamp right before the loop starts…
(Another option is to draw a flat sequence frame around that function and wire the error wire across that frame. When you do so: select the frame and create a subVI from it, then save the resulting VI to your user.lib…)