102BTechnology instructions
9.3 Basic motion control
S7-1200 Programmable controller
346
System Manual, 11/2011, A5E02486680-05
9.3.2
Motion control instructions
Note
The CPU calculates motion tasks in "slices" or segments of 10 ms. As one slice is being
executed, the next slice is waiting in the queue to be executed. If you interrupt the motion
task on an axis (by executing another new motion task for that axis), the new motion task
may not be executed for a maximum of 20 ms (the remainder of the current slice plus the
queued slice).
9.3.2.1
MC_Power instruction
NOTICE
If the axis is switched off due to an error, it will be enabled again automatically after the
error has been eliminated and acknowledged. This requires that the Enable input
parameter has retained the value TRUE during this process.
Table 9- 24 MC_Power instruction
LAD / FBD
SCL
Description
"MC_Power_DB"(
Axis:=_multi_fb_in_,
Enable:=_bool_in_,
StopMode:=_int_in_,
Status=>_bool_out_,
Busy=>_bool_out_,
Error=>_bool_out_,
ErrorID=>_word_out_,
ErrorInfo=>_word_out_);
The MC_Power motion control instruction enables
or disables an axis. Before you can enable or
disable the axis, ensure the following conditions:
The technology object has been configured
correctly.
There is no pending enable-inhibiting error.
The execution of MC_Power cannot be aborted by
a motion control task. Disabling the axis (input
parameter Enable = FALSE ) aborts all motion
control tasks for the associated technology object.
1
STEP 7 automatically creates the DB when you insert the instruction.
2
In the SCL example, "MC_Power_DB" is the name of the instance DB.
Table 9- 25 Parameters for the MC_Power instruction
Parameter and type
Data type
Description
Axis
IN
TO_Axis_1
Axis technology object
Enable
IN
Bool
FALSE (default): All active tasks are aborted according to the
parameterized "StopMode" and the axis is stopped.
TRUE: Motion Control attempts to enable the axis.