Lenze PMSS1000 Simple Servo User Manual

Page 46

Advertising
background image

Indexer-Programmer-Manual.pdf REV 1.3

This program starts motion and moves for maximum 100 revs. While in motion if it sees sensor (or switch)
it turns output for 10mS. The programs able to look for the sensor while executing motion because of ",C"
modifier for MOVED statement. Without this modifier program would be suspended until all motion is
done making impossible to look for the sensor on input #1. After it travels the full distance it returns back
to initial position and process repeats. This program could be used for simple paint mechanism which
turns ON paint spray as soon as part edge (or part guide) crosses the sensor(s).
On the other hands MDV statement execution never suspends the program because each individual
statement sets portions of motion profile. Every motion profile or portion of (in case of MDV statement)
generated by motion statements MOVEP,MOVED or MDV first go to Motion Queue and than executed
one by one. In the other hand if statement doesn't have ",C" modifier motion profile generated by this
statement goes to Motion Queue and program suspended until this profile has been executed. Diagram
below shows structure and operation of Motion Queue.

{...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

15

16

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

Motion Queue is 32 entries deep. System Status Register's flag #7 indicates state of Motion Queue. Flag
is set if there is no more empty space in the Queue. Programmer should check this flag before executing
any MOVE statements if the possibility of overflow exists especially in programs where MOVE statements
executed in lopped fashion. Attempt to execute motion statement while Motion Queue full will result in
fault #23. MDV statements don't have "C" option. Program is never suspended by MDV statements. If last
MDV statement in the Queue is statement specifies non 0 velocity Motion Stack Underflow fault #24 will
occur.
It is essential for program to execute final MDV statement before last motion statement is completed. It is
especially true for very short MDV moves. Since motion starts immediately after first motion statement, in

46

Advertising