Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing Direction Terminal for Counter Input

Solved!
Go to solution

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");

 

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

1. Show section of code related to the problems not just a single line.

2. Show error code and its explaination.

0 Kudos
Message 2 of 4
(3,679 Views)
Solution
Accepted by topic author Sincrono

"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:

 

NI-DAQmx Device Terminals Help_2013-10-04_13-24-00.png

 

 

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,

John Passiak
0 Kudos
Message 3 of 4
(3,666 Views)

Thanks!!

0 Kudos
Message 4 of 4
(3,652 Views)