LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to misure time and to increase thread priority

I want to report the time passed from the start of a Labview application, how can I do?
Furthermore, how can I change the thread priority of a Labview program?
Thanks.
0 Kudos
Message 1 of 7
(3,001 Views)
Hello,

Normally I do that using the tick count (time and dialog palette) function that return the milisencond value of the couter and then at any time put another one in the places of the code you want to monitorize and subtracty from the first one.
You have also a tool (tools..advanced... profile vi's) than give you timming information about the sub-vi's of the application.

To change the thread priority, go to file...vi properties, then choiose the execution tab and there you have the thread in witch the vi will run and the priority.

Hope this helps,
Paulo
0 Kudos
Message 2 of 7
(2,993 Views)
Hi

One way to do this is to capture the Tick Count VI which you'll find under the Time & Dialog palette as your program starts up. The output from the VI is in milliseconds. Whenever you need to subsequently know the lapsed time capture the Tick Count again and subtract it from the original Tick Count to give you a value which you can multiply by 1000 to give you lapsed time in seconds. It's probably not a problem but be careful when you use this function since the value of the timer wraps from (2ˆ32)–1 to 0 about every 1200 hours !

See attached example.

To increase thread priority go to File >> VI Properties >> Select "Execution" under the Category dropdown and then select the required priority under the "Priority" dropdown.

Hope that helps
Neil
Message 3 of 7
(2,991 Views)
There is no way to modify the priority with a control in the panel?
0 Kudos
Message 4 of 7
(2,987 Views)
You can open a VI reference and use a property node.
See the example. Set the VI path to your VI.

Regards
Neil
Message 5 of 7
(2,981 Views)
Hello,

I'm not sure if this is what you want, but look at the attached vi to see too loops running in parallel at different rates.

Hope it helps,
Paulo
Message 6 of 7
(2,978 Views)
Thanks all, I resolved all my problems
0 Kudos
Message 7 of 7
(2,933 Views)