LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

incremental encoder vs. absolute encoder

Hello,

This example reads 0,1 values from an incremental rotary encoder (360 P/R)  connected to pin 3 of Arduino UNO.

The value is displayed both on numeric indicator and waveform chart.

The short delay 2 ms is ok for detecting all changes of state at required rotation speed.

Question: how can I reset the (incremental) counter, so that it counts from 0 to 360, then restarts every time?

It should behave like a ìn absolute encoder.

I am looking for something like the history property for charts.

I tried with the property 'Reinitialize to default' but I feel I should reset the feedback node or the shift register

Thank you

0 Kudos
Message 1 of 2
(3,268 Views)

You could just write 0 to a local variable of "counter" for reseting it.  For the shift register, just run that through the case structure and write 0 to it in the true case, otherwise, just pass it on through.

0 Kudos
Message 2 of 2
(2,763 Views)