Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Automatic External

Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

KUKA System Software 8.

BACKWARD_
STEP

Fig. 6-27: Example: BACKWARD_STEP

The contents of the line before BACKWARD_STEP are not relevant for back-
ward motion and may differ from this example.
If not all parameters of BACKWARD_STEP are listed, the default values are
valid for those that are not listed.
If BACKWARD_STEP is removed from KrcConfig.XML again, the default val-
ues are valid for all parameters again.

Parameter Description/default
ENABLE Type: BOOL
TRUE (= default): activated, i.e. backward motion using
the Start backwards key is possible.
FALSE: deactivated, i.e. backward motion using the
Start backwards key is not possible.
MOVE- Type: INT
MENTS
Maximum number of motions recorded for backward
motion
0 60 (default = 30)
BACKWARD Type: BOOL
_WARNING
TRUE: The robot controller generates the following
message when the Start backwards key is pressed for
the first time after forward motion: Caution! Robot is
moving backwards.. The user must acknowledge the
message and press the Start backwards key again.
FALSE (= default): No message

6.17 Configuring Automatic External

Description If robot processes are to be controlled centrally by a higher-level controller


(e.g. a PLC), this is carried out using the Automatic External interface.
The higher-level controller transmits the signals for the robot processes (e.g.
motion enable, fault acknowledgement, program start, etc.) to the robot con-
troller via the Automatic External interface. The robot controller transmits in-
formation about operating states and fault states to the higher-level controller.

Overview To enable use of the Automatic External interface, the following configurations
must be carried out:

190 / 487 Issued: 28.05.2014 Version: KSS 8.3 SI V3


6 Configuration

