Programming – Lenze PM94P01C User Manual

Page 56

Advertising
background image

PM94P01C

54

Programming

{...Statements}

......

MOVED 20,C

MDV 10,5

MDV 20,5

MDV 10,0

MOVEP 0,C

.......

{statements}

To Motion Profiler

User Program

EMPTY

EMPTY

MOVED 20

MDV 10,5

MDV 20,5

1

2

3

31

32

MDV 10,0

4

MOVEP 0

5

EMPTY

6

Queue locations

Queue INPUT pointer

Pointer alwayes positions to next

avalable location

Queue Full

flag

Queue

Empty flag

Figure 21: Motion Queue

The Motion Queue can hold a maximum of 32 motion profiles. The System Status Register contains bit values that
indicate the state of the Motion Queue. Additionally, system flags (representing individual bits of the status register)
are available for ease of programming. If the possibility of overflow exists, the programmer should check the Motion
Queue full flag before executing any MOVE statements, especially in programs where MOVE statements are executed
in a looped fashion. Attempts to execute a motion statement while the Motion Queue is full will result in fault #23. MDV
statements don’t have the “C” option and therefore the program is never suspended by these statements. If last MDV
statement in the Queue doesn’t specify a 0 velocity Motion, a Stack Underflow fault #24 will occur.

The “MOTION SUSPEND” and “MOTION RESUME” statements can be utilized to help manage the User Program
and the Motion Queue. If the motion profiles loaded into the queue are not managed correctly, the Motion Queue can
become overloaded which will cause the drive to fault.

Advertising