ME 305 Group 6 Documentation
|
Sets up and calls the closed loop controller class. More...
Functions | |
def | taskController_04.taskControllerFcn_04 (str taskName, int period, shares_04.Share_04 input_signal, shares_04.Share_04 target_val, shares_04.Share_04 prop_gain, shares_04.Share_04 cont_enable, shares_04.Share_04 target_duty) |
Sets up and calls the closed loop controller class. More... | |
Sets up and calls the closed loop controller class.
Configures a proportional controller object and continuously updates the controller output value and assigns to the proper motor duty cycle.
def taskController_04.taskControllerFcn_04 | ( | str | taskName, |
int | period, | ||
shares_04.Share_04 | input_signal, | ||
shares_04.Share_04 | target_val, | ||
shares_04.Share_04 | prop_gain, | ||
shares_04.Share_04 | cont_enable, | ||
shares_04.Share_04 | target_duty | ||
) |
Sets up and calls the closed loop controller class.
Every period, this task resets the Kp using set_Kp and updates the controller. Saturation limits are set to 100 and -100.
taskName | Task name label for debugging purposes. |
period | Period to run taskControllerFcn |
input_signal | Shared variable to store controller input signal. In this case the actual encoder velocity. |
target_val | Shared variable to store the target value for encoder velocity. |
prop_gain | Shared variable to store the controller proportional gain value. |
cont_enable | Shared variable to store a boolean whether to enable or disable the controller. |
target_duty | Shared variable to point to the duty cycle to be affected by the controller. |