TechPack Function manual

30
Funktionsgenerator KSS5.1 08.02.00 en 1 of 28 SOFTWARE KR C... Function Generator System Tech (KSS) 5.1

Transcript of TechPack Function manual

Page 1: TechPack Function manual

Funktionsgenerator KSS5.1 08.02.00 en

1 of 28

SOFTWARE

KR C...

Function Generator

System Tech (KSS) 5.1

Page 2: TechPack Function manual

2 of 28

Funktionsgenerator KSS5.1 08.02.00 en

e Copyright KUKA Roboter GmbHThis documentation or excerpts therefrommay 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, inthe case of a replacement or service work.We have checked the content of this documentation for conformity with the hardware and software described. Nevertheless, discrepanciescannot be precluded, for which reason we are not able to guarantee total conformity. The information in this documentation is checked on aregular basis, however, and necessary corrections will be incorporated in subsequent editions.Subject to technical alterations without an effect on the function.

PD Interleaf

Page 3: TechPack Function manual

3 of 28

Funktionsgenerator KSS5.1 08.02.00 en

Contents

1 Characteristics, functional description 5. . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.1 Characteristics 5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.2 Functional description 6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1.2.1 Basic principle 6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1.2.2 Function definition 6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1.2.3 Correction direction 7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1.2.4 The correction coordinate system TTS 7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.3 Configuration 8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2 Programming, parameterization 9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.1 Structure variables 9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2.1.1 $TECH[i], $TECH_C[i], i=1,...,6 9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2.1.2 $TECHIN[i], i = 1,...,6 14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2.1.3 $TECHPAR[i, j], i=1,...,6 , j=1,...,10 14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2.1.4 $TECHPAR_C[i, j], i = 1,...,6 , j=1,...,10 14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2.1.5 $TECHVAL[i], i = 1,...,6 15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2.1.6 $TECHSYS 15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2.1.7 $TECHSYS_C 15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2.1.8 $TECHANGLE 15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2.1.9 $TECHANGLE_C 15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2.1.10 $TSYS 15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2.1.11 $DISTANCE 15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.2 Analog sensors 17. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2.2.1 Interface 17. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2.2.2 Parameterization 17. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2.2.3 Correction direction 18. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2.2.4 Changing technology mode, correction variable 19. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.3 Conveyor synchronization 20. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.4 Complex sensors 23. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3 Application examples 25. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3.1 Weaving 25. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3.2 Analog sensor 26. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3.3 Conveyor synchronization 27. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 4: TechPack Function manual

Function Generator

4 of 28

Funktionsgenerator KSS5.1 08.02.00 en

Page 5: TechPack Function manual

1 Characteristics, functional description

5 of 28

Funktionsgenerator KSS5.1 08.02.00 en

1 Characteristics, functional description

1.1 Characteristics

The function generator included in the KRC software is easy to use and allows the user toimplement the following functions:

G Mechanical weaving

G Thermal weavingThe function values can be used at KRC analog outputs to modulate the weld currentand the wire feed rate.

G Analog sensors

G Conveyor synchronization

G Coupling of intelligent sensors (META, SCOUT, ...).

The following diagram illustrates mechanical and thermal weaving using the functiongenerator.

Weld direction

Weld direction

Max. feed

Min. feed

Wire feed

Length(1 period)Weld voltage

(volts)

Max. voltage

Min. voltage

Thermal weaving

Torch

Weave planeComponentplane

Weave amplitude

Mechanical weavingTaking the example of a weldapplication

Page 6: TechPack Function manual

Function Generator

6 of 28

Funktionsgenerator KSS5.1 08.02.00 en

1.2 Functional description

1.2.1 Basic principle

The user defines a function which is evaluated accordingly by the system and processedfurther. The input values of the function (distance, velocity, etc.), and also the furtherprocessing of the results of the function (output to an analog channel, path correction, etc.),can be selected and configured using variables.

1.2.2 Function definition

G The required function y(x) is defined in the interval [0,1] as a polygon.

G The polygon is defined unambiguously by entering function control points.

G Amaximum of 50 control points (x,y) is permissible. They must be selected as follows:

-- x is a real number from the interval [0,1]

-- y is a real number from the interval [--1,1]For control points 1 tomax. 50, the followingmust be observed: x1 < x2 < ...<xN

The first and last control points must be situated on the edge of thedefinition range (x1=0, xN=1).

Example

The control points

(0,0),(0.3,0.5),(0.75,--0.5) and(1,0)

result in the function illustrated below:

(0,0)

(0,1)

(0,--1)

Y

X

(1,--1)

(0.3,0.5)

(0.75,--0.5)

(1,1)

(1,0)

Page 7: TechPack Function manual

1 Characteristics, functional description (continued)

7 of 28

Funktionsgenerator KSS5.1 08.02.00 en

1.2.3 Correction direction

The correction direction is defined using a user--defined correction coordinate system(tool--based technological system, $TECHSYS):

WORLD, BASE, ROBROOT, TCP and TTS

The following definitions apply here:

The correction coordinate system can be rotated using the variable $TECHANGLE:

A: Rotation about the Z axis of the tool--based technological systemin the mathematically positive direction.

B: Rotation about the Y’ axis of the tool--based technological systemin the mathematically positive direction.

