KUKA KRC Translators

This section provides basic information about the Kuka KRC1 translator. The information includes:

This page discusses:

Instruction Support

Kuka Instruction Support

This table summarizes the level of support for each Kuka instruction by the DELMIA Kuka translator and DELMIA simulation.

Kuka KRC Instruction Level of Support DELMIA Instruction Comments
Motion Instructions
PTP Supported Robot Motion Joint, linear and circular move instructions
LIN
CIRC
Spot Instructions
EG_SPOT Supported Spot Operation Needs the entire servo spot Fold. When CMD=#SPOT, it is a spot weld instruction; when CMD=#TIP_DRESSING, it is a tip dressing instruction.
Arc Instructions
A20 Supported Arc Operation Needs the entire ARC Tech 20 Fold. Supports ARC ON, ARC OFF, and ARC Switch instructions.
Logic Instructions
GOTO Marker Support Goto Marker is an identifier followed by a colon(":").
Marker: (GOTO destination) Supported Label on another instruction The label is set on the DELMIA instruction which follows it.
IF Execution_Condition THEN Statements <ELSE Statements> ENDIF Support Condition
FOR Counter = Start TO End <STEP Increment > Statements ENDFOR Supported For
WHILE Repetition_Condition Statements ENDWHILE Supported Do While, While do
SWITCH … CASE … ENDSWITCH Supported Test
RETURN < Function_Value > Supported Return For functions, a value is returned. For subprograms, no values are returned.
EXIT Supported Break Unconditional exit from loops.
Subprogram(Arguments) Partial Support Run (procedure) Arguments are supported. KRL is limited in the expression support for arguments. If a subprogram is called again with different number of arguments, it is uploaded as Custom instruction.
H50 Supported Grab/Release Needs the entire Gripper Tech Fold.
Assignment Supported Assign KRL is limited in the expression supported for assignment. The DELMIA expression must conform to the KRL expression format.
WAIT FOR Continue_Condition WAIT SEC Wait_Time Partial Support Wait KRL is limited in the expression supported for waiting. The DELMIA expression must conform to the KRL expression format.
Any unsupported instruction Supported Custom
IO Instructions
$OUT[ IO ] Support Assign Type Boolean
PULSE($OUT[1],TRUE,0.5) Support Pulse
Other Instructions
;comments Supported Custom Comments have no impact on the program execution.
Inline Comment Partial Support Set to instruction text Inline Comment is text on an instruction line from ";" to end of line. It is appended to the end of the instruction text. Inline Comments of instructions which are uploaded to a 3DEXPERIENCE instructions are kept and will be downloaded as Inline Comments. For example, there are several assignment instructions in a Motion Fold, only the Inline Comment on the Move instruction (PTP, LIN etc.) are kept.

DELMIA Instruction Support

The following table summarizes the level of support for each DELMIA instruction by the KUKA translator.

DELMIA Instruction Level of Support KUKA KRL Instructions Comments
Goto Supported GOTO Marker Marker: Marker is an identifier followed by a colon(":"). See Custom instruction for detail.
Condition Supported IF Execution_Condition THEN Statements <ELSE Statements> ENDIF
For Supported FOR Counter = Start TO End <STEP Increment > Statements ENDFOR
Do While, While do Supported WHILE Repetition_Condition Statements ENDWHILE
Test Supported SWITCH … CASE … ENDSWITCH
Return Supported RETURN < Function_Value > For functions, a value is returned. For subprograms, no values is returned.
Break Supported EXIT Unconditional exit from loops.
Run (service) Not Supported NA Service calls run procedures from other resources, this is not possible with KRL.
Run (procedure) Partial Support Subprogram(Arguments) Arguments are supported. KRL is limited in the expression support for arguments.
Procedure Supported SRC and DAT files Each procedure is a pair of SRC and DAT files.
Custom Supported Custom instructions are downloaded "as-is" and are assumed to be valid Kuka instructions. If the field "Goto Label" is set (non-blank), it is downloaded as the Marker(label) for Goto statements.
Grab/Release Supported Gripper tech fold Depending on positioning, subprogram H50 is called either directly or from a TRIGGER statement.
Assign Supported Assignment KRL is limited in the expression supported for assignment. The DELMIA expression must conform to the KRL expression format.
Pulse Partial Support PULSE
Wait Partial Support WAIT FOR Continue_Condition WAIT SEC Wait_Time KRL is limited in the expression supported for waiting. The DELMIA expression must conform to the KRL expression format.
Robot Motion Supported PTP|LIN|CIRC XP1 <C_PTP < Approximate_Positioning >>
Spot Operation Supported EG_SPOT(Spot tech)
Arc Operation Supported A20(Arc tech)
Seam Search Operation Not Supported N/A KRL has no Seam search operations.

