I am trying to develop with the PCI-DIO-96 & PCI-DIO-24 (PCI-6503) in MSVC++ w/ Ni-DAQ version 6.9.1f28. I am trying to use the message mapping but have been unsuccessful in getting it to work. I simply want a function to be called when a digital input goes high.
Here are some code snipits of how I have attempted to configure this:
nStatus = Config_DAQ_Event_Message(m_nBoardID,
1, // mode : add message
_T(szTemp), // str : how to specify bit & port?
// tried "DI0" & "DI0.0"
// for port A bit 0
0, // DAQEvent :
1, // DAQTrigVal0
0, // DAQTrigVal1
0, // trigSkipCount
0, // preTrigScans
0, // postTrigScans
this->m_hWnd , // h
andle
WM_NIDAQ_MSG1 , // message
NULL // callbackAddr
);
Also tried with the callback, changing the last 3 parameters to:
...
0,// handle
0,// message
(unsigned long)(&myCallback));// callbackAddr
I have also found documentation on a "DIG_Change_Message_Config" function. It is documented in:
"NI-DAQ™ Function Reference Manual for PC Compatibles
Version 6.6 Data Acquisition Software for the PC ... August 1999 Edition Part Number 321645E-01" but it is not in the nidaq.h file I am using.
Any ideas?
-Bock