10-02-2020 11:16 PM - edited 10-02-2020 11:16 PM
When I run my vi, as soon the the code runs in parallel, the while loop with the "GetInitState" object executes once then exits (Not expected, the notifier does not stop the loop until the for loop finishes executing) and the for loop path continues to execute. When the for loop path enters the second while loop, the same object continues to operate until the exit condition is met (as expected).
Why does the parallel while loop only execute once then stop?
This is the first time attempting this in code. Is there an issue calling .net objects in parallel where one continues to execute while the rest of the program calls other .net objects asynchronously..?
Note: the beginning part of the vi is deleted but works just fine. The vi is just to show the portion where I am experiencing the issue.
Solved! Go to Solution.
10-04-2020 11:05 PM
Your wait on notification has infinite timeout (-1), thus the upper while loop will just sit there waiting for "done", then stop. If you want it to iterate every 200ms, set the timeout to that and you can even remove the other wait function.
10-09-2020 11:12 PM
@altenbach wrote:
Your wait on notification has infinite timeout (-1), thus the upper while loop will just sit there waiting for "done", then stop. If you want it to iterate every 200ms, set the timeout to that and you can even remove the other wait function.
Your solution was correct, and the vi runs as expected now. Thank you very much.