Operating Instructions
COMPAX-M / -S
STOP / BREAK handling [IF STOP GOSUB xxx]
112
The stop program must not contain
♦
any motion commands (POSA, POSR, POSR ..., WAIT POSA, WAIT POSR,
SPEED in the speed control mode, ),
♦
any sub-program jumps (GOSUB, IF ... GOSUB, ...),
♦
any COMPAX XX70 commands,
♦
any approach real zero and find machine zero commands,
♦
any speed step commands (POSR ... SPEED ...) or
♦
comparator commands (POSR ... OUTPUT ...)
and is used to bring the individual outputs (e.g. the control output for a pump or a
valve) into a safe status.
The 'WAIT START' instruction must be included; it stops the programming
procedure before an external START is executed again.
Then OUTPUT instructions can again be present for resetting the outputs.
There must be a RETURN or END instruction at the end of the stop program.
♦
The END instruction stops the program.
♦
The RETURN instruction executes a jump back into the previously interrupted
program line, a travel motion which was interrupted by STOP is continued; the
next command is executed after the BREAK.
The error program has priority over the stop program.
A running stop program is interrupted by the error program and continued after the
error program has run.
Main Program
Stop Program
N001: IF STOP GOSUB 240
N240: OUTPUT O9=0
N002: OUTPUT O9=1
N241: WAIT START
N003: POSA 0
N242: OUTPUT O9=1
N004: POSA 4000
N243: RETURN
N005: OUTPUT O9=0
N006: GOTO 002
If the axis has been stopped due to a STOP, e.g. during POSA 4000 positioning,
sub-program jump is then made to program line 240 and output O9 is set to zero at
this point.
The program then stops in program line 241 and waits until a new start occurs.
At program line 242, output O9 is switched on again, at program line 243, a jump is
made back to the previously interrupted program line N004.
The axis therefore executes the rest of the travel to position 4000 and the main
program is then continued at program line N005.
If the stop program is concluded using END rather than RETURN, the program
indicator remains in the same position. The program stops running at this point.
Machine zero has to approached or the program indicator must be reset explicity.
Stop program:
Error program with
WAIT START
Priority:
Example:
POSA
POSR
SPEED
ACCEL
OUTPUT
Password
SPEED
SYNC
Mark
reference
POSR
SPEED
POSR
OUTPUT
Cam
controller
WAIT
GOTO
GOSUB
RETURN
END
REPEAT
IF I..
Comparison
WAIT Start
GOTO /
GOSUB EXT
IF Error/ Stop
Arithmetic
Position
monitoring
Idle display
Speed
monitoring
Engage /
disengage
brake / final
stage
Variable
voltage