04-18-2006 11:43 AM
04-19-2006 05:29 PM
Depending upon the command this may be the only option available. For the following commands DAQmx_Val_SynchronousEventCallbacks is the only 'option'.
Value Description DAQmx_Val_SynchronousEventCallbacks The callback function is called in the thread which registered the event. In order for the callback to occur, you must be processing messages. If you do not set this flag, the callback function is called in a DAQmx thread by default.
DAQmxRegisterDoneEvent
DAQmxRegisterEveryNSamplesEvent
DAQmxRegisterSignalEvent
04-20-2006 07:56 AM
Hi Otis,
Is DAQmx_Val_SynchronousEventCallbacks set by the programmer?
If DAQmx_Val_SynchronousEventCallbacks = 0 what does DAQmxRegisterDoneEvent do?
If DAQmx_Val_SynchronousEventCallbacks = 1 what does DAQmxRegisterDoneEvent do?
Thanks,
Kevin
04-20-2006 09:08 AM - edited 04-20-2006 09:08 AM
Message Edited by bilalD on 04-20-2006 09:11 AM
04-21-2006 12:45 PM - edited 04-21-2006 12:45 PM
This is very good information.
1. What is a DAQmx thread?
2. What is a thread that registered the event?
Kevin
Message Edited by EW on 04-21-2006 12:45 PM
04-24-2006 03:25 PM
06-25-2006 10:51 PM
int32 DAQmxRegisterSignalEvent (TaskHandle taskHandle, int32 signalID, uInt32 options, DAQmxSignalEventCallbackPtr callbackFunction, void *callbackData);
"when I set the paramter "options" as DAQmx_Val_SynchronousEventCallbacks . Is there any sample to show me ?06-30-2006 03:18 PM
I don't know, but I would write a test program with options set to 0 first. Get that working and then move to the next.
Kevin
07-05-2006 04:01 PM
Hello Robert,
The are no DAQmx shipping example that shows how to use the option DAQmx_Val_SynchronousEventCallbacks.
The ANSI C examples that ship with DAQmx do not have a GUI and do not process
windows messages. For this reason they do not use the above option.
All the shipping examples use the asynchronous 0 option, and you can typically
find them here:
C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Events\Every
N Samples
There are also several example that use the asynchronous
RegisterEveryNSampleEvent online. For example you can find a Visual Basic
example here.
To use the DAQmx_Val_SynchronousEventCallbacks you
must either use an application that automatically handles windows messages, or
write your own message handling.
Regards,
Jesse O.
Applications Engineering
National Instruments
07-13-2006 05:22 AM