Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I set the thread priority for the serial functions in CVI ? ie ComWrt().

I need to read in data and respond in less than 5 ms. I have the serial in a seperate thread and I have set the priority to the highest.
0 Kudos
Message 1 of 4
(3,656 Views)
Hello

You would use the SetThreadPriority function. Check out the MSDN for details. This is one of the SDK functions that should be included in CVI.

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 4
(3,656 Views)
How can I tell which thread the Com functions are opereating in???
0 Kudos
Message 3 of 4
(3,656 Views)
You would define the thread in which you want the COM read and write operations to occur.Check out some of the CVI multi threading examples for more information on making threads in CVI. Once you can get the handle to the thread, you can set its priority accordingly.
Here is a good document that talks about threads in C
General Information on Multithreading for C Programmers

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 4 of 4
(3,656 Views)