10-03-2013 10:12 PM
According to documentantion, the default terminals of the USB-6215 for counter input source and direction (when the direction of counting is externally controlled), are both PFI 0. I tried to change it but StartTask fails because it doesn't find the channel choosed to control the direction of counting..... heeeeelp!
DAQmxSetChanAttribute (countTask, "", DAQmx_CI_CountEdges_DirTerm, "Dev1/port0/line1");
Solved! Go to Solution.
10-04-2013 12:43 AM
1. Show section of code related to the problems not just a single line.
2. Show error code and its explaination.
10-04-2013 01:33 PM - edited 10-04-2013 01:34 PM
"Dev1/port0/line1" is the way you would reference a line in a Digital Input or Digital Output task. You want a "terminal" to set the direction, which in your case would be a PFI line. For example, "/Dev1/PFI3".
Sure enough, the 6215 does have the same default for counter source and aux (which is used for up/down) lines:
This seems weird, but the 6215 only has 4 input PFI and 4 output PFI lines so I guess they had to fit the default terminals in somehow (funny though it makes the AUX line unusable for an up/down line with default terminals--I never liked using default terminals anyway now that we have the option because honestly who can keep track of them).
Best Regards,
10-04-2013 10:17 PM
Thanks!!