Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Does Stop task reset a quadrature encoder counter?

Solved!
Go to solution

I am using an M-Series PCI-6280 board, with one of its onboard counters wired as a quadrature encoder.

 

1)I start the counter task, take a set of measurements with the counter, and then stop the task.

2) The encoder which the encoder counter is monitoring continues to output quadrature encoder signals into the PCI board's counter.

3) I start the task again, and perform another set of measurements.

 

Which of the following occurs?

  • Upon starting the task again, the counter's previous value was wiped and the measurements taken in (3) start at 0 counts. 
  • The counter keeps the value it had before it was stopped and subsequently started, and the measurements in (3) cumulate on top of the measurements taken in (1). 
  • The counter keeps the value it had before it was stopped, continues to increment/decrement position in (2) even after the task is stopped, and when the task is started in (3) the counter value is cumulative with the quadrature encoder pulses in (1) and (2). 

 

Thanks in advance for the help. 

0 Kudos
Message 1 of 3
(5,977 Views)
Solution
Accepted by topic author acmap

Hello acmap,

 

In this case The behavior will be the following:

Upon starting the task again, the counter's previous value was wiped and the measurements taken in (3) start at 0 counts.

 

However, you can specify the initial count value of the counter on the Initial Count terminal of the DAQmx Start Task VI, so it doesn't have to start at zero, and you can implement the behavior described in your second option.

 

Daniel

Dániel Fülöp
Field Application Engineer (CLA, CTA)
National Instruments
Message 2 of 3
(5,967 Views)

Thank you.

0 Kudos
Message 3 of 3
(5,961 Views)