Operating Instructions
COMPAX-M / -S
Sub-program jump with data record selection [GOSUB EXT]
110
8.4.27 Sub-program jump with data record selection [GOSUB EXT]
Entry at BDF2: GOSUB Ent
Jump into a sub-program with data record selection via the inputs I9 to I16.
The bit pattern of inputs I9 to I16 is interpreted as a data record number (binary).
I16............I9 => 27..............20
e.g.
00 010 100 = 20
jumps to sub-program at data record 20.
Note!
If inputs have been assigned functions (e.g. fast start I15 or external position
adjustment I11), they are not taken into consideration when using GOSUB EXT
(read logically as "0"):
The assignments of each of the binary inputs I16...I9 must be taken into
consideration for the individual unit variants (COMPAX XX50M,...).
When the PLC data interface is activated, the commands GOTO EXT and GOSUB
EXT are blocked!
8.4.28 Error handling [IF ERROR GOSUB]
To influence the error reactions.
IF ERROR GOSUB xxx
This instruction can only be programmed as normal IF instructions in the program.
Use this instruction to define the program procedure when an error status occurs.
The error sub-program is called up with a delay by P17 (brake delay). When
performing a WAIT START, COMPAX does not branch into the error sub-program
if an error occurs!
Normally, an error in the COMPAX will cause an actively running move to be
interrupted. Depending on the type of error, the drive is switched off. The program
is however stopped no matter what the error type.
The instruction 'IF ERROR GOSUB xxx' allows you to, e.g. set the outputs to
defined statuses when an error occurs.
If such an instruction has been run once in the program and then an error later
occurs,
♦
the current move is interrupted,
♦
if necessary, the axis is (depending on the error) switched off and
♦
the 'Error program', which has been programmed from program number xxx, is
executed.
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 is executed.
The error 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 ...)
GOSUB EXT
IF ERROR
GOSUB
Syntax:
Note!
Function:
Priority:
Error program:
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