04-15-2021 01:18 AM
Hello All,
one question regarding queue and while loop...
There is dequeue element in while loop. My opinion is that while loop should run constantly, but instead while loop doesn't run, only if i press start test.
Please check in attachment.
Can someone please give me explanation?
Thanks
Solved! Go to Solution.
04-15-2021 01:46 AM
04-15-2021 01:54 AM
You did not wire any timeout value to the Dequeue Element function, so it's stuck waiting forever until you enqueue an element in the other while loop.
I understand that this is only a skeleton of a program, however causing the lower loop to run by enqueing the very same element does not seem the right choice to do. One possible improvement is to structure the lower loop as a state machine and only use the queue to make the state shift from "waiting" to "executing test A" or "executing test B" and so on. Also, explore the possibility to use a Typedef Enum instead of a string to define the possible states.
I guess you should still go through some LabVIEW tutorial to familiarize with LV coding.
04-15-2021 02:19 AM
Thank you both.