11-25-2021 01:40 AM
Hello.
I want to make a list of when the while loop starts, but I've been thinking about it for hours because I don't know how to do it.
repeat start time
0 00:00:00
1 00:00:05
2 00:00:10
3 00:00:15
4 00:00:20
I attached my failures.
If you can help me, I will be very delighted.
Thank you!
Solved! Go to Solution.
11-25-2021 02:52 AM
What do you want to do with this information. Just display it on the screen, log it to file, or something else?
You were pretty much there unless I misunderstood something. I have attached an amendment which shows the iteration number next to each time stamp.
Something to note is that building an array inside of a loop which potentially runs forever is asking for trouble because eventually your array will get so big you run out of memory. If you are going to do something like this in anger I would definitely limit the size of your array so that you don't run out of memory
11-25-2021 02:53 AM
You need to explain in detail what you want to achieve. A list of what?
Also: your loop starts only once and never stops, so there is only one start time.
11-25-2021 02:54 AM - edited 11-25-2021 02:56 AM
11-25-2021 03:22 AM
Thank you so much for the tip.
I am relived to hear that Im halfway not wrong way.
And it worked well!!
Thank you!
Best regards.
Kim
11-25-2021 03:53 AM - edited 11-25-2021 03:56 AM
11-25-2021 03:55 AM - edited 11-25-2021 04:00 AM
Thank you for your comment!
Actually, my version is 2015. So I can't look inside your file.
I'm so sorry.
But your explanation helped me a lot. Thank you very much!
When a customer creates a 10-second pattern, it is repeatedly executed in LabVIEW.
Looking at the resulting graph, it seems to work normally (Figure 1).
However, the actual time is about 13 seconds.
So we wanted the actual running time of one loop.
The program configuration repeats the loop once per second.
Wait Until Next ms Multiple Function is set to 1000 ms (Figure 2).
It seems to me that Wait Until Next ms Multiple Function(1s) + other actions within the loop (0.3s) = 1.3s.
Can you tell me how can I calculate the time it takes for 1 iteration (10 points)?
11-25-2021 03:59 AM
Thanks for the comment!
I wrote the question again in another comment.
The loop I was trying to make repeats once per second
It's actually a problem that takes more than 1 second.
Is there any way to find out how much time has elapsed in 10 loops (10 points)?
Best regards.
Kim
11-25-2021 04:02 AM
Could I get a hint on how to get the time it takes to iterate this loop 10 times?
11-25-2021 09:15 AM
Hi kim,
@kimtae wrote:
Could I get a hint on how to get the time it takes to iterate this loop 10 times?
Take the timestamp before and after that loop and subtract both values…