Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

how to setup continuous pulse measurements using DAQmx

Using NI-6533 and DAQmx with C code, I would like to setup a 16-bit digital input that reads continuously only when a high pulse is given to one of the 6533 inputs.  When the pulse goes low, no data should be acquired.  The system clock is running at a high frequency (2.3MHz per sample), and each "enable" pulse may have a variable length. 
 
I based my current design on the ContReadDigChan-ExtClk.c example.  However, this code does not stop data acquisition when the pulse goes low, and it does not look like the code will restart for a new read when the next pulse occurs.
 
Help and suggestions are appreciated.
0 Kudos
Message 1 of 2
(2,740 Views)

Hi Grmn,

Welcome to the NI forums. I believe a pause trigger is what you are looking for. This is a trigger that, when high/low (depending on what you set), will pause acquisition until the level is changed. There are two functions which need to be set to do this with a 6533 – DAQmxSetDigLvlPauseTrigSrc and DAQmxSetDigLvlPauseTrigWhen. You can find these, and other C functions, in the DAQmx C Reference Help (Start >> Programs >> National Instruments >> NI-DAQ). Typically the trigger type needs to be set, but since the 6533 is purely digital, this is not needed. An appropriate place to set these functions would be just after configuring the clock.

One note about using the pause trigger: This will require a PFI line as an input, not a digital line. You can see from the 6533 pintout (attached) that these are different lines. Hope this helps you out!

David L.
Systems Engineering
National Instruments
0 Kudos
Message 2 of 2
(2,727 Views)