C: Rotation about the X’’ axis of the tool--based technological systemin the mathematically positive direction.

The definition can be made unambiguous by selecting an axis of the correction coordinatesystem by means of a “GEOREF” variable.

Corrections are only possible in Cartesian space and not in axis space. This meansthat the function generator is only available for CP motions (LIN, CIRC).

1.2.4 The correction coordinate system TTS

“TTS” stands for tool--based technological system. This tool--basedmoving frame is definedas follows:

X axis Unit vector in direction of path tangent.

Y axis Unit vector in direction of vector product of path tangent and X axis oftool coordinate system.(Applying the right hand rule, the direction of the Y axis is that of themiddle finger if the thumb is pointing in the direction of the path tangentand the index finger is pointing in the direction of the X axis of the toolcoordinate system.)

Z axis Unit vector in direction of vector product of path tangent and Y axis.

Y axis (middle finger)

X axis (thumb)

Z axis

XTOOL axis(index finger)

TTS(tool--based technological system)

The correction coordinate system is calculated every time a CP motion is executed.If the X axis of the tool coordinate system and the path tangent are parallel, the TTScannotbe generated. The TTS is invalid in this case and results in the acknowledgementmessage

“TTS NOT EXISTING”and dynamic braking when path correction is used.In this case, a corresponding reorientation of the tool is required as well as reprogrammingof the motion.

Page 8: TechPack Function manual

Function Generator

8 of 28

Funktionsgenerator KSS5.1 08.02.00 en

1.3 Configuration

Themaximumnumber of programmable function generators is selected in the robot--specificmachine data using the datum $TECH_MAX.

$TECH_MAX can be set to values between 3 and 6 with 3 being the default setting.

Page 9: TechPack Function manual

2 Programming, parameterization

9 of 28

Funktionsgenerator KSS5.1 08.02.00 en

2 Programming, parameterizationThe function generator can be programmed using advance run and main run systemvariables. Advance run variables are copied into the main run variables internally in thesystem at the start of a motion or when changing block to an approximate positioning block.

The function generator, which is only active for CP motions, only evaluates the main runvariables.

For this reason, when controlling the function generator using advance run variables, a CPmotion block must then be executed so that the data are transferred to the main run data.A so--called zero block is also valid in this case.

2.1 Structure variables

2.1.1 $TECH[i], $TECH_C[i], i=1,...,6

These are structure variables for defining the function and programming the evaluation ofthe function.

$TECH[i]. MODE

The parameter “MODE” defines the type of evaluation of the function in theadvance run. Theparameter can be changed in the program and is block--specific.

MODE Effect

#OFF The function is not evaluated.

#SINGLE The definition range of the function is run through just oncewhen the function is evaluated.

#CYCLE Cyclical evaluation of the function.

$TECH_C[i]. MODE

The parameter “MODE” defines the type of evaluation of the function in the main run. Theparameter can be changed using Trigger, Interrupt or the variable modification function andthe changes take effect immediately.

MODE Effect

#OFF The function is not evaluated.

#SINGLE The definition range of the function is run through just oncewhen the function is evaluated.

#CYCLE Cyclical evaluation of the function.

Page 10: TechPack Function manual

Function Generator

10 of 28

Funktionsgenerator KSS5.1 08.02.00 en

$TECH[i].CLASS

The parameter “CLASS” can be used to define the technology class in the advance run. Theparameter can be changed in the program and is block--specific.

CLASS Effect

#PATH The input variable for the function generator is the systemvariable $DISTANCE. The unit for the scaling and offsetvariables is [mm].

#VEL The input variable for the function generator is the pathvelocity ($VEL_ACT).

#SENSOR The input variable for the function generator is the systemvariable $TECHIN[i], i=1..6. Depending on the input values, acorresponding position correction is carried out.

#CONVEYOR The input variable for the function generator is the systemvariable $TECHIN[i], i=1..6. Depending on the input values, acorresponding tracking motion is executed by the robot.

#DATALINK The input variable for the function generator is a correctionframe that is set by the sensor task. Depending on the inputvalues, a corresponding correction is carried out by the robot.

$TECH_C[i].CLASS

The parameter “CLASS” can be used to define the technology class in the main run. Theparameter cannot be changed.

CLASS Effect

#PATH The input variable for the function generator is the systemvariable $DISTANCE. The unit for the scaling and offsetvariables is [mm].

#VEL The input variable for the function generator is the pathvelocity ($VEL_ACT).

#SENSOR The input variable for the function generator is the systemvariable $TECHIN[i], i=1..6. Depending on the input values, acorresponding position correction is carried out.

#CONVEYOR The input variable for the function generator is the systemvariable $TECHIN[i], i=1..6. Depending on the input values, acorresponding tracking motion is executed by the robot.

#DATALINK The input variable for the function generator is a correctionframe that is set by the sensor task. Depending on the inputvalues, a corresponding correction is carried out by the robot.

Page 11: TechPack Function manual

2 Programming, parameterization (continued)

11 of 28

Funktionsgenerator KSS5.1 08.02.00 en

$TECH[i].FCTCTRL

This is a function control structure for setting the scaling and offset parameters in theadvance run. The parameter can be changed in the program and is block--specific.

FCTCTRLelement

Effect

