
2.3
MC_API
The Motor Control API (Src\mc_api.c) are part of the Motor Control SDK and provides the key functions
controlling the motor.
The functions listed below are used by the firmware example, for more details regarding Motor Control SDK API,
refer to the relevant User Manual.
•
MC_StartMotor1
: Initiates the start-up procedure for the motor including the encoder alignment
•
MC_StopMotor1
: Initiates the stop procedure for the motor
•
MC_ProgramPositionCommandMotor1
: Programs the execution of a position command indicating the
target mechanical position (fTargetPosition) in radian and the expected execution time (fDuration) in seconds
•
MC_GetControlPositionStatusMotor1
: Returns the status of the positioning control state machine
•
MC_GetAlignmentStatusMotor1
: Returns the status of the encoder alignment (start-up sequence)
•
MC_GetOccurredFaultsMotor1
: Returns a bitfield showing the new faults detected by the motor control
algorithm
•
MC_AcknowledgeFaultMotor1
: Acknowledge a Motor Control fault occurred during motor control enabling
a new command execution
2.4
MB_API
The MODBUS RTU API (modbus\mb_API.c) manages the direct inputs, coils and holding registers of the
application.
•
setMovementCompleted
: Sets the DONE direct input high or low
•
setZeroReached
: Sets the ALIGN direct input high or low
•
getTargetPos_Deg
: Returns the target position in degrees stored in holding registers
•
getMovementDuration_s
: Returns the target movement duration (seconds) according to the value in the
holding registers (milliseconds)
•
getNewCommand
: Returns true if MOVE coil is high
•
clearCommand
: Forces MOVE coil low
UM2711
MC_API
UM2711
-
Rev 1
page 4/18