102BTechnology instructions
9.3 Basic motion control
S7-1200 Programmable controller
358
System Manual, 11/2011, A5E02486680-05
9.3.2.7
MC_MoveVelocity instruction
Table 9- 37 MC_MoveVelocity instruction
LAD / FBD
SCL
Description
"MC_MoveVelocity_DB"(
Axis:=_multi_fb_in_,
Execute:=_bool_in_,
Velocity:=_real_in_,
Direction:=_int_in_,
Current:=_bool_in_,
InVelocity=>_bool_out_,
Busy=>_bool_out_,
CommandAborted=>_bool_out_,
Error=>_bool_out_,
ErrorID=>_word_out_,
ErrorInfo=>_word_out_);
Use the MC_MoveVelocity
instruction to move the axis
constantly at the specified velocity.
In order to use the
MC_MoveVelocity instruction, the
axis must first be enabled.
1
STEP 7 automatically creates the DB when you insert the instruction.
2
In the SCL example, "MC_MoveVelocity_DB" is the name of the instance DB.
Table 9- 38 Parameters for the MC_MoveVelocity instruction
Parameter and type
Data type
Description
Axis
IN
TO_Axis_1
Axis technology object
Execute
IN
Bool
Start of the task with a positive edge (Default value: False)
Velocity
IN
Real
Velocity specification for axis motion (Default value: 10.0)
Limit values: Start/stop velocity ≤ |Velocity| ≤ maximum velocity
(Velocity = 0.0 is allowed)
Direction
IN
Int
Direction specification:
0: Direction of rotation corresponds to the sign of the value in
parameter "Velocity" (Default value)
1: Positive direction of rotation (The sign of the value in
parameter "Velocity" is ignored.)
2: Negative direction of rotation (The sign of the value in
parameter "Velocity" is ignored.)
Current
IN
Bool
Maintain current velocity:
FALSE: "Maintain current velocity" is deactivated. The values
of parameters "Velocity" and "Direction" are used. (Default
value)
TRUE: "Maintain current velocity" is activated. The values in
parameters "Velocity" and "Direction" are not taken into
account.
When the axis resumes motion at the current velocity, the
"InVelocity" parameter returns the value TRUE
.