Component: Grey Code Encoder (General Input)
Author | Matrix TSL |
Version | 1.4 (Release) |
Category | General Input |
Contents
Grey Code Encoder component
Grey Code Encoder component implements a rotary encoder connected to a defined number of pins Grey Code Encoders provide absolute positioning rather than incremental positioning.
Examples
No additional examples
Downloadable macro reference
ReadAbsoluteAngle
Reads the absolute angular position of the motor.
Returns a floating point value representing the angle of the encoder.
Parameters
- This macro has no parameters
Return value
ReadAbsolutePosition
Reads the absolute angular position of the motor.
Returns an integer value representing the step position.
Parameters
- This macro has no parameters
Return value
Simulation macro reference
Rotate
Simulation Rotate function to allow accurate rotation during simulation.
Automatically called by any attached coupling or gearbox component.
Parameters
- FLOAT Angle
- Amount to rotate the shaft input in degrees
Return value
- This call does not return a value
Property reference
Output States
This property is of type Unsigned integer and can be referenced with the variable name OutputStates.
Number of unique output states
Resolution
This property is of type Floating point and can be referenced with the variable name Resolution.
The resolution of the encoder in degrees
Number of Pins
This property is of type Fixed list of ints and can be referenced with the variable name NumPins.
Sets the number of output pins on the encoder and hence the resolution of the encoder.
Pin0
This property is of type Single digital pin and can be referenced with the variable name pin_0.
Input pin 0
Pin1
This property is of type Single digital pin and can be referenced with the variable name pin_1.
Input Pin 1
Pin2
This property is of type Single digital pin and can be referenced with the variable name pin_2.
Input Pin 2
Repeat Rate
This property is of type Fixed list of ints and can be referenced with the variable name reprate.
Simulated repeat rate when clicking and rotating the encoder
Scope Traces
This property is of type True or false and can be referenced with the variable name ScopeTraces.
No additional information