Each of the above instructions is translated as described below.

Task

Kuka robot programs are comprised of a .SRC file and a .DAT file. An SRC file may contain multiple routines; the first routine name is the same as the file name. Since different SRC files may contain routines of the same name (such as short utility routines), routines in an SRC file are uploaded as Tasks with the naming format “RoutineName#SRCFileName”, to identify the program files the routines should be downloaded into.

To make round-load as close as possible, during download, you may select Template to a folder that contains the original program files uploaded. The Attributes (lines beginning with ‘&’ at the start of program files) and header section (lines from “;FOLD INI” through “;ENDFOLD”) are taken from the original program files. (If Kuka SRC and DAT program files exist in the Template folder, these supersede the Kuka Controller Parameter “TemplateFile” setting.) The SRC program file may contain short utility routines that do not need modification. If these subroutines are not selected for download, they are taken from the original program files and appended to the download file.

Unsupported Instructions
Any instruction that is not supported on download is ignored, and a warning is displayed.
Goto

A DELMIA Goto instruction is translated into a GOTO Marker. In DELMIA, there must be an instruction with an identical "Goto Label" set on it.

Upon uploading a Marker(label), the "label" will be set to the "Goto Label" field of the following instruction. If there is no instruction following the Marker instruction (before the "END" statement), a Custom instruction will be created with its "Goto Label" set. If the Label referenced by a GOTO instruction does not exist in the program, a warning will be generated instructing the user to manually correct the program.

Indirect label addressing is not supported.

Condition
A DELMIA Condition instruction is translated into an IF. The expression for the IF must conform to the KUKA KRL Expressions. Additionally multiple expressions can be joined with AND or OR operators. However, AND and OR cannot be mixed. See Run (procedure) for how expressions are translated.
Test
A DELMIA Test instruction is translated to a KUKA SWITCH … CASE … ENDSWITCH instruction. The Test expression types supported are Integer and String.
For-Loop
DELMIA For-Loop instruction is translated into a KUKA FOR … TO … ENDFOR instruction. DELMIA restricts the STEP to be either 1 or -1.
While-Do
DELMIA While-Do instruction is translated to KUKA WHILE … ENDWHILE instruction.
Custom
A custom instruction text is downloaded into the program exactly as-is. On upload, any unsupported instruction is created as a custom instruction with the name of the custom instruction being the KRL instruction's text.
Grab/Release

Grab and release instructions are downloaded as Kuka Gripper Tech instruction H50.

Assign

A DELMIA assign instruction is translated into a KUKA KRL assignment.

The expressions for the assignment must conform to the KUKA KRL assignment restrictions on download. See Expressions for details on how each KUKA data type and operators are translated.

Output IOs are also assigned with this statement.

Pulse

A DELMIA Pulse instruction is translated into a KUKA Pulse instruction.

Output IO number, output value, or pulse duration(time) cannot be specified as a variable. They must be specified as numbers.

Output IOs must be of type Boolean.

When pulse duration is set to Infinite, it downloads to the maximum of 3 seconds.

Non-zero Delay value is not supported in Kuka. A warning is issued.

Wait

A DELMIA Wait instruction is translated as a KUKA KRL “WAIT FOR” instruction.

On download, the expression for the wait must conform to the KUKA wait expression syntax. See Expressions for details.

The KUKA “WAIT SEC time” expression format corresponds to a DELMIA Wait instruction with the expression set to the constant “false”. The DELMIA timeout value is the time.

