Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get an input pattern mis-match callback from Port-C working on a DIO-32HS?

Using MSVC, I need a callback every time any bit of port-C changes state, polling has too great a latency.
If I program Port-C as group 2, I can't read valid data from the port using DIG_In_Grp() and get no callbacks via Config_DAQ_Event_Message().
0 Kudos
Message 1 of 4
(3,487 Views)
To use the DAQ Event 7 (pattern mismatch) the transfer operation has to be asynchronous and interrupt driven as documented in the NI-DAQ online help. You should use the DIG_Block_In function instead.

The attached example code illustrates how to to use the DAQ event 8 (pattern match) to initiate a callback function.

See also the NI-DAQ help for Config_DAQ_Event_Message.
0 Kudos
Message 2 of 4
(3,487 Views)
Thanks for the answer, but I require to read the port every time it changes state and when I try this I can only read two or more bytes into the buffer, not just one.
0 Kudos
Message 3 of 4
(3,487 Views)
In 652X series this is accomplished by DIG_Change_Message_Config
0 Kudos
Message 4 of 4
(3,487 Views)