LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

way

Hi
way the while loop execuation pause if click on time/date browse in timestamp if using property node in while loop
0 Kudos
Message 1 of 5
(2,125 Views)

Because both run in the User Interface thread AND the UI thread is single threaded.

Once one begins to execute, the other has to wait for the other to finish.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 5
(2,112 Views)
hi,

seems weird to me. I have change the execution system of the VI to the standart thread, so the loop shouldnt run in the UI thread. I also added a path-control  and it doesnt stop  if I click the path-control.
I dont get it.

bye
0 Kudos
Message 3 of 5
(2,097 Views)
Spring:

As Ben mentionned, both operations are running in the UI thread and that is why it has to wait until you select the timestamp to continue updating the numeric indicator that is tied to the loop iteration terminal of the while loop. I have included a few documents about threads in LabVIEW:

LabVIEW Threads
Turning Off Multithreading
Create Multitheaded Applications
Incorrect Number of Processors

I hope this helps and let me know if I can help further.

Regards,
Rudi N.
0 Kudos
Message 4 of 5
(2,065 Views)

This is just another reason not to overuse property nodes. There is no reason in the world to rewrite the same old property millions of times per second, especially since it is fed by a diagram constant that can never change. Once you set a property, it remains until you set the property to something else.

Property nodes execute in the UI thread. Notice that if you remove the property node and open the calender dialog, the loop keeps spinning.

You simply need to compose your code in such a way that the property node only executes if its input value has changed. There are many ways to do this. Property nodes are relatively expensive (partly because they force a switch to the UI thread) so this is a good idea in all cases.

UI loops such as in your example also deserve a small wait statement.

0 Kudos
Message 5 of 5
(2,050 Views)