Submit Interpreter: Software
Submit Interpreter: Software
Submit Interpreter: Software
KR C
Submit Interpreter
1 of 15
e Copyright KUKA Roboter GmbH
This documentation or excerpts therefrom may not be reproduced or disclosed to third parties without the express permission of the publishers.
Other functions not described in this documentation may be operable in the controller. The user has no claim to these functions, however, in
the case of a replacement or service work.
We have checked the content of this documentation for conformity with the hardware and software described. Nevertheless, discrepancies
cannot be precluded, for which reason we are not able to guarantee total conformity. The information in this documentation is checked on a
regular basis, however, and necessary corrections will be incorporated in subsequent editions.
Subject to technical alterations without an effect on the function.
SubmitInt R1 02.00.01 en
2 of 15
Contents
3 Operator control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.1 Manual start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.2 Manual stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.3 Visualization of program execution for fault analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.1 Calling subprograms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.2 Communication with other applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.3 Controlling system variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.4 Polling system variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.5 Access to inputs and outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.6 Technology packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
SubmitInt R1 02.00.01 en
3 of 15
Submit Interpreter
SubmitInt R1 02.00.01 en
4 of 15
1 KR C and Submit interpreter
For cases such as these we recommend use of the KUKA products “CoDeSys” or
“Multiprog--ProCoNos”. Detailed descriptions of these products can be found in
the KUKA Roboter GmbH product catalog.
SubmitInt R1 02.00.01 en
5 of 15
Submit Interpreter
A Submit file may only be viewed, created and edited at Expert level. The controller
interpreter can be started and run at both user levels.
Unlike in the robot, program execution in the controller is carried out in quick cycles (PLC
approach).
DECLARATIONS
INI
AUTOEXT INIT
ARC!= PLC INIT
USER INIT ; <-- Open this fold!
; Insert expansions for one--off settings following booting
; e.g. initialization of process variables
LOOP
AR10 PLC
TOUCH PLC
GRP PLC
SPOT PLC
USER PLC; <-- Open this fold!
; Insert expansions for cyclical program execution
ENDLOOP
SubmitInt R1 02.00.01 en
6 of 15
2 Programming the Submit interpreter (continued)
To create a new Submit file, press the softkey “NEW”. This generates an input box in which
the name of the new Submit file and the extension *.sub must be entered. Once these entries
have been made, the Enter key is pressed and the (at this stage still empty) Submit file is
created. In order to enter commands in the Submit file, the file is highlighted using the blue
bar and the editor is opened by pressing the softkey “EDIT”. The Submit file is now displayed
and commands can be entered.
Program structure:
The structure is very similar to the program structure at the robot level. Data types,
declarations and initializations are thus also handled in the same way as for a robot program.
Basic structure of a Submit program:
Declaration
Initialization
Program
If you want controller interpreter programs to run permanently in the background, this must
be programmed using a program loop (Loop...Endloop).
To prevent this cycle from being interrupted, WAIT commands and wait loops should not
be programmed.
SubmitInt R1 02.00.01 en
7 of 15
Submit Interpreter
The WAIT command between the two output commands stops the program loop for 20
seconds. This means that the subsequent polling of the input $in[1] is no longer reliable, as
this input is only polled briefly once every 20 seconds.
Commands which are only to be executed once after booting the system can be entered
before the LOOP command. This allows basic initializations, for example, that are to take
effect once the robot has been booted.
SubmitInt R1 02.00.01 en
8 of 15
2 Programming the Submit interpreter (continued)
2.4 Compiler
If new program code is entered in the editor, it must always be compiled. Only then can the
code be run as a Submit program. The compiler is started automatically when the editor
window is closed. All commands are checked and translated into machine commands. If the
entered Submit program is free of errors, the Submit file is available and can be selected and
started.
Incorrect entries:If the code contains incorrect entries, incompatible logic or basic motion
command calls (PTP, LIN, CIRC), it cannot be translated by the compiler. In such cases an
error message is generated in the user interface message window and an error file (*.err)
is created. This file lists the errors that have been found along with their error number.
It is not possible to start an incorrectly compiled Submit file. Instead, the compiler
generates an ERR file. This file may not be visible immediately in the listing, but then
becomes visible following the command “Refresh display”.
SubmitInt R1 02.00.01 en
9 of 15
Submit Interpreter
3 Operator control
3.1 Manual start
The Submit interpreter can be started manually in the “Configure” menu. Following the
manual start, the Submit program specified in the file $custom.dat is selected and
executed independently of the status of the programs on the robot side of the KR C.
The status flag for the interpreter in the GUI turns green once the interpreter has started.
Submit flag
The status flag for the interpreter in the GUI turns red again, indicating that the interpreter
has stopped.
SubmitInt R1 02.00.01 en
10 of 15
3 Operator control (continued)
It is not possible to switch this function back again in software version 2.3. To do this, the
KR C must be rebooted.
From software version 3.2. onwards, the display can be switched back to the robot program
by resetting the system variable to its original value “1”.
SubmitInt R1 02.00.01 en
11 of 15
Submit Interpreter
4 Examples
4.1 Calling subprograms
Controller subprograms (*.sub) can also be called from an interpreter program. The program
call has the same syntax as that for a motion program in the robot interpreter.
Controller
Robot
SPS.SUB
DECLARATIONS CELL.SRC
INI INI
AUTOEXT INIT LOOP
CWRITE($CMD,STAT,MODE, CASE 1 Program1.SRC
”RUN/R1/CELL( )” )
CELL.SRC( )
CASE 2 Program2.SRC
LOOP
ARC20 PLC CASE 3 Program3.SRC
USER PLC
ENDLOOP ENDLOOP
Steuer.sub Roboter.src
SubmitInt R1 02.00.01 en
12 of 15
4 Examples (continued)
The program switches the contrast of the GUI screen between the maximum and minimum
values using the system variable $phgcont. The time control functions are performed by
Timer(10).
Axis monitoring
Def PLC( )
real Angle_A1
loop
USER PLC
Angle_A1 = $AXIS_ACT.A1
if ((Angle_A1 > -60.0) AND (Angle_A1 < 60.0)) THEN
$OUT[3] = True
$OUT[4] = True
else
$OUT[3] = False
$OUT[4] = False
endif
endloop
end
In this program, the system variable $AXIS_ACT.A1 is polled and evaluated. In this way,
the current axis position of A 1 can be determined by the Submit program at any time. As
soon as A 1 moves outside the range +/-- 60.0 degrees, the output variables $OUT[3] and
$OUT[4] are set to “false”. The output variables can now be assigned through to the
interfaces or be polled by the robot program and linked according to the specific application.
SubmitInt R1 02.00.01 en
13 of 15
Submit Interpreter
This program switches outputs 1 to 16 on and off, one after the other. The time control
functions are performed by Timer(10). If the outputs are now viewed with the aid of the menu
item “Overview output”, the effect is like that of a running light.
SubmitInt R1 02.00.01 en
14 of 15
5 Useful information and tips
Careful attention must be paid when assigning the output variables. Since
the output variables may be used to control machines, devices or safety
equipment in the vicinity of the robot, an incorrectly set output can have
fatal consequences.
1
SubmitInt R1 02.00.01 en
15 of 15
Index
Symbols I
$AXIS_ACT, 13 IOSYS.INI, 8
$custom.dat, 5
$interpreter, 11
N
$phgcont, 13
Notices, 12
A
ARC Tech, 14 P
ARCSPS.SUB, 5 PLC, 5
B S
Basic initializations, 8 Software version, 11
Basic motion commands, 9 SPS.SUB, 5
Status flag, 10
C
Cell program, 12 T
Commands, 7
Task, 5
Compiler, 9
Timer, 13, 14
Cooling water circuit, 5
E U
Error file, 9 user.init, 6
Expert level, 6 user.plc, 6
F W
Flags, 12 WAIT command, 8
Index -- i