Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

cDAQ-9178 BNC as Counter Input

I set up a task in MAX to measure frequency on channel cDAQ1Mod2/ctr0 and it works correctly, getting its input from PF1 of module 2. However, I would rather send the frequency signal through the TRIG 1 BNC on the 9178 chassis but MAX won't give me that choice. In my C code, I tried issuing the commands:

DAQmxDisconnectTerms("/cDAQ1Mod2/PFI1", "/cDAQ1/Ctr0Gate");
DAQmxConnectTerms("/cDAQ1/PFI1", "/cDAQ1/Ctr0Gate", DAQmx_Val_DoNotInvertPolarity);

before or after DAQmxStartTask() but in both cases I get Error -200088 Measurements: Task specified is invalid or does not exist.

 

How do I route the BNC input to the counter input?

0 Kudos
Message 1 of 2
(5,714 Views)

Got it!

 

A call to DAQmxSetCIFreqTerm(taskHandle, s, "/cDAQ1/PFI1") does the trick.

Message 2 of 2
(5,708 Views)