KUKA Example DELMIA Example
WAIT FOR $IN[17] WAIT FOR BIT1 == FALSE Wait (Input[17]=1) Timeout = 0s Wait (BIT1=false) Timeout = 0s
WAIT SEC 2.5 Wait (false) Timeout = 2.5s

On upload, WAIT instructions are uploaded as custom activities if the parameter "CommentWaitSignal" in "Kuka Controller Parameters" is set to true. This is the default value. This is because the robot program will pause during simulation at the WAIT instruction unless all the robot's IO have been setup and you are simulating the full station behavior.

Run (procedure)

A DELMIA run instruction, where the run is calling a procedure, is translated into a KUKA subprogram call instruction.

Run instructions can have arguments. The argument expression in the run instruction must conform to the KUKA KRL argument requirements. This means that an argument can be a constant, a string, a local variable or a procedure input variable.

DELMIA argument direction KUKA Download Result
In Supported Transfer mode is ":IN"
Out Supported Transfer mode is ":OUT"
InOut Not Supported N/A
Robot Motion
Robot Motions, Spot Operations, and Arc Operations support the following options.
Kuka Motion Option Support Level DELMIA Equivalent Description Translation Notes
PTP, LIN, CIRC Joint, Linear, Circular motion type CIRC requires an auxiliary position and a target position.
Px Global positions supported, not local Position Type / Position Number Position storage location Tag and Cartesian targets are downloaded as Kuka E6POS positions. Joint targets are downloaded as E6AXIS positions.
C_DIS, C_VEL, C_PTP Support Accuracy Profile Accuracy When approximate positioning is used(FlyBy=On), C_VEL specifies accuracy type speed and C_DIS specifies type distance. For type joint moves, C_PTP is also present, i.e. "C_PTP C_DIS" or "C_PTP C_VEL". Accuracy values are specified in the .DAT file as component APO_DIST of data structure PDAT/LDAT. See also Accuracy Parameter section.
VEL Support Motion Profile Speed "VEL" appears in the motion FOLD but not on the motion command line. Its value is specified in the .DAT file as component VEL of data structure PDAT/LDAT.
$config.dat Limited Kuka predefined data file When uploading programs, if this file exists in the same folder, it is also uploaded. Positions, tool profiles, object profiles, motion profiles, and accuracy profiles will be created if they are used in the program task.

E6AXIS positions are uploaded as HOME targets, and E6POS positions are uploaded as Global targets. These positions, along with PDAT/LDAT (motion profile-accuracy profile combo) and FDAT defined in $config.dat, are not downloaded to application programs.

Spot Welding

For spot welding, only servo guns are supported. Spot operation translation depends upon the weld parameter settings of "Kuka ServoGunWeld Profile" or "Kuka ServoGunTipDress Profile" which is associated with the spot operation.

Upon uploading Kuka robot programs with SpotTech instructions, the profiles are created with the parameters are set from the instruction FOLD. Upon download, the parameters are used to generate the instruction FOLD.

For Tip Dress instructions, the "Cont" attribute is set to "TIPDRESS" on uploading ServoGun TC programs.

Arc Welding

Translation of Arc welding operations relies on the Arc profile and the Kuka-specific arc profile DNBOlpKukaArcProfile. Generally, one Arc profile is associated with all Arc operations for a single weld. Arc profile Start, Weld, and End sections are set with Kuka specific arc weld profiles.

Upon uploading Kuka robot programs with ArcTech20 instructions, the profiles are created with the parameters set from the instruction FOLD and the weld data structures (WELD_ST and WELD_FI) in the DAT file. Upon download, the parameters are used to generate the A20 instruction FOLD in the SRC file and the weld data structures in the DAT file.

Gripper Application

Grab and Release actions are translated to GripperTech instructions. Only Type 1 gripper, 2 states Open & Close as defined in Kuka GripperTech, is supported. An applicative profile DNBOlpKukaGripperProfile needs to be associated with the Grab/Release actions. When the profile parameter "Cont" (Approximate positioning) is "#NO", Grab/Release actions are translated to direct H50 function calls ( H50(…) ). When the parameter is "#YES", they are translated to TRIGGER instructions that call H50 function.

