ME 305 Group 6 Documentation
Functions | Variables
taskMotor_04.py File Reference

For running the motor and motor drivers. More...

Functions

def taskMotor_04.taskMotorFcn (str taskName, int period, shares_04.Share_04 duty1, shares_04.Share_04 duty2, shares_04.Share_04 cFlag)
 Function to execute the state management functionality for the motor tasks. More...
 

Variables

 taskMotor_04.S0_INIT = micropython.const(0)
 Maps state 0 to a more readable const S0_INIT.
 
 taskMotor_04.S1_COMMAND = micropython.const(1)
 Maps state 1 to a more readable const S1_COMMAND.
 

Detailed Description

For running the motor and motor drivers.

Continuously updates the motors with desired duty cycles after initialization.

Author
Caleb Savard
Chris Linthacum
Date
February 23, 2022

Function Documentation

◆ taskMotorFcn()

def taskMotor_04.taskMotorFcn ( str  taskName,
int  period,
shares_04.Share_04  duty1,
shares_04.Share_04  duty2,
shares_04.Share_04  cFlag 
)

Function to execute the state management functionality for the motor tasks.

Function manages states for the management of motor functions. Performs all motor related processes including setting motor duty cycle, initialization, and clearing faults.

Parameters
taskNameBrief string to describe the instance of the function. Useful for debug purposes.
periodPeriod with which to run the function and update/execute state logic.
duty1Shared data object to encapsulate the desired duty cycle of motor 1.
duty2Shared data object to encapsulate the desired duty cycle of motor 2.
cFlagShared data object to signal that a fault needs to be cleared.