Overview

The Closed-Loop is a general-purpose feedback control system that uses the I/O module to receive sensor feedback. A digital PID controller processes the error between the setpoint and the feedback value, and adjusts the output to minimize this error. Depending on the axis’s command mode, the controller’s output is interpreted as a position, velocity, or torque command.

The diagram below shows the overall structure of the Closed-Loop system:

../_images/WMXDOC_FUNC_CLP_image0.png

To activate the Closed-Loop controller, use the StartController function. The function takes a Command object with the following parameters:

  • axis: Specifies which axis to control. The interpretation of the controller’s output (position, velocity, or torque) depends on the axis’s command mode.

  • setpoint: The target value that the controller aims to achieve. This value is expressed in the same unit as the sensor feedback.