Programming – Lenze E94P PositionServo with MVOB User Manual

Page 50

Advertising
background image

48

L

PM94H201B_13xxxxxx_EN

Programming

2.11 Motion

2.11.1 How Moves Work

The position command that causes motion to be generated comes from the profile generator or profiler for short.
The profile generator is used by the MOVE, MOVED, MOVEP, MOVEPR, MOVEDR and MDV statements. MOVE
commands generate motion in a positive or negative direction, while or until certain conditions are met. For example
you can specify a motion while a specific input remains ON (or OFF). MOVEP generates a move to specific absolute
position. MOVED generates incremental distance moves, i.e. move some distance from its current position. MOVEPR
and MOVEDR are registration moves. MDV commands are used to generate complicated profiles. Profiles generated
by these commands are put into the motion stack which is 32 level. By default when one of these statements (except
for MDV) is executed, the execution of the main User Program is suspended until the generated motion is completed.
Motion requests generated by an MDV statement, or by MOVE statement with the “C” modifier do not suspend the
program. All motion statements are put into the motion stack and executed by the profiler in the order in which they
where loaded. The Motion Stack can hold up to 32 moves. The SML language allows the programmer to load moves
into the stack and continue on with the program. It is the responsibility of the programmer to check the motion stack
to make sure there is room available before loading new moves. This is done by checking the appropriate bits in the
System status register or the appropriate system flag.

2.11.2 Incremental (MOVED) and Absolute (MOVEP) Motion

MOVED and MOVEP statements are used to create incremental and absolute moves respectively. The motion that
results from these commands is by default a trapezoidal velocity move or an S-curved velocity move if the “,S” modifier
is used within the statement.

For example:

MOVEP 10

;will result in a trapezoidal move

But

MOVEP 10,S

;will result in an S-curved move

In the above example, (MOVEP 10), the length of the move is determined by the argument following the MOVEP
command, (10). This argument can be a number, a variable or any valid arithmetic expression. The maximum velocity
of the move is determined by setting the system variable MAXV. The acceleration and deceleration are determined by
setting the system variables ACCEL and DECEL respectively.

If values for velocity, acceleration and deceleration, for a specified distance, are such that there is not enough time to
accelerate to the specified velocity, the motion profile will result in triangular or double S profile Full Stop. The following
code extract generates the motion profiles shown in Figure 19.

ACCEL = 200

DECEL = 200

MAXV = 20

MOVED 4

;Move 1

MOVED 1.5

;Move 2

MOVED 4 , S

;Move 3

MOVED 1.5 , S

;Move 4

Advertising