OFFSET_IN Real value which, depending on the parameter CLASS, can be usedto offset the zero point of the definition range of the function.

OFFSET_OUT Real value which, depending on the parameter CLASS, can be usedto offset the zero point of the value range of the function.

SCALE_IN Real value which can be used to scale the definition range of thefunction with reference to the parameter CLASS.

SCALE_OUT Real value which can be used to scale the value range of thefunction with reference to the parameter CLASS.

$TECH_C[i].FCTCTRL

Function control structure for setting the scaling and offset parameters in the main run. Theparameter can be changed using Trigger, Interrupt or the variable modification function andthe changes take effect immediately.

FCTCTRLelement

Effect

OFFSET_IN Real value which, depending on the parameter CLASS, can be usedto offset the zero point of the definition range of the function.

OFFSET_OUT Real value which, depending on the parameter CLASS, can be usedto offset the zero point of the value range of the function.

SCALE_IN Real value which can be used to scale the definition range of thefunction with reference to the parameter CLASS.

SCALE_OUT Real value which can be used to scale the value range of thefunction with reference to the parameter CLASS.

Page 12: TechPack Function manual

Function Generator

12 of 28

Funktionsgenerator KSS5.1 08.02.00 en

GEOREF

GEOREF If the technology class SBC is selected, the variable GEOREF isirrelevant.

NONE This result of the function evaluation is only availableas the system variable $TECHVAL. With thetechnology class SENSOR, this parameter has theeffect that no function evaluation is carried out.

X In addition to the system variable, the calculated valueis also included in the calculation of the TCP in thedirection of the X axis of the TTS programmed using$TECHSYS and $TECHANGLE, or in the direction ofthe X BASE axis in the case of technology classCONVEYOR.

Y In addition to the system variable, the calculated valueis also included in the calculation of the TCP in thedirection of the Y axis of the TTS programmed using$TECHSYS and $TECHANGLE, or in the direction ofthe Y BASE axis in the case of technology classCONVEYOR.

Z In addition to the system variable, the calculated valueis also included in the calculation of the TCP in thedirection of the Z axis of the TTS programmed using$TECHSYS and $TECHANGLE, or in the direction ofthe Z BASE axis in the case of technology classCONVEYOR.

For technology classes SENSOR and CONVEYOR, the followingparameters can also be programmed for GEOREF:

A Significance for technology class SENSOR:Rotation about the Z axis of the tool--basedtechnological system in the mathematically positivedirection.Significance for technology class CONVEYOR:Tracking motion about the Z axis of the BASEcoordinate system in the mathematically positivedirection.

B Significance for technology class SENSOR:Rotation about the Y axis of the tool--basedtechnological system in the mathematically positivedirection.Significance for technology class CONVEYOR:Tracking motion about the Y axis of the BASEcoordinate system in the mathematically positivedirection.

C Significance for technology class SENSOR:Rotation about the X axis of the tool--basedtechnological system in the mathematically positivedirection.Significance for technology class CONVEYOR:Tracking motion about the X axis of the BASEcoordinate system in the mathematically positivedirection.

Page 13: TechPack Function manual

2 Programming, parameterization (continued)

13 of 28

Funktionsgenerator KSS5.1 08.02.00 en

Example

$TECHVAL

(output variable)

OFFSET_IN

OFFSET_OUT

SCALE_IN

Technology mode#CYCLE

e.g. length of arcfor #PATH

SCALE_OUT

