| cmdMO_PEEK | Index |
Command Code:
The Packet:
Reply Packet
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | |||||||||
| address | 8 | cmdMO_PEEK | moID | inputH | inputL | setH | setL | pwmH | pwmL |
| moID - | The channel (zero based) being observed. |
| inputH - | The high byte of the current control input. |
| inputL - | The low byte of the current control input. |
| setH - | The high byte of the current setpoint. |
| setL - | The low byte of the current setpoint. |
| pwmH - | The high byte of the current PWM output. |
| pwmL - | The low byte of the current PWM output. |
Description:
This command is only available on BrainStem modules with the motion control feature.
The cmdMO_PEEK command is used to determine the current status of the PID function. The PID control loop takes the current control input, compares it to the desired setpoint, and calculates an output in an attempt to maintain the setpoint.
The control input is the current value of the input to the PID control loop. Depending on the control mode, this can be a position or velocity from an encoder or an analog sensor.
The current setpoint is the value that the PID loop is trying to maintain at the control input. In stepper mode, it is the number of steps that the stepper motor was ordered to perform.
The current PWM output is the output that the PID loop is applying in an attempt to keep the control input at the setpoint.