LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How Do I enable multiple trigger voltages on the PCI-6221 using NI-DAQmx?

Solved!
Go to solution

I am using the PCI-6221 to do some simple data acquisition.  The idea is to allow three different analog voltages to trigger the data acquisition state.  I currently have the code set up for one voltage trigger but I am not sure what needs to be done to add the two additional trigger voltages. Any ideas?

 

Thanks.

0 Kudos
Message 1 of 4
(3,152 Views)

Hi capncane,

 

The PCI-6221 does not have analog hardware triggering so what you will need to do is to acquire the triggers and your data signal continuously. Then setup a data manipulation, where you drop data points if the trigger conditions are not met. If the conditions are met, keep the data. I hope this helps. 

Steven K.
National Instruments
Software Engineer
0 Kudos
Message 2 of 4
(3,124 Views)

Is it possible to do something as simple as this:

 

    DAQmxErrChk
        (DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai0","",DAQmx_Val_Cfg_Default,0.0,5.0,DAQmx_Val_Volts,NULL));
    DAQmxErrChk
        (DAQmxCfgSampClkTiming(taskHandle,"OnboardClock",3000.0,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,3000));
    DAQmxErrChk
        (DAQmxCfgAnlgEdgeStartTrig(taskHandle,"Dev1/ai0",DAQmx_Val_Rising,0.7));

 

or will I need to put the trigger on PFI0?

0 Kudos
Message 3 of 4
(3,102 Views)
Solution
Accepted by capncane

Hi capncane,

 

The 6221 is not able to do analog triggering so DAQmxCfgAnlgEdgeStartTrig will not work for your card. Is your trigger a digital signal? If so what kind of level logic is it? If it is TTL you can use the PFI lines. If not you will need to trigger like I mentioned in my previous post. 

Steven K.
National Instruments
Software Engineer
0 Kudos
Message 4 of 4
(3,087 Views)