Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Which option should I use in DAQmxRegister functions?

Primary Software: LabWindows/CVI Development Systems>>Base Package
Primary Software Version: 8.0
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:

When I use functions such as DAQmxRegisterSignalEvent, DAQmxRegisterDoneEvent or DAQmxRegisterEveryNSamplesEvent, I can use either 0 or DAQmx_Val_SynchronousEventCallbacks in the options parameter. Which one should I use and how do I use them?



Solution:

The 0 option means that your callback will be called and ran in a DAQmx driver thread. Use this option if you do not have lot of processing to do like setting a flag.

However, if option is set to DAQmx_Val_SynchronousEventCallbacks then your callback will be called and ran in the thread that registered the callback event. Using this parameter will place the event in the SystemEvent queue. In order to let the thread run the callback you will need the use the ProcessSystemEvents() function.



Related Links:

KnowledgeBase 4NFE5MCZ : Unable to Use DAQmx_Val_SynchronousEventCallbacks in Non-Windows Operating System



Attachments:





Report Date: 08/19/2008
Last Updated: 08/27/2008
Document ID: 4OI3HLBA

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit