Encoder Module
The encoder module features 16 inputs specifically designed to accommodate up to 8 rotary encoders, whether they are mechanical or electronic in nature. An additional set of 8 inputs is dedicated for pushbuttons.
Each encoder independently generates its own clockwise/anticlockwise (up/down or right/left) message, depending on the direction of rotation. A flag is set in the message to indicate a fast turn if an encoder exceeds a predefined threshold of rotation speed. Conversely, if the encoder's rotation speed falls below the threshold, the flag is cleared.
The parameters of the encoder module can be modified using the Module Configuration Service (MCS), a CanAerospace node service accessible through the USB interface.
Byte | Description | Values |
---|---|---|
0 | Node ID | 1-255 |
1 | Data Type | BCHAR (11) |
2 | Service Code | <encoder num> |
3 | Message Code | <message num> |
4 | Data Byte 1 | bitfield |
5 | Data Byte 2 | 0 |
6 | Data Byte 3 | 0 |
7 | Data Byte 4 | 0 |
Bit | Description | Values |
---|---|---|
0 | Encoder CW | Set to 1 in the case of a clockwise event |
1 | Encoder CCW | Set to 1 in the case of a counterclockwise event |
2 | Pushbutton UP | Set to 1 in the case of a pushbutton up event |
3 | Pushbutton DOWN | Set to 1 in the case of a pushbutton down event |
4-6 | unused | 0 |
7 | Fast Flag | Set to 1 if rotation speed is greater than threshold |
Encoder modules use CAN Identifiers in the range of 0x708 - 0x70F.