ME 305 Group 6 Documentation
Functions
taskController_04.py File Reference

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...
 

Detailed Description

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.

Author
Caleb Savard
Chris Linthacum
Date
February 17, 2022

Function Documentation

◆ taskControllerFcn_04()

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.

Parameters
taskNameTask name label for debugging purposes.
periodPeriod to run taskControllerFcn
input_signalShared variable to store controller input signal. In this case the actual encoder velocity.
target_valShared variable to store the target value for encoder velocity.
prop_gainShared variable to store the controller proportional gain value.
cont_enableShared variable to store a boolean whether to enable or disable the controller.
target_dutyShared variable to point to the duty cycle to be affected by the controller.