Upon upload, the profiles are created with the parameters set from the instruction FOLD and the gripper data structures (GRP_TYP) in the DAT file. Upon download, the parameters are used to generate the H50 and TRIGGER instructions FOLD in the SRC file and the gripper data structures in the DAT file.

Expressions

KUKA expressions used in IF, WAIT, Assignment, and Argument passing are somewhat different than the DELMIA expressions.

On upload, the KUKA KRL expression is converted into a DELMIA expression (with very few exceptions). However, converting the DELMIA expression to a KUKA expression may not always be possible.

If an error occurs converting an expression on upload, the instruction containing the expression will be uploaded as a custom instruction. If an error occurs converting an expression on download, the instruction containing the expression will be placed as a comment in the program. In both cases, a warning will be generated.

Variable Conversion

DELMIA external IO, IO defined on the robot, is mapped to one of the KUKA IO variables. On upload, the IO and variables are automatically created.

External IO must be declared of the appropriate type in DELMIA. Analog IO must be of type double and binary IO must be of type Boolean.

KUKA Variable/IO Variable Type Direction Location Address
X Any Type Internal Robot or Procedure X
$IN[x] Boolean Input Robot DI[x]
$OUT[x] Boolean Output Robot DO[x]

Expression Conversion

KUKA expressions are limited to a simple set of operations.

Category Description Kuka Operator DELMIA Operator
Binary Integer/Double Plus + +
Minus - -
Multiply * *
Division / /
Modulus NA %
Power NA **
Unary Negative - -
Not NOT Not
Bitwise Not B_NOT ~
Binary Comparison Equals == =
Not Equals <> <>
Less Than < <
Less Than or Equal <= NA
Greater Than > >
Greater Than or Equal >= NA
Binary Boolean And AND and
Or OR or
Exclusive OR EXOR NA
Bitwise And B_AND &
Bitwise Or B_OR |
Left Shift NA <<
Right Shift NA >>
Bitwise XOR B_EXOR ^^
Other Grouping NA ( ... )
conditional (if) IF...THEN...ELSE...ENDIF If ... then ... else ...

Controller Parameters

Parameter Name Usage Default Value Description
PartGrabbed Upload "" This parameter specifies the part being grabbed / released in the Grab/Release operation.
SoftwareVersion Download & Upload "4.1.5" This parameter specifies the software release version string in the KRL basic language FOLD (%MKUKATPBASIS). It is modified by the version string in the program upon uploading.
ServoGunTechRelease Download & Upload "" This parameter specifies the software release version string in the Kuka SpotTech FOLD (%MKUKATPSERVOTECH). It is modified by the version string in the program upon uploading.
ArcTechRelease Download & Upload "" This parameter specifies the software release version string in the Kuka ArcTech20 FOLD (%MKUKATPA20). It is modified by the version string in the program upon uploading.
GripperTechRelease Download & Upload "" This parameter specifies the software release version string in the Kuka Gripper Tech FOLD (%MKUKATPGRP). It is modified by the version string in the program upon uploading.
TemplateFile Download "" Users can set this parameter to point to Kuka program files serving as "template" for file attributes (lines beginning with '&' at the start of Kuka program files) and header section (lines from ";FOLD INI" through ";ENDFOLD"). The value for this parameter is the path to the SRC & DAT files without the SRC or DAT extension names. If this parameter is blank, default file attributes and header section will be output to the downloaded Kuka program files.
CommentWaitSignal Upload true When this parameter is "true" (default), WAIT FOR instructions are uploaded as Custom instructions.
UniquePDATDownloadfalse Robot motion activities using the same Motion Profile and Accuracy Profile get the same PDAT (or LDAT for Linear motion). If a unique PDAT/LDAT is desired for each move (not re-using), set this parameter to "true".
MachineFile Download & Upload "" Use this parameter to inform the Kuka Translator the location of the Kuka system file $machine.dat. This can be a full path name. For download it may also be a file name, in which case it is assumed in the Template Folder. This can be useful to specify a specific robot-rail configuration name, e.g. $machineA.dat, since by default, $machine.dat is being processed if found in the Template Folder during download (and upload).

Multiple Routines in a Single Program File

Refer to Task section above.

Template File Download

