Page 1
Controller Description Programming instructions Type CMXR-C1 Description 560 316 en 0805NH [729 224]...
Page 3
Edition _____________________________________________________ 0805NH Designation _______________________________________ GDCP-CMXR-SW-EN Order no. ___________________________________________________ 560 316 Festo AG & Co KG., D-73734 Esslingen, Federal Republic of Germany, 2008 Internet: http://www.festo.com E-mail: service_international@festo.com The reproduction, distribution and utilization of this document as well as the communica- tion of its contents to others without express authorisation is prohibited.
Page 4
Index of revisions Author: Name of manual: GDCP-CMXR-SW-EN File name: File saved at: Consec. no. Description Index of revisions Date of amendment Produced: 0805NH 25.06.2008 Festo GDCP-CMXR-SW-EN en 0805NH...
Page 6
WAIT – Instruction with time <WaitTime> .............. 42 8.10 WAIT instruction with condition <WAIT> ............... 43 8.11 Adding comments <//> ..................46 8.12 Deactivating the program line <##> ..............46 Movement commands ................... 48 Positional description ..................48 9.1.1 Axis position ..................48 Festo GDCP-CMXR-SW-EN en 0805NH...
Page 7
Reference of the reference system ..............89 11.6 Data for the reference system ................90 11.7 Reference system with direct values <SetRefSys> ..........91 11.8 Reference system with three points <SetRefSys3P> ..........92 11.9 World reference system <SetRefSysWorld> ............93 Festo GDCP-CMXR-SW-EN en 0805NH...
Page 8
Converting time into text <TimeToStr> ............... 124 16.6 Sine <SIN>, <ASIN> ..................... 125 16.7 Cosine <COS>, <ACOS> ..................126 16.8 Tangent <TAN>, <ATAN> ..................128 16.9 Cotangent <COT>, <ACOT> .................. 129 16.10 Tangent2 <ATAN2> ..................... 130 16.11 Logarithm <LN> ....................130 Festo GDCP-CMXR-SW-EN en 0805NH...
Page 9
Waiting until value is inside/outside the range - WaitIns/WaitOuts methods ..................... 150 17.6.6 Sensing the value, Read method ............151 17.7 Analogue output module AOUT ................. 152 17.7.1 Instancing ..................152 17.7.2 Variables .................... 153 17.7.3 Methods .................... 154 Festo GDCP-CMXR-SW-EN en 0805NH...
Page 10
Vacuum grippers ................177 19.4.2 Pneumatic parallel grippers ............... 180 19.4.3 Pneumatic swivel/gripper unit ............183 19.5 Working with the PLC interface ................187 19.5.1 Problem definition ................187 19.5.2 PLC interface ..................187 19.5.3 Sequence program ................188 Festo GDCP-CMXR-SW-EN en 0805NH...
1. Introduction 1. Introduction This document describes the command set FTL (Festo Teach Language) for the Festo CMXR multi-axis control system, with the software status of version 1.0. The CMXR controller is programmed using the CDSA-D1-VX teach pendant or the CMXR PlugIn in Festo Configura- tion Tool (FCT).
Festo is not liable for damage caused by failure to observe the warning instructions in these operating instructions. Note The safety precautions in chapter 2.3 ff.
2.5 Safety notes on this manual Warning DANGER! Considerable damage to property and injury to human beings may occur if these instructions are not observed. Caution Considerable damage to property may occur if these instructions are not observed. Festo GDCP-CMXR-SW-EN en 0805NH...
Should measuring or test work be needed on the system, this must be carried out by expert electrical technicians. Caution Only replacement parts approved by Festo may be used. Festo GDCP-CMXR-SW-EN en 0805NH...
3. Program processing 3. Program processing 3.1 General information FTL stands for Festo Teach Language. FTL is a movement-oriented programming language and is used to program CMXR controllers. As a programming language for robotics and handling systems, FTL has an enormous lan- guage capacity, which, despite this, is easy to learn and easy to master.
Page 16
The lower arrow marks the active command of the set precalculation. The distance between both arrows is the set forerun. More information and examples of the set forerun are described in chapter 19.3 Control- ling the set forerun. Festo GDCP-CMXR-SW-EN en 0805NH...
An FTL project is created as a subdirectory in the applications directory. The name of the directory is the project name and has the extension “tt”. Example for project names: Project “_global” Project “cube” Project “PickPlace” Festo GDCP-CMXR-SW-EN en 0805NH...
The file “Load.tip” is created for a program with the name “Load”. The file name of the local program data is “Load.tid”. If the program is created via the CDSA teach or via Festo programming editor (in the Festo Configuration Tool), the file is generated automatically for the local program data. If a pro- gram is generated via other software, then you must make sure that the appropriate data file is created for every program.
Other programs or projects do not have any access to it. The following illustration shows the programs “Fill” and “Sort”. Both of these programs have local data and program data which are stored in the respective files. Festo GDCP-CMXR-SW-EN en 0805NH...
The following illustration shows the global project “_global” in combination with project- global and local data. System-global programs are also shown in the system-global range. Festo GDCP-CMXR-SW-EN en 0805NH...
The values only stay unchanged for as long as the project or program is loaded. After the project/program has been unloaded or if the power supply has failed, the data changed in the program are lost. Festo GDCP-CMXR-SW-EN en 0805NH...
Page 22
3. Program processing Note Should position values have to be permanently saved on the mem- ory card, then this can be done by using the “SavePosition” macro. Festo GDCP-CMXR-SW-EN en 0805NH...
List of all keywords : CALL THEN END_IF ELSIF ELSE GOTO LABEL WHILE END_WHILE LOOP END_LOOP RETURN KILL BOOL DINT DWORD REAL STRING All other data types derived therefrom are also keywords. Festo GDCP-CMXR-SW-EN en 0805NH...
The length of a string is restricted to 255 characters. All characters in the ASCII char- acter set are valid. Example for a valid string: “CMXR-C1 multi-axis control system” 4.6 Operators and limiting characters Operators are used in phrases and describe how variable values and numeric constants are linked up with one another.
Greater than or equal to > Greater than Table 4.3 Comparators 4.6.4 Other operators Operator Meaning Point operator for accessing structure elements Index brackets for accessing arrays Brackets for parameter lists, for example Table 4.4 Other operators Festo GDCP-CMXR-SW-EN en 0805NH...
4. Language set-up 4.6.5 Limiting characters Operator Meaning Value assignment for variable Separator for instancing variables List symbols in parameter lists for function or macro call-ups Table 4.5 Limiting characters Festo GDCP-CMXR-SW-EN en 0805NH...
However, FTL partially supports the assignment of various data types. In this case, an automatic type conversion is carried out. From \ To BOOL Integer num- Bit pattern REAL STRING bers BOOL Integer numbers Bit pattern REAL STRING Table 5.3 Possible assignments Festo GDCP-CMXR-SW-EN en 0805NH...
REAL to DINT, for example, the system removes the positions after the deci- mal point. Examples for type conversions: Variables: print : REAL index : DINT Program code: print := 1.53 index := print // Conversion REAL->DINT The “index” variable contains the value “1” after the conversion. Festo GDCP-CMXR-SW-EN en 0805NH...
Arrays are used to bring together the same data types into an organised unit. The individ- ual elements in the array are accessed using an index. Creating arrays on the user level is not possible. They are used, for example, within the PLC interface. Festo GDCP-CMXR-SW-EN en 0805NH...
Should further links be needed, then these have to be implemented via several instructions. When using Boolean operands, several links can be in an instruction. The following variables are used for the following examples: Marker : BOOL Flag1 : BOOL Flag2 : BOOL Festo GDCP-CMXR-SW-EN en 0805NH...
Page 33
The use of several links with comparison operands within a condi- tion is not permissible. Example for the programming of a condition with several links: Flag1 := Index < 10 Flag2 := Index > 0 IF Flag1 AND Flag2 THEN END_IF Festo GDCP-CMXR-SW-EN en 0805NH...
FALSE, then a move is to made to the PosStart position. IF partOk AND NOT partNotOk THEN // Good part Lin(pos12) Lin(pos13) ELSIF NOT partOk AND partNotOk THEN // Reject part Lin(pos3) Lin(pos4) ELSE Lin(posStart) // No defined signals END_IF Festo GDCP-CMXR-SW-EN en 0805NH...
The keyword LABEL is placed in front so that the system can recognise a jump label. Syntax LABEL <Jump label> The jump label can be jumped to with jump commands, which are described as follows. Festo GDCP-CMXR-SW-EN en 0805NH...
Loops are program instructions that conditionally or unconditionally repeat a defined pro- gram part. This allows programs, in accordance with the task, to be compiled very short, e.g. removing from a pallet parts whose positions can be calculated on the basis of the known configuration. Festo GDCP-CMXR-SW-EN en 0805NH...
If the final value is less than 1, the loop will not be run through at all but rather skipped. After every run through, the value of the loop variable is increased by one and the final value is recalculated. Festo GDCP-CMXR-SW-EN en 0805NH...
Processing: The selecting program waits for the end of the subprogram while this is being processed. After the end of the subprogram there is an automatic return jump to the selecting pro- gram, which is continued. Festo GDCP-CMXR-SW-EN en 0805NH...
These variables are supplied with the corresponding values from the call-up and processed within the subprogram. Recursive call-ups of programs are not allowed. Thus a program may not call itself up. A call-up of the selecting program is also not possible. Syntax CALL <Program name> ( ) Festo GDCP-CMXR-SW-EN en 0805NH...
The main program will be continued. Example: CALL checkPart() // Call-up for subprogram checkPart IF NOT partOk THEN partStatus := 10 // Global variable for return value RETURN // Premature end of program END_IF Lin(pos3) Festo GDCP-CMXR-SW-EN en 0805NH...
In this example, the “feed” program calls up a “calculate” parallel program. The called up “calculate” program initially waits for a signal and increases one counter. During this, the main program “feed” is continued to be executed. Festo GDCP-CMXR-SW-EN en 0805NH...
After the previous command has been executed, the waiting time begins to run. The program continues after this period of time has expired. Syntax WaitTime (<timeMS >: DINT) Festo GDCP-CMXR-SW-EN en 0805NH...
8.10 WAIT instruction with condition <WAIT> The WAIT instruction with condition allows the sensing of binary states. This status can be in the form of a single Boolean variable, a combination of several or one scan. Festo GDCP-CMXR-SW-EN en 0805NH...
Page 44
42). In the condition of the WAIT instruction, the master data types BOOL, REAL and DINT may be used with logical operators and comparators. Arithmetical and bit operators may not be used. Syntax WAIT <Condition> Festo GDCP-CMXR-SW-EN en 0805NH...
Page 45
// Move to part Lin(pos2) // Move above part Lin(pos3) // Move above place of deposit Lin(pos4) // Deposit part WaitTime(0) // Wait for set main run Vacuum.Reset() // Vacuum off Lin(pos3) // Move above place of deposit Festo GDCP-CMXR-SW-EN en 0805NH...
Using the “##” string, program lines for program processing are deactivated, however the syntax check remains unchanged. Note ## <Program instruction> This means: A deactivated FTL command is not processed in the program, i.e. the contents have no effect. Festo GDCP-CMXR-SW-EN en 0805NH...
Page 47
With program instructions that consist of several lines, such as IF..THEN…ELSE, all associated program lines have to deactivated. The following illustration shows the program mask of the teach with deactivated program instructions in the lines 8 … 10: Festo GDCP-CMXR-SW-EN en 0805NH...
5.4 Structured data types on page 29). 9.1.1 Axis position An axis position is described using the structured data type AXISPOS (see chapter 5.4 Structured data types on page 29). This includes 9 positions of 9 individual axes whose Festo GDCP-CMXR-SW-EN en 0805NH...
Page 49
: AXISPOS := (100, 50, 30, 0, 0, 0, 0, 0, 0) posA1 : REAL posA2 : REAL Program: Lin(startPos) // Moving to startPos posA1 := startPos.a1 // Re-storing of axis value 1 posA2 := startPos.a2 // Re-storing of axis value 2 Festo GDCP-CMXR-SW-EN en 0805NH...
Page 50
Position of axis 5, not available : REAL Position of axis 6, not available : REAL Position of auxiliary axis 1, not available : REAL Position of auxiliary axis 2, not available : REAL Position of auxiliary axis 3, not available Festo GDCP-CMXR-SW-EN en 0805NH...
The slowest axis determines the dynamics. The movement of the TCP derives, in this case, from a combination of the single field movement. The movement on the TCP is not defined. Festo GDCP-CMXR-SW-EN en 0805NH...
Page 53
The CMXR multi-axis control system transforms the positions ac- cordingly. Example: A Cartesian gantry with three axes X, Y, Z and an axis of rotation with gripper has to be positioned. 1 Y-axis 2 Z-axis 3 Axis of rota- tion with gripper 4 X-axis Festo GDCP-CMXR-SW-EN en 0805NH...
Page 54
Because the tool has an offset to the Z-axis, its course of path results in an unforeseeable response since with synchronous interpolation all axes travel together to their target point, without consideration for the course of the travelled path. Festo GDCP-CMXR-SW-EN en 0805NH...
The distance specification can be Cartesian or based on every individual axis. The CMXR controller transforms the positions accordingly. Example: In a handling application, a part is approached at 4 positions on one measuring unit re- spectively. Z-axis pos1 pos3 pos2 X-axis Festo GDCP-CMXR-SW-EN en 0805NH...
Page 56
CALL Check() // Call-up of Check cycle PtpRel(distZpos) PtpRel(distX) Ptp(pos3) The measuring cycle for the workpiece and the evaluation are managed in the “Check” subprogram. To make things simpler, the contents of the subprogram are not shown. Festo GDCP-CMXR-SW-EN en 0805NH...
Axis 4 = axis of rotation of the tool. In this example, a workpiece has to be received at one position and deposited at another position. To do this, the axis of rotation must be positioned accordingly. Festo GDCP-CMXR-SW-EN en 0805NH...
Page 58
MoveAxisPtp(A1, 450) // Upper place of deposit MoveAxisPtp(A4, 180) // Turn on place of deposit MoveAxisPtp(A3, 50) // Lower place of deposit Gripper.Reset() // Open gripper MoveAxisPtp(A3, 145) // Upper place of deposit Ptp(pos2) // Travel Festo GDCP-CMXR-SW-EN en 0805NH...
Parameter Meaning Unit Absolute target position AXISPOS or CARTPOS Table 9.5 Parameter for Lin command The position specification can be Cartesian or based on every individual axis. The CMXR multi-axis control system transforms the positions accordingly. Festo GDCP-CMXR-SW-EN en 0805NH...
Dist Relative target position AXISDIST or CARTDIST Table 9.6 Parameter for LinRel command The distance specification can be specified as Cartesian or based on every individual axis. The CMXR multi-axis control system transforms the positions accordingly. Festo GDCP-CMXR-SW-EN en 0805NH...
In the circular path, first the support point is approached and then the end point. The radius of the circular path is taken from an internal calculation using the starting point, support point and end point of the circular path. Festo GDCP-CMXR-SW-EN en 0805NH...
The circular path is travelled on a level that is defined on the basis of the three points: starting point, support point and end point. This definition can be used to fix the level at which the circular path is going to be travelled in the space. Festo GDCP-CMXR-SW-EN en 0805NH...
Page 65
The illustration shows a circular path with three support points that define a level in the space on which the circular path lies. Note The circular path always lies on a level, a helical interpolation; an additional interpolation perpendicular to the level is not possible. Festo GDCP-CMXR-SW-EN en 0805NH...
If this point is displaced there will be a change in the circular path. This could be accidental and could lead to a collision. Changing the starting point does not lead to an error message, because the result is mathematically correct. Festo GDCP-CMXR-SW-EN en 0805NH...
Page 67
: CARTPOS := (1050, 400, 0, 0, 0, 0, 0, 0, 0) EndPos : CARTPOS := (950, 300, 0, 0, 0, 0, 0, 0, 0) Program: Lin(pos1) // Approaching starting point CircIp(IpPos, EndPos) // Circular movement to end point Lin(pos2) // Travel Festo GDCP-CMXR-SW-EN en 0805NH...
AXISPOS or CARTPOS End point of the arc AXISPOS or CARTPOS Table 9.8 Parameter for PtpToCircIp command The position specifications can be Cartesian or based on every individual axis. The CMXR multi-axis control system transforms the positions accordingly. Festo GDCP-CMXR-SW-EN en 0805NH...
Support point IpPos End point EndPos Position Pos1 X-axis 1050 The level for the Z-axis is 0. The starting point of the arc is approached using a linear movement. The starting point is transferred to the LinToCirc command. Festo GDCP-CMXR-SW-EN en 0805NH...
After the status has been detected, the movement is stopped using the StopMove command. An example of the use of the StopMove command is described in chapter 19.1 Stopping the movements on page 171. Festo GDCP-CMXR-SW-EN en 0805NH...
Table 10.4 Units for ValueAcc, ValueDec parameters Note If the optional parameter ValueDec (for the braking ramp) is not specified, then the value of the ValueAcc (for the acceleration) parameter is used for the braking ramp. The profile is then sym- metrical. Festo GDCP-CMXR-SW-EN en 0805NH...
Unit Mode Type of movement Enumeration: dynPtp, dynCart Value Value of the jerk Table 10.5 Parameter for Jerk command Enumeration parameter Movement type Unit Mode dynPtp Point-to-point dynCart Cartesian mm/sec³ Table 10.6 Units for Value parameter Festo GDCP-CMXR-SW-EN en 0805NH...
Page 75
: AXISPOS := (100, 60, 0, 0, 0, 0, 0, 0, 0) Program: Ptp(pos0) Jerk(dynPtp, 50) // Jerk for PTP to 50 % Ptp(pos1) Jerk(dynCart, 5000) // Jerk on the path to 5,000 mm/sec³ Lin(pos2) Festo GDCP-CMXR-SW-EN en 0805NH...
An override value can be set in the program by using the Ovr command. This has the same effect as a change via the keys on the teach pendant. Festo GDCP-CMXR-SW-EN en 0805NH...
Syntax DynOvr ( <Value> : REAL) Parameter Meaning Unit Value Value of the dynamic override Percentage Table 10.8 Parameter for DynOvr command Note The travelled path is not changed by the override. Festo GDCP-CMXR-SW-EN en 0805NH...
Trapezoid ramp form when Trapezoid ramp form the factor is approx. 0.1 when the factor is 0.5 If the optional parameter is not specified, it will automatically be set to the factor 0.5. This results in the acceleration triangle. Festo GDCP-CMXR-SW-EN en 0805NH...
Ramp( <Ramptype> : ENUM, OPT <Param> : REAL) Parameter Meaning Unit Ramp type Ramp type selects the ramp form. Enumeration: TRAPEZOID SINE SINE SQUARE MINJERK Param Parameter for trapezoid ramps ----- Table 10.9 Parameter for Ramp command Festo GDCP-CMXR-SW-EN en 0805NH...
Should path segments be programmed which, as a result of the dynamics limits, cannot be travelled with a constant path speed, then there will be drops in the path speed in these positions. Festo GDCP-CMXR-SW-EN en 0805NH...
Page 81
This means that if the kinemat- ics system does not achieve its full speed due to a limiting override, the monitoring will be active and an error will be triggered. Example: Program: Lin(pos1) VconstOn(25, TRUE) Lin(pos2) Lin(pos3) VconstOff() Festo GDCP-CMXR-SW-EN en 0805NH...
A cancellation of the user program does not automatically lead to a shutdown of the monitoring of the path speed. If the user pro- gram is restarted, then the monitoring system must always be switched off first. Festo GDCP-CMXR-SW-EN en 0805NH...
A smooth transition can take place in two ways: 1. Speed-type smooth transition based on the speed 2. Positional smooth transition based on a specified distance These are described in the following pages. Festo GDCP-CMXR-SW-EN en 0805NH...
Too small path segment lengths can lead to an unwanted loss in the dynamics if the defined smooth transition area was reduced. If this is not wanted, then the path or the smooth transition area has to be adapted. Festo GDCP-CMXR-SW-EN en 0805NH...
(contouring faults) are increased, whereby the axes acceleration is low- ered when compared to a setting of 100 %. The figure below illustrates the speed profiles for travelling to position 1 and position 2. Different values are also defined here for the transition area. Festo GDCP-CMXR-SW-EN en 0805NH...
Page 86
Example: OvlVel(100) // Smooth transition with 100 % Lin(pos1) Lin(pos2) OvlVel(75) // Smooth transition with 75 % Lin(pos3) Festo GDCP-CMXR-SW-EN en 0805NH...
Table 11.2 Parameter for OvlCart command Note A smooth geometric transition is very often needed in combination with a constant path speed. This is set using the VconstOn com- mand (see chapter 10.6 Switching on constant path speed on page 80) Festo GDCP-CMXR-SW-EN en 0805NH...
Page 88
A contour has to be travelled with a constant path speed and with a smooth transition radius of 5 mm. Smooth transition radius Vel(dynCart, 300) // Path speed to 300 mm/sec VconstOn(25, TRUE) // Switching on const. path speed OvlCart(5) // Set smooth transition area Lin(p1) Lin(p2) Lin(p3) Lin(p4) Lin(p5) Lin(p6) Festo GDCP-CMXR-SW-EN en 0805NH...
Nesting the reference systems must be done with careful consid- eration. This mechanism can be used, under certain circumstances, for efficient programming. The transparency when reading the pro- gram is difficult, however, and nestings not carefully considered could possibly lead to collisions. Festo GDCP-CMXR-SW-EN en 0805NH...
RefSys parameter. The data types for all options can be specified under the RefSys parameter. The commands for setting a reference system are described below. Festo GDCP-CMXR-SW-EN en 0805NH...
If the World coordinate system for the kinematics is to be referenced, then you have to reference the system variable _system.world. Example: Data: refsysdata0 : REFSYSDATA := (MAPX("_system.world"), 100, 150, 0, 0, 0, 0) Program: SetRefSys(refsysdata0) Festo GDCP-CMXR-SW-EN en 0805NH...
Under the baseRs parameter, another reference can be specified upon which the reference system has an additive impact. If the World coordinate system for the kinematics is to be referenced, then you have to reference the system variable _system.world. Festo GDCP-CMXR-SW-EN en 0805NH...
If a reference system was set (activated) using the command SetRefSys or SetRefsys3P and you would like to deactivate these reference systems at a certain position in the pro- gram, then the SetRefSysWorld command is used for this. Festo GDCP-CMXR-SW-EN en 0805NH...
// Offset pallet 1 in Y refPal2.x := 1500 // Offset pallet 2 in X refPal2.y := 300 // Offset pallet 2 in Y Lin(pos1) // Move to safety in World system SetRefSys(refPal1) // Activate offset pallet 1 Festo GDCP-CMXR-SW-EN en 0805NH...
Page 95
11. Smooth-transition commands CALL Feed() // Call-up of subprogram Feed parts SetRefSys(refPal2) // Activate offset pallet 2 CALL Feed() // Call-up of subprogram Feed parts SetRefSysWorld() // Activate World system Lin(pos1) Festo GDCP-CMXR-SW-EN en 0805NH...
High dynamic values do not make any sense here. Note The refData and timeout parameters are optional. If these are not specified, then the current actual position is taken as the reference position (DS 402 - Method 35). Festo GDCP-CMXR-SW-EN en 0805NH...
Page 97
Limit switch Positive Limit switch Limit switch Positive Homing switch Homing switch Negative Homing switch Homing switch Negative Zero pulse Zero pulse Positive Zero pulse Zero pulse No travel Current actual position Table 12.3 Homing methods Festo GDCP-CMXR-SW-EN en 0805NH...
Record of the homing run, e.g. how referencing will take place. None timeout Period of time up to expiry of the operation (this is followed by Seconds an error message, the referencing process is interrupted). Table 12.4 Parameter for RefAxis commandAsync Festo GDCP-CMXR-SW-EN en 0805NH...
Page 99
Furthermore, suitable dynamic values must be selected for these movements so that homing can be executed rea- sonably. High dynamic values do not make any sense here. The parameter and the other mode of operation correspond with the RefAxis command. Festo GDCP-CMXR-SW-EN en 0805NH...
If an error does not occur during the homing run, then TRUE is returned - otherwise FALSE. Program: RefAxisAsync(A1, refdata0) RefAxisAsync(A2, refdata0) RefAxisAsync(A3, refdata0) RefAxisAsync(A4) boolReference := WaitRefFinished() IF NOT boolReference THEN SetError ("Error when referencing") END_IF Festo GDCP-CMXR-SW-EN en 0805NH...
Parameter Meaning Unit Axis Selected axis that is to be interrogated. Enumeration A1, A2, up to A9 Table 12.5 Parameter for IsAxisReferenced command If the specified axis is referenced, then TRUE is returned - otherwise FALSE. Festo GDCP-CMXR-SW-EN en 0805NH...
Offset along the Y-axis : REAL Offset along the Z-axis : REAL Orientation specification, rotation around the Z-axis : REAL Orientation specification, rotation around the turned Y-axis : REAL Orientation specification, rotation around the turned Z-axis Festo GDCP-CMXR-SW-EN en 0805NH...
Page 103
A = 0 B = 0 Offset in Z C = 0 The orientation of the tool coordinate system stays unchanged. If required, Offset in X this has to be set via the parameters A, B and C. Festo GDCP-CMXR-SW-EN en 0805NH...
Page 104
The programmer must make sure that the TCP data are assigned correctly to the tool. The CMXR multi-axis control system does not recognise any reference of the tool data to the physical tool. Caution There is a danger of a collision if inappropriate or erroneous TCP data are used. Festo GDCP-CMXR-SW-EN en 0805NH...
Example: A handling system has a pneumatic semi-rotational axis on the tool flange. With the aid of this axis, the tool can be swivelled into a fixed position. This swivel motion is used to Festo GDCP-CMXR-SW-EN en 0805NH...
Page 106
Offset along the Y-axis = Tool length Offset along the Z-axis Orientation acc. to Euler, rotation around the Z-axis Orientation acc. to Euler, rotation around the turned Y-axis Orientation acc. to Euler, rotation around the turned Z-axis Festo GDCP-CMXR-SW-EN en 0805NH...
Page 107
Our Cartesian kinematics should now travel with a vertical tool from position 1 to posi- tion 2. The tool will then be swivelled by the semi-rotational axis. The swivelled tool must now approach position 2. Approach from pos1 to pos2: Tool(tool1) Lin(pos1) Lin(pos2) Festo GDCP-CMXR-SW-EN en 0805NH...
Page 108
The swivel motion now causes the Tool Center Point (TCP) to move upwards. Due to the pneumatic axis, the control system is not able to carry out any automatic compensating movements. To be able now to approach position 2, the tool's new orientation has to be defined. Festo GDCP-CMXR-SW-EN en 0805NH...
Page 109
- no change is required in the tool orientation. With the electrical semi-rotational axis, the required orientation is programmed within a positioning command. The CMXR controller automatically calculates the position of the axes while taking into account the programmed orientation. Festo GDCP-CMXR-SW-EN en 0805NH...
The Boolean variables are stored in an array which can be accessed via the index 0 to 15. Syntax plc_InBool [ <Arrayindex> ] : BOOL plc_OutBool [ <Arrayindex> ] : BOOL All input signals are stored in the array variable plc_InBool. The array variable plc_OutBool includes all output data. Festo GDCP-CMXR-SW-EN en 0805NH...
The integer variables are stored in an array which can be accessed via the index 0 to 255. Syntax plc_Dint [ <Arrayindex> ] : DINT Example: IF plc_Dint[3] = 13 THEN END_IF Festo GDCP-CMXR-SW-EN en 0805NH...
[ <Arrayindex> ] : CARTPOS The interface variable plc_AxisPos includes 256 positions of the data type AXISPOS, the variable plc_CartPos includes 256 positions of the data type CARTPOS. Example: Ptp(plc_AxisPos[17]) Lin (plc_AxisPos [18] ) Lin (plc_AxisPos [19] ) Lin(plc_CartPos[1]) Festo GDCP-CMXR-SW-EN en 0805NH...
Reference systems that are specified via the external interface can only be linked within the interface's reference systems. A reference to a reference system that has been defined outside the interface is not possible. Example: Lin(pos2) SetRefSys (plc_RefSys [3] ) Lin(pos3) Lin(pos4) Festo GDCP-CMXR-SW-EN en 0805NH...
This sample program approaches various positions, whereby a speed-type smooth transi- tion is set with 100 %. If the signal for programmed stop is set, then the program is stopped at these positions. This results in the following speed sequence: Festo GDCP-CMXR-SW-EN en 0805NH...
Page 115
14. PROFIBUS interface Sequence with programmed stop: Time between stop and start command Speed Time pos1 pos2 pos3 pos4 pos5 Sequence without programmed stop: Speed Time pos1 pos2 pos3 pos4 pos5 Festo GDCP-CMXR-SW-EN en 0805NH...
15.1 Message texts The programming in FTL (Festo Teach Language) allows the issuing of information mes- sages, warning messages and error messages from the movement program. The message texts can be freely defined by the user as a string. This string can also include variable entries in the form of a maximum of two parameters (e.g.
Page 117
SetInfo macro. Variables: param1 : DINT := 7 param2 : REAL := 3.48 Program code: SetInfo (“Sensor %1, pressure value %2 bar”, param1, param2) The following info text is displayed: “Sensor 7, print value 3.48 bar". Festo GDCP-CMXR-SW-EN en 0805NH...
An information message has no effect on the movement. It is only used for information. Example: pressure := Sensor.Read(); // Reading of a pressure value cycle := cycle + 1 // Counting the cycle SetInfo ("Cycle %1 finished, Value %2", cycle, pressure) Display on the teach pendant: Festo GDCP-CMXR-SW-EN en 0805NH...
A warning message has no effect on the movement. It is only used for information. Example: pressure := Sensor.Read(); // Reading of a pressure value cycle := cycle + 1 // Counting the cycle SetWarning("Cycle %1 finished, Value %2",cycle, pressure) Display on the teach pendant: Festo GDCP-CMXR-SW-EN en 0805NH...
SetError("Cycle %1 error, pressure %2", cycle, pressure) Display on the teach pendant: With an error message, the error text is also displayed in the header line on the teach pen- dant. Moreover, the Error LED illuminates in red on the teach pendant. Festo GDCP-CMXR-SW-EN en 0805NH...
The values are not saved in the data file on the memory card. The values are lost after the program/project has been deselected. The SavePosition macro can be used to save the position. Festo GDCP-CMXR-SW-EN en 0805NH...
Syntax (<Time value> : DINT) := Time ( ) This command reads the actual system time of the control system and returns it as a DINT value. Example: value := Time() // Reading actual system time Festo GDCP-CMXR-SW-EN en 0805NH...
Meaning Unit sysTime Optional specification, time value that Seconds is to be converted. Table 16.4 Parameter for TimeStr function Example: str_Time := TimeToStr() // Reading actual system time Return: str_Time = “Mon Feb 13 11:23:44 2006” Festo GDCP-CMXR-SW-EN en 0805NH...
If, however, the angle is to be calculated, then the CMXR provides the function for the arc- sine. This function calculates the enclosed angle, e.g. alpha, using the side opposite and the hypotenuse. Syntax (<Angle in degrees> : REAL) := ASIN(<Sine value>) The angle is specified in degrees. Festo GDCP-CMXR-SW-EN en 0805NH...
If, however, the angle is to be calculated, then the CMXR provides the function for the arc- cosine. This function calculates the enclosed angle, e.g. alpha, using the side adjacent and the hypotenuse. Festo GDCP-CMXR-SW-EN en 0805NH...
Page 127
:= 23.5 // Angle of alpha := b / COS(alpha) // Calculation of the hypotenuse := 45.89 // Side adjacent := 145.67 // Hypotenuse value := b / c alpha := ACOS(value) // Calculation of the angle Festo GDCP-CMXR-SW-EN en 0805NH...
(<Angle in degrees> : REAL) := ATAN(<Tangent value>) The return of the angle is specified in degrees. Example: := 30 // Side opposite alpha := 23.5 // Angle of alpha := a / TAN(Alpha) // Calculation of the side adjacent Festo GDCP-CMXR-SW-EN en 0805NH...
If, however, the angle is to be calculated, then the CMXR provides the function for the arc- cotangent. This function calculates the enclosed angle, e.g. alpha, using the side adjacent and the side opposite. Syntax (<Angle in degrees> : REAL) := ACOT(<Cotangent value>) The return of the angle is specified in degrees. Festo GDCP-CMXR-SW-EN en 0805NH...
The logarithm function calculates the natural logarithm of the transferred argument. Syntax (<Natural logarithm> : REAL) := LN (<Value> : REAL) 16.12 Exponent <EXP> The exponential function calculates the value e(x). Syntax (<Result> : REAL) := EXP (<Value>:REAL) Festo GDCP-CMXR-SW-EN en 0805NH...
C² = A² + B² or C = √(A² + B²) Program example: A := 152.67 // Length of cathetus A B := 63.12 // Length of cathetus B Value := A * A + B * B C := SQRT(Value) // Calculation of the hypotenuse Festo GDCP-CMXR-SW-EN en 0805NH...
Mask variable are shifted by three bits to the right. On the left-hand side, three bits are inserted with the value “0”. Contents of the variable: 1001 1111 0000 1100 1111 1111 1001 1100 This results in the bit pattern: 0001 0011 1110 0001 1001 1111 1111 0011 Festo GDCP-CMXR-SW-EN en 0805NH...
Mask variable are rotated by four bits to the right. The four bits are added on the left-hand side. Contents of the variable: 1011 1111 0110 1001 0011 000 1001 1010 This results in the bit pattern: 1010 1011 1111 0110 1001 0011 000 1001 Festo GDCP-CMXR-SW-EN en 0805NH...
Module instances in the application program Declaration of a module instance <Instance name> : <Instance type> ( Parameter ) Just as with variables, instances are stored in the associated data file. Example of an instance Pressure sensor : AIN(…) Festo GDCP-CMXR-SW-EN en 0805NH...
Both types of access have a different execution time. This is described in more detail in the chapters on the individual modules. In the example, the instance Sensor is accessed in the module variable State: IF Sensor.state THEN Lin(pos1) ELSE Lin(pos2) END_IF Festo GDCP-CMXR-SW-EN en 0805NH...
The movement is not stopped but rather continued without interruption. A smooth transition to subse- quent movements is possible. Note If the parameter is not specified, then FALSE is assumed. Festo GDCP-CMXR-SW-EN en 0805NH...
Instancing with the FTL Editor Instancing takes place in the dialogue for creating variables by selecting <Type:> (DIN) and entry of the <Identifier:> (Sensor). The real reference to a configured digital input is pro- duced in the <MAPTO DINPORT> line. Festo GDCP-CMXR-SW-EN en 0805NH...
Page 138
More information and an example of generating an error message are described in chapter 19.2 Working with input and output modules. Festo GDCP-CMXR-SW-EN en 0805NH...
The teach pendant is used to select these methods from the “Digital inputs” heading via the menu tree. The illustration shows the selection of the DIN module's methods on the teach pendant. Festo GDCP-CMXR-SW-EN en 0805NH...
The return value is also TRUE if, in the meantime, the input has the status FALSE. The status of the edge is determined independent of the cycle in the FTL program and is executed in its own cycle. Festo GDCP-CMXR-SW-EN en 0805NH...
The hardware reference to the digital output is required for instancing the digital output module. This is specified via the <output> parameter during instancing. Syntax <Instance name> .DOUT( <Timeout> : DINT, <RisingEdge> : BOOL, MAPX(“< output>“)) Festo GDCP-CMXR-SW-EN en 0805NH...
Page 142
Instancing with the teach pendant The digital output module is instanced with the teach pendant in the variable mask by selecting the data type DOUT. When instancing on the teach pendant, the entry is automatically saved in the data file. Festo GDCP-CMXR-SW-EN en 0805NH...
RisingEdge Although the module is not called up, it stores the status of a rising edge. This status can be evaluated in the program. Output The Output variable describes the reference to the module's hardware output. Festo GDCP-CMXR-SW-EN en 0805NH...
In FTL Editor, the available methods are automatically displayed in a list after the full-stop has been entered and can be selected from there. The illustration shows the selection of the DOUT module's methods on the teach pendant. Festo GDCP-CMXR-SW-EN en 0805NH...
The return value is also TRUE if, in the meantime, the output has the status FALSE. The status of the edge is determined independent of the cycle in the FTL program and is executed in its own cycle. Syntax <Instance name>.RisingEdge (OPT ovlEnable: BOOL) : BOOL Festo GDCP-CMXR-SW-EN en 0805NH...
Set and Reset are executed in the main run. The smooth transition is NOT influenced by the module. Example: Lin(pos1) Lin(pos2) cylinder.Set() // Sets the cylinder output to TRUE Lin(pos3) cylinder.Reset() // Sets the cylinder output to FALSE Lin(pos4) Festo GDCP-CMXR-SW-EN en 0805NH...
This is, however, not necessary for instancing and can take place in the program. Example: A sensor is created as a module instance: Instancing in the data file: temperature : AIN := (-1, MAPX(“_system.Sensor1”)) Festo GDCP-CMXR-SW-EN en 0805NH...
Timeout for waiting with the WaitLss, WaitGrt, WaitIns and Waitouts commands. -1 = no Timeout (waiting infinitely) 0 = immediate check >0 = Timeout in milliseconds Input AINPORT Reference to the hardware input Table 17.5 Variables of analogue input module Festo GDCP-CMXR-SW-EN en 0805NH...
In FTL Editor, the available methods are automatically displayed in a list after the full-stop has been entered and can be selected from there. The teach pendant is used to select these methods from the “Analogue inputs” heading via the menu tree. Festo GDCP-CMXR-SW-EN en 0805NH...
17.6.5 Waiting until value is inside/outside the range - WaitIns/WaitOuts methods The WaitIns and WaitOuts methods are used to wait until the analogue input value is inside or outside the specified value range. The module's Timeout parameter is taken into account in the process. Festo GDCP-CMXR-SW-EN en 0805NH...
The Read method reads in the actual value of the analogue input. Syntax <Instance name>.Read(OPT ovlEnable) For a description of the ovlEnable parameter, see chapter 17.3.1, page 136. Example Lin(pos1) // Reading the temperature without a stop on the path value := temperature.Read(TRUE) Lin(pos2) Festo GDCP-CMXR-SW-EN en 0805NH...
<Identifier:> (aoutQuantity). The real reference to a configured analogue output is produced in the <MAPTO AOUTPORT> line. Instancing with the teach pendant The analogue output module is instanced with the teach pendant in the variable mask by selecting the data type AOUT. Festo GDCP-CMXR-SW-EN en 0805NH...
An error message must be generated by the se- quence program. If 0 is specified as the value, then an immediate check is carried out. Should the signal not have the required value, an error message has to be generated by the sequence program. Festo GDCP-CMXR-SW-EN en 0805NH...
The teach pendant is used to select these methods from the “Analogue outputs” heading via the menu tree. The illustration shows the selection of the AOUT module's methods on the teach pendant. Festo GDCP-CMXR-SW-EN en 0805NH...
For a description of the ovlEnable parameter, see chapter 17.3.1, page 136. Parameter Type Meaning value REAL Limit value Table 17.12 Parameter for WaitLss/WaitGrt methods Example: Lin(pos1) // Wait until less than 110.0 quantity.WaitLss(110.0, TRUE) Lin(pos2) Festo GDCP-CMXR-SW-EN en 0805NH...
The Read method reads in the actual value of the analogue output. Syntax <Instance name>.Read(OPT ovlEnable) For a description of the ovlEnable parameter, see chapter 17.3.1, page 136. Example Lin(pos1) // Read quantity without stopping on the path value := quantity.Read(TRUE) Lin(pos2) Festo GDCP-CMXR-SW-EN en 0805NH...
Instancing takes place in the dialogue for creating variables by selecting <Type:> (CLOCK) and entry of the <Identifier:> (clkTimer). Instancing with the teach pendant The timer module is instanced with the teach pendant in the variable mask by selecting the data type CLOCK. Festo GDCP-CMXR-SW-EN en 0805NH...
17.8.3 Starting the timer, Start method The timer is started using the Start method. The starting time is saved in the internal mod- ule. Should a start take place when the timer has already been stopped, then the stopped Festo GDCP-CMXR-SW-EN en 0805NH...
17.8.6 Reading the timer, Read method The current time value can be read in milliseconds (msec) using the Read method. Syntax <Instance name>.Read(OPT ovlEnable : BOOL) : DINT For a description of the ovlEnable parameter, see chapter 17.3.1, page 136. Festo GDCP-CMXR-SW-EN en 0805NH...
Return value: String with the formatted time information tt hh:mm:dd.ms. Example: Data: time : STRING Program: Lin(pos1) time := Timer.ToStr() // Reading with stop on path Lin(pos2) time := Timer.ToStr(TRUE) // Reading in the set main run Lin(pos3) Festo GDCP-CMXR-SW-EN en 0805NH...
(ENCODER) and entry of the <Identifier:> (encTrack). The real reference to a configured encoder input is produced in the <MAPTO ENCPORT> line. Instancing with the teach pendant The encoder module is instanced with the teach pendant in the variable mask by selecting the data type ENCODER. Festo GDCP-CMXR-SW-EN en 0805NH...
In FTL Editor, the available methods are automatically displayed in a list after the full-stop has been entered and can be selected from there. The teach pendant is used to select these methods from the “Incremental sensor” heading via the menu tree. Festo GDCP-CMXR-SW-EN en 0805NH...
Table 17.18 Modes of the Set method Example: enc0.Set(1000, DIRECT) 17.9.5 Reading the encoder, Read method The Read method is used to read the current incremental sensor value by the user pro- gram. Syntax: <ENCODER>.Read ( OPT <ovlEnable> : BOOL) : DINT Festo GDCP-CMXR-SW-EN en 0805NH...
DriveBus as well as to CANopen devices on the peripheral CAN bus. Example: Axis 1 in the kinematics is called Axis 1 in the DriveBus configuration in FCT. Accessing takes place via Axis1_copd.ModuleMethod( ). Festo GDCP-CMXR-SW-EN en 0805NH...
The illustration shows the selection of the CANopen module's methods on the teach pen- dant. 17.10.3 Writing SDO, WriteSDO method Data packets can be written to CAN bus using the WriteSDO method. Festo GDCP-CMXR-SW-EN en 0805NH...
DINT Subindex for SDO data DINT Data that are read Table 17.22 Parameters for the ReadSDOSigned method If the packet is read successfully, then TRUE is returned - otherwise FALSE. Example: dint_iData : DINT := 0 Festo GDCP-CMXR-SW-EN en 0805NH...
DINT Index for SDO subindex DINT Subindex for SDO data DWORD Data that are read Table 17.23 Parameters for the ReadSDOUnsigned method If the packet is read successfully, then TRUE is returned - otherwise FALSE. Festo GDCP-CMXR-SW-EN en 0805NH...
Every analogue signal is represented in the form of a structured data type. This contains the data: Value : REAL Value of the signal Error : BOOL Information on a signal error These data are accessed via the hardware names and the point operator. Festo GDCP-CMXR-SW-EN en 0805NH...
Page 170
Example: An analogue input signal has the designation “Level". Access to the status of the sensor is: Level.Value This statement is of the REAL data type and can be used like a variable in the program. Festo GDCP-CMXR-SW-EN en 0805NH...
This sensor is also used to detect the upper sheet. A sensor (to detect an empty stac is also attached to detect that a stack of sheets has been processed. Gripper system with collision detection Sensor for detecting empty stack Roller conveyor Stack of sheet steel ü Festo GDCP-CMXR-SW-EN en 0805NH...
Page 172
Other positions can be used for this application. The example is limited to those specified, however. safetyPosDeposit safetyPosSheet depositPos removalPos Since the height of the removal position is unknown due to the varying stack height, the removal position is positioned under the stack. Festo GDCP-CMXR-SW-EN en 0805NH...
Page 173
This position is supplemented with a safety distance. Thus in the next cycle, the movement to above the stack can be carried out at fast speed. The speed is then switched over to low speed until contact is established with the parts. Festo GDCP-CMXR-SW-EN en 0805NH...
//Interrupt sequence SetError("Timeout has expired") RETURN END_IF //Continue sequence Lin(pos) Note The output of an error message leads to an interruption of the movement. The sequence can only be continued after the error message has been acknowledged. Festo GDCP-CMXR-SW-EN en 0805NH...
If the loop counter is to display the actual cycle, then the set forerun has to be interrupted with a WaitTime instruction. The loop counter is now always increased when the Pos3 is reached. The following illustration shows this. Set forerun Festo GDCP-CMXR-SW-EN en 0805NH...
If sensors for the end positions are attached on the gripper system, then waiting times are normally not necessary. The integration of different gripper types in the CMXR world is described in the following chapters. Festo GDCP-CMXR-SW-EN en 0805NH...
A workpiece is going to be repositioned from the position at pos2 to the position at pos4. pos1 pos3 pos2 pos4 A Venturi nozzle is used as the vacuum generator. It is activated via a digital output of the CMXR. This is done by creating a digital output module. Festo GDCP-CMXR-SW-EN en 0805NH...
Page 178
The sub- sequent WaitTime command prevents a smooth transition, because the set precal- culation is stopped in this position and is continued after the time has elapsed. Festo GDCP-CMXR-SW-EN en 0805NH...
Page 179
19. Examples Movement profile: pos1 pos3 Smooth transition range pos2 pos4 Time behaviour: Speed pos2 pos4 Time pos1 pos1 pos3 pos3 Waiting time Festo GDCP-CMXR-SW-EN en 0805NH...
A workpiece is going to be repositioned from the position at pos2 to the position at pos4. pos1 pos3 pos2 pos4 A parallel gripper with end position sensors is used. This results in the following digital signals, which are integrated in the FTL programming in the form of modules. Festo GDCP-CMXR-SW-EN en 0805NH...
Page 181
Wait module method, a smooth transition to the receive and deposit positions is suppressed. The set precalculation is stopped at this point and continued after the digital input signal is relayed. Festo GDCP-CMXR-SW-EN en 0805NH...
Page 182
19. Examples Movement profile: pos1 pos3 Smooth transition range pos1 pos2 pos4 Smooth transiti Time behaviour: Speed pos2 pos4 Zeit pos1 pos1 pos3 pos3 Waiting for feedback signal Waiting for feedback signal Gripper closed Gripper opened Festo GDCP-CMXR-SW-EN en 0805NH...
19. Examples 19.4.3 Pneumatic swivel/gripper unit The Festo HGDS pneumatic swivel/gripper unit combines a parallel gripper with a semi- rotary drive in one unit. HGDS swivel/gripper with parallel gripper HGDS swivel/gripper unit with parallel The HGDS provides the option of built-in sensors for detecting the end positions of the gripper and the semi-rotary drive.
Page 184
// Wait until gripper closed Lin(pos1) outPos0Deg.Reset() // Turn to 90 degrees outPos90Deg.Set() Lin(pos3) inPos90Deg.Wait(TRUE) // Wait for 90 degrees with smooth transition Lin(pos4) // Deposit position outGripperClose.Reset() // Gripper open outGripperOpen.Set() inGripperOpen.Wait() // Wait until gripper open Lin(pos3) Festo GDCP-CMXR-SW-EN en 0805NH...
Page 185
The feedback signal is waited for at the posi- Smooth transiti tion pos3 and a smooth transition movement to pos4 is not carried out. pos1 pos3 Smooth transition range pos2 pos4 pos1 Smooth transiti Festo GDCP-CMXR-SW-EN en 0805NH...
Page 186
The feedback signal for the turn to 90 degrees is not present at the position at pos3. This signal is awaited. Speed pos4 pos2 pos3 Time pos1 pos1 pos3 Waiting for feedback signal Waiting for feedback signal Gripper opened Gripper closed Waiting for feedback signal 90 degrees turn Festo GDCP-CMXR-SW-EN en 0805NH...
This sequence is shown in the following flow diagram. Signal from the PLC Data ready plc_inboolreg[0] Signal to the PLC Data read plc_outboolreg[0] Adopt position New position was Position was End of transmission transferred transferred Festo GDCP-CMXR-SW-EN en 0805NH...
:= TRUE // Acknowledges the transfer WAIT NOT plc_inboolreg[0] // Wait for reaction of PLC plc_outboolreg[0] := FALSE // Approach the receive position Lin(abovePickPos) Lin(pickPos) // Gripping Gripper := TRUE WaitTime(200) // Approaching the deposit position Lin(abovePickPos) Lin(aboveDepositPos) Festo GDCP-CMXR-SW-EN en 0805NH...
Need help?
Do you have a question about the CMXR-C1 and is the answer not in the manual?
Questions and answers