Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to create Start Trigger for counter input tasks

Hi,
 
Hardware: PCI-6602
Software: DAQmx 7.4 Ansi C API
 
I'm having some trouble configuring a start trigger for counter input tasks.  After creating the task and with counter input channel (any measurement type) I call DAQmxCfgDigEdgeStartTrig( ) specifying one of the PFI lines (say '/Dev1/PFI2') as the trigger source terminal.  This call always returns  "Error -200452 : Specifed property is not supported by the device or is not applicable to the task".  I have also tried configuring timing before the trigger but that does not make any difference.  One thing I've noticed is that this same error does not occur for counter output (pulse generation) tasks.  Any help with this problem would be much appreciated.
 
Thanks,
 
Jeff   
0 Kudos
Message 1 of 4
(4,577 Views)

Jeff,

Hi again.  This one stumped me for a while too when I was transitioning to DAQmx.  It may be documented somewhere, but it didn't make itself obvious.

Counter input operations use a different triggering method/mechanism that's referred to as an "arm start" trigger.  I work in LV so I don't know the C syntax, but try searching for "arm start" in your docs. 

(For other readers: in LV, this cannot be setup with the regular DAQmx Trigger vi.  You must use a DAQmx Trigger Property Node and specify your settings there.)

-Kevin P. 

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 2 of 4
(4,578 Views)

Thanks again Kevin for pointing me in the right direction Smiley Happy.

For anyone interested, a digital edge arm start trigger for counter input tasks can be configured in C using:

DAQmxSetArmStartTrigType(taskHandle, DAQmx_Val_DigEdge);

The trigger source terminal and active edge can then be modified with:

DAQmxSetDigEdgeArmStartTrigSrc() and DAQmxGetDigEdgeArmStartTrigEdge().

The initial confusion was due in part to a knowledge base article (http://digital.ni.com/public.nsf/allkb/9C657EE63C9D07A686256F6D0062AC66) which suggests that both an arm start trigger and a (regular) start trigger can be used with TIO devices.  While this may be true for counter output tasks, the (regular) start trigger does not appear to be applicable to counter input tasks.
 
Jeff
Message 3 of 4
(4,570 Views)
Spot on, Jeff. I'll see what I can do to eliminate some confusion in that KB.

Regards,
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 4 of 4
(4,553 Views)