Refer to Task section above.

External Axis - Rail

Kuka robots mounting on rails can be four (4) 90-degree configurations and four (4) 45-degree configurations, and it is necessary to use file $machine.dat for OLP. The file must be in the program folder during upload and in the Template Folder (usually the same as program folder specified by Template in the download dialog) during download. It can also be specified by the controller parameter MachineFile and takes precedent over the file in program folder (and Template folder).

90-degree configurations A, B, C, and D

45-degree configurations H, I, J, and K

Table 1. Variable settings in the file $machine.dat
Configurations Variable Settings
A

$ET1_TA1KR = {X=0, Y=0, Z=450, A=0, B=90, C=0}

$ET1_TFLA3 = {X=0, Y=0, Z=0, A=0, B=-90, C=0}
B

$ET1_TA1KR = {X=0, Y=0, Z=450, A=0, B=0, C=-90}

$ET1_TFLA3 = {X=0, Y=0, Z=0, A=0, B=0, C=90}
C

$ET1_TA1KR = {X=0, Y=0, Z=450, A=0, B=-90, C=0}

$ET1_TFLA3 = {X=0, Y=0, Z=0, A=0, B=90, C=0}
D

$ET1_TA1KR = {X=0, Y=0, Z=450, A=0, B=0, C=90}

$ET1_TFLA3 = {X=0, Y=0, Z=0, A=0, B=0, C=-90}
Configurations Variable Settings
H (A-450-B)

$ET1_TA1KR = {X=0, Y=0, Z=450, A=0, B=0, C=-90}

$ET1_TFLA3 = {X=0, Y=0, Z=0, A=0, B=-45, C=+90}
I (B-450-C)

$ET1_TA1KR = {X=0, Y=0, Z=450, A=0, B=0, C=-90}

$ET1_TFLA3 = {X=0, Y=0, Z=0, A=0, B=+45, C=+90}
J (C-450-D)

$ET1_TA1KR = {X=0, Y=0, Z=450, A=0, B=0, C=+90}

$ET1_TFLA3 = {X=0, Y=0, Z=0, A=0, B=+45, C=-90}
K (D-450-A)

$ET1_TA1KR = {X=0, Y=0, Z=450, A=0, B=0, C=+90}

$ET1_TFLA3 = {X=0, Y=0, Z=0, A=0, B=-45, C=-90}

Note that the Z value (450 in this example) specifies the height of the robot raised by the rail. The values of B and C determine the configurations.

For the 90-degree configurations, the targets output are relative to a coordinate system Z-offset below the robot coordinate system.

For the 45-degree configurations H (A-450-B) and I (B-450-C), the targets output are relative to the same coordinate system as in the 90-degree configuration B. For J (C-450-D) and K (D-450-A), the relative coordinate system is the same as in the 90-degree configuration D.

Safety Zones

KUKA SafeOperation monitors the positions of Tools moving against some predefined Cartesian spaces.

The Tools are defined by multiple spheres (up to 6 at this time), and as many as 16 Tools can be configured.

The Cartesian spaces consist of one Cell Area and up to 16 other configurable spaces.

The Cell Area is a Prism defined by up to 10 vertices and bound by vertical upper and lower limits. The Cell Area is always monitored (active) and the robot Tools must move inside of it.

There may have up to 16 other Cartesian spaces which are simply Cuboids, or rectangular prisms. Each cuboid can be active or inactive, and “Protected” (robot Tools must remain outside of it) or not.

The safety configuration can be exported as XML files for DELMIA Kuka Translator to upload and create TCP Safety Zones and Tool Volumes. No Safety Zone or Tool Volume download is supported.

An XML safety file can be selected along with Kuka program files for upload. If no XML safety file is selected, and there are multiple XML files in the program folder, the alphabetically first safety XML file will be uploaded to create Safety Zones and Tool Volumes.

[1] KRC, KRL, MKS10, PTC NutCracker Platform Components, Kuka Office Lite, Kuka WorkVisual, FlexLM LMTOOLS, ServoGunTech, ArcTech, and GripperTech are or may be trademarks or registered trademarks of Kuka or its subsidiaries in the U.S. and in other countries.