(input variable)$DISTANCE (CLASS = #PATH)$VEL_ACT (CLASS = #VEL)$TECHIN (CLASS = #SENSOR,

CLASS = #CONVEYOR)Correction frame

(CLASS = #DATALINK)

(0,--1) (1,--1)

(0,0)

(1,0)

(0,1) (1,1)

Y

X

Page 14: TechPack Function manual

Function Generator

14 of 28

Funktionsgenerator KSS5.1 08.02.00 en

$TECH[i].FCT

Defines the function in the advance run. It can be changed in the program and isblock--specific.

$TECH_C[i].FCT

Defines the function in the main run. It cannot be changed in the program.

FCT element Effect

ORDER Integer value specifying the degree of interpolation when the splineis evaluated. The only degree of interpolation currently implementedis 1.

CPNUM Total number of valid control points in the following five control pointstructures. The number of valid control points can be freely selectedbetween 2 and 50; no gaps are allowed between valid controlpoints.

CPS1 Control point list for control points 1 to 10

CPS2 Control point list for control points 11 to 20

CPS3 Control point list for control points 21 to 30

CPS4 Control point list for control points 31 to 40

CPS5 Control point list for control points 41 to 50

2.1.2 $TECHIN[i], i = 1,...,6

The system variable $TECHIN forms the interface between the cyclical analog and digitalinputs of the KR Cx and the function generator. The contents of this variable serve as theinput variable for the function generator.

The variable has the data type REAL and cannot be modified in the program.

2.1.3 $TECHPAR[i, j], i=1,...,6 , j=1,...,10

This is used for parameterization or output of the function generator (analog sensors,conveyor tracking, etc.) in the advance run. Ten input parameters and ten output parametersare available to each function generator (i). If a parameter is used to output functiongenerator states, the parameter value that is current in the interpolation cycle can be foundin the main run variable.

The data type is REAL. The variable can be modified in the program and is block--specific.

2.1.4 $TECHPAR_C[i, j], i = 1,...,6 , j=1,...,10

This is used for parameterization or output of the function generator (analog sensors,conveyor tracking, etc.) in themain run. Ten input parameters and ten output parameters areavailable to each function generator (i). If a parameter is used to output function generatorstates, the parameter value that is current in the interpolation cycle can be found in the mainrun variable.

The data type is REAL. The variable can be modified using Trigger, Interrupt or the variablemodification function. The changes take effect immediately.

Page 15: TechPack Function manual

2 Programming, parameterization (continued)

15 of 28

Funktionsgenerator KSS5.1 08.02.00 en

2.1.5 $TECHVAL[i], i = 1,...,6

This is an output variable of the function generator. SCALE_OUT and OFFSET_OUT areincluded in the calculations.

This variable has the data type REAL and cannot be modified during program execution.

2.1.6 $TECHSYS

Used for programming the TTS in the advance run. The coordinate systems #WORLD,#BASE, #ROBROOT, #TCP and #TTS can be programmed. If GEOREF < > (is not equalto) #NONE, then the calculated function values refer to the programmed coordinate system.This variable can be modified in the program and is block--specific.

2.1.7 $TECHSYS_C

This variable is used for programming the TTS in the main run. The coordinate systems#WORLD, #BASE, #ROBROOT, #TCP and #TTS can be programmed.

If GEOREF < > (is not equal to) #NONE, then the calculated function values refer to theprogrammed coordinate system.

This variable can be modified using Trigger, Interrupt or the variable modification functionand the changes take effect immediately.

2.1.8 $TECHANGLE

Used for programming the rotation of the TTS in the advance run.

The rotation is specified in RPY angles.

This variable can be modified in the program and is block--specific.

2.1.9 $TECHANGLE_C

Used for programming the rotation of the TTS in the main run. The rotation is specified inRPY angles.

The variable canbemodified using Trigger, Interrupt or the variablemodification function andthe changes take effect immediately.

2.1.10 $TSYS

For each interpolation cycle, this system variable contains the current TTS – insofar as thereis one available – with reference to the base coordinate system.

This variable is of type FRAME and cannot be modified.

2.1.11 $DISTANCE

This variable allows path--related function evaluation. During program execution, itrepresents the current arc length of a Cartesian motion in millimeters.

$DISTANCE is set to zero at the start of an individual CPblock or at the start of theCPmotionin a PTP/CP approximate positioning motion.

This variable is of type REAL and cannot be modified.

Page 16: TechPack Function manual

Function Generator

16 of 28

Funktionsgenerator KSS5.1 08.02.00 en

Page 17: TechPack Function manual

2 Programming, parameterization (continued)

17 of 28

Funktionsgenerator KSS5.1 08.02.00 en

2.2 Analog sensors

2.2.1 Interface

The system variables $TECHIN[i] (i = 1 .. 6) form the interface between the sensor inputsand the function generator.

These variables are written to cyclically using the following statements and serveas the inputvariable for the function generator.

Analog input:

SIGNAL CORRECTION $ANIN[1]ANIN ON $TECHIN[2] = FACTOR * CORRECTION + OFFSET

Digital input:

Entry in “$MACHINE.DAT”

SIGNAL $DIGIN1 $IN[20] TO $IN[27]DECL DIGINCODE $DIGIN1CODE=#UNSIGNED

DIGIN ON $TECHIN[3] = FACTOR * $DIGIN1 + OFFSET

2.2.2 Parameterization

Elements of the array variable $TECHPAR[i,j] are used for parameterization and foroutputting function generator states.

Technology class SENSOR ($TECH[i].CLASS = #SENSOR) causes the function generatorto use the variable $TECHIN[i] and thus the sensor signal as the input variable.

For function generator class #SENSOR, the function definition describes a controllercharacteristic as illustrated in the following diagram.

Correction velocity[mm/s] or [degrees/s]

OFFSET_IN

OFFSET_OUT

SCALE_IN

Technology mode#CYCLE

$TECHIN

SCALE_OUT

(0,--1) (1,--1)

(0,0) (1,0)

(0,1) (1,1)

Y

X

Controller characteristic

Page 18: TechPack Function manual

Function Generator

18 of 28

Funktionsgenerator KSS5.1 08.02.00 en

If the definition range “SCALE_IN” is exceeded, the corresponding limit value ismaintained.

For function generator class “#SENSOR”, the function generator calculates a correctionvelocity (mm/s or degrees/s) from the input values. This correction velocity is used tocalculate a correction value (mm, degrees) which is added up in every interpolation cycle(sensor correction, initial value 0.0).

With corresponding parameterization, the correction velocity is 0 (zero) and the sensorcorrection value remains constant in the balanced state.

The correction velocity is smoothed before the correction value is calculated in order to avoidabrupt corrections. This smoothing can be set using $TECHPAR[i,1].

If the filter $TECHPAR[i,1] is set to less than the duration of an interpolation cycle, theunfiltered velocity value is used for calculating the correction.

2.2.3 Correction direction

The correction direction is defined, as is usual for the function generator, by means of thevariables

$TECHSYS, $TECHANGLE and GEOREF.

Using the components

#A, #B, and #C

of the ENUM variable GEOREF, it is also possible to carry out an orientation correction tothe corresponding angles.

G #A: Rotation of the X axis of the tool about the Z axis of the tool--based technologicalsystem in the mathematically positive direction.

G #B: Rotation of the X axis of the tool about the Y axis of the tool--based technologicalsystem in the mathematically positive direction.

G #C: Rotation of the X axis of the tool about the X axis of the tool--based technologicalsystem in the mathematically positive direction.

Since the tool--based technological system changes its position when following a contour,the correction increase in the direction/orientation defined byGEOREF and calculated in theinterpolation cycle is converted to the corresponding BASE components (dx, dy, dz or da,db, dc).

Z BASE

Y BASE

X BASE

GEOREF

dsdz

dx dy

X TSYS

Y TSYS

Z TSYS

ds = correction velocity * t_ipo

Page 19: TechPack Function manual

2 Programming, parameterization (continued)

19 of 28

Funktionsgenerator KSS5.1 08.02.00 en

The correction increase in the BASE components is added up (dX, dY, dZ or dA, dB, dC),included in the calculation of the TCP and can be accessed by the user via the TECHPARvariables.

TECHPAR_C[i, 3] : Correction value in X BASE (dX)TECHPAR_C[i, 4] : Correction value in Y BASE (dY)TECHPAR_C[i, 5] : Correction value in Z BASE (dZ)TECHPAR_C[i, 6] : Correction value in A BASE (dA)TECHPAR_C[i, 7] : Correction value in B BASE (dB)TECHPAR_C[i, 8] : Correction value in C BASE (dC)

In the case of a TCP correction (GEOREF = #X, #Y or #Z), the value of the correction vectorin BASE (unit = mm) is written to the output variable of the function generator ($TECHVAL[i])and can then be used, with the aid of two interrupt declarations, for monitoring the sensorcorrection.

INTERRUPT DECL 1 WHEN $TECHVAL[1] > 20.0 DO UPPER_LIMIT()INTERRUPT DECL 2 WHEN $TECHVAL[1] < --20.0 DO LOWER_LIMIT()

In the case of an orientation correction (GEOREF = #A, #B or #C), the value is calculatedusing the correction angle in

BASE (dA, dB, dC)

and transferred to TECHVAL[i].

$TECHVAL[i] = SQRT(dA2 + dB2 + dC2)

All correction values that are made available to the user are interpolator command valuesand are not filtered, i.e. there is no reference to actual values.

2.2.4 Changing technology mode, correction variable

Switching the technology mode from #CYCLE to #SINGLE has the effect that the inputvariable $TECHIN[i] is no longer evaluated. The correction velocity is set to zero internallyin the system thus keeping the established sensor correction vector constant.

When an exact positioning point is reached, the correction variable is retained and is usedfor the subsequent CPmotion. This applies also for the transition to the following block whena CP approximation contour is executed.

Block selection, program reset and interrupt commands followed by theRESUMEstatementcause the start values of the motion block to be initialized and the correction value is lost.The sensor offset is set to 0 in the function generator.

No sensor offset is permissible in the case of a PTP motion. If there is a correction valuepresent, the acknowledgement message

“DEVIATION IN THE START POINT”

is generated.

The instruction $TECH[i].MODE=#OFF triggers an advance run stop, deactivates thefunctionality of the sensors, sets the sensor offset to 0 and continues the motion from thecurrent point in space.

Page 20: TechPack Function manual

Function Generator

20 of 28

Funktionsgenerator KSS5.1 08.02.00 en

2.3 Conveyor synchronization

The system variables $TECHIN[i] (i = 1 .. 6) form the interface between the sensor inputsand the conveyor functionality.

Data are written to these variables cyclically using the following statements:

Analog input:

SIGNAL CONVEYORVEL $ANIN[1]ANIN ON $TECHIN[2] = FACTOR * CONVEYORVEL + OFFSET

Digital input:

Entry in “$MACHINE.DAT”

SIGNAL $DIGIN1 $IN[20] TO $IN[28]DECL DIGINCODE $DIGIN1CODE=#UNSIGNED

DIGIN ON $TECHIN[3] = FACTOR * $DIGIN1 + OFFSET

Elements of the array variable $TECHPAR[i,j] are used for parameterization and foroutputting function generator states as described below.

Two conveyor modes are possible. The robot tracks the conveyor in the case of translationalor rotational motions of the part to be processed, e.g. with a conveyor belt or turntable.

The coordinate system inwhich trackingmotions are possible is definedbymeans of the firstsix TECHPAR variables of the next function generator.

If, for example, function generator 1 has been configured for the conveyor function,$TECHPAR[2,1] to $TECHPAR[2,6] contain the tracking coordinate system (X, Y, Z, A, B,C) with reference to $WORLD.

Function generator 2 should not be used for any other purpose in this case.

The TECH variable “GEOREF” defines the correction direction in this coordinate system.The parameters

#X, #Y and #Z

define a translational correction in the corresponding direction.

For rotational tracking, the parameters

#A, #B and #C

of the “GEOREF” variable are used:

#A --> about Z, #B --> about Y, #C --> about X.

In the case of translational conveyor mode, it is of vital importance to ensure that thetracking direction corresponds to the direction of motion of the conveyor belt.

In the case of rotational motions of the part, the correction axis must be located at the centerof rotation, for example:

GEOREF=#A

where the Z axis of the conveyor (Z Conv.) is the rotational axis and the direction of rotationis mathematically positive.

Page 21: TechPack Function manual

2 Programming, parameterization (continued)

21 of 28

Funktionsgenerator KSS5.1 08.02.00 en

If the following is selected

GEOREF=#NONE

the tracking distance is calculated and is available to the user via the variable

$TECHVAL[i]

The robot does not carry out tracking, however.

The conveyor function is defined by means of the technology class

CONVEYOR ( $TECH[i].CLASS = #CONVEYOR)

and activated with technology mode “CYCLE”.

The parameter $TECHPAR[i,8] defines whether the variable $TECHIN[i] refers to a velocityvalue or a distance.

$TECHPAR[i,8]=0 ----> $TECHIN[i] refers to a velocity$TECHPAR[i,8]=1 ----> $TECHIN[i] refers to a distance

In the case of a conveyor synchronization with an “absolute” position sensing system,$TECHPAR[i,8] must be set to 1.

Example:The synchronization switch enables the counting mode.At the end of the tracking operation, a digital output in the KRC ensures that the counteris set to 0 and that the enabling of the counting mode is withdrawn.The 16--bit values are scaled to [mm] using the FACTOR in theDIGIN statement.

KR C2

Direction of motion

Conveyor

Synchronization switch

Incrementalencoder

Pulse Directionofrotation

CounterStart counter

(enable)

16 bits DIGIN ON$TECHIN[i]=FACTOR*$DIGIN1+OFFSET

Start signal (digital input)

16 digital inputs

Z Conv.

P1

P2 P3

P4

Robot

Reset counter(digital output)

Strobe (digital output)

X Conv.

Page 22: TechPack Function manual

Function Generator

22 of 28

Funktionsgenerator KSS5.1 08.02.00 en

If the parameter $TECHPAR[i,8] is set to 0, the tracking distance is calculated on the basisof the conveyor velocity which is assigned cyclically to $TECHIN[i] by means of an ANIN orDIGIN statement.

Make sure that $TECHIN[i] contains the conveyor velocity value in mm/s or degrees/s.This is done by means of the factor in the ANIN/DIGIN statement.

The systemvariable $TECHVAL[i] contains theabsolute trackingdistance inmmor degrees.This variable can be used to monitor the maximum permissible tracking distance, e.g.

INTERRUPT DECL 1 WHEN $TECHVAL[i] > 2000.0 DO STOP_TRACK()

The robot trackingmotion is startedbymeans of a synchronization signalwhich the conveyorsystem sends to the robot controller when the part enters the robot’s processing area.

This synchronization input (user input) is transferred to the system via the variable$TECHPAR[i,7]. The program interpreter is stopped by means of a

“WAIT FOR $TECHVAL[i]>0.05” statement

once the conveyor synchronization has been activated.

The conveyor functionality is activated as soon as the technology mode is switched toCYCLE and the technology class CONVEYOR is selected.

Once the robot has detected the synchronization signal it leaves its starting position andstarts tracking and processing. For this kind of start from the rest position with the conveyoralready running (so--called “flying start”), special precautions (smoothing) must be taken inorder to ensure a “smooth”, but nonetheless sufficiently rapid, synchronization of the robotmotion with the conveyor motion.

The corresponding parameters are set using elements of $TECHPAR[i,j]:

G “Distance gain” $TECHPAR[i,1] in [1/s],

G “Velocity gain” $TECHPAR[i,2] in [1/s].

The following error between the conveyor and the robot caused by the smoothing and thesystem run times can be compensated for by the user by means of

$TECHPAR[i,3] (rate time in s).

As the function generator (interpolator) is not called during pauses between motions, noexact positioning motion should be programmed at any point in the tracking operation.

A programmed point can be reached exactly by setting the approximation radius to 0 (zero).If it is necessary for there to be pauses between robot motions, this can be achieved bysetting the override to zero at the corresponding point in the program (TRIGGER inapproximation zero block).

The instruction $TECH[i].MODE=#OFF triggers an advance run stop, deactivates theconveyor functionality, sets the tracking distance to 0 and continues the motion from thecurrent point in space.

Page 23: TechPack Function manual

2 Programming, parameterization (continued)

23 of 28

Funktionsgenerator KSS5.1 08.02.00 en

2.4 Complex sensors

Using an add--on controller task (sensor task), it is possible to couple an “intelligent” sensorto the controller and correct the robot motion in Cartesian space ($TECH[i].CLASS =#DATALINK).

Page 24: TechPack Function manual

Function Generator

24 of 28

Funktionsgenerator KSS5.1 08.02.00 en

Page 25: TechPack Function manual

3 Application examples

25 of 28

Funktionsgenerator KSS5.1 08.02.00 en

3 Application examples

3.1 Weaving

Example

DECL TECH WEAVE1, WEAVE2 ; Declare variables of type TECH

WEAVE1.MODE = #CYCLE ; Cartesian weaving is a cyclical; function.

WEAVE1.FCTCTRL.SCALE_IN = 2 ; Wavelength of the weave oscillation is; 2 mm.

WEAVE1.FCTCTRL.OFFSET_IN = 0 ; Start of deflection is start of CP path.WEAVE1.FCTCTRL.SCALE_OUT = 3 ; Weave amplitude is 3 mm.WEAVE1.FCTCTRL.OFFSET_OUT = 0 ; Focus of the weave oscillation is

; on the path:; If amplitude = 0, path is followed without; weaving.

WEAVE1.CLASS = #PATH ; Argument of the weave pattern is the; arc length, i.e. SCALE_IN the; wavelength.

WEAVE1.FCTCTRL.GEOREF = #Y ; Direction of the weave deflection in the Y; direction in the TTS

WEAVE1.FCT.ORDER = 1 ; Create weave pattern from polygon using; pairs of values in the function table.

TECHANGLE.C = 10 ; Rotate TTS

; User--defined WEAVE1 is ready for assignment to the technology structure $TECH[1]; Prepare FCTCTRL section of the structure WEAVE2 for structure; assignment using TRIGGER command!

WEAVE2.MODE = #CYCLE ; Cartesian weaving is a cyclical; function.

WEAVE2.FCTCTRL.SCALE_IN = 4 ; Wavelength of the weave oscillation is; 4 mm.

WEAVE2.FCTCTRL.OFFSET_IN = 0 ; Start of deflection at start of CP path.WEAVE2.FCTCTRL.SCALE_OUT = 3 ; Weave amplitude is 3 mm.WEAVE2.FCTCTRL.OFFSET_OUT = 0 ; Focus of the weave oscillation is

; the path.

$TECH[1] = WEAVE1 ; Weaving from next CP block onwards.

PTP X1 ; PTP blocks always without weaving.LIN L1 ; Weaving with values of the structure

; WEAVE1.

$TECH[1].FCTCTRL.GEOREF = #Z

LIN L2 C_DIS ; Weaving in the Z direction, i.e. perpendicular; to the plane of the panels to be welded,; from the start of this block onwards.

TRIGGER WHEN DISTANCE=1 DELAY=0 DO$TECH_C[1].FCTCTRL = WEAVE2.FCTCTRL

LIN L3 C_DIS ; From the center of the intermediate; block of the approximate positioning,; weaving with new wavelength 4 mm.

LIN L4$TECH[1].MODE = #OFFLIN L5 ; This motion block without weaving

Page 26: TechPack Function manual

Function Generator

26 of 28

Funktionsgenerator KSS5.1 08.02.00 en

3.2 Analog sensor

Example

Using a distance sensor, a correction is to be made in the Z direction of the TTS.

Calibration is carried out using the offset variables. The maximum value for the correctionvector should be +/-- 20 mm.

The analog input delivers a voltage between --10 V and +10 V; this should be adjusted to0 V.

FACTOR = 0.1OFFSET = 1.0

; Sensor at analog input 2SIGNAL CORRECTION $ANIN[2]

; Monitor sensor correction valueINTERRUPT DECL 1 WHEN $TECHVAL[1] > 20.0 DO UPPER_LIMIT()INTERRUPT DECL 2 WHEN $TECHVAL[1] < -20.0 DO LOWER_LIMIT()

; Activate cyclical reading of the analog input and; scaling of $TECHIN[1] to 0.0 - 2.0ANIN ON $TECHIN[1] = FACTOR * CORRECTION + OFFSET

; Define correction direction$TECHSYS = #TTS$TECH[1].FCTCTRL.GEOREF = #Z ; Correction in Z direction

; Sensor correction using the function generator$TECH[1].CLASS = #SENSOR

$TECH[1].FCTCTRL.SCALE_IN = 2.0 ; Definition of control parameters$TECH[1].FCTCTRL.OFFSET_IN = 0.0 ; ”$TECH[1].FCTCTRL.SCALE_OUT = 20.0; ”$TECH[1].FCTCTRL.OFFSET_OUT = 0.0; ”$TECH[1].FCT.ORDER = 1 ; ”$TECH[1].FCT.CPNUM = 3 ; ”$TECH[1].FCT.CPS1.X1 = 0.0 ; ”$TECH[1].FCT.CPS1.Y1 = -1.0 ; ”$TECH[1].FCT.CPS1.X2 = 0.5 ; ”$TECH[1].FCT.CPS1.Y2 = 0.0 ; ”$TECH[1].FCT.CPS1.X3 = 1.0 ; ”$TECH[1].FCT.CPS1.Y3 = 1.0 ; ”$TECHPAR[1,1] = 0.056 ; Smoothing constant in s

PTP BEFORE_PART

INTERRUPT ON 1INTERRUPT ON 2

; Activate sensor correctionTECH[1].MODE = #CYCLELIN P1 C_DISLIN P2 C_DISLIN P3

; Deactivate sensor correctionTECH[1].MODE = #OFFLIN_REL {X 0.0} ; Zero block for accepting advance run data

; in the main run data --> Deactivation of; the function generator

; Deactivate cyclical analog inputANIN OFF CORRECTION

Page 27: TechPack Function manual

3 Application examples (continued)

27 of 28

Funktionsgenerator KSS5.1 08.02.00 en

3.3 Conveyor synchronization

Example

Conveyor

Direction of motion

Robot

Velocity measuring system

KR C1

Z Conv.

P1

P2 P3

P4

Synchronization switch

X Conv.

Analog input

Digitalinput

A workpiece on a conveyor belt is moved past a robot. The velocity measuring systemdelivers a voltage of 10.0 V in the case of a maximum conveyor velocity of 0.08 m/s.

The voltage range of the analog input is 0 V to 10.0 V.

FACTOR = 80OFFSET = 0.0

; Number of the user input to which the synchronization switch is attachedSYNCH_NO = 5

; Velocity measuring system at analog input 2SIGNAL CONVEYORVEL $ANIN[2]

; Monitor tracking distanceINTERRUPT DECL 1 WHEN $TECHVAL[1] > 2000.0 DO STOP_TRACK()

; Define conveyor coordinate system relative to WORLD, Z axis points in; direction of motion of the conveyor$TECHPAR[2,1] = ... ; X Conv.$TECHPAR[2,2] = ... ; Y Conv.$TECHPAR[2,3] = ... ; Z Conv.$TECHPAR[2,4] = ... ; A Conv.$TECHPAR[2,5] = ... ; B Conv.$TECHPAR[2,6] = ... ; C Conv.

; Activate cyclical reading of the analog inputANIN ON $TECHIN[1] = FACTOR * CONVEYORVEL + OFFSET

Page 28: TechPack Function manual

Function Generator

28 of 28

Funktionsgenerator KSS5.1 08.02.00 en

; Conveyor synchronization using the function generator$TECH[1].CLASS = #CONVEYOR

; Tracking direction is the Z axis of the conveyor coordinate system$TECH[1].FCTCTRL.GEOREF = #Z

; Define control parameters$TECHPAR[1,1] = 0.6 ; “Distance gain” in 1/s$TECHPAR[1,2] = 0.7 ; “Velocity gain” in 1/s$TECHPAR[1,3] = 0.084 ; Rate time in s$TECHPAR[1,7] = SYNCH_NO ; Synchronization input$TECHPAR[1,8] = 0 ; $TECHIN[i] corresponds to a

; velocity value; (measuring sensor is a tachometer)

PTP WAIT_POS

INTERRUPT ON 1

; Activate conveyor synchronizationTECH[1].MODE = #CYCLELIN_REL {X 0.0} ; Zero block for accepting advance run data

; in the main run data --> Activation of; conveyor functionality

; Wait for the synchronization signalWAIT FOR $TECHVAL[1]>0.05 ; Wait until the system has

; detected the synchronization signal; --> $TECHVAL “grows”

; Process workpieceLIN P1 C_DISLIN P2 C_DISLIN P3 C_DISLIN P4 C_DIS

LIN AWAY_FROM_BELT

; Deactivate robot trackingTECH[1].MODE = #OFFLIN_REL {X 0.0} ; Zero block for accepting advance run data

; in the main run data --> Deactivation of; the function generator

; Deactivate cyclical analog inputANIN OFF CONVEYORVEL

1

Page 29: TechPack Function manual

Index

Index -- i

Symbols

#CYCLE, 19

#SENSOR, 17, 18

#SINGLE, 19

$ANIN[1], 17, 20

$DIGIN1, 17

$DISTANCE, 15

$MACHINE.DAT, 17, 20

$TECH[i]. MODE, 9

$TECH[i].CLASS, 17

$TECH[i].CLASS , 10

$TECH[i].FCT, 14

$TECH[i].FCTCTRL , 11

$TECH[i].MODE, 19, 22

$TECH[i], $TECH_C[i], 9

$TECH_C[i]. MODE, 9

$TECH_C[i].CLASS , 10

$TECH_C[i].FCT, 14

$TECH_C[i].FCTCTRL, 11

$TECH_MAX, 8

$TECHANGLE, 7, 15

$TECHANGLE_C, 15

$TECHIN[i], 14, 17, 19, 20

$TECHPAR, 17, 20, 22

$TECHPAR[i, j], 14

$TECHPAR[i,1, 18

$TECHPAR[i,1], 18

$TECHPAR[i,j], 20

$TECHPAR_C[i, j], 14

$TECHSYS, 7, 15, 18

$TECHSYS_C, 15

$TECHVAL[i], 15, 19, 21

$TSYS, 15

A

Analog sensors, 17

B

BASE, 19

CConfiguration, 8Control points, 6Conveyor synchronization, 20Correction coordinate system, 7Correction coordinate system TTS, 7Correction direction, 7Correction value, 18Correction velocity, 18CYCLE, 21

DDIGIN statement, 21

FFunction definition, 6Functional description, 6

GGEOREF, 7, 18, 20

MMechanical weaving, 5

OOFFSET_OUT, 15

PParameterization, 9Programming, 9

RReaching a programmed point, 22RESUME, 19

SSCALE_OUT, 15Sensor correction value, 18Sensor offset, 19SIGNAL $DIGIN1, 17SIGNAL CORRECTION, 17Structure variables, 9

Page 30: TechPack Function manual

Index

Index -- ii

TTCP correction, 19TECHPAR variables, 20TECHVAL[i], 19Thermal weaving, 5Tool--based technological system, 7Tool--based technological system (TTS), 7, 15TTS, 7

WWAIT FOR $TECHVAL[i], 22