LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Real Time with CVI

Hello,
 
I have a question about real time with CVI.
 
With LabVIEW RT, I know that a task can easily be given a higher priority than another task. For example, "while loop A" can have a priority = 10, and "while loop B" can have a priority = 100. How can I do the same thing with CVI ? In other words, how can I handle priorities (how can I give a priority to a task) with CVI ?
 
Thank you in advance for any information about those problems of priority with CVI.
 
Julien
0 Kudos
Message 1 of 3
(3,517 Views)
Julien,

The way you set the priority of tasks in CVI (and in CVI real-time) is by creating threads to do these tasks, and then setting the thread priority for each thread that you create. The way you schedule a thread in CVI while configuring its priority is by using the CmtScheduleThreadPoolFunctionAdv function. Be sure to read the help for the Thread Function Priority, since the available priorities in CVI RT are not as many as in Windows.

Also, keep in mind, that in real-time a thread with a higher priority can completely starve a lower priority thread, until the first thread finishes. This is different than the Windows behavior.

Luis
Message 2 of 3
(3,508 Views)

Thank you very much, that is very clear, all the more so as I have found an example illustrating your explanation.

Regards,

Julien

0 Kudos
Message 3 of 3
(3,502 Views)