LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting DAQ Event Mesasge Priority

Is it possible to set the priority of the Event Messages when using Config_DAQ_Event_Message()? I am using a 6533 set for continuous change detection. I'd like to use DAQ Events 0 and 1 using interrupts. Every time a change occurs, I want to process the latched data->Event 0. When N changes are detected, I'd like to clear my half-buffer->Event 1. What happens when Event 0 and 1 are generated at the same time? How are they executed?
0 Kudos
Message 1 of 2
(2,850 Views)
Hi Steve,

No it is not possible to directly set the priority of the callback for the DAQ event message. One suggestion is if you want to change the priority of the function (or the code in that function) the best thing to do is to create another thread pool and have the DAQ callback function call a function in the new thread pool. You will be able to adjust the priority of the threads in that new thread pool and thus adjust the function priority.

To answer your second question, it will depend on which interrupt the processor handles first. Each event will generate an interrupt but the processor will limit which one gets handled first (sequential processing). I would assume that the OS will assign priority based on which one was assigned first but this som
ething I'm not entirely sure about. I suppose you could try a simple test to see which one fires first. Anyway, hope that helps.

Ron
Message 2 of 2
(2,850 Views)