Step Description
1 Configuration of the CELL.SRC program.
(>>> 6.17.1 "Configuring CELL.SRC" Page 191)
2 Configuration of the inputs/outputs of the Automatic Exter-
nal interface.
(>>> 6.17.2 "Configuring Automatic External inputs/out-
puts" Page 192)
3 Only if error numbers are to be transmitted to the higher-lev-
el controller: configuration of the P00.DAT file.
(>>> 6.17.3 "Transmitting error numbers to the higher-level
controller" Page 198)

6.17.1 Configuring CELL.SRC

Description In Automatic External mode, programs are called using the program
CELL.SRC.

Program 1 DEF CELL ( )



6 INIT
7 BASISTECH INI
8 CHECK HOME
9 PTP HOME Vel= 100 % DEFAULT
10 AUTOEXT INI
11 LOOP
12 P00 (#EXT_PGNO,#PGNO_GET,DMY[],0 )
13 SWITCH PGNO ; Select with Programnumber
14
15 CASE 1
16 P00 (#EXT_PGNO,#PGNO_ACKN,DMY[],0 )
17 ;EXAMPLE1 ( ) ; Call User-Program
18
19 CASE 2
20 P00 (#EXT_PGNO,#PGNO_ACKN,DMY[],0 )
21 ;EXAMPLE2 ( ) ; Call User-Program
22
23 CASE 3
24 P00 (#EXT_PGNO,#PGNO_ACKN,DMY[],0 )
25 ;EXAMPLE3 ( ) ; Call User-Program
26
27 DEFAULT
28 P00 (#EXT_PGNO,#PGNO_FAULT,DMY[],0 )
29 ENDSWITCH
30 ENDLOOP
31 END

Line Description
12 The robot controller calls the program number from the
higher-level controller.
15 CASE branch for program number = 1
16 Receipt of program number 1 is communicated to the higher-
level controller.
17 The user-defined program EXAMPLE1 is called.
27 DEFAULT = the program number is invalid.
28 Error treatment in the case of an invalid program number

Precondition Expert user group

Procedure 1. Open the program CELL.SRC in the Navigator. (This program is located
in the folder "R1".)

Issued: 28.05.2014 Version: KSS 8.3 SI V3 191 / 487


KUKA System Software 8.3

2. In the section CASE 1, replace the name EXAMPLE1 with the name of the
program that is to be called via program number 1. Delete the semicolon
in front of the name.

15 CASE 1
16 P00 (#EXT_PGNO,#PGNO_ACKN,DMY[],0 )
17 MY_PROGRAM ( ) ; Call User-Program

3. For all further programs, proceed as described in step 2. If required, add


additional CASE branches.
4. Close the program CELL.SRC. Respond to the request for confirmation
asking whether the changes should be saved with Yes.

6.17.2 Configuring Automatic External inputs/outputs

Procedure 1. In the main menu, select Configuration > Inputs/outputs > Automatic
External.
2. In the Value column, select the cell to be edited and press Edit.
3. Enter the desired value and save it by pressing OK.
4. Repeat steps 2 and 3 for all values to be edited.
5. Close the window. The changes are saved.

Description

Fig. 6-28: Configuring Automatic External inputs

192 / 487 Issued: 28.05.2014 Version: KSS 8.3 SI V3


6 Configuration

Fig. 6-29: Configuring Automatic External outputs

Item Description
1 Number
2 Long text name of the input/output
3 Type
Green: Input/output
Yellow: variable or system variable ($...)
4 Name of the signal or variable
5 Input/output number or channel number
6 The outputs are thematically assigned to tabs.

6.17.2.1 Automatic External inputs

PGNO_TYPE Type: Variable


This variable defines the format in which the program number sent by the high-
er-level controller is read.

Value Description Example


1 Read as binary number. 00100111
The program number is transmitted by the => PGNO = 39
higher-level controller as a binary coded
integer.

Issued: 28.05.2014 Version: KSS 8.3 SI V3 193 / 487


KUKA System Software 8.3

Value Description Example


2 Read as BCD value. 00100111
The program number is transmitted by the => PGNO = 27
higher-level controller as a binary coded
decimal.
3 Read as 1 of n*. 00000001
The program number is transmitted by the => PGNO = 1
higher-level controller or the periphery as a
00001000
"1 of n" coded value.
=> PGNO = 4

* When using this transmission format, the values of PGNO_REQ,


PGNO_PARITY and PGNO_VALID are not evaluated and are thus of no sig-
nificance.

REFLECT_PROG Type: Variable


_NR This variable defines whether the program number is to be mirrored to an out-
put range. The output of the signal starts with the output defined using
PGNO_FBIT_REFL.

Value Description
0 Function deactivated
1 Function activated

PGNO_LENGTH Type: Variable


This variable determines the number of bits in the program number sent by the
higher-level controller. Range of values: 1 16.
Example: PGNO_LENGTH = 4 => the external program number is 4 bits long.
If PGNO_TYPE has the value 2, only 4, 8, 12 and 16 are permissible values
for the number of bits.

PGNO_FBIT Input representing the first bit of the program number. Range of values:
1 8192.
Example: PGNO_FBIT = 5 => the external program number begins with the
input $IN[5].

PGNO_PARITY Input to which the parity bit is transferred from the higher-level controller.

Input Function
Negative value Odd parity
0 No evaluation
Positive value Even parity

(>>> 6.17.2.2 "Odd / even parity" Page 196)


If PGNO_TYPE has the value 3, PGNO_PARITY is not evaluated.

PGNO_VALID Input to which the command to read the program number is transferred from
the higher-level controller.

Input Function
Negative value Number is transferred at the falling edge of the signal.
0 Number is transferred at the rising edge of the signal on
the EXT_START line.
Positive value Number is transferred at the rising edge of the signal.

If PGNO_TYPE has the value 3, PGNO_VALID is not evaluated.

194 / 487 Issued: 28.05.2014 Version: KSS 8.3 SI V3


6 Configuration

$EXT_START If the I/O interface is active, this input can be set to start or continue a program.

Only the rising edge of the signal is evaluated.

There is no BCO run in Automatic External mode. This


means that the robot moves to the first programmed po-
sition after the start at the programmed (not reduced) velocity and does not
stop there.

$MOVE_ENABLE This input is used by the higher-level controller to check the robot drives.

Signal Function
TRUE Jogging and program execution are possible.
FALSE All drives are stopped and all active commands inhibit-
ed.

If the drives have been switched off by the higher-level controller, the message
GENERAL MOTION ENABLE is displayed. It is only possible to move the ro-
bot again once this message has been reset and another external start signal
has been given.
During commissioning, the variable $MOVE_ENABLE is often configured with
the value $IN[1025]. If a different input is not subsequently configured, no ex-
ternal start is possible.

$CHCK_MOVENA Type: Variable


If the variable $CHCK_MOVENA has the value FALSE, $MOVE_ENABLE
can be bypassed. The value of the variable can only be changed in the file
C:\KRC\ROBOTER\KRC\STEU\Mada\$OPTION.DAT.

Signal Function
TRUE MOVE_ENABLE monitoring is activated.
FALSE MOVE_ENABLE monitoring is deactivated.

In order to be able to use MOVE_ENABLE monitoring,


$MOVE_ENABLE must have been configured with the input
$IN[1025]. Otherwise, $CHCK_MOVENA has no effect.

$CONF_MESS Setting this input enables the higher-level controller to acknowledge error
messages automatically as soon as the cause of the error has been eliminat-
ed.

Only the rising edge of the signal is evaluated.

$DRIVES_OFF If there is a low-level pulse of at least 20 ms duration at this input, the higher-
level controller switches off the robot drives.

$DRIVES_ON If there is a high-level pulse of at least 20 ms duration at this input, the higher-
level controller switches on the robot drives.

$I_O_ACT If this input is TRUE, the Automatic External interface is active. Default setting:
$IN[1025].

Issued: 28.05.2014 Version: KSS 8.3 SI V3 195 / 487


KUKA System Software 8.3

6.17.2.2 Odd / even parity

Description A parity bit is a bit which is added to a bit sequence and has a checking func-
tion. It indicates whether the bit sequence contains an even or odd sum of
ones.
The meaning of the relevant bit value (even or odd) depends on the appli-
cable parity protocol: even parity or odd parity.
If the entire data block consisting of the bit sequence and the parity bit is
transferred and the parity bit then no longer matches the sequence, this
means that an error has occurred during transfer.

Even parity Even parity


The sum of the ones in the entire data block (bit sequence + parity bit) must
be even.

Sum of ones in the bit sequence Parity bit


Even 0
Odd 1

Example:

Bit sequence Parity bit


0011.1010 0
1010.0100 1

Odd parity Odd parity


The sum of the ones in the entire data block (bit sequence + parity bit) must
be odd.

Sum of ones in the bit sequence Parity bit


Even 1
Odd 0

Example:

Bit sequence Parity bit


0011.1010 1
1010.0100 0

6.17.2.3 Automatic External outputs

$RC_RDY1 Ready for program start.

$ALARM_STOP This output is reset in the following EMERGENCY STOP situations:


The EMERGENCY STOP device on the smartPAD is pressed.
External E-STOP

In the case of an EMERGENCY STOP, the nature of the EMERGEN-


CY STOP can be recognized from the states of the outputs
$ALARM_STOP and $ALARM_STOP_INTERN:
Both outputs are FALSE: the EMERGENCY STOP was triggered on the
smartPAD.
$ALARM_STOP is FALSE, $ALARM_STOP_INTERN is TRUE: exter-
nal EMERGENCY STOP.

196 / 487 Issued: 28.05.2014 Version: KSS 8.3 SI V3


6 Configuration

$USER_SAF This output is reset if the safety fence monitoring switch is opened (AUT mode)
or an enabling switch is released (T1 or T2 mode).

$PERI_RDY By setting this output, the robot controller communicates to the higher-level
controller the fact that the robot drives are switched on.

$ROB_CAL The signal is FALSE as soon as a robot axis has been unmastered

$I_O_ACTCONF This output is TRUE if Automatic External mode is selected and the input
$I_O_ACT is TRUE.

$STOPMESS This output is set by the robot controller in order to communicate to the higher-
level controller any message occurring which requires the robot to be stopped.
(Examples: EMERGENCY STOP, Motion enable or Operator safety)

PGNO_FBIT_REF Output representing the first bit of the program number. Precondition: The in-
L put REFLECT_PROG_NR has the value 1.
The size of the output area depends on the number of bits defining the pro-
gram number (PGNO_LENGTH).
If a program selected by the PLC is deselected by the user, the output area
starting with PGNO_FBIT_REFL is set to FALSE. In this way, the PLC can
prevent a program from being restarted manually.
PGNO_FBIT_REFL is also set to FALSE if the interpreter is situated in the
CELL program.

$ALARM_STOP_I Previous name: Int. NotAus


NTERN This output is set to FALSE if the EMERGENCY STOP device on the smart-
PAD is pressed.

In the case of an EMERGENCY STOP, the nature of the EMERGEN-


CY STOP can be recognized from the states of the outputs
$ALARM_STOP and $ALARM_STOP_INTERN:
Both outputs are FALSE: the EMERGENCY STOP was triggered on the
smartPAD.
$ALARM_STOP is FALSE, $ALARM_STOP_INTERN is TRUE: exter-
nal EMERGENCY STOP.

$PRO_ACT This output is set whenever a process is active at robot level. The process is
therefore active as long as a program or an interrupt is being processed. Pro-
gram processing is set to the inactive state at the end of the program only after
all pulse outputs and all triggers have been processed.
In the event of an error stop, a distinction must be made between the following
possibilities:
If interrupts have been activated but not processed at the time of the error
stop, the process is regarded as inactive ($PRO_ACT=FALSE).
If interrupts have been activated and processed at the time of the error
stop, the process is regarded as active ($PRO_ACT=TRUE) until the in-
terrupt program is completed or a STOP occurs in it
($PRO_ACT=FALSE).
If interrupts have been activated and a STOP occurs in the program, the
process is regarded as inactive ($PRO_ACT=FALSE). If, after this, an in-
terrupt condition is met, the process is regarded as active
($PRO_ACT=TRUE) until the interrupt program is completed or a STOP
occurs in it ($PRO_ACT=FALSE).

PGNO_REQ A change of signal at this output requests the higher-level controller to send a
program number.

Issued: 28.05.2014 Version: KSS 8.3 SI V3 197 / 487


KUKA System Software 8.3

If PGNO_TYPE has the value 3, PGNO_REQ is not evaluated.

APPL_RUN By setting this output, the robot controller communicates to the higher-level
controller the fact that a program is currently being executed.

$PRO_MOVE Means that a synchronous axis is moving, including in jog mode. The signal is
thus the inverse of $ROB_STOPPED.

$IN_HOME This output communicates to the higher-level controller whether or not the ro-
bot is in its HOME position.

$ON_PATH This output remains set as long as the robot stays on its programmed path.
The output ON_PATH is set after the BCO run. This output remains set until
the robot leaves the path, the program is reset or block selection is carried out.
The ON_PATH signal has no tolerance window, however; as soon as the robot
leaves the path the signal is reset.

$NEAR_POSRET This signal allows the higher-level controller to determine whether or not the
robot is situated within a sphere about the position saved in $POS_RET. The
higher-level controller can use this information to decide whether or not the
program may be restarted.
The user can define the radius of the sphere in the file $CUSTOM.DAT using
the system variable $NEARPATHTOL.

$ROB_STOPPED The signal is set when the robot is at a standstill. In the event of a WAIT state-
ment, this output is set during the wait.
The signal is thus the inverse of $PRO_MOVE.

$T1, $T2, $AUT, These outputs are set when the corresponding operating mode is selected.
$EXT

6.17.3 Transmitting error numbers to the higher-level controller

Error numbers of the robot controller in the range 1 to 255 can be transmitted
to the higher-level controller. To transmit the error numbers, the file P00.DAT,
in the directory C:\KRC\ROBOTER\KRC\R1\TP, must be configured as fol-
lows:
1 DEFDAT P00
2
3 BOOL PLC_ENABLE=TRUE ; Enable error-code transmission to plc
4 INT I
5 INT F_NO=1
6 INT MAXERR_C=1 ; maximum messages for $STOPMESS
7 INT MAXERR_A=1 ; maximum messages for APPLICATION
8 DECL STOPMESS MLD
9 SIGNAL ERR $OUT[25] TO $OUT[32]
10 BOOL FOUND
11
12 STRUC PRESET INT OUT,CHAR PKG[3],INT ERR
13 DECL PRESET P[255]

26 P[1]={OUT 2,PKG[] "P00",ERR 10}

30 P[128]={OUT 128,PKG[] "CTL",ERR 1}

35 STRUC ERR_MESS CHAR P[3],INT E
36 DECL ERR_MESS ERR_FILE[64]
37 ERR_FILE[1]={P[] "XXX",E 0}

96 ERR_FILE[64]={P[] "XXX",E 0}
97 ENDDAT

198 / 487 Issued: 28.05.2014 Version: KSS 8.3 SI V3


6 Configuration

Line Description
3 PLC_ENABLE must be TRUE.
6 Enter the number of controller errors for the transmission of
which parameters are to be defined.
7 Enter the number of application errors for the transmission of
which parameters are to be defined.
9 Specify which robot controller outputs the higher-level control-
ler should use to read the error numbers. There must be 8
outputs.
13 In the following section, enter the parameters of the errors.
P[1] P[127]: range for application errors
P[128] P[255]: range for controller errors
26 Example of parameters for application errors:
OUT 2 = error number 2
PKG[] "P00" = technology package
ERR 10 = error number in the selected technology pack-
age
30 Example of parameters for controller errors:
OUT 128 = error number 128
PKG[] "CTL" = technology package
ERR 1 = error number in the selected technology package
37 96 The last 64 errors that have occurred are stored in the
ERR_FILE memory.

Issued: 28.05.2014 Version: KSS 8.3 SI V3 199 / 487


KUKA System Software 8.3

6.17.4 Signal diagrams

Fig. 6-30: Automatic system start and normal operation with program
number acknowledgement by means of PGNO_VALID

200 / 487 Issued: 28.05.2014 Version: KSS 8.3 SI V3


6 Configuration

Fig. 6-31: Automatic system start and normal operation with program
number acknowledgement by means of $EXT_START

Issued: 28.05.2014 Version: KSS 8.3 SI V3 201 / 487


KUKA System Software 8.3

Fig. 6-32: Restart after dynamic braking (operator safety and restart)

202 / 487 Issued: 28.05.2014 Version: KSS 8.3 SI V3


6 Configuration

Fig. 6-33: Restart after path-maintaining EMERGENCY STOP

Issued: 28.05.2014 Version: KSS 8.3 SI V3 203 / 487


KUKA System Software 8.3

Fig. 6-34: Restart after motion enable

204 / 487 Issued: 28.05.2014 Version: KSS 8.3 SI V3


6 Configuration

Fig. 6-35: Restart after user STOP

Issued: 28.05.2014 Version: KSS 8.3 SI V3 205 / 487

You might also like