Lucas Murray ME 305 Portfolio
|
Runs tasks sent by the taskUser file. More...
Functions | |
def | taskMotor.taskMotorFcn (taskName, period, mFlag, MFlag, cFlag, wFlag, duty, delta, controlParameters, cLoopFeedback) |
Performs the tasks as determined by the taskUser file. More... | |
Runs tasks sent by the taskUser file.
Acts as a background function file controlling the motor for the primary user interface so that the user interface does not have to perform tasks directly.
The State Transition Diagram for taskUser can be seen here.
Source Code: https://bitbucket.org/lmurray03/me305_lucas_murray/src/master/Lab%200x03/taskMotor.py
def taskMotor.taskMotorFcn | ( | taskName, | |
period, | |||
mFlag, | |||
MFlag, | |||
cFlag, | |||
wFlag, | |||
duty, | |||
delta, | |||
controlParameters, | |||
cLoopFeedback | |||
) |
Performs the tasks as determined by the taskUser file.
Interfaces with the taskUser file through the use of the shared flag parameters and shared values, being able to change the motor duty cycles and clear faults as well as toggling and updating the closed loop controller.
taskName | The name of the task a string |
mFlag | Boolean variable shared between taskUser and taskMotor for the motor1 duty cycle command |
MFlag | Boolean variable shared between taskUser and taskMotor for the motor2 duty cycle command |
cFlag | Boolean variable shared between taskUser and taskMotor for the reset fault command |
wFlag | Boolean variable shared between taskUser and taskMotor for the closed loop control toggle command |
duty | Tuple shared between taskUser and taskMotor that stores the input duty value |
delta | Tuple shared between taskUser and taskEncoder that stores delta data |
controlParameters | Tuple shared between taskUser and taskMotor that stores the input reference velocity and proportional gain |
cLoopFeedback | Tuple shared between taskUser and taskMotor that stores the closed loop error feedback from each update |