11 motion, 1 how moves work, 2 incremental (moved) and absolute (movep) motion – Lenze PM94P01C User Manual

Page 50: Programming

Advertising
background image

PM94P01C

48

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 levels deep. 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 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 with 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 as illustrated in Figure
19.

Advertising