11-02-2010 03:05 PM
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?
11-02-2010 03:59 PM
Got it!
A call to DAQmxSetCIFreqTerm(taskHandle, s, "/cDAQ1/PFI1") does the trick.