The GetCommandedPhase function returns the SERCOS® loop phase that the movement controller is trying to establish.
NOTE: Use the GetActualPhase function to determine the current loop phase.
The SetCommandedPhase function requests the movement controller to change the SERCOS® loop to the specified phase.
The SERCOS® phase must always switch phases in an increasing manner. If the SetCommandedPhase value is lower than the present loop phase, the movement controller will switch the phase to phase 0 and sequence the loop up to the specified phase. If the loop is at phase 4, and a lower phase is commanded, the movement axes will fault.
NOTE: The movement controller can only progress to the next SERCOS® phase if all the drives on the loop allow a switch to the next phase. Therefore, it is possible that the commanded phase might never be achieved. Use the GetCommandedPhase function to find out which phase was commanded, and use the GetActualPhase function to discover the actual phase of the SERCOS® loop.
How to Use these Functions
These functions are implemented with the help of the WRITE_CMD instruction (see
WRITE_CMD).
Associated Language Objects
Exchange via WRITE_CMD:The table below presents the different language objects linked to these functions.
Object
|
Name
|
Function code
|
Description
|
%MWr.m.c.26
|
ACTION_CMD
|
1545
|
Read command
|
2545
|
Write command
|
%MDr.m.c.20
|
RETURN_CMD_1
|
-
|
Result of the read command
|
%MDr.m.c.27
|
PARAM_CMD_1
|
-
|
Value to write
|
%MWr.m.c.19
|
ERROR_CMD
|
-
|
|