LabVIEW myRIO Toolkit

Read VI

  • Updated2023-02-21
  • 3 minute(s) read

Read VI

Owning Palette: Encoder VIs

Requires: myRIO Toolkit or roboRIO Toolkit

Reads the value of the encoder tick counter, the last direction of the tick counter, and whether the counter wraps around.

Encoder Ref In specifies the reference to the encoder channel. Use the Open VI to open a reference to the encoder channel. Do not modify the Encoder Ref In values.
Reset Counter specifies whether to reset the tick counter to zero after this VI runs. The default is FALSE.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
Encoder Ref Out returns a reference to the encoder channel that you specify.
Counter Value returns the number of ticks that this VI reads from the encoder since the last counter reset. Counter Value must be in the range from -2,147,483,648 to 2,147,483,647.
Overflow? returns whether the counter value wraps around. Overflow? returns TRUE when the value of the counter goes from the maximum value to the minimum value or from the minimum value to the maximum value. After the count value is read once, Overflow? changes to FALSE until the counter value wraps around again.
error out contains error information. This output provides standard error out functionality.
Counter Direction returns the direction of the counter between the last two ticks that the encoder receives.

0Counting Up—Returns that the counter is incrementing.
1Counting Down—Returns that the counter is decrementing.

Log in to get a better experience