Home

PNC CPL Programming Manual

image

Contents

1. ding V4 x x 1050 0000 1 9030 0000 1 1050 0000 6 1050 0001 1 1050 0008 9 1050 0001 2 1050 0010 0 1050 0003 1 1050 0010 1 1050 0003 2 1050 0100 0 1050 0000 2 1050 0100 1 1050 0002 1 1061 0000 2 1020 0000 1 1061 0000 3 1020 0000 2 1061 0000 4 1020 0000 3 1061 0000 5 1020 0000 4 1070 0000 2 1040 0001 O 1 1070 0000 3 1040 0001 1 1 1070 0000 4 1040 0001 2 1 1070 0000 9 1040 0001 5 1 1070 0002 0 1040 0002 0 1 1070 0002 1 1040 0002 1 1 1070 0001 1 1040 0003 1 1 1070 0001 8 1040 0004 1 1 1070 0010 1 9020 0011 0 1070 0090 1 1040 0000 3 1080 0000 2 1040 0001 O 2 1080 0000 3 1040 0001 1 2 1080 0000 4 1040 0001 2 2 1080 0000 9 1040 0001 5 2 1080 0002 0 1040 0002 0 2 1080 0002 1 1040 0002 1 2 1080 0001 1 1040 0003 1 2 1080 0001 8 1040 0004 1 2 2060 0000 1 obs 2060 0001 0 obs 3030 0000 1 7060 0002 0 3030 0000 2 7060 0001 0 3080 0000 3 7070 0001 0 3080 0010 0 7060 0031 0 3080 0010 1 7060 0032 0 3080 0010 2 7060 0033 0 9020 0000 5 obs 9020 0000 6 obs 9098 0000 1 9050 0000 1 9098 0000 2 9040 0000 1 9098 0000 3 7060 0011 0 9098 0000 4 9040 0010 4 9098 0000 9 7060 0021 0 9098 0001 0 7050 0001 0 9098 0001 1 7050 0002 0 9098 0001 2 7050 0003 0 9098 0001 6 7040 0001 0 9098 0002 0 7040 0002 0 9098 0002 4 8004 0000 1 9098 0003 0 9020 0001 0 9098 0004 0 7050 0031 0 Annex A 15 A 16 Annex BOSCH A 5 ASCII character set Dec Hex ASCII Dec Hex ASCII Dec Hex ASCII Dec Hex
2. 9 SEEK 1 0 PRN 1 lt EOF gt 10 SEEK 1 0 1 PRN 1 new lt EOF gt 11 CLOSE 1 6 14 File Handling BOSCH 6 9 Determining file size FILESIZE Supplies the size of a file or the limit up to which a file has already been writ ten The file may be a sequential or a random file This command only has an effect on files that were opened with OPENR FILESIZE lt n gt lt k gt lt N gt lt k gt 1to9 Logical number of the file whose size is to be deter mined If the range of values is not adhered to the INVALID FILE NUM BER error message appears With random files Range of values 1 to 4 With sequential files Range of values 1 to 2 lt k gt 1 Total memory area size in bytes used by a file lt k gt 2 Memory area size in bytes used from the start of the data area up to the EOF pointer excluding the size of the EOF pointer lt k gt 3 Maximum number of records in a file This result depends on the record length with which the file was opened lt k gt 4 Number of records from the start of the file up to the EOF pointer This result depends on the record length with which the file was opened lt k gt not programmed Like lt k gt 1 If the ranges of values for lt k gt is not adhered to the INVALID PA RAMETER error message appears Example FILESIZE and sequential file ONHUBPWNH FOR OPENW 1 2 1000 I 1 TO 20 PRN 1 TEST FILE
3. DANGER Tool or axis movements Feed and spindle motors generate very powerful mechanical forces and can accelerate very quickly due to their high dynamics e Always stay outside the danger area of an active machine tool e Never deactivate safety relevant functions e Report any malfunction of the unit to your servicing and repairs department immediately CAUTION Use only spare parts approved by Rexroth cS bs CAUTION Danger to the module All ESD protection measures must be observed when using the mo dule Prevent electrostatic discharges The following protective measures must be observed for modules and com ponents sensitive to electrostatic discharge ESD e Personnel responsible for storage transport and handling must have training in ESD protection e ESD sensitive components must be stored and transported in the pre scribed protective packaging e ESD sensitive components may only be handled at special ESD work places e Personnel working surfaces as well as all equipment and tools which may come into contact with ESD sensitive components must have the same potential e g by grounding e Wear an approved grounding bracelet The grounding bracelet must be connected with the working surface through a cable with an integrated 1 MQ resistor e ESD sensitive components may by no means come into contact with chargeable objects including most plastic materials e When ESD sensitive com
4. NPV2_TAB K2 npv according to the given usr user NPV_TAB K2 npv layout 4 22 System Functions BOSCH FXINS Sets up a new column in front of an existing column of an axis ZS table The instruction has the following structure FXINS lt TabName gt lt position gt lt axis name gt lt axis type gt lt TabName gt Axis ZS table name lt position gt Logical or physical axis name or column index of the table column at the insert position The new column is inserted in front of the insert posi tion lt axis name gt Logical or physical axis name of the new table column lt axis type gt optional axis type of the new axis 0 rotary axis 1 linear axis default value 1070 073 740 111 02 11 GB BOSCH 4 4 Tool compensations TC Access tool compensation data Both read and write access is possible for e ASCII geometry tables with definable names e external geometry compensation values e the database tables K4 and K5 The instruction has the following structure TC lt selection gt lt group gt lt table gt lt unit gt 1070 073 740 111 02 11 GB lt selection gt lt group gt lt table gt lt unit gt standard compensation external compensation 18t external compensa tion general compensation 2nd external compensa tion standard compensation external compensation 1 external compensation general compensation 24 external compensa
5. 1 BIN_VALUE BCD 49 BIN VALUE has the value 31 2 5 4 Relational operations 1070 073 740 111 02 11 GB gt gt lt gt lt lt The following comparison operations are permitted equal gt greater than equal gt greater than lt gt not equal lt less than equal lt smaller than Comparison operations are used to describe the relation fulfilled or not fulfilled of a condition e g for the commands REPEAT UNTIL WHILE DO END IF THEN ELSE ENDIF 2 20 CPL Basic Elements BOSCH 2 5 5 Repeat instructions In the event that one or more instructions must be repeatedly processed in accordance with specific conditions which is to be indicated here as a routine the option exists to accomplish this routine by means of repeat in structions The multiple repetition of the program is known as a loop FOR STEP TO NEXT If the abort condition is to be a direct consequence of the processing of the routine a tracking counter would be required This counter requires no spe cific programming for the FOR NEXT loop A counting variable INTEGER is declared the start and end count of which must be specified If the count ing increment deviates from 1 the step size STEP can be specified A FOR NEXT loop is structured as follows FOR lt numerical variable gt lt start value gt STEP lt stepsize gt TO lt end
6. 40 NEXT I M30 Screen output IS ROOT OF 1 IS ROOT OF 2 IS ROOT OF 3 1 000 1 414 1 732 3 162 IS ROOT OF 10 Example 10 A 25 B SORT A Z 5 S 10 20 DSP Z S A A B B C A B Screen output A 25 000 B 5 000 C 30 000 Example 10 A 25 B SQRT A Z 5 S 10 15 FAS A FBS B FCS C DSP Z S FAS FBS FCS A B B A 20 Screen output A 25 0 B 5 0 C 30 Example 1 1 52Y 2 5 B TRUE 1 200 T1s MEAS PROBE T2S NO 2 DSP 5 XPOS YPOS T1 B X Y T2 I Screen output XPOS 1 500 YPOS 2 500 MEAS PROBE TRUE NO 200 1070 073 740 111 02 11 GB BOSCH 1070 073 740 111 02 11 GB Dialog Programming 7 5 DLG ENDDLG Some dialog instructions may be contained in the program within a range which is enclosed by DLG and ENDDLG This range offers convenient data input options cf PRN and INP below Example 30 DLG Start of dialog Dialog and other CPL commands 90 ENDDLG End of dialog INKEY Returns as a function value the number of a depressed key which was not yet processed This gives the user the opportunity to respond to the depres sion of a certain key If the program flow encounters the INKEY function the execution of the pro gram will not be interrupted The INKEY function can provide values between 0 and 255 The value 0 means that no key was pressed The values from 1 127 correspond to the decimal values of the
7. Example DIM A 10 DIM B 15 A ANTON B WILLY C ABCDE D VWXYZ IF A lt B THEN IF MID A 2 3 MIDS BS 1 3 THEN Z A lt gt TEST 10 IF A lt C THEN 11 IF C gt D THEN 12 IF AS CS THEN 13 IF TE lt MIDS D 2 2 THEN ODIAHDUFWNP Ko The contents of the STRING expressions are checked for alphabetical order in accordance with the ASCII code of the individual characters 1070 073 740 111 02 11 GB BOSCH Processing Character Strings 5 13 5 8 3 Chaining STRING expressions 1070 073 740 111 02 11 GB Several STRING expressions can be chained with the use of the plus character The result must be assigned to a character field The nesting depth for the chaining of STRING expressions is 3 If this depth is exceeded the following fault message is returned RUNTIME ERROR 2153 NEST ING TOO DEEP Example Chaining also within CPL instructions 1 DIM AS 3 2 DIM BS 3 3 AS ABC 4 BS DEF 5 CS GH 6 DS JKL 7 OPENW 1 P2 130 CHAINING TEST 10 8 PRN 1 AS BS 9 PRN 1 AS C 10 PRN 1 C D 11 PRN 1 AS CS TEST 12 PRN 1 UVW XYZ 13 CLOSE 1 Content of P2 file ABCDEF lt LF gt ABCGH lt LF gt GHJKL lt LF gt ABCGHTEST lt LF gt UVWXYZ lt LF gt lt ETX gt lt LF gt Example Chaining texts via STRING expressions 10 DIM A 100 20 DIM B 100 30 DIM
8. e You can test launching the measuring probe on the channel with the func tion SD 9 The instruction has the following structure PPOS lt axis selection gt lt axis type gt It is not possible to inquire about positions of asynchronous axes Example Channel 3 as in the example configuration from page 4 5 No axis transformation is active i e logical coordinates correspond to log ical axes N10 G1 G75 A250 F500 20 IF SD 9 1 THEN N30 MSG Measuring probe was not deflected 40 GOTO ERROR 50 ELSE 60 AMEAS PPOS 1 1 The measured position of the 1st logical axis on 70 ENDIF the channel is assigned to the AMEAS variable 4 16 System Functions BOSCH PROBE In contrast to the function PPOS the function PROBE supplies the axis val ues which are based on the axis zero point coordinates of the machine coor dinate system MSC Please regard the following conditions e PROBE may only be used for axes of its own channel e Only lead screw error compensation and cross compensation are taken into consideration e You can test launching the measuring probe on the channel with the func tion SD 9 e The measured values are read with functions PPOS and PROBE with the function Measuring fixed stop G375 Itis not possible to inquire about positions of asynchronous axes The instruction has the following structure PROBE lt axis selection gt lt axis type gt Example Channel 2 as i
9. k bmp in the CPL dialog window If the color intensity of the bitmap to be shown does not comply with the currently set color intensity as displayed on the screen the system automatically performs a bitmap conversion As a result the bitmap is displayed after a delay BMP lt X value gt lt Y value gt lt file gt lt copy type gt lt X value gt lt Y value gt Coordinates in the CPL dialog window for the upper left hand pixel of the bitmap to be displayed Value range lt X value gt 0 632 lt Y value gt 0 374 Any INTEGER expressions are possible The entire graphics area incl softkey bar can be used for dis playing the bitmap CPL dialog max 374 X value max 632 Softkey range 40 0 1070 073 740 111 02 11 GB BOSCH 1070 073 740 111 02 11 GB Graphic Programming 8 9 lt file gt File name of the bitmap without file name extension omp Max 70 characters Must be programmed as STRING expres sion Used bitmap files must always be stored in the following directory typ3pcep bin cplbmp If the file cannot be accessed the following error message appears cplbmp lt name gt bmp is not existing After the error message has been acknowledged the program is con tinued lt copy type gt Value range 0 to 8 Any INTEGER expression The parameter defines how the bitmap is copied into the CPL dialog window In this way the bitmap to be disp
10. 34 Content of INTEGER variable X NUL Example LEN 1 DIM Z 10 2 Z TEST 3 S TREST 4 A LEN TEST 5 B LEN ZS 6 C LEN SS 7 D LEN TEST Z SS Content of INTEGER variable A Content of INTEGER variable B Content of INTEGER variable C Content of INTEGER variable D a RAL Example MID command with read access 10 DIM A 4 20 DIM BS 10 30 DIM C 10 40 DIM D 10 50 DIM E 10 55 DIM F 10 60 A ABCD 70 BS MIDS A 2 2 gt BS BC 80 CS MIDS AS 2 5 gt C BCD 95 ES MIDS A 5 1 gt ES NUL 97 FS MIDS AS 2 gt F BCD 98 FS MIDS F 1 1 gt FS B Example MID command with write access 10 DIM A 4 20 DIM BS 10 30 DIM C 10 40 DIM D 10 60 AS ABCD 70 BS 1234567890 80 CS EFGHIJKLMN 85 DS A gt D ABCD 90 MIDS D 2 3 BS gt D A123 95 MIDS D 5 1 C gt D A123E 97 MIDS D 4 BS gt D A121234567 Example TRIM 1 DIM XYZ 16 2 XYZ XVALUE 0 123 3 AS MIDS XYZ 8 4 BS TRIMS MIDS XYZS 8 5 CS TRIMS MIDS XYZ 8 L 6 DS TRIMS MIDS XYZS 8 R Content of STRING variable A 0 123 Content of STRING variable B 0 123 Content of STRING variable C 0 123 Content of STRING variable D 0 123 1070 073 740 111 02 11 GB BOSCH File Handling 6 1 6 File Handling Files are conta
11. 40 GMD 8 3 GOTO 2 22 GPR 8 7 Graphic programming 8 1 Graphics area Definition 8 3 Grounding bracelet 1 6 GWD 8 3 H Hard disk drive 1 7 HighSpeed interface 4 40 l IC 4 40 IF THEN ELSE ENDIF 2 23 INKEY 7 5 INP 7 7 INP 6 8 INP 7 2 INSTR 5 4 Instruction words reserved 2 6 Instructions 2 15 INT 2 16 INTEGER 2 7 2 12 Intended use 1 1 J Jump instruction Unconditional 2 22 Jump instructions Conditional 2 23 K Key terms 2 6 L Label 2 22 LEN 5 4 LIN 8 4 Line 8 4 Line and column grid 7 4 Line type 8 3 Linking 2 5 LJUST 6 5 Logical operations 2 18 Low Voltage Directive 1 1 M MCA 4 29 MCODS Motion control data services 4 48 MCOPS 4 70 Measuring units supplied axis and coordinate positions 4 7 MID 5 2 5 3 MMC 9 1 Modules sensitive to electrostatic discharge See ESD sen sitive components Motion control data services MCODS 4 48 Motion control process services 4 70 MPOS 4 14 MWD 8 4 N NC block 2 3 NCF 4 30 NCS coupling 4 46 NCS coupling via MCODS 4 48 NJUST 6 5 NOT 2 18 NUL 2 15 Numbers 5 5 0 Offset Graphics area 8 7 OPENR 6 3 OPENW 6 3 Operations Arithmetical 2 16 Double precision 2 7 Logical 2 18 OR 2 18 P Parameter transfer to sub programs 3 3 PDIM 3 3 1070 073 740 111 02 11 GB BOSCH Pixels h
12. Code number 2 If the automatic program re selection is active then it can be suppressed with the value 2 in this control reset Example ERR_VAR MCOPS 2 2 2 control reset in 24 channel without automatic program re selection Search block MCOPS 3 lt channel gt lt Start block gt lt End block gt 1070 073 740 111 02 11 GB Triggers Search block in the selected but not yet started main program of the programmed lt channel gt e lt Start Block gt and lt End Block gt are transferred as string expressions In the search for lt Start Block gt and lt End Block gt the following conventions apply e Blank lt Tab gt lt LF gt at the beginning of an NC block are ignored e If lt Start Block gt and lt End Block gt begin with a number and the express ion is not found in the program searched the system searches for the expression again but this time with the symbol N prefixed In this way e g 50 also finds the NC block N50X100 e If lt Start Block gt and lt End Block gt end with a number the expression is only found in the program searched if no further number follows directly E g G1X10 does not find the NC block G1X100 e f lt Start Block gt and lt End Block gt end with a letter the expression is only found in the program searched if a blank follows directly E g 50A finds the NC block 50A 1 but not 50A 1 e The machining begins wi
13. Examples WZNR 1 4 The first variable with Index 1 of the 1 dimensional field WZNR of the INTEGER type is assigned the value 4 WZKOR 2 2 0 2 The variable with the indexes 2 2 within the 2 dimensional field WZKOR of the REAL type is assigned the value 0 2 5 Estimating the available number of newly definable permanent vari ables e Total memory space for permanent variables 100 Kbyte 102400 byte e In versions smaller than V6 0 15 Kbyte 15360 byte Thus the number of maximum possible variables is reduced Pos Reserved for Memory Comment space as of V6 0 in bytes 1 all permanent variables 102400 Total memory of which the following are reserved for 2 1 99 800 permanent variables 3 administrative information 24 4 all definable permanent 101576 4 1 2 3 variables Pos Reserved for Memory Comment space in bytes 4 all definable permanent 101576 4 1 2 8 variables of which the following are reserved for 5 _R 823 Permanent field variables with 100 elements of the type DOUBLE 6 _RES_DOUBLE 40 Permanent variables of the type DOUBLE reserved for internal applications 7 _RES_DWORD 35 Permanent variables of the INTEGER type reserved for internal applications 8 newly defined perma 100678 8 4 5 nent variables 6 7 1070 073 740 111 02 11 GB BOSCH 1070 073 740
14. If no length compensation is active 1 is returned Active length compensation Real MCODS 10 lt channel gt lt version gt lt buffer gt 1 S Supplies in lt buffer gt the length compensation active in lt channel gt in mm If no length compensation is active 0 0 is returned 2 1 Data which the control unit provides cyclically are identified with Z Data available after each switching of blocks are identified with S Data which appear in irregular periods after a change are identified with an E Data which appear immediately when called for are identified with an Data which never change they only need to be called for once are identified with R Gives the variable type integer real double character needed for lt buffer gt If not a simple variable but a field variable is needed the variable type is followed by array yp 1070 073 740 111 02 11 GB BOSCH System Functions 4 53 Function supplies lt buffer gt is Syntax refresh of type 2 description Active tool radius compensation Integer MCODS 11 lt channel gt lt version gt lt buffer gt 1 number S Supplies in lt buffer gt the tool radius compensation number active in lt channel gt If no tool radius compensation is active 1 is returned Active tool radius compensation Real MCODS 12 lt channel gt lt version gt lt buffer gt 1 S Supplies in
15. Programmed coordinate end Real Array MCODS 76 lt channel gt lt version gt lt buffer gt lt size gt points S Supplies the programmed coordinate end points of the given channel to lt buffer gt first all working range coordinates then the pseudo coordinates of the channels Coordinate end points Real Array MCODS 77 lt channel gt lt version gt lt buffer gt lt size gt S Supplies the end points of the coordinates of the given channel to lt buffer gt including the shifts first all working range coordinates then the pseudo coordinates of the channel 1 Data which the control unit provides cyclically are identified with Z Data available after each switching of blocks are identified with S Data which appear in irregular periods after a change are identified with an E Data which appear immediately when called for are identified with an Data which never change they only need to be called for once are identified with R 2 1070 073 740 111 02 11 GB Gives the variable type integer real double character needed for lt buffer gt If not a simple variable but a field variable is needed the variable type is followed by array mye 4 68 System Functions BOSCH coordinates Function supplies lt buffer gt is Syntax refresh of type 2 description Coordinate names Character MCODS 78 lt channel gt lt version gt
16. Reads active system data of the NC control unit see page 4 32 SDR SDR lt group gt lt index1 gt lt index2 gt Reads active system data of the NC control unit in REAL format 4 37 SEEK SEEK lt n gt lt k gt lt o gt lt n gt logical file number lt k gt record lt o gt record offset Positions the file pointer on the lt k gt record of a random file or on the lt k gt h byte of a sequential file 6 13 SFK SFK lt variable gt lt text1 gt lt text8 gt Output of a softkey bar and assignment of the softkey being depressed to the specified variable SIN lt function value gt SIN lt input value gt Application of sine function to lt input value gt SPOS SPOS lt axis selection gt Transfers the current axis command value of a physical axis SQRT lt function value gt SQRT lt input value gt Application of square root function to lt input value gt STR STRS lt format string gt lt value gt Converts the numerical expression lt value gt to a character string which can only be assigned to a character field If lt format string gt is programmed the string can be output formatted lt value gt can be an INTEGER or REAL expression of simple and double precision TAN lt function value gt TAN lt input value gt Application of tangent function to lt input value gt TC TC lt selection gt
17. To set up and modify an axis ZS table the following CPL instructions are nec essary e FXC access to the axis zero point shift values e FXCR setting up a new axis ZS table e FXDEL deleting a column in the axis ZS table e FXINS inserting a column to the axis ZS table FXC Provides direct access to the axis zero shift values axis ZS values in the NC Both read and write access is possible for e ASCII tables with definable names for axis ZS values e external axis ZS values the database tables V1 V2 and V3 compatible with older versions Furthermore the sum of all effective last programmed axis ZS values of an axis can be requested In the case of external axis ZS values the function supplies a CPL er ror message for axes foreign to the channel The instruction has the following structure FXC lt axis selection gt lt G address gt lt axis ZS table gt lt unit gt lt axis selection gt Axis ZStables column index 1 64 or logical axis name External axis ZS logical axis index 1 8 or logical axis name The logical axis index can also be programmed with negative sign incremental specification The addressed table can be read or overwritten When overwriting it is possible to lt axis selection gt positive the programmed value is incorporated into the axis ZS table and replaces the old value lt axis selection gt negative the programmed value is added to the old table value increme
18. Typ3 osa PNC CPL Programming Manual adad idad ak Rexroth Bosch Group Typ3 osa PNC CPL Programming Manual 1070 073 740 111 02 11 GB Software release V7 3 1994 2002 by Bosch Rexroth AG Erbach Germany All rights reserved including applications for protective rights Reproduction or distribution by any means subject to our prior written permission Discretionary charge EUR 12 BOSCH Contents 1070 073 740 111 02 11 GB a oo E OuRWND Contents Safety Instructions 02 c eee eee eee Intended USC 1005s cnnecad eis niaaa iE E a Eaa A ba ae Qualified personnel 0 0 cee cee eee ee eee ees Safety markings on products 00 e eee eee nes Safety instructions in this manual 0 nanna Safety instructions for the described product Documentation software release and trademarks CPL Basic Elements 2200eeeeeees Progam SUUCIUIC wii bee di eee aie ee ieee bed ate eee oe NG DIOCK Sieni iadaa ketieend eset a daea deed een aa gea dediens CPL DIOCK stiai deana aatia a deana deaa Ee a ade da ant Start Of program sess erdera cee eee di aah LIAKING eh sick kag hee ee es wing sai oE Ps paa EE REDE eva Symbol names 000 cece eee eens Reserved instruction wordS 0 cece eee eee eens Constants lt 2ntsiyctascetarienidiesiehy S Sew EEE VanlableS orren aye saws eevee nieye saws
19. lt buffer gt lt size gt Array E Supplies the names of the active coordinates of the given channel to lt buffer gt first all working range coordinates then the pseudo coordinates of the channel INPOS status coordinates Integer MCODS 79 lt channel gt lt version gt lt buffer gt lt size gt Array Z Supplies the INPOS status of the coordinates of the given channel to lt buffer gt first all working range coordinates then the pseudo coordinates of the channel The status for a working range coordinate is derived from the logical AND operation of the axis signals Reference status of the Integer MCODS 80 lt channel gt lt version gt lt buffer gt lt size gt coordinates Array E Supplies the reference point status of the coordinates of the given channel to lt buffer gt first all working range coordinates then the pseudo coordinates of the channel The status for a working range coordinate is derived from the logical AND operation of the axis signals Measuring units of the Integer MCODS 81 lt channel gt lt version gt lt buffer gt lt size gt coordinates Array E Supplies the measuring units of the coordinates of the given channel to lt buffer gt first all working range coordinates then the pseudo coordinates of the channel Possible return values for the measuring units 0 inches 1 metric 2 degrees 3 coordinate is not available Number of coordinates Integer MCODS 82 lt channel gt lt version gt
20. lt buffer gt lt size gt Array E Supplies the number of coordinates axes in 3 elements of the given channel to lt buffer gt 1st value the total number of axes of the channel 2nd value number of working range coordinates number of pseudo coordinates of the channel 3d value the number of pseudo coordinates of the channel Distance to go of the workpiece Real Array MCODS 83 lt channel gt lt version gt lt buffer gt lt size gt Z Supplies the distances to go of the workpiece coordinates WCS of the given channel to lt buffer gt first all working range coordinates then the pseudo coordinates of the channel 2 1 Data which the control unit provides cyclically are identified with Z Data available after each switching of blocks are identified with S Data which appear in irregular periods after a change are identified with an E Data which appear immediately when called for are identified with an Data which never change they only need to be called for once are identified with R Gives the variable type integer real double character needed for lt buffer gt If not a simple variable but a field variable is needed the variable type is followed by array yp 1070 073 740 111 02 11 GB BOSCH System Functions 4 69 Function supplies lt buffer gt is Syntax refresh of type 2 description Channel waiting states Integer MCOD
21. 1070 073 740 111 02 11 GB A STRING expression can be assigned to a STRING variable Example Programming of STRING variables without previous dimensioning 1 A ABCDE 2 B CHR 10 During read access parts of the STRING variables can be accessed by means of the MID command 1 A ABCDEFGHIJKLMN 2 B MID A 2 1 3 C MID A 4 4 The following lines of programming will lead to faults 4 MID A 1 4 ABCD 4 A MID A 1 3 MID A 4 1 4 A B A To continue processing a dimensioned character field it is necessary to spe cifically access one or several connected characters Only then will it be pos sible to assign a character field or a part of the character field to a STRING variable or to another character field Read and write access to a part of a character field is performed with the MID command If only the character field name is entered the entire char acter field will be addressed Reading a character field If the lt n gt t character of the character field is to be accessed proceed as follows n is less than or equal to the length of the character field and the number of characters in the field Example Reading a character field 1 DIM VWX 13 2 VWX TEST TEST TES 3 AS MIDS VWX 12 1 4 I 12 5 AS MIDS VWX I 1 The 12th character E of the VWX character field is assigned to the A string variable Writing of a character field If the content
22. OTHERWISE instruction or in the event that OTHERWISE was not pro grammed directly to the ENDCASE instruction The lt instruction gt of a CASE construct can include all CPL instructions A maximum of 10 CASE constructs can be nested Examples 10 CASE A OF 10 CASE INTFIELD 1 2 OF 20 LABEL 0 Y 1 20 LABEL 1 2 3 GOTO MARK1 30 LABEL 2 30 LABEL 4 5 6 GOTO MARK2 40 Y Y Y 40 OTHERWISE GOTO END 50 LABEL 4 Z Y Y 50 ENDCASE 60 Y Z Z 70 OTHERWISE Y 0 80 ENDCASE 10 CASE INT X Y C OF 20 LABEL 1 2 X 1 Y 2 30 LABEL 4 8 40 X 2 Y 4 50 LABEL 0 60 X 0 Y 1 70 OTHERWISE X 0 Y 0 80 ENDCASE 1070 073 740 111 02 11 GB BOSCH 2 5 8 Program remark 1070 073 740 111 02 11 GB CPL Basic Elements 2 25 REM For giving remarks on programs Characters after the REM instruction until the next end of a line are ignored in the program s execution of commands REM lt remark text gt Example 10 REM SP TO DEMASK THE STATUS WORD The colon within a remark is not regarded as an instruction separat ing character also see section 2 1 2 2 26 CPL Basic Elements BOSCH Notes 1070 073 740 111 02 11 GB BOSCH Sub programs and Cycles 3 1 3 Sub programs and Cycles The NC makes no formal distinction between main programs and sub pro grams The following conventions apply e Sub programs can contain CPL and DIN blocks e Any part program can be invoked as a sub pr
23. The MID instruction overwrites parts of a character field MIDS lt character field gt lt start point gt lt number of characters gt lt character field gt Character field in which parts are to be overwrit ten lt start point gt Determines from which position in the lt character field gt the characters are to be overwritten The lt start point gt value may exceed the number of previously assigned components length by a maximum of 1 lt number of characters gt Determines the number of characters which are overwritten If lt number of characters gt is not pro grammed all assigned characters are entered in lt character field gt in so far as the dimensioning of the character field allows The range of values for the 29 and 3 parameters is between 1 to 1024 If the range of values is not adhered to the fault message INVALID PARAME TER appears Example 1 DIM A 10 2 AS ABC Length of As is 3 3 MIDS AS 4 3 DEF The 4 to 6t components of the character field are written This is permissi ble because the first three components have already been assigned Example 1 DIM A 10 2 AS ABC Length of As is 3 3 MIDS AS 5 3 DEF An attempt is made to inscribe the 5t to 71 components of the character field This however results in the error message CHARACTER FIELD NOT ASSIGNED because the 4 component has not yet been assigned If more characters are assigned than permitted by
24. Typ1osa reading access to the machine parameter for customer software P4017 is no longer applicable Typ3osa Access via the CPL command MCA to the customer specific MACODA group 50 applications A 3 C Other CPL changes in the Typ3 osa The following functions have been changed in the Typ3 osa in comparison to the previous controls Command Control panel Remark The graphic window of the Typ3 osa is larger than that of the Typ1 osa Horizontally 79 columns text or 633 pixels graphics Vertically 46 lines text or 415 pixels graphics See chapter 8 8 8 softkeys see page 7 8 Key codes By using the CPL command INP the keys can be queried As the control panel has been changed so have some keycodes been changed See Annex A 6 Additional keycodes TYP2 Those CPL dialog programs marked TYP2 are exe cuted as Typ2 compatible in Typ3 osa Only the first 5 softkeys are used and the dialog uses only the smaller graphic section of the previous controls See chapter 7 Dialog programming MP 4017 The machine parameter block P4017 Machine parame ters for customer software no longer exists in the Typ3 osa MP 4017 has been replaced by the MACODA group 50 applications 5010 00001 and 5010 00002 for configur ing CPL programs and PLC modules 1070 073 740 111 02 11 GB A 14 Annex BOSCH A 4 MACODA parameters list of chang
25. Workpiece coordinates Real Array MCODS 71 lt channel gt lt version gt lt buffer gt lt size gt Z Supplies the values of the workpiece coordinates WCS of the given channel to lt buffer gt first all working range coordinates then the pseudo coordinates of the channel Basis coordinates of the setpoints Real Array MCODS 72 lt channel gt lt version gt lt buffer gt lt size gt Z Supplies the setpoint values of the basis coordinates BCS of the given channel to lt buffer gt first all working range coordinates then the pseudo coordinates of the channel Axis coordinates Real Array MCODS 73 lt channel gt lt version gt lt buffer gt lt size gt Z Supplies the values of the axis coordinates ACS of the given channel to lt buffer gt Channel 1 all axis coordinates 0 lt channel lt max channel data of the specified channel Machine coordinates Real Array MCODS 74 lt channel gt lt version gt lt buffer gt lt size gt Z Supplies the values of the machine coordinates MCS of the given channel to lt buffer gt Channel 1 all axis coordinates 0 lt Channel lt max channel Data of the specified channel Basis coordinates actual values Real Array MCODS 75 lt channel gt lt version gt lt buffer gt lt size gt Z Supplies the actual values of the basis coordinates BCS of the given channel to lt buffer gt first all working range coordinates then the pseudo coordinates of the channel
26. see MCODS 39 Status Acknowledgement compulsory auxiliary see MCODS 40 Status Load release see MCODS 41 41 Status Travel command see MCODS 47 Status Feed inhibit see MCODS 49 SAV block preparation and IPO states see MCODS 82 Potentiometers Value of feed potentiometer see MCODS 7 Values of spindle potentiometers see MCODS 8 Value of axis potentiometers 4 50 System Functions BOSCH see MCODS 50 Compensations Active length compensation number see MCODS 9 Active length compensation see MCODS 10 Active tool radius compensation number see MCODS 11 Active tool radius compensation see MCODS 12 Name of active tool compensation table see MCODS 13 Name of active axis shift table see MCODS 14 Active zero axis shift values see MCODS 15 Active external tool compensation values see MCODS 51 Active external axis zero shift values see MCODS 52 Active general tool compensation see MCODS 54 Operation modes Channel operation mode see MCODS 31 Axis operation mode see MCODS 48 System structure Number of feed axes auxiliary axes spindles movement types drive types see MCODS 34 Number of channels see MCODS 44 Number of axes see MCODS 45 Names of axes see MCODS 33 Active logical axis names see MCODS 59 Logical axis na
27. value gt lt routine gt NEXT lt numerical variable gt Example 10 FOR I 0 TO 18 20 XSINUS I SIN I 10 30 NEXT I Proceeding the loop the numerical variable will have a value which is larger than the end value max step size In this example the sine values for 0 through 180 degrees are written into the XSINUS field The 1 that was appended to the NEXT in line 30 serves clarification purposes only and may be omitted It is also possible to program FOR NEXT loops with variable step size In this case the step size variable should possess the same type of variable as the numeric variable Example 10 OPENW 1 P222 130 20 STEPS 1 START 1 END 3500 NJUST 30 FOR COUNTER S START STEP STEP TO END 40 STEP ROUND STEP SORT STEPS 50 PRN 1 COUNTER COUNTER STEP SIZE STEP 60 NEXT 70 CLOSE 1 Subsequent to program execution the following appears in the P222 file COUNTER 1 STEP SIZE 3 COUNTER 4 STEP SIZE 5 COUNTER 9 STEP SIZE 11 COUNTER 20 STEP SIZE 36 COUNTER 56 STEP SIZE 216 COUNTER 272 STEP SIZE 3175 COUNTER 3447 STEP SIZE 178902 1070 073 740 111 02 11 GB BOSCH 1070 073 740 111 02 11 GB CPL Basic Elements 2 21 REPEAT UNTIL If the loop abort condition is to be queried only subsequent to the first proc essing of the routine the program can be instructed to REPEAT this routine UNTIL the condition has been me
28. 01 percent If you specify an actually existing channel number for lt channel gt for each axis on the specified channel the value of the channel potentiometer and then the values of the axis potentiometers of all asynchronous axes will be supplied in ascending order in lt buffer gt in 0 01 percent Active external tool compensation values Real Array MCODS 51 lt channel gt lt version gt lt buffer gt lt size gt S Supplies in lt buffer gt the external tool compensation values active in lt channel gt Order radius length compensation If no external tool compensation is active 0 0 will be returned in each case Active external axis zero shift values Real Array MCODS 52 lt channel gt lt version gt lt buffer gt lt size gt S Supplies in lt buffer gt the external axis zero shift values active in lt channel gt Order 15 logical axis 8 logical axis If no external shift is active 0 0 will be returned in each case Unit of measurement of the axes Integer Array MCODS 53 lt channel gt lt version gt lt buffer gt lt size gt E If you specify the value 1 for lt channel gt the units of measurement metric inch degree of all physical axes will be supplied in ascending order in lt buffers If you specify an actually existing channel number for lt channel gt the unit of measurement for each axis on the specified channel and then
29. 073 740 111 02 11 GB 4 76 System Functions BOSCH 4 14 3 Programming examples Example 1 Immediately request SAV and interpolator state of channel 2 10 DIM BUF 2 Make field 20 VERSION 0 Supply data immediately 30 ERR_VAR MCODS 32 2 VERSION BUF 2 Function call gt The SAV condition is shown in BUF 1 the IPO condition is shown in BUF 2 gt The current version number of the data is shown in VERSION important for example 2 Example 2 Wait until SAV state of channel 2 changes to inactive lt Code of Example 1 gt 10 INACTIVE 20 WHILE BUF 1 lt gt INACTIVE DO 30 ERR_VAR MCODS 32 2 version BUF 2 40 END 1 1 gt After the call the function does not return to the invoking program until the SAV state changes VERSION contains another value lt gt 0 please refer to Example 1 for the version number The loop will not be exited until BUF 1 contains the value 1 Example 3 Version of axis names in MSG window 30 VERSION 0 40 DIM AXNAMES 512 50 REM Request all axis names 60 ERR MCODS 33 1 VERSION AXNAMES 512 70 IF ERR 0 THEN 80 REM Determine number of axes 90 DIM AXNMBS 3 100 VERSION 0 110 ERR MCODS 45 1 VERSION AXNMB 3 120 ANZ AXNMBS 2 130 ENDIF 140 IF ERR lt gt 0 THEN 150 PRN 0 Error occurred ERR 160 ELSE 170 REM Display of axis names 180 FOR I 0 TO ANZ 1 190 NAMES MIDS AXNAMES 13 941 8 200 IF ASC NAMES lt g
30. 1070 073 740 111 02 11 GB 4 34 System Functions BOSCH Group Index1 Index2 Index3 Concerns the function Explanation 13 Machining mode when executing at the point of interpretation SD 13 0_ single block single step SD 13 1 automatic SD 13 2 program block SD 13 10 block search with single block or single step selected block not yet interpreted SD 13 11 block search with automatic selected block not yet interpreted 14 Number of active national language MACODA parameter 6010 00010 15 Test without motion SD 15 0 no SD 15 1 yes 16 0 1 Currently not in use 17 1 32 Currently not in use 20 1 2 Supplies the number of synchronous axes of the invoking channel SD 20 1 value default value at the moment of block processing SD 20 2 value when active 21 1 n 1 2 Supplies the number of synchronous axes of a channel SD 21 lt 1 n gt 1 value default value at the moment of block processing SD 21 lt 1 n gt 2 value when active 1 n channel number n max number of channels 22 1 m 1 2 Supplies the logical axis number of a physical axis if this is an or axis of the invoking channel physi SD 22 lt 1 m gt String 1 value default value at the moment cal of block processing fee SD 22 lt m gt String 2 value when active es igna 1 m physical axis number tion m max number of physical axes String physical axis
31. 1070 073 740 111 02 11 GB BOSCH Effect Control reset System Functions 4 71 Syntax description MCOPS 2 lt channel gt lt Control reset type gt Triggers Control reset on the programmed lt channel gt To trigger system control reset lt channel gt 2 e The channel initially accepts no further jobs such as program selection or operation mode switch The interpolator is stopped Jobs assigned to the channel but not yet executed are discarded The main program is exited Altered MACODA parameters not requiring startup are adopted e g MACODA parameter 1020 00001 software limit Errors and warnings triggered by this channel are deleted The interpolator is restarted The power up condition at control reset MACODA parameter 7060 00020 is adopted i e the corresponding modal states become active e The channel returns the interface signal 0 2 Control reset executed and is ready again for new jobs e Control reset type gt Integer expression Sets the behavior of the functions The following list includes all defined behavior patterns A code number precedes each pattern In order to set a certain pattern the corresponding code number must be transferred into lt Control reset type gt If several patterns are to be combined then the total of all the corresponding code numbers in lt Control reset type gt must be transferred to the function Up to now the list contains only one element
32. 1070 073 740 111 02 11 GB BOSCH Graphic Programming 8 5 8 5 Circle Draws full circles or arcs of circles in clockwise direction Full circle CIR lt X center gt lt Y center gt lt radius gt Partial circle arc clockwise CIR lt X start gt lt Y start gt lt X end gt lt Y end gt lt X center gt lt Y center gt lt X center gt lt Y center gt Circle center coordinates in the form of any INTEGER expression lt radius gt Radius of the full circle in the form of any INTEGER expression lt X start gt lt Y start gt Coordinates of the starting point in the form of any INTEGER expression lt X end gt lt Y end gt Coordinates of the end point in the form of any INTEGER expression If parameter values are identical with a preceding circle programming these unchanging parameters may be omitted at the corresponding place of the CIR command If REAL values are used instead of INTEGER values an internal conversion to integer pixel values will take place Examples Graphic commands 1 DLF REM Bring CPL dialog window to the foreground 2 COL 7 7 REM Activate color table 2 set graphic color to black 3 GWD 100 500 100 350 REM Specify graphic area 4 MWD 0 400 150 100 REM Determine edges of the coordinate system 5 LIN 50 100 100 50 REM Draw line from 50 100 to 100 50 6 REM Draw half circle from 100 50 to 200 50 with center 150 50 7 CIR 100 50 200 50 150 50 8 LIN 0 REM Draw line from 200 5
33. 111 02 11 GB CPL Basic Elements 2 11 Each definable permanent variable occupies the following memory space Pos Reserved for in bytes 9 the names of the permanent va riables Memory space Comment max 16 1 byte per character 10 the value of the definable per manent variables 1 40r 8 Integer 4 bytes Double 8 bytes Real 4 bytes Boolean 1 byte 11 administrative information 20 12 a definable permanent variable of the DOUBLE type with a name length of 16 characters 44 e g maximum assignment of memory space 9 10 11 Number of definable permanent variables of the types DOUBLE and INTEGER Variable type Number of Comment variables Type DOUBLE with a name length 2288 100678 44 2288 of max 16 characters Type INTEGER with a name length 2516 100678 16 4 20 of max 16 characters 2516 Type INTEGER with a name length 3146 100678 8 4 20 of max 8 characters 3146 Field variables with name lengths 25160 100678 16 20 4 of max 16 characters 25160 Type INTEGER Field variables with name lengths 12580 100678 16 20 8 of max 16 characters Type DOUBLE 12580 File structure of wmhperm dat and anwperm dat files The files may contain only declarations of definable permanent variables Each declaration occupies a separate line and concludes with a RETURN A li
34. 111 02 11 GB 4 26 System Functions BOSCH 4 6 Contour shift Example Tool length value in database 312000 integer The value is interpreted by the control unit in accordance with the current configuration e g as a real number with 4 digits before and 3 digits after the decimal point 312 000 If you process the value by CPL or write it into the database you must ensure that the CPL program e interprets the transferred value correctly and e writes it into the database as an appropriate integer Examples 70 TDA 1 1 9 1 20000 In tool table 1 the value 20000 is entered in sector 1 2 place 1 in the 9th database field integer 70 TDA 2 3 8 1 NAMES In tool table 1 the content of the string variable NAME is entered in sector 2 place 3 in the 8th database field string 70 A TDA 2 1 3 The value of the 3 9 database field from the data set of sector 2 place 1 is entered in integer variable A Tool table 1 is used for this COF Supplies the last programmed contour shift G60 of a coordinate for the channel in which the program with the COF command is running Since the programmed contour shift only affects coordinates on the current channel an error message is issued if a coordinate not existing on this chan nel is selected Compensation values are supplied in the active measuring unit of the cur rent channel i e with G70 in inches and with G71 in mm When working with rotary axes or r
35. 21 2 and SD 21 1 1070 073 740 111 02 11 GB BOSCH System Functions 4 35 Group Index1 Index2 Index3 Concerns the function Explanation G168 G268 68 1 1 8 Sum of last programmed coordinate shifts G168 G268 for the given axis Index1 68 2 1 8 Total of the active coordinate shifts G168 G268 for the given axis Index2 168 1 1 8 Value of last programmed coordinate shift G168 for the given axis Index1 168 2 1 8 Value of the active coordinate shift G168 for the given axis Index2 268 1 1 8 Value of the last programmed additive coordinate shift G268 for the given axis Index1 268 2 1 8 Active value of the additive coordinate shift G268 for the given axis Index2 G131 131 1 logical axis number of the axis of rotation 131 2 symmetry Work area Dead range 200 1 Number of active areas on the channel 200 1 1 10 Shows if an area is active or not 0 Area i Index2 is not active 200 3 1 10 Type of area i 0 type not defined 1 dead range 2 work area 200 11 1 10 Position of the center of the area i Index2 in programming units for the 1St axis of the area 200 12 1 10 Position of the center of the area i Index2 in programming units for the 21d axis of the area 200 21 1 10 Extension of the area i Index2 in programming units for the 1St axis of the area 200 22 1 10 Extension of the area i Index2 in
36. 22 D1 1 12345678901234 24 D2 123456789012345 26 D3 1234 123456 The following queries produce the result E TRUE 28 IF DO 123456789 123456 THEN E TRUE ELSE E FALSE ENDIF 29 IF D1 1 12345678901234 THEN E TRUE ELSE E FALSE ENDIF 30 IF D2 123456789012345 THEN E TRUE ELSE E FALSE ENDIF 31 IF D3 1234 123456 THEN E TRUE ELSE E FALSE ENDIF 32 IF DO 2 1 3 1 123456789 123456 2 1 3 1 THEN 33 E TRUE 34 ELSE 35 E FALSE 36 ENDIF 37 IF DO 2 1 3 1 123456789 123456 2 1 3 1 THEN 38 E TRUE 39 ELSE 40 E FALSE 41 ENDIF Character string constant STRING 1070 073 740 111 02 11 GB A character string constant is limited by quotation marks inverted commas Example EXAMPLES This is a character string STRING constant 2 8 CPL Basic Elements 2 4 3 Variables Groups of variables BOSCH If it is deemed desirable that data remains subject to change i e variable during program execution this data will be defined by means of expressions containing variables Variables are definable symbol names for which in CPL some declarations must be effected The most important declaration is the unambiguous choice of a name for the variable However variable names may not include reserved instruction words also termed keywords The name of the variable may consist of any sequence of capital letters and numbers the only stipulation bei
37. 3 6 only 5 elements according Oldest errors reported to the DIM command The part program errors 1938 and 1971 are issued as a result in the MSG window The variable Erg has the value 2 One of the uses of the GETERR function is to record the chronological appearance of one or several errors in order to research the actual cause of the error 1070 073 740 111 02 11 GB 4 46 System Functions BOSCH 4 14 NCS coupling Process and data services of the internal NCS interface can be accessed by means of the functions for NCS coupling 4 14 1 Possible error return values of the functions All function calls supply a return value for verification and remedying errors This value can be assigned to an integer variable or to a real variable Example ERR_VAR MCOPS ERR_VAR MCODS CAUTION Incorrect program reactions possible If invoked functions return an error code actions which might be im portant for the continued program sequence were performed incom pletely or not at all We therefore urgently recommend that after a function call you check the program e g using CASE to determine whether the func tion was able to be executed without error The further program behaviour will then be based on the type and severity of any error occurring The following return values are currently defined 0 No error occurred 1 The specified channel does not exist 2 The function cannot be executed
38. 3 Actual speed 2nd spindle 6 1 6 Currently not in use 7 1 7 2 Currently not in use T 3 8 Supplies the channel number of the invoking channel 9 G75 Probe switched SD 9 0 G75 not active Probe not switched 9 1 G75 active G375 Measuring fixed stop executed SD 9 0 Q375 not active Measuring fixed stop not yet D 9 1 Q375 active executed 10 1 2 1 2 Index 1 1 Number of last programmed drilling axis 2 Number of active drilling axis Index 2 1 Axis on which length compensation H has an effect 2 Axis on which the L3 compensation of the general tool compensation has an effect 11 1 1 Main axis of last programmed plane switchover 11 2 1 Secondary axis of last programmed plane switchover 11 1 2 Main axis of active plane 11 2 2 Secondary axis of active plane 12 1 Active sense of spindle rotation SD 12 1 3 clockwise spindle rotation SD 12 1 4 counter clockwise spindle rotation SD 12 1 7 spindle stop SD 12 1 1 spindle not applied Sie 1 19 spindle orientation 12 2 Last programmed sense of spindle rotation functions as with Active sense of spindle rotation An active reversal of the sense of rotation via interface signal is not taken into account 12 3 Active sense of spindle rotation 29 spindle functions as with Active sense of spindle rotation 12 4 Last programmed sense of spindle rotation 2nd spindle functions as with Active sense of spindle rotation Currently not available
39. 740 111 02 11 GB BOSCH 1 3 Safety markings on products 1070 073 740 111 02 11 GB RPPP Safety Instructions 1 3 Warning of dangerous electrical voltage Warning of danger caused by batteries Components sensitive to electrostatic discharge Warning of hazardous light emissions optical fiber cable emitters Disconnect mains power before opening Pin for connecting PE conductor only Connection of shield conductor only 1 4 Safety Instructions BOSCH 1 4 Safety instructions in this manual DANGEROUS ELECTRICAL VOLTAGE This symbol is used to warn of a dangerous electrical voltage The fail ure to observe the instructions in this manual in whole or in part may result in personal injury structions may result in personal injury CAUTION This symbol is used wherever insufficient or lacking compliance with in structions may result in damage to equipment or data files DANGER A This symbol is used wherever insufficient or lacking compliance with in This symbol is used to draw the user s attention to special circumstances x This symbol is used if user activities are required 1070 073 740 111 02 11 GB BOSCH Safety Instructions 1 5 1 5 Safety instructions for the described product DANGER Danger of life through inadequate EMERGENCY STOP devices EMERGENCY STOP devices must be active and within reach in all system modes Releasing an EMERGENCY STOP device must not r
40. ASCII 0 00 NUL 32 20 SP 64 40 96 60 1 01 SOH 33 21 65 41 A 97 61 a 2 02 STX 34 22 R 66 42 B 98 62 b 3 03 ETX 35 23 67 43 C 99 63 c 4 04 EOT 36 24 68 44 D 100 64 d 5 05 ENQ 37 25 69 45 E 101 65 e 6 06 ACK 38 26 amp 70 46 F 102 66 f 7 07 BEL 39 27 71 47 G 103 67 g 8 08 BS 40 28 72 48 H 104 68 h 9 09 HT 41 29 73 49 l 105 69 i 10 OA LF 42 2A 74 4A J 106 6A j 11 0B VT 43 2B 75 4B K 107 6B k 12 oc FF 44 2C 76 4C L 108 6C 13 oD CR 45 2D 77 4D M 109 6D m 14 OE so 46 2E 78 4E N 110 6E n 15 OF SI 47 2F 79 4F O 111 6F o 16 10 DLE 48 30 0 80 50 P 112 70 p 17 11 DC1 49 31 1 81 51 Q 113 71 q 18 12 DC2 50 32 2 82 52 R 114 72 r 19 13 DC3 51 33 3 83 53 S 115 73 s 20 14 DC4 52 34 4 84 54 T 116 74 t 21 15 NAK 53 35 5 85 55 U 117 75 u 22 16 SYN 54 36 6 86 56 V 118 76 v 23 17 ETB 55 37 7 87 57 Ww 119 77 w 24 18 CAN 56 38 8 88 58 X 120 78 x 25 19 EM 57 39 9 89 59 Y 121 79 y 26 1A SUB 58 3A 90 5A Z 122 7A z 27 1B ESC 59 3B 91 5B 123 7B 28 1C FS 60 3C lt 92 5C 124 7C l 29 1D GS 61 3D z 93 5D 125 7D 30 1E RS 62 3E gt 94 5E t 126 7E 31 1F US 63 3F 2 95 5F _ 127 7F DEL Characters that are skipped by default when reading in data A 6 Additional keycodes Keycodes Meaning Dec 134 CURSOR UP 135 CURSOR DOWN 136 CURSOR RIGHT 137 CURSOR LEFT 139 LEVEL RETURN 141 SOFTKEY 1 142 SOFTKEY 2 143
41. Axis configuration Physical axis names MACODA parameter 1003 00001 41 A2 A3 A7 A8 AO A ASD AG Individ param Phys axis index 1 2 3 7 8 10 11 63 64 Y 1070 073 740 111 02 11 GB BOSCH System Functions 4 7 Overview of all functions for determining the axis and coordinate positions Block preparation Block execution Part program Program coordinate system PCS Y Position last programmed CPOS Position last programmed CPROBE Current G92 shift AXO Calculation of the workpiece coordinates Program coordinate shift Contour offset Scaling Workpiece coordinate system WCS Y Measuring probe value PPOS Interpolation Workpiece coordinate system WCS Y Interpolated workpiece position WPOS Coordinate transformation Basic workpiece coordinate system BCS Y Axis transformation Axis coordinate system ACS Y Interpolated machine position MPOS Axis zero point shift Machine coordinate system MCS Y System axis command values SPOS Drives axes Actual axis value APOS Actual axis position with a connected PROBE switching measuring probe Measuring units for supplied axis and coordinate positions 1070 073 740 111 02 11 GB Synchronous linear axes and translatory working range coordinates Synchronous rotary axes and rotatory working range coordinates Asynchronous linear
42. Filename variations P123456789 PRG P12 Data_Dial P12 DATA_DIAL e Filenames comprising and are prohibited as they are already used internally e Filenames must be unique within the directory in which they are con tained However files with the same name may exist in different directories 6 2 6 1 2 6 1 3 File Handling BOSCH Sequential file structure A sequential file contains a sequence of components records which may have a variable length If a particular record is sought in a sequential file the search for this record must be performed from the start of the file on wards Direct access is not possible If the length of a record is changed in a sequential file all subsequent records must be moved accordingly Unlike random files sequential files contain records of varying length max length 1024 characters The end of a record is identified by an lt LF gt which does not form part of the length An lt ETX gt lt LF gt which denotes an EOF pointer is inserted after the last file record An EOF pointer indicates the end of the usable data lt ETX gt in a file Random file structure A random file contains components records with a fixed definable length Direct random access to any desired file component is therefore possible The classification of random files into records of fixed length facili tates direct access to a particular record As is the case with sequential files data is stor
43. Information on the event Example Query last part program error on channel 2 10 DIM ERRNO 5 3 REM Integer array with 5 elements 20 REM REM query last part program error on channel 2 30 CHAN 2 CATEGORY 6 40 ERG GETERR CHAN CATEGORY ERRNO 1 The error no 1938 appears in ERRNO 1 1 see figure above 1070 073 740 111 02 11 GB BOSCH System Functions 4 45 Example Result evaluation for 5 array elements see display page 4 44 10 DIM ERRNO 5 3 REM Integer array with 5 elements 20 CHAN S 2 CATEGORY 0 25 REM query part program error on channel 2 30 ERG GETERR CHAN CATEGORY ERRNO 5 40 FOR I 1 TO ERG 50 IF ERRNO I 3 6 THEN 60 PRN 0 Part program error ERRNO I 1 70 ENDIF 80 NEXT I Criteria for error selection Result in Erg that fulfils Channel 2 the criteria of GETERR Category 6 2 i e 2 errors were Max number of errors to be recorded 5 detected DIM ERRNO 5 3 Most recent Array element errors reported l g 1856 Error no Array index 1 gt 2 2 Error channel 3 2 Error category 1 1869 Array index 2 2 2 3 1 1 1938 ERRNO 3 1 1938 Array index 3 gt 2 2 3 6 1 1970 Array index 4 gt 2 2 3 10 1 1971 ERRNO 5 1 1971 Array index 5 gt 2 2 3 6 1 1970 This error is no longer 2l 2 taken into consideration since the array can record Y d
44. Prog status toggle softkey the program is first checked for proper syntax and for possible jump destina tions and sub program calls This process is termed linking or preparing It results in the creation of a so called link table Only a CPL program that has been linked can be started The control unit stores all link tables in a special directory defined by the MACODA parameter 3080 00004 In this process the filenames identifying link tables are formed from the name of the selected program and the file name extension Link While it is starting up the control unit tries to find the relevant program for all the existing link tables To do this the search path from MACODA parameter 3080 00001 is used Link tables for which no program exists are erased If a program is selected again the Typ3 osa uses an existing link table pro vided that the program has not been modified in the interim If the program has been changed it will be linked again In the event that sub programs are called in the program to be linked the control unit will check whether updated link tables exist for the respective programs If this is the case such sub programs will not be linked again This may sig nificantly accelerate the linking process for a main program incorporating numerous sub program calls A typical feature of programming languages such as CPL is symbolic pro gramming Symbol names represent variable or perma
45. SFK TFO U UNTIL V VAL W WAIT X XOR WHILE WPOS reserved keywords currently not in use CPL uses the following code characters 2 amp gt The comma is normally used as a delimiter It is used as a grammatical punctuation mark only within character strings The period is used as a deci mal point in decimal numbers and as a label identifier in jump destinations Within character strings the period is interpreted as a grammatical punctu ation mark 1070 073 740 111 02 11 GB BOSCH 2 4 2 Constants Integer constant INTEGER Floating point constant REAL CPL Basic Elements 2 7 If numerical values are declared for program execution and are to remain unchanged constant such values may be entered into the instructions as a numerical expression Integers are written without decimal points Example NUMBERS 4 L INTEGER constant Real numbers decimal numbers or fractions are identified by a decimal point floating point Example PI 3 141593 REAL constant Double precision constant and double precision operations Constants assigned to or compared with a double precision REAL vari able are represented with double precision i e precise to 15 digits Example Assignment of double precision REAL constants and comparing variables with double precision REAL constants 4 D5 1234 123456 12345 1234 234567 20 DO 123456789 123456
46. X1 A Each physical axis has a physical axis index that is valid system wide ac cording to the index of the MACODA individual parameter 1 64 under which the axis is registered in the MACODA If the SERCOS axes with their axis addresses are configured with spaces in the MACODA index 1 64 then the physical axis index corresponding to the space cannot be assigned a physical axis Therefore the number of physical axes is smaller than or equal to the physical axis index of the axis configured in the system last If you assign a physical axis to a machining channel by MACODA parameter 1003 00002 the control unit will automatically assign a logical axis index to this axis This logical axis index is specific to the respective channel always starts with the value 1 for each channel and is incremented by the value 1 for each additional axis configured on this channel In this context the following sequence applies The 15 logical axis is always the axis with the lowest physical axis index of all axes configured on the channel Furthermore the logical axes in the MACODA parameter 7010 00010 can be assigned a logical axis name for a specific channel Channel axes which have not been assigned an explicit logical axis name are implicitly assigned the physical name of the respective axis The channel configuration can be changed during run time through the func tions of the axis transfer G510 ff When doing s
47. a cor responding error message appears INVALID INTEGER VALUE INVALID FLOAT VALUE Example INP instruction P2 ABC 123456789 ABC P3 1 OPENR 2 P2 2 DIM C 3 DIM D 3 INP 2 1 3 L CS K D CLOSE 2 B w RESULT I NUL NUL NUL BBC 123456789 BBC q L c K tou a T a S D 1070 073 740 111 02 11 GB BOSCH File Handling 6 9 Example Reading a record from a file OPENW 1 P2 200 TEST 22 PRN 1 12TEST1 23V12ABCD2 4A PRN 1 12TEST1 23V12ABCD2 4A PRN 1 12TEST1 23V12ABCD2 4A CLOSE 1 DINHDUFWNE 14 DIMR 15 OPENR 2 P2 22 16 INP 2 B D R 1 1 MIDS E 1 1 R 1 2 AS C 17 INP 2 GS 18 INP 2 HS 19 INP 2 1S 20 INP 2 J 21 CLOSE 2 Result BS 12 D TEST since max length of character field 4 R 1 1 1 230 ES Vv R 1 2 12 000 A ABC since max length of character field 3 C D2 4A G 12TEST1 23V12ABCD2 4A HS 12TEST since max length of character field 7 I 1 23V12 since max length of character field 7 J ABCD2 4A 1070 073 740 111 02 11 GB 6 10 File Handling BOSCH 6 5 6 6 End of file recognition Closing a file EOF The EOF function allows a query to be made as to whether the end of a file EOF c end of file has been reached The EOF function returns the logical value TRUE if the end of the file is reac
48. a vari ety of parameters feedrate distance traversed etc Therefore if the program is required to respond to a machine specific actual status e g axis position or to an actual process related status e g signal at the digital interface the WAIT instruction must be used to ensure that the aforementioned time lag equals zero at the precise sampling time This is the only way to ensure that the program will access current data WAIT may be programmed alone or together with parameter e WAIT without parameters block processing will be stopped until all program blocks ahead of WAIT have actually been executed e WAIT with parameters block processing will be stopped until a certain condition occurs at the digital interface between CNC and PLC and or until a predefined period of time has lapsed WAIT without parameters can be included in programming of both CPL and NC blocks CPL example 20 WAIT NC example N20 WAIT A CPL block that includes the WAIT instruction must not contain a Subsequent CPL instructions must be programmed in a new CPL block WAIT with parameters can be included only in programming of CPL blocks e g 20 WAIT 1000 4 2 System Functions BOSCH The instruction has the following structure WAIT lt IC condition gt lt Duration gt lt Result var gt lt IC condition gt lt Duration gt lt Result var gt Specifies the condition
49. auxiliary axes in the system in the case of linear axes in mm min in the case of rotary axes in rom 2 1 Data which the control unit provides cyclically are identified with Z Data available after each switching of blocks are identified with S Data which appear in irregular periods after a change are identified with an E Data which appear immediately when called for are identified with an Data which never change they only need to be called for once are identified with R Gives the variable type integer real double character needed for lt buffer gt If not a simple variable but a field variable is needed the variable type is followed by array yp 1070 073 740 111 02 11 GB BOSCH System Functions 4 55 Function supplies lt buffer gt is Syntax refresh of type 2 description Messages in the part program Character MCODS 28 lt channel gt lt version gt lt buffer gt 80 Array E Supplies in lt buffer gt the messages programmed in lt channel gt by MSG command Status Test mode Integer MCODS 29 0 lt version gt lt buffer gt 1 E Supplies in lt buffer gt the value 1 if the test mode is activated Otherwise 0 Path and name of main program Character MCODS 30 lt channel gt lt version gt lt buffer gt lt size gt Array Supplies in lt buffer gt the path incl the name of the main program selected in lt channel gt
50. because the specified channel is momentarily occupied the momentary status does not permit the ac tion In the specified channel an initiated control reset is not yet completed The specified program name is too long currently not in use The function requires reference points traversed to The specified program does not exist or cannot be executed When entering buffered NC blocks writing into the buffer was inter rupted A second authority had simultaneously attempted to write in the buffer 8 The function cannot be executed in the current operation mode 9 The channel cannot be started because its status is not READY 10 The function cannot be executed because no program is selected 11 The specified program cannot be selected because the channel sta tus does not permit it e g status of block processing and interpolator is RUNNING 12 Currently not in use 13 The operation mode cannot be changed because the channel status does not permit this 14 The destination of Search block was not found Yoga pe 1070 073 740 111 02 11 GB BOSCH 1070 073 740 111 02 11 GB 15 16 17 18 19 20 21 22 23 24 25 26 27 100 101 102 103 System Functions 4 47 Search block is not possible because although the channel status is READY the processing of the main program has already started e g program at MO The number of axes in the input of external zero shifts
51. buffer gt the maximum permissible spindle speeds in rpm of all spindles in the system Order S or S1 S2 etc The speed limits are included in the calculation Minimum spindle speed Real Array MCODS 20 0 lt version gt lt buffer gt lt size gt S Supplies in lt buffer gt the minimum permissible spindle speeds in rpm of all spindles in the system Order S or S1 S2 etc The speed limits are included in the calculation Programmed end position without Real Array MCODS 23 0 lt version gt lt buffer gt lt size gt shifts S Like MCODS 16 but without shifts Programmed path feed Real MCODS 24 lt channel gt lt version gt lt buffer gt 1 S Supplies in lt buffer gt the programmed path feed of lt channel gt in the unit mm min Programmed spindle speeds Real Array MCODS 25 0 lt version gt lt buffer gt lt size gt S Supplies in lt buffer gt the programmed speeds of all spindle axes in the system in rpm Order S or S1 S2 etc Status Axes referenced Integer MCODS 26 1 lt version gt lt buffer gt lt size gt Array E Supplies in lt buffer gt in ascending channel independent order the value 0 or 1 as signal Axes referenced for each feed and auxiliary axis Axis referenced 1 Axis not referenced 0 Jog speeds Real Array MCODS 27 1 lt version gt lt buffer gt lt size gt E Supplies in lt buffer gt in ascending channel independent order the current jog speeds of all feed and
52. color for text background 5 RGB Programs colors in the third color table If you want to use mixed colors mixed colors color portions except 0 and 255 first set a color resolution of at least 65536 colors high color 16 bit in the PC control panel You will find a table of standardized mixed colors on the PC control panel in the directory c programme exceed 95 nt user rgb txt RGB lt color code gt lt R gt lt G gt lt B gt lt color code gt 0 to 7 Any INTEGER expression Determines which color in table 3 is changed lt R gt 0 to 255 Any INTEGER expression Red portion 0 no red portion 255 max red portion lt G gt 0 to 255 Any INTEGER expression Green portion 0 no green portion 255 max green portion lt B gt 0 to 255 Any INTEGER expression Blue portion 0 no blue portion 255 max blue portion Examples Set colors in color table 3 and activate color table 3 Assign colors to the individual color codes 10 RGB 0 238 130 238 Color code 0 violet 11 RGB 1 255 165 0 Color code 1 orange 12 RGB 3 192 192 192 Color code 3 grey 13 RGB 4 165 42 42 Color code 4 brown 20 COL 1 2 3 10 4 5 Activate color table 3 1070 073 740 111 02 11 GB BOSCH Graphic Programming 8 3 8 2 Line type GMD The GMD function can be used to select the type of representation of lines on the screen GMD lt line type gt lt line type gt 0 unbroken line 1 line must be erased 2 era
53. completeness of the IF instruction Example 10 X 1 20 START 30 IF X gt 100 THEN 40 GOTO END 50 ELSE X X 2 75 60 GOTO START 70 ENDIF 90 END 2 24 CPL Basic Elements BOSCH CASE LABEL LABEL OTHERWISE ENDCASE Within a program it is often necessary to query more than two statuses of an integer expression or an integer variable In such cases a query by means of an IF instruction is possible only with the use of several nested IF instructions Such constructs are not only costly in terms of additional com puting time but also lead to an impairment of program readability and main tainability The attendant disadvantages can be overcome through the use of the CASE structure CASE lt integer expression gt OF LABEL lt integer constant gt lt additional integer constant gt lt instruction gt lt instruction gt LABEL OTHERWISE lt instruction gt lt instruction gt 2 ENDCASE Subsequent to the CASE instruction the program branches to the LABEL instruction in which one of the lt integer constants gt is identical to the value of lt integer expression gt Now all instructions up to the next occurrence of the LABEL or OTHERWISE instruction will be carried out The program then branches directly to the ENDCASE instruction If a LABEL instruction in which one of the lt integer constants gt is identical to the value of lt integer expression gt does not exist the program jumps to the
54. file BOSCH INP With the INP instruction the ASCII data in an open file may be read in record form and assigned to one or several variables This command only has an effect on files that were opened with OPENR INP lt n gt lt variable gt lt variable gt lt n gt 1 to 9 Logical file number to be read from 0 This setting can be used for the CPL dialog within the editor For relevant information see Chap 7 2 page 7 2 lt variable gt Variable under which the read data is stored If a semicolon is programmed the file pointer remains in the record until the end of the record is reached After that the next record is switched to Reading does not however automati cally take place there If no semicolon is programmed the next record is switched to automatically The type of variable is freely selectable Indexed variables and character fields can also be used If a value other than TRUE or FALSE is assigned to a logical variable this variable is valued at NUL The characters 0 to 9 leading signs leading zeros or spaces are converted to INTEGER or REAL values if the variable type is INTEGER or REAL simple and double precision If another character is assigned to an INTEGER or REAL variable the variable is assigned NUL If a variable is assigned NUL the position within the file does not change If the value is assigned to an INTEGER or a REAL variable is too high
55. is interpreted i a w the programmed lt unit gt and standardized to the table unit then added to the table If no lt unit is pro grammed the value is written directly into the table without conversion external axis ZS For the 2 logical axis the value 80 is stored in the database axis ZS table V1 under G54 For the 1 t logical axis the value 20 is stored in the ASCII table usr user NPV1 npv under G54 The value 2 is added to the 1t logical axis under G54 The result of 10 25 4 is recorded in inches for the Z axis under G54 The external shift G160 is assigned the value 40 for the Z axis The value 3 is added to the Z axis under G254 The value 20 is added for the U_CH1 axis under G54 The value 40 is filed for the Z axis in the active axis ZS table under G255 The sum of all active zero point shifts for X axis is assigned the variable X_SUM k 1070 073 740 111 02 11 GB BOSCH 1070 073 740 111 02 11 GB FXCR Sets up a new axis ZS table System Functions 4 21 The instruction has the following structure FXCR lt channel or layout gt lt TabName gt lt classification gt lt channel or layout gt lt TabName gt lt classification gt Channel number or name of table layout According to the channel number the number of columns the names of the axes and the type of axis are determined setting up the table accordingly The following applies for channel number gt
56. link process Example Programmed CALL instruction 50 IF A 1 THEN 51 CALL P999 52 ENDIF Using DIN identifier to influence the link process Preparing If you conclude a sub program call by means of CALL with the DIN identi fier the control unit will exclude the sub program thus called from the linking process For example the linking process of a main program that includes numerous sub program calls can be significantly accelerated in this manner It is strongly recommended to include the DIN identifier in the program only if e the invoked sub program consists exclusively of DIN block and e the invoked sub program does not call any additional sub programs In the event that a sub program containing CPL elements was excluded from the linking process due to the presence of the DIN identifier the con trol will return an appropriate error message at program runtime Example DIN identifier in sub program call Main program 50 IF A 1 THEN 51 CALL P999 DIN Sub program P999 is excluded from linking 52 ENDIF M30 As an alternative the DIN identifier can be inserted as a remark into the first line of the sub program to be called The control unit will respond by ex cluding the program from the linking process Example DIN identifier in sub program to be called Sub program P999 N10 DIN Sub program P999 is excluded from linking N20 1070 073 740 111 02
57. lt channel gt lt P1 gt lt P2 gt lt P3 gt lt P3 gt 4 70 Calls Motion Control Process services of the NCS by CPL Enables controlling of channels in the CNC MID MID lt STRING expression gt lt start point gt lt number of 5 2 characters gt This function takes a part from a lt STRING expression gt and outputs it as text The result can be transferred to a STRING variable or to an appropriately dimen sioned character field MIDS lt character field gt lt start point gt lt number of characters gt Overwrites parts of a character field MMC MMC lt CPL vari gt lt CPL var2 gt lt CPL varN gt 9 1 Sends information on the program run time from a part program to a client and waits for the result from this client MPOS MPOS lt axis selection gt lt axis type gt lt channel gt 4 14 Transfers the currently interpolated command position referred to the machine zero point of the machine coordinate system MCS MWD MWD lt X left gt lt X right gt lt Y bottom gt lt Y top gt 8 4 Definition of a coordinate system for the current graphics window NCF NCF lt NC function gt 4 30 Transfers the syntax of the active NC function within the NC modal group of lt NC function gt NJUST NJUST 6 5 Premature resetting of left justified data output to formatted output NOT NOT lt expression gt 2 18 Negation of a BOOLEAN or bit by bit negation o
58. lt cut gt lt orientation gt Lucida console default Sample text Arial Verdana Book Antiqua Times New Roman Bosch Impact Haettenschweiler Comic Sans MS Brush Script MT 10 Wingdings 0 font height 9 pixels font width 8 pixels default only for Lucida console font setting 1 to 500 font height in pixels font width is determined automatically Example Point sizes 8 10 12 16 20 3 6 If the font width is to be set individually for a certain font height calculate the input value for lt size gt according to the following formula lt size gt font height font width 1000 with font height 1 to 500 font width 1 to 500 0 normal default 1 boldface 2 italics 3 boldface and italics 0 to 360 degrees 0 default lt orientation gt does not work for font 5 Bosch If individual parameters are not to be specified at least the corresponding commas must be written in front of the last programmed parameter e g TFO 3 At the end of the program the default setting TFO 0 0 0 0 automatically becomes active again If you set another font than 0 the following applies e The specification of line and column in CPL dialog commands defines only the starting position for the screen output An assignment between line column and the returned character no longer exists because of the differing space requirement of a character e Softkey texts are not return
59. memory space The range of values encompasses 10 8 this being the equivalent to 7 significant dig its 10 PI 3 141593 REAL variable with single precision Floating point variable DOUBLE If an exclamation mark is appended to the name of the variable the vari able will be interpreted as a REAL variable with double precision In this case a variable occupies 64 bits of memory space The value range encompasses 10308 this being the equivalent of 15 significant digits 10 PI 3 141592653589793 REAL variable with double precision 1070 073 740 111 02 11 GB BOSCH 1070 073 740 111 02 11 GB CPL Basic Elements 2 13 Logical variable BOOLEAN Logical variables are identified by a question mark that is appended to the name of the variable Logical variables Boolean variables can assume only the values TRUE or FALSE They are used to store logical statuses or con ditions that will be needed throughout the course of program execution 10 START FALSE BOOLEAN variable Field variable ARRAY The use of ARRAY variables makes it possible to reserve under a single designation a one or two dimensional field array consisting of one or more variables of the same type within the memory range Field definitions are possible for variables of the INTEGER REAL DOUBLE BOOLEAN and CHARACTER types To enable access to the in dividual field elements of an array the fiel
60. mode Axes can be jogged Traverse to reference point Axes can be started with the signals manual manual Reserved Manual data input Individual NC blocks can be specified for ma chining Automatic Part programs are completely executed Automatic program block Individual blocks of a part program are executed one after the other Each individual block is pre pared and started with cycle start Automatic single step From an individual NC block in the part program the NC may generate and process several blocks In this operation mode cycle start always passes an individual block on to the interpolator for machining Reserved Reserved Automatic single block With cycle start all blocks generated and prepared on the basis of a single NC block in the part pro gram are forwarded to the interpolator for machining Return to path Axes can be removed manually from the contour and automatically or manually returned to it CPL debugger program block operation Single blocks are executed as they are specified in the part pro gram CPL debugger automatic operation All blocks up to the next breakpoint are executed 2 1 Data which the control unit provides cyclically are identified with Z Data available after each switching of blocks are identified with S Data which appear in irregular periods after a change are identified with an E Data which appear immediately when called for a
61. no comma before a closing bracket In the following table integer constants are sometimes given as pa rameters in the syntax You may also program integer variables in lieu of these constants but they must be occupied with the specified value at the time of the function call Effect Cancel distance to go Syntax description MCOPS 1 lt channel gt Triggers Cancel distance to go on the programmed lt channel gt e After triggering distance to go all prepared NC blocks including the rest of the current block are discarded and newly processed EF CPL blocks or CPL parts are not taken into consideration Example The CPL variable POS had the value 10 for preparation The NC word X POS is interpreted as X10 after cancel distance to go although POS may have a completely different value at this moment Any corrective values that may have changed are taken into consideration e The indicated end point is set on the current position in the display whereby the indicated distance to go is simultaneously canceled The lt channel gt subsequently returns to the condition NC ready NC O 16 0 NC ready e After Cycle start NC I 1 0 Cycle start the program continues at the break point taking the new corrective values into consideration Example for application of MCOPS 1 lt channe1 gt after alteration of com pensation tables if the new values are also to apply to blocks already prepared
62. of a STRING variable is to be assigned to the character field or a part of the character field the assignment must be converted Example Partial writing of the character field 1 DIM XYZ 15 2 BS ABCDE 3 MIDS XYZ 1 5 BS 4 MIDS XYZ 6 5 B The 1st through 10th character of the XYZ character field are assigned the content of the B STRING variable The following programming would lead to the error message CHARACTER AREA NOT USED because the 1t to 5t characters of the character field are not yet assigned 1 DIM XYZ 15 2 BS ABCDE 4 MIDS XYZ 6 5 BS 5 10 Processing Character Strings BOSCH Example Partial writing of the character field 1 DIM XYZ 100 2 B ABCDE 3 MIDS XYZ 1 10 B Content of the STRING variable B ABCDE Content of the field variable XYZ ABCDE The field variable has a length of 5 The remaining 95 characters are not assigned If the length of the STRING variable is smaller than the character field the character field XYZS is written only in the length of the STRING variable When allocating this character field to a STRING variable it is not the entire character field defined via DIM instruction which is assigned but only the range which was written previously length of the character field Example 1 DIM XYZS 100 3 MIDS XYZS 1 10 ABCDE 4 MIDS XYZ 6 3 T The content of the xyz field variable after block 3 is ABCDE Th
63. or name of a physical or logical axis lt axis type gt lt channel gt 1070 073 740 111 02 11 GB Name is initially interpreted as a logical axis name In none exists the physical axis name is taken Index is interpreted according to the given lt axis type gt Programming an axis that is not configured leads to a run time error optional Determines how an index programmed under lt axis selections is interpreted 0 physical axis index 1 logical axis index The index is interpreted as a logical axis index with out lt axis type gt optional channel number only for MPOS If the axis value of a foreign channel is read and the axis is to be addressed by its logical index or name then the channel number of the axis must be entered If lt channe1 gt is not given then the axes of the cur rent channel are accessed Programming a physical axis and a channel number lead to an error message 4 14 System Functions BOSCH MPOS The MPOS function supplies the currently interpolated command position of an axis referred to the machine zero point of the machine coordinate system MCS at the time of program interpretation Please regard the following conditions e The result of MPOS always corresponds to the SPOS function e With MPOS itis also possible to inquire about axis values from foreign channels e f there are no axis zero point shifts or axis transformations MPOS and WPOS always supply identica
64. performed by properly trained personnel This personnel must be able to judge potential hazards arising from pro gramming program changes and in general from the mechanical electrical or electronic equipment Interventions in the hardware and software of our products unless de scribed otherwise in this manual are reserved to our specialized personnel Tampering with the hardware or software ignoring warning signs attached to the components or non compliance with the warning notes given in this manual may result in serious bodily injury or material damage Only electrotechnicians as recognized under IEV 826 09 01 modified who are familiar with the contents of this manual may install and service the prod ucts described Such personnel are e those who being well trained and experienced in their field and familiar with the relevant norms are able to analyze the jobs being carried out and recognize any hazards which may have arisen e those who have acquired the same amount of expert knowledge through years of experience that would normally be acquired through formal tech nical training With regard to the foregoing please note our comprehensive range of train ing courses Please visit our website at http www boschrexroth de for the latest information concerning training courses teachware and training sys tems Personal information is available from our Didactic Center Erbach Telephone 49 0 60 62 78 600 1070 073
65. programming units for the 214 axis of the area Spindles 1 8 spindle number previous still valid SD functions 202 1 8 Current potentiometer value SD 2 3 SD 2 4 Active commanded speed 205 1 18 incl potentiometer SD 5 3 1 SD 5 4 1 205 2 1 8 Last progr commanded speed SD 5 3 2 SD 5 4 2 205 3 1 8 Actual speed SD 5 3 3 SD 5 4 3 212 1 1 8 Active movement function SD 12 1 SD 12 3 Last programmed movement 212 2 1 8 function SD 12 2 SD 12 4 G328 328 Last programmed precision barrier of G328 328 1 Last programmed precision barrier of G328 328 2 Last programmed distance between corners of G328 1070 073 740 111 02 11 GB 4 36 System Functions BOSCH Group Index1 Index2 Index3 Concerns the function Explanation Axis coupling m logical axis number of the master on the current channel s logical axis number of the slave on the current channel 581 0 1 8 m logical axis number m if axis m is a master axis 0 if there is no master axis 581 1 8 s 0 Number of the master axis to which axis s is a slave 0 if s is not a slave 581 1 8 s 1 Programmed slave axis shift in programming units 0 if s is not a slave 581 1 8 s 2 Programmed coupling factor 0 if s is not a slave 581 1 8 s 3 Programmed master axis shift in programming units 0 if s is not a slave Examples 10 AS SD 1 2 1 A contains the active G function from index range 2 i e t
66. the maximum character field length these characters will be discarded 5 4 Processing Character Strings BOSCH 5 4 Character string length LEN Returns the number of characters in a lt STRING expression gt The result is an INTEGER value If the lt STRING expression gt is empty LEN returns the value 0 If the lt STRING expression gt is not defined LEN returns the value 1 LEN lt STRING expression gt Example DIM XYZ 10 XYZS ABC I LEN XYZS The INTEGER variable I has the value 3 XYZS J LEN XYZS The INTEGER variable J has the value o XYZS NUL K LEN XYZS The INTEGER variable K has the value 1 NNO BWNEH 5 5 Searching for a character string INSTR INSTR lt character string gt lt STRING expression gt lt start point gt Beginning at the lt start point gt INSTR searches for a lt character string gt within a lt STRING expression gt and outputs the position of the first character of the lt character string gt found in the lt STRING expression gt as an IN TEGER value A value of 0 is returned if the lt character string gt is not found The lt character string gt can be programmed as a STRING expression The range of values for the 3 4 parameter is between 1 to 1024 The follow ing error message appears if the range of values is not adhered to INVALID PARAMETER Example 1 DIM AS 8 2 DIM BS 16 3 AS A MIDS AS 2 UVWXYZ 4 BS ABCDEF UVWXYZ
67. the unit of measurement of all asynchronous axes will be supplied in ascending order in lt buffer gt In the case of asynchronous linear axes in the axis modes Jog and Traverse to reference point the axis interface determines the unit of measurement If no axis mode is specified metric is supplied In the case of synchronous linear axes in the channel modes Jog and Traverse to reference point the axis interface determines the unit of measurement In the other operation modes it depends on the channel unit of measurement metric inch G70 G71 With rotary axes and spindles the measuring unit degrees is used with Hirth axes with position programming a corresponding measuring unit will be supplied Possible return values for the units of measurement 0 Inch 1 Metric 2 Degree 3 Axis not present 4 position programmable Hirth axis 2 1 Data which the control unit provides cyclically are identified with Z Data available after each switching of blocks are identified with S Data which appear in irregular periods after a change are identified with an E Data which appear immediately when called for are identified with an Data which never change they only need to be called for once are identified with R Gives the variable type integer real double character needed for lt buffer gt If not a simple variable but a field variable is needed the variable type is fo
68. type 2 Integer Array Syntax description MCODS 64 1 lt version gt lt buffer gt lt size gt E Supplies the gear range of the spindles Gear range codes 40 automatic gear range selection 41 gear 1 42 gear 2 43 gear 3 44 gear 4 48 neutral gear In the case of 8 spindles the lt buffer gt must have the lt size gt 8 integer Group assignment of the spindles Integer Array MCODS 65 1 lt version gt lt buffer gt lt size gt E Supplies the group assignment of the spindles Group classification 0 no group 1 4 group number In the case of 8 spindles the lt buffer gt must have the lt size gt 8 integer Automatic or manual gear selection Integer Array MCODS 66 1 lt version gt lt buffer gt lt size gt E Supplies the automatic or manual selection of gears Gear selection 0 manual 1 automatic In the case of 8 spindles the lt buffer gt must have the lt size gt 8 integer Information as to whether gear Integer MCODS 67 1 lt version gt lt buffer gt lt size gt switching is active Array E Supplies information whether or not gear switching is active Gear switching 0 gear switching is not active 1 gear switching is active In the case of 8 spindles the lt buffer gt must have the lt size gt 8 integer Skip block activate Integer MCODS 68 lt channel gt lt version gt lt buffer gt 2 Arra
69. which the digital interface be tween CNC and PLC is to be checked for To do so you must adhere to the following syntax NOT IC lt parameter gt lt State gt lt parameter gt Transfer parameter of the IC function for a description please refer to the IC function lt State gt BOOLEan expression which the result of the IC function is compared to If lt State gt is not programmed the comparison will be made to TRUE If the condition is fulfilled block processing resumes Waiting time in terms of milliseconds no decimal places May also be an integer arithmetic expression If lt Duration gt was programmed without an lt C condi tion gt block processing will stop exactly for the specified period of time If lt Duration gt is programmed with an lt C condition gt block processing will stop until the lt C condition gt is met however no longer than for the specified duration Integer variable The parameter must only be written with at least one of the other parameters The system will store the specified integer variable in a return value which you can evaluate subsequently The following return values are possible 0 lt IC condition gt was already fulfilled at the call 1 lt Duration gt has lapsed completely 2 lt IC condition gt has changed Example WAIT without parameter N10 N100 N20 30 40 50 N60 70 X0 MSG still running X150 WAIT XPOS MPOS
70. 0 a column is set up for each channel axis in the axis ZS table For channel number 0 the following applies a column is set up for each system axis Alternately a table layout including a path can be used as a sample Axis ZS table name Defining the table feature 0 no strict classification 1 strict classification If lt classification gt is not programmed it is oc cupied by 0 default value In order to edit the axis ZS table with the table editor the file name ex tension according to the settings in MACODA parameter 3080 00200 should be programmed FXDEL Deletes a column in an axis ZS table The instruction has the following structure FXDEL lt TabName gt lt axis desig gt lt TabName gt Axis ZS table name lt axis desig gt Logical or physical axis name or column index of the table column that is to be deleted Example FXCR FXDEL and FXINS 10 NPV_BASISS usr user NPV_TAB K2 npv 11 IF FILEACCESS NPV_BASISS 1 THEN 12 13 14 FXCR 2 NPV_BASISS Create axis ZS table NPV_TAB K2 npv for channel 2 FXDEL NPV_TAB K2 npv 2 Delete column 2 FXINS NPV_TAB K2 npv 3 U 0 from axis ZS table NPV_TAB K2 npv Insert column 3 for 15 ELSE rotary axis U in 16 IF FILEACCESS NPV2_TAB K2 npv 1 THEN axis ZS table NPV_TAB K2 npv 17 FXCR NPV_BASISS NPV2_TAB K2 npv Create axis ZS 18 ENDIF table 19 ENDIF
71. 0 073 740 111 02 11 GB BOSCH Annex A 5 Command Syntax Short description see page FXCR FXCR lt channel or layout gt lt TabName gt lt classification gt 4 21 Sets up a new ZS table FXDEL FXDEL lt TabName gt lt axis desig gt 4 21 Deletes a column in a ZS table FXINS FXINS lt TabName gt lt position gt lt axis name gt lt axis type gt 4 22 Sets up a new column in a ZS table GETERR GETERR lt channel gt lt category gt lt error no gt lt number gt 4 43 Supplies the error no channel no and the assigned error category for the current errors GMD GMD lt line type gt 8 3 Definition of the type of representation of lines GOTO GOTO lt jump destination gt 2 22 Unconditional program jumps to line numbers block numbers or labels GPR GPR lt X pixel gt lt Y pixel gt lt offset gt lt text gt 8 7 Text output in pixel graphics grid GWD GWD lt X left gt lt X right gt lt Y bottom gt lt Y top gt 8 3 Determination of the graphics range in terms of pixels IC IC lt bit gt lt group gt lt index gt 4 40 Access to the digital interface between CNC and PLC IF ENDIF IF lt condition gt THEN lt routine gt ELSE lt alternative routine gt ENDIF 2 23 Conditional jump to a routine or alternative routine INKEY lt function value gt INKEY 7 5 Supplies a pressed key as a function value at time when command is invoke
72. 0 073 740 111 02 11 GB If the STRING expression contains fewer characters than the selected range of the character field the remaining range is regarded as not as signed This remaining range is not included in the character field length Example 1 DIM XYZS 16 2 XYZ Content of character field XYZ Length of character field XYZ 1 If the length of the STRING expression exceeds the maximum length of the character field during assignment the surplus characters will be rejected Example 1 DIM XYZS 3 2 XYZS ABCDEF Content of character field XYZS ABC Length of character field XYZ 3 gt maximum length Example 1 DIM XYZ 16 2 AS DAS This 3 BS IST EIN TEST is a test 4 CS EIN EI an egg 5 MID XYZ 1 4 AS CONTENT OF THE CHARACTER FIELD Length 4 Range is not assigned 6 MID XYZ 5 6 BS CONTENT OF CHARACTER FIELD Length 10 Range is not assigned 7 MID XYZ 5 12 BS CONTENT OF CHARACTER FIELD Length 16 Range is fully assigned 5 12 Processing Character Strings BOSCH 8 MIDS XYZ 9 8 C CONTENT OF CHARACTER FIELD Length 16 Range is fully assigned 9 XYZS MIDS XYZS 1 4 CONTENT OF CHARACTER FIELD Length 4 Range is not assigned The character field was cut off 5 8 2 Comparisons of STRING expressions It is also possible to compare STRING expressions STRING constants STRING variables and character fields with one another
73. 0 to 200 0 9 REM Draw full circle with center 200 10 R 10 10 CIR 200 0 200 10 11 LIN 300 REM Draw line from 200 0 to 300 0 12 REM Draw half circle from 300 0 to 300 100 with center 300 50 13 GMD 3 REM Set line type to dash dot line 14 CIR 300 0 300 100 300 50 15 GMD 0 REM Set line type to unbroken line 16 LIN 50 100 REM Draw line from 300 100 to 50 100 20 REM Draw arrowhead 21 XX 195 YY 50 WI 30 22 LIN XX YY XX 15 COS W1I 165 YY 15 SIN WI 165 23 LIN XX 15 COS WI 195 YY 15 SIN W1I4 195 LIN XX YY 24 REM Fill the tip of the arrow with the color black 25 FIL XX 10 COS WI YY 10 SIN WI 0 7 7 26 LIN XX 15 COS WI YY 15 SIN WI1 XX 30 COS WI HYY 30 SIN WT Graphic edition of the example N arrowhead 1070 073 740 111 02 11 GB 8 6 8 6 8 7 Graphic Programming BOSCH Lines 21 to 26 draw an arrowhead with the global variables xx and YY representing the coordinates of the tip of the arrow and AN WI the angle of the arrowhead with reference to the X axis of the graphics coordinate sys tem This also shows clearly that the use of REAL expressions is permitted since they are converted to INTEGER values internally Filling in closed contour surfaces Clear commands FIL Fills in a closed contour FIL lt X value gt lt Y value gt lt fill pattern gt lt fill color gt lt contour color gt lt
74. 1 1070 073 740 111 02 11 GB BOSCH System Functions 4 33 Group Index1 Index2 Index3 Concerns the function Explanation 1 2 48 1 Active G functions for respective group see separate table 2 48 2 Last programmed G function 1 1 2 Last programmed G function with index1 1 can only be recognized directly in the next block Otherwise the value 0 will be returned For non applied G groups the SD function returns the value 1 1 11 48 3 G functions at Power ON Active override position in percent for the respective potentiometer Feedrate A l Rapid traverse 2 3 Spindle SD 2 3 0 if no spindle is applied 2 4 2nd spindle SD 2 4 0 if no 2nd spindle is applied 3 1 Currently not in use 3 2 4 1 Currently not in use 4 2 Active speeds rounded up to integer value 5 1 1 Feedrate in input unit per minute evaluated with potentiometer When G63 is active SD returns 100 value 5 2 1 Rapid traverse in mm min or inch min 100 value 5 3 1 Spindle speed in rpm evaluated with potentiometer SD 5 3 1 0 if no spindle applied 5 4 1 Spindle speed in rpm evaluated with potentiometer 2nd spindle SD 5 4 1 0 if no 2nd spindle is applied Last programmed speeds 5 1 2 Feedrate in input unit per minute 5 3 2 Spindle speed in rom SD 5 3 2 0 if no spindle applied 5 4 2 Spindle speed in rpm 2nd spindle SD 5 4 2 0 if no 2nd spindle is applied 5 3 3 Actual speed 5 4
75. 1 150 IF XPOS lt 0 0001 THEN MSG Position reached ENDIF Stop block processing Position reached message is returned at X 150 As a suggestion test run the example with and then without WAIT If no WAIT is programmed the Position reached message will not be returned 1070 073 740 111 02 11 GB BOSCH System Functions 4 3 Examples WAIT with parameter 10 WAIT 1000 E Block processing is stopped for 1000ms Subsequently the E variable is occupied by the integer value 1 10 WAIT TIMES The duration of block processing hold depends on the contents of the TIME integer variable No value is returned 10 WAIT IC 1 1 1 TRUE Wait until the 2nd axis related input signal of the1st axis is set 10 WAIT IC 2 0 2 E1 OR E2 Wait until the 3rd channel related input signal of the 2nd channel has reached the value of the logic expression E1 OR E2 10 WAIT NOT IC 3 2 1 C Wait until the 4th spindle related input signal 20 IF C 0 THEN of the 1st spindle has reached the value of 30 DSP 10 10 COND ALREADY OK FALSE The C variable supplies either the 40 ENDIF value 0 if the condition was already met when WAIT was called or the value 2 ifthe condition was only met during waiting 10 WAIT IC 4 4 1 E7 250 ERG Wait until the 5th axis related output signal 20 IF ERG 0 THEN of the 1st axis takes on the value the E7 30 DSP 10 10 DID NOT WAIT variable or
76. 1070 073 798 1070 073 799 PLC project planning manual Software interfaces of the integrated PLC 1070 073 728 1070 073 741 iPCL system description and programming manual 1070 073 874 1070 073 875 ICL700 system description Typ3 osa only Program structure of the integrated PLC ICL700 1070 073 706 1070 073 737 DIN programming manual for programming to DIN 66025 1070 073 725 1070 073 738 CPL programming manual 1070 073 727 1070 073 740 CPL Debugger Operating Instructions 1070 073 872 Tool Management Parameterization 1070 073 782 1070 073 793 Software PLC Development environment for Windows NT 1070 073 783 1070 073 792 Measuring cycles for touch trigger switching probes 1070 073 788 1070 073 789 Universal Milling Cycles 1070 073 795 hard disk drive always uses drive letter C 1070 073 740 111 02 11 GB In this manual the floppy disk drive always uses drive letter A and the 1 8 Safety Instructions Release Trademarks BOSCH Special keys or key combinations are shown enclosed in pointed brackets e Named keys e g lt Enter gt lt PgUp gt lt Del gt e Key combinations pressed simultaneously e g lt Ctrl gt lt PgUp gt This manual refers to the following version Software V7 3 The current release number of the individual software modules can be viewed by selecting the Control Diagnost
77. 11 GB BOSCH Sub programs and Cycles 3 3 3 4 Parameter transfer to sub programs 1070 073 740 111 02 11 GB Parameters which are to be transferred to the sub program are to be written in the main program in square brackets and separated by commas when calling the sub program The individual parameters may contain numbers variables or arithmetic expressions In the sub program the parameters transferred during the sub program call are always addressed via the variables P1 P2 P3 etc in accordance with the sequence of the parameter transfer The parameters may also be addressed by means of P1TEST P2XYZ etc However the capital letters following P1 P2 etc will be ignored P1 P1TEST P1XYZ Based on the foregoing it can be shown that in sub program P999 in the example below P1 has a value of 2 75 P2 assumes the value of the variable X at the time of parameter transfer and P3 has the value 0 In the event that P2 is to represent an INTEGER value also in the sub program this can be accomplished by appending a character to P2 This mode of identifying the type of variable can also be used with the other types of variables In the sub program the value of the individual parameters can be assigned to additional variables Example Parameter transfer to a sub program Main program 50 IF A 1 THEN 51 CALL P999 2 75 X 0 Sub program call with parameter transfer 52 ENDIF M30 Sub program P999 1 FACT
78. 16 Requests the axis position in the switch point of the measuring probe The value supplied refers to axis zero point coordinates of the machine coordinate system MSC REM REM lt remark text gt 2 25 Program commentary REPEAT REPEAT lt routine gt UNTIL lt condition gt 2 21 Loop construction with query of abort condition after first execution of the routine REWRITE REWRITE lt n gt 6 7 Overwrites an existing file RGB RGB lt color code gt lt R gt lt G gt lt B gt 8 2 Programs colors in the third color table Round lt INTEGER number gt ROUND lt REAL expression gt 2 17 Converts a REAL expression to an INTEGER number by rounding up or down SCL SCL lt selection gt lt axis selection gt lt selection type gt 4 28 Supplies for the current channel here channel in which the program with the SCL command is running the parameters last programmed of the functions G37 and G38 pole coordinates scaling factors and rotation angles scs SCS lt axis index gt lt ID type gt lt ID no gt lt Result var gt 4 30 Enables read access to SERCOS drive parameters of the active parameter set SCSL SCSL lt axis index gt lt ID type gt lt ID no gt lt filename gt 4 31 lt Result var gt Creating a file for SERCOS parameter lists 1070 073 740 111 02 11 GB A 8 Annex Command SD BOSCH Syntax Short description SD lt group gt lt index1 gt lt index2 gt lt index3 gt
79. 2 8 Local 2 8 Overview 2 14 Permanent 2 9 STRING 2 14 Ww WAIT 4 1 WHILE DO END 2 21 Working range coordinates 4 6 WPOS 4 11 X XOR 2 18 Annex A 19 A 20 Annex BOSCH Notes 1070 073 740 111 02 11 GB Australia Bosch Rexroth Pty Ltd 3 Valediction Road Kings Park NSW 2148 Phone 61 0 2 98 31 77 88 Fax 61 0 2 98 31 55 53 United Kingdom Bosch Rexroth Ltd Broadway Lane South Cerney Cirencester GL7 5UH Phone 44 0 1285 86 30 00 Fax 44 0 1285 86 30 03 USA Bosch Rexroth Corporation 5150 Prairie Stone Parkway Hoffmann Estates Illinois 60192 Phone 1 0 847 6 45 36 00 Fax 1 0 847 6 45 08 04 Canada Bosch Rexroth Canada Corp 490 Prince Charles Drive South Welland Ontario L8B 5X7 Phone 1 0 905 7 35 05 10 Fax 1 0 905 7 35 56 46 1070 073 740 111 02 11 GB HB NC BRC ESM11 Printed in Germany Rexroth Bosch Group Bosch Rexroth AG Electric Drives and Controls Postfach 11 62 64701 Erbach Berliner StraBe 25 64711 Erbach Deutschland Tel 49 0 60 62 78 0 Fax 49 0 60 62 78 4 28 www boschrexroth com
80. 250ms have lapsed 40 ENDIF The ERG variable will supply either the 50 IF ERG 2 THEN value 0 if the condition was already 60 DSP 10 10 WAITED gt 250ms fulfilled when WAIT was called or the value 70 ENDIF 1 if the duration has lapsed or the value 2 if the condition was met during waiting 4 2 Axis and coordinate positions 1070 073 740 111 02 11 GB CPL offers you various functions for inquiring the current positional values of axes and coordinates A distinction between the following functional types is made e functions which are based on physical axes or logical coordinates CPOS AXO WPOS CPROBE e functions which are based on physical or logical axes MPOS PPOS PROBE e functions which are based on physical axes SPOS APOS To use these functions you should know e how to address an axis by physical or logical axis index or axis name or coordinate name e how to interpret the transferred positional value Additional information on the topics Coordinates Axes and Trans formations can be found in the user s manual Description of Func tions refer to section 1 6 4 4 System Functions Definition of physical and logical axis names BOSCH The term physical axis includes all axes which are connected to the SERCOS interface In MACODA parameter 1003 00001 they receive a system wide unique axis address physical axis name e g X Y
81. 5 2 2 Deselection on channel 2 without automatic program re selection Start program MCOPS 6 lt channel gt Starts a selected program or a selected MDI block on the programmed lt channel gt Specify operation mode MCOPS 7 lt channel gt lt operation mode gt Specifies an operation mode on the programmed lt channel gt e lt operation mode gt Integer expression Defines the operation mode to be switched to 1 Jog mode Axes can be jogged See also MCOPS 4 under lt selection type gt code number 256 2 Traverse to reference point Axes can be started with the signals manual manual See also MCOPS 4 under lt selection type gt code number 512 4 Manual data input Individual NC blocks can be specified for machin ing 5 Automatic Part programs are completely executed 6 Automatic program block Individual blocks of a part program are executed one after the other Each individual block is prepared and started with cycle start 7 Automatic single step From an individual NC block in the part pro gram the NC may generate and prepare several blocks In this operation mode cycle start always passes an individual block on to the interpolator for machining 10 Automatic single block With cycle start all blocks generated and prepared on the basis of a single NC block in the part program are forwarded to the interpolator for machining 11 Return to path Axes can be removed manually f
82. 70 073 740 111 02 11 GB BOSCH 1070 073 740 111 02 11 GB System Functions 4 15 PPOS If switching measuring probes are connected then the current axis actual position of a synchronous axis is queried in the switch point of the measuring probe PPOS considers the following compensations e axis zero shifts G54 G59 G154 G159 G254 G259 G160 G360 e tool compensations Hx G145 G845 G147 G847 program coordinate shift G168 G268 e lead screw error compensation and cross compensation The following are not considered e axis transformation COORD n e coordinate transformations G138 G352 G354 G359 e scaling G37 G38 e programmed contour shift G60 Please regard the following conditions e PPOS may only be used for axes of its own channel e lf there is no axis transformation or coordinate transformation the sup plied value is based on the last programmed workpiece coordinate sys tem WCS e You can enter which axes are to be considered during a measurement in the MACODA parameter 1003 00012 The measurement can be acti vated with the function Probe input G75 as well as with On the fly measurement G275 With G75 those axes of the channel are taken into consideration for which the MACODA parameter has the value 1 With G275 only the specified axis is measured e The measured values are read with functions PPOS and PROBE with the function Measuring fixed stop G375
83. ASCII characters The keys of the operating panel have separate numbers assigned For the ASCII table and the key codes please refer to the Annex The command is only effective when the CPL dialog is in the foreground Example 1 NEW 0 OLD 0 2 CLS 3 DSP 10 10 Press any key ABORT WITH ENTER 4 WHILE NEW lt gt 13 DO 5 NEWS INKEY 6 IF OLD lt gt NEW AND NEW gt 0 THEN fi DSP 12 10 KEY NUMBER NEW S OLD NEW 8 ENDIF 9 END 10 CLG Dialog Programming BOSCH Example aL AS SOFT1 BS SOFT2 CS SOFT3 2 DS SOFT4 BS SOFT5 FS SOFT6 GS SOFT7 HS SOFT8 3 CALL UNTPR AS BS CS D S ES M30 UNTPR Z 0 COL 0 7 0 2 DSP 41 4 P1 DSP 41 13 P2 DSP 41 22 P3S 3 DSP 41 31 P4S DSP 41 40 P5S DSP 41 49 P6S DSP 41 58 P7 DSP 41 67 P8 4 REPEAT 5 REPEAT 6 K INKEY Fi UNTIL K 141 OR K 142 OR K 143 OR K 144 OR K 145 OR K 146 OR K 147 OR K 148 OR K 139 8 JZ Z 140 JK K 140 9 IF JZ gt 0 AND JZ lt 9 THEN COL 0 7 0 10 FOR I 0 to 2 11 DSP 414 1 JZ 1 8 JZ 1 y 12 NEXT I 13 IF Z 141 THEN DSP 41 4 P1 ENDIF 14 IF Z 142 THEN DSP 41 13 P2S ENDIF 15 IF Z 143 THEN DSP 41 22 P3S ENDIF 16 IF Z 144 THEN DSP 41 31 P4S ENDIF 17 IF Z 145 THEN DSP 41 40 P5S ENDIF 18 IF Z 146 THEN DSP 41 49 P6S ENDIF 19 IF Z 147 THEN DSP 41 58 P7S ENDIF 20 IF Z 148 THEN DSP 41 67 P8S ENDI
84. C 10 40 DIM D 20 51 DIM ES 30 52 DIM FS 30 53 DIM G 30 54 DIM H 30 55 DIM I 30 60 AS THIS 70 BS IS A TEST 80 MIDS C 1 6 AS BS 90 MID D 1 10 MID A 1 1 MIDS BS 1 2 92 ES AS MIDS BS 1 93 X ABC 94 YS DE 95 FS X YS 96 GS X AS 97 HS X AS TEST 98 IS TES T1 Content of A THIS Length 4 Content of B IS A TEST Length 9 Content of C THIS I Length6 Content of D TIs Length 3 Content of E THIS IS A TEST Length 14 Content of F ABCDE Length 5 Content of G ABCTHIS Length 8 Content of H ABCTHIS TEST Length 12 Content of I TEST1 Length 5 The following lines of code will lead to faults 1 DIM A 3 A ABC B CD C EF 2 D AS BS gt p x T WoT Inadmissible assignment to an 7 non dimension TRING variabl 5 D TEST TEST1 on dimensioned S G variable 5 14 Processing Character Strings BOSCH Example STR 1 DIM AS 50 DIM BS 21 2 AS STRS AS 37 3 BS STRS 2 5 Content of character field AS AS 12 333 characterfield BS 2 500 Example VAL 1 DIM FOLGES 20 FOLGES X VALUE 0001 234 MM 2 XR VAL MID FOLGES 7 Z VAL MIDS FOLGES 7 6 3 Y VAL MIDS FOLGES 15 5 X VAL MIDS FOLGES 18 Content of REAL variable XR 1 234 Content of INTEGER variable Z 1 Content of INTEGER variable Y
85. CO_NOT_IN_CYCL_AT_C 2147483648 is given The value is integer in SERCOS weighting In the case of 16 axes the lt buffer gt must have lt size gt 16 integer Movement function of the spindles Integer Array MCODS 63 1 lt version gt lt buffer gt lt size gt E Supplies the movement function of all spindles Movement function codes Spindle is not defined Turn right clockwise without coolant Turn right clockwise with coolant Turn left counter clockwise without coolant Turn left counter clockwise with coolant Spindel stop Spindle orientation OOF SO aS In the case of 8 spindles the lt buffer gt must have the lt size gt 8 integer 1 Data which the control unit provides cyclically are identified with Z Data available after each switching of blocks are identified with S Data which appear in irregular periods after a change are identified with an E Data which appear immediately when called for are identified with an I Data which never change they only need to be called for once are identified with R 2 1070 073 740 111 02 11 GB Gives the variable type integer real double character needed for lt buffer gt If not a simple variable but a field variable is needed the variable type is followed by array 4 66 System Functions BOSCH Function supplies refresh Gear range of the spindles lt buffer gt is of
86. Command Syntax Short description see page CASE CASE lt Integer expression gt OF 2 24 LABEL lt int constant gt lt additional int constants lt instructions lt instruction gt LABEL ses Gumeeunde lt instruction gt lt instruction gt ENDCASE Conditional selection from several alternatives CHR CHR lt Integer expression gt 5 5 Transmits a character whose ordinal number in the ASCII table is equal to the value transferred via the lt INTEGER expression gt parameter CIR CIR lt X start gt lt Y start gt lt X end gt lt Y end gt lt X center gt lt Y center gt 8 5 CIR lt X center gt lt Y center gt lt radius gt Output of a partial or full circle CLG Clears the entire image area and moves the CPL dialog window into the back 8 6 ground 8 8 CLOCK lt function value gt CLOCK 4 42 Time counter query in milliseconds CLOSE CLOSE lt n gt 6 10 Closes an open file with logical number lt n gt after concluding read or write opera tions CLR Deletion of the graphics range defined via GWD 8 6 CLS Deletion of the entire image range 8 6 COF COF lt axis selection gt lt selection type gt 4 26 Supplies for the current channel here channel in which the program with the COF command is running the contour shift last programmed G60 of a coordi nate COL COL lt graphics gt lt text gt lt textBG gt lt tab gt lt SK gt lt SKBG gt 8 2 Defines the colors for graphics t
87. F 21 ENDIF 22 IF JK gt 0 AND JK lt 9 THEN COL 0O 0 7 23 FOR I 0 TO 2 24 DSP 414 1 JZ 1 8 JZ 1 3 25 NEXT I 26 IF K 141 THEN DSP 41 4 P1S ENDIF Dey IF K 142 THEN DSP 41 13 P2S ENDIF 28 IF K 143 THEN DSP 41 22 P3S ENDIF 29 IF K 144 THEN DSP 41 31 P4S ENDIF 30 IF K 145 THEN DSP 41 40 P5S ENDIF 31 IF K 146 THEN DSP 41 49 P6S ENDIF 32 IF K 147 THEN DSP 41 58 P7S ENDIF 34 IF K 148 THEN DSP 41 67 P8S ENDIF 34 ENDIF 35 Z K 36 UNTIL K 139 CLG M30 Example 10 M 10 20 REPEAT 30 KEY INKEY 40 LIN 250 10 M M 45 M M 1 50 UNTIL KEY 66 OR M gt 300 60 CLG Example 10 M 2 20 WHILE INKEY lt gt 66 AND M lt 150 DO 30 CIR 250 160 M M M 1 40 END 50 CLG 60 1070 073 740 111 02 11 GB BOSCH 1070 073 740 111 02 11 GB Dialog Programming 7 7 INP Assigns a value to a REAL or INTEGER variable in the dialog INP lt variable name gt If an INP instruction is to be executed the CPL processor must have read a corresponding PRN instruction with the same variable within the DLG ENDDLG range before An attempt to use INP to assign a value to a STRING variable will be ignored but the corresponding PRN instruction will be executed The dialog text will be displayed on the screen with the reading of the first INP instruction An INP instruction can be skipped using the cursor keys without a value as signment being made An existing value can be deleted using the delete key T
88. GH 5 6 I oul POS1 INSTR MIDS AS 2 BS 4 POS2 INSTR MIDS AS 2 4 BS 10 7 POS3 INSTR MIDS AS 2 BS Content of INTEGER variable POS1 8 Content of INTEGER variable Pos2 0 Content of INTEGER variable POS3 8 1070 073 740 111 02 11 GB BOSCH Processing Character Strings 5 5 5 6 Strings and numbers 1070 073 740 111 02 11 GB ASC ASC lt character string gt Outputs the ordinal number of the first character ASCII code from the lt character string gt as an INTEGER value If the lt character string gt is empty or not defined ASC returns the value 1 lt character string gt must be a STRING expression ASC is the reversal of CHR Example 10 DIM A 1 20 A ABC 30 BS BCD 40 I ASC AS Content of INTEGER variable 1 65 50 J ASC BS Content of INTEGER variable J 66 60 AS s uN 70 K ASC AS Content of INTEGER variable K 1 80 AS NUL 90 L ASC AS Content of INTEGER variable L 1 CHRS is the reversal of ASC CHR lt integer expression gt Converts an lt integer expression gt into the corresponding ASCII character All ASCII character decimal significants appear in the ASCII character set table in the Annex of this manual Example 10 DIM A 1 20 I 65 30 AS CHRS I Content of string variable A A 5 6 Processing Character Strings BOSCH STR STRS lt format string gt lt value gt Conv
89. HARACTER variables For this the field must be declared by means of a DIM instruction Each CHARACTER variable in this field then contains only one character of the character string A one dimensional field comprised of variables of the CHARACTER type is termed STRING variable No index is entered when accessing a one dimen sional CHARACTER variable However when accessing a two dimensional CHARACTER variable an index must be entered Example 1 REM String variable AB length 10 2 DIM ABS 10 3 REM 3 String variables CD each at a length of 5 4 DIM CD 3 5 5 ABS gz 6 CD 2 ABC Group of variables Name of variable Type of variable Arrays possible x YES Local max 8 significant INTEGER Xx characters REAL x DOUBLE x BOOLEAN x CHARACTER x incl symbol INTEGER Xx Global max 8 significant REAL xX characters DOUBLE X BOOLEAN x CHARACTER x Permanent 1 100 Definable max 16 significant INTEGER x permanent characters REAL x DOUBLE x BOOLEAN x CHARACTER X 1070 073 740 111 02 11 GB BOSCH 2 5 Instructions 1070 073 740 111 02 11 GB CPL Basic Elements 2 15 Local as well as global variables can be assigned values This is accom plished with the use of the equals sign Example Value assignment BOOLEAN variable 1 START FALSE I Value Assignment symbol equals sign logical variable Example Value as
90. OF FILE 6 POS FILEPOS 1 7 POS1 FILEPOS 1 1 8 POS2 FILEPOS 1 2 9 POS3 FILEPOS 1 3 11 CLOSE 1 Result POS 3 gt record number of record of current position POS1 258 gt byte number POS2 3 gt record number of record of current position POS3 2 gt position within 3rd record POS 11 gt record number of record of current position POS1 1281 gt byte number POS2 11 gt record number of record of current position POS3 1 gt position within 3rd record 1070 073 740 111 02 11 GB BOSCH 6 8 Setting file pointer 1070 073 740 111 02 11 GB File Handling 6 13 SEEK Positions the file pointer at a certain position of an open file The file may be a sequential or a random file With sequential files the file must be opened with the command OPENR For random files the command OPENW is also permis sible SEEK lt n gt lt k gt lt o gt lt n gt Logical number of the file in which the file pointer is to be posi tioned Range of values 1 to 9 If the range of values is not adhered to the following error mes sage appears INVALID FILE NUMBER lt k gt Record number of a random file or byte number of a sequential file The file pointer is positioned on lt k gt Range of values 0 to last existing record or 0 to last existing byte The record with the EOF pointer is taken to be the last existing re cord At 0 positionin
91. OR P1 XVALUE P2 COMPTAB P3 N1 G1 X XVALUE FACTOR N2 G22 K COMPTABS PDIM If a sub program e is to be invoked with a string constant as transfer parameter and e the invoking program is selected without linking the PDIM command must be used PDIM lt parameter name gt lt field size gt If the field size programmed is too small or missing entirely the control unit reports the part program error invalid variable Example Main program N10 DIN nog P SP TEST us Sub program 10 PDIM P1 4 i30 The string variable P1 has the value TEST 3 4 Sub programs and Cycles BOSCH Notes 1070 073 740 111 02 11 GB BOSCH System Functions 4 1 4 System Functions 4 1 Standard functions 1070 073 740 111 02 11 GB CPL is able to access system data of the NC control unit with system func tions WAIT The WAIT function is a mandatory requirement in all situations where cur rent machine or process related data essential to further program execu tion i e for program branching or a calculation is needed within the program Viewed in terms of elapsed time block processing i e the operation by which the individual program lines are analyzed and interpreted is always carried out in advance of its execution on the machine For this reason the period of time by which the execution on the machine tool lags behind the completion of block processing is not constant but dependent upon on
92. S 87 lt channel gt lt version gt lt buffer gt 1 E Supplies the waiting states of a channel to lt buffer gt If a channel goes into a waiting state this function reports the reasons for doing so The active waiting statesare bit coded The following constant terms define the respective bits of the first integer value beginning with the lowest value 0 Dwell time 1 Acknowledgement compulsory auxiliary function 2 Block transfer inhibit 3 Feed in channel equals 0 4 Program stop with MO M1 5 Feed hold on the channel 6 Feed inhibit on the channel or of a channel axis 7 Block transfer inhibit entered by customer 8 Synchronized movement stop between channels ASTOP 9 Waiting for axis in the case of an axis exchange G511 10 Waiting for a permanent variable WPV 11 Waiting for an interface signal at an active time WAITA 12 Waiting for an interface signal WAIT IC or for a set period of time WAIT TIME during block preparation 13 Motion Control Data Services MCODS See example under 4 14 3 Online correction values WCS Real Array MCODS 89 lt channel gt lt version gt lt buffer gt lt size gt E Supplies the values of the online correction WCS of the given channel to lt buffer gt First all working range coordinates then the pseudo coordinates of the channel Status of the online correction Integer MCODS 90 lt channel gt lt version gt lt buffer gt WCS Array lt si
93. SIZE NEXT CLOSE 1 OPENR 2 2 A FILESIZE 2 B FILESIZE 2 1 10 C FILESIZE 2 2 11 CLOSE 2 The INTEGER variable A has the value 302 The INTEGER variable B has the value 302 The INTEGER variable C has the value 300 1070 073 740 111 02 11 GB BOSCH 6 10 Erasing a file 1070 073 740 111 02 11 GB File Handling 6 15 Example FILESIZE and random file OPENW 1 P2 1000 10 FOR I 1 TO 20 PRN 1 TEST FILESIZE NEXT CLOSE 1 OPENR 2 2 10 AS FILESIZE 2 BS FILESIZE 2 1 10 C FILESIZE 2 2 10 D FILESIZE 2 3 10 ES FILESIZE 2 4 11 CLOSE 2 ONHDUOBPWNH The INTEGER variable A has the value 222 The INTEGER variable B has the value 222 The INTEGER variable C has the value 220 The INTEGER variable D has the value 20 The INTEGER variable E has the value 20 ERASE Erases files in the current directory ERASE lt PGM identifier gt lt PGM identifier gt STRING expression max 30 characters Otherwise the INVALID FILE NAME error message ap pears The following values can be returned if the ERASE function is assigned to an INTEGER variable or if it is used in loops or queries WHILE IF etc 0 File erased 1 File not erased because it does not exist 2 File not erased because this file is erase protected 3 File not erased because this file is active If a file cannot be erased a warning to this effect is issued and execution of the program con
94. SOFTKEY 3 144 SOFTKEY 4 145 SOFTKEY 5 146 SOFTKEY 6 147 SOFTKEY 7 148 SOFTKEY 8 1070 073 740 111 02 11 GB BOSCH A 7 Index A ABS 2 16 ACOS 2 17 Active system data 4 29 AND 2 18 APOS 4 17 ARRAY 2 13 ASC 5 5 ASIN 2 17 ATAN 2 17 Axes synchronous and asynchronous 4 5 Axis address variable 4 39 Axis and coordinate positions 4 3 Axis names physical and logical 4 4 Axis positions 4 3 Axis zero shift operations 4 19 Axis ZS tables 4 19 AXO 4 9 AXP 4 39 B BCD 2 19 BIN 2 19 Bitmap files Display 8 8 BMP 8 8 BOOLEAN 2 9 2 13 Brackets 2 3 Branch instructions 2 23 Cc CALL 3 2 CASE LABEL LABEL OTHERWISE ENDCASE 2 24 CHARACTER 2 9 2 14 Character fields Dimensioning 5 1 Character string 5 1 Length 5 4 Modifying 5 3 Reading 5 2 Searching 5 4 Character string constant 2 7 CHR 5 5 CIR 8 5 Circle 8 5 Clear commands 8 6 CLG 8 6 8 8 CLOCK 4 42 CLOSE 6 10 CLR 8 6 CLS 8 6 Code characters 2 6 COF 4 26 COL 8 2 Color code 8 1 1070 073 740 111 02 11 GB Annex Color selection 8 1 Communication 9 1 Compensation of workpiece position 4 27 Conditional jump instructions 2 23 Constant Double precision 2 7 Constants 2 7 Contour shift 4 26 Contour surfaces Filling in closed 8 6 Conversion Numeric systems 2 19 Coordinate positions 4 3 Coordinates for active axis transforma
95. X value gt lt Y value gt lt fill pattern gt lt fill colors lt contour colors CLG Coordinates of the fill in point within the closed contour in the form of any INTEGER expres sions INTEGER expression 2 0 and lt 5 currently not used for representation Reserved for later implementation Color code cf page 8 1 Color code cf page 8 1 of the closed con tour pass This indication is only necessary if the fill color does not correspond to the color of the con tour Clears the entire image area CLear Graphic permissible for CPL and moves the CPL dialog window into the background of the screen see also DLF instruction on p 8 8 CLR Clears the graphics range CLear Range defined by GWD CLS Clears the entire screen CLear Screen 1070 073 740 111 02 11 GB BOSCH Graphic Programming 8 7 8 8 Text output in the graphics grid 1070 073 740 111 02 11 GB GPR If text is to be written in a form other than in the line column grid such as is the case with the PRN and DSP commands text can be addressed in graph ics coordinates using the GPR command For this purpose the bottom left point of the letter matrix at the beginning of a character string is defined by way of specifying the screen pixels in the X and Y direction The command format is as follows GPR lt X pixel gt lt Y pixels lt offset gt lt text gt lt X pixel gt lt Y pixel gt Coordinates of the
96. afterwards It is also possible to determine the record offset within the current record of a random file or the offset from the current byte that can be accessed for a sequential file The file can therefore be a sequential or a random file Offset refers to the number of bytes from the top of the file up to the current byte in a file The record offset specifies the byte at which positioning takes place within a record The record offset begins with the value 1 15 byte ina record and can have the maximum value of the record length 1 last byte in this record is lt LF gt The value 1 is returned if you are on the EOF pointer FILEPOS lt n gt lt mode gt lt n gt 1to9 Logical number of the file in which the position of the file pointer is to be read If the range of values is not adhered to the following error mes sage appears INVALID FILE NUMBER lt mode gt With random files Range of values 1 to 3 lt mode gt 1 Supplies the offset to the current byte which can be read or writ ten lt mode gt 2 Supplies the record number of the current record which can be read or written The result is as follows if you are on the EOF pointer number of records 1 lt mode gt 3 This command supplies the record offset within the current re cord which can be read or written The record offset begins with the value 1 1t byte in this record and can have the maxi mum value of the record length 1 last byte
97. al axes in the default setting appear in lt buffer gt separated by the character 0 zero byte in increasing order at 9 bytes each If an already existing channel number is entered for lt channel gt then all the names of all axes on the given channel will appear in lt buffer gt separated by the character 0 zero byte in increasing order Names which are shorter than 8 characters will be completed with blanks up until the 8th character The size of the lt buffer gt appears in lt size gt It can be a maximum of 144 bytes with 16 axes 9 16 Example see chapter 4 14 3 page 4 76 1 Data which the control unit provides cyclically are identified with Z Data available after each switching of blocks are identified with S Data which appear in irregular periods after a change are identified with an E Data which appear immediately when called for are identified with an I Data which never change they only need to be called for once are identified with R 2 Gives the variable type integer real double character needed for lt buffer gt If not a simple variable but a field variable is needed the variable type is followed by array 1070 073 740 111 02 11 GB BOSCH Function supplies refresh Measuring units of axes Default setting lt buffer gt is of type 2 Integer Array System Functions 4 65 Syntax description MCODS 61 lt ch
98. am will continue to run from that point onward Sub programs in turn can accommodate further sub pro gram calls CPL permits a maximum 7 fold nesting depth 2 2 CPL Basic Elements BOSCH Main pro vn Sub pro a Sub pro a Sub pro gram gram gram gram In accordance with existing formal input stipulations CPL instructions are usually written in capital letters A formal input comprises the correct syntax of reserved instruction words thus preventing possible confusion with names of variables A consequence of increasing program size is the increased demand for clean programming Besides comprehensible constants and designations of variables clean programming mainly includes e structured programming e fault tolerance and e software ergonomics Generally speaking structured programs tend to be clearer in their overall architecture A practice providing several advantages is that of bundling pro gram segments serving related purposes or containing frequently used functions into parameterized sub programs or under a single jump destina tion With the added identification by a comprehensible designation label and because the respective functions are very often utilized by other pro grams this practice besides resulting in improved readability of the referred programs also provides the benefit of preventing duplication of effort Al though it should be noted that this approach to program
99. annel gt lt version gt lt buffer gt lt size gt R If the value 1 is entered for the lt channel gt then the measuring units metric inch degrees of all physical axes in the default setting will appear in lt buffer gt separated by the character 0 zero byte in increasing order at 9 bytes each If an already existing channel number is entered for lt channel gt then all the names of all axes on the given channel will appear in lt buffer gt separated by the character 0 zero byte in increasing order e Asynchronous linear axes are given in metric e With synchronous axes the measuring unit depends on the power up condition after the start MACODA parameter 7060 00010 metric inch G70 G71 e With rotary axes and spindles the measuring unit degrees is used with Hirth axes with position programming a corresponding measuring unit will be supplied Possible return values for the measuring units inch metric degree axis not available position programmable Hirth axis oS In the case of 16 axes the lt buffer gt must have lt size gt 16 integer ID number of the cyclical axis message Integer Array MCODS 62 1 lt channel gt lt version gt lt buffer gt lt Ssize gt lt ID number gt Z Supplies the value of an lt D number gt from the cyclic axis telegram for all axes If the lt ID numbers is not in the cyclic telegram the value NCS_M
100. as a string A value existing in lt version gt is ignored in the function call of the function For files stored in the Typ3 internal file system the value 31 must be given in lt size gt path incl file name can contain max 30 characters here For files stored in mounted file systems the value in lt size gt depends from the maximum possible number of characters supported by the external file system for path and name of a file 1 Data which the control unit provides cyclically are identified with Z Data available after each switching of blocks are identified with S Data which appear in irregular periods after a change are identified with an E Data which appear immediately when called for are identified with an di Data which never change they only need to be called for once are identified with R 2 Gives the variable type integer real double character needed for lt buffer gt If not a simple variable but a field variable is needed the variable type is followed by array 1070 073 740 111 02 11 GB 4 56 System Functions BOSCH Function supplies lt buffer gt is Syntax refresh of type 2 description Channel operation mode Integer MCODS 31 lt channel gt lt version gt lt buffer gt 1 E Supplies in lt buffer gt the operation mode active in lt channel gt 10 11 12 13 No operation mode and therefore no process is active Jog
101. axes Asynchronous rotary axes mm or inch depending on the momentary active setting G70 G71 on the invoking channel degree mm degree 4 8 System Functions BOSCH 4 2 1 Functions for coordinates or physical axes The functions AXO CPOS CPROBE and WPOS always supply coordinate values The coordinates are selected by entering e the coordinate indexes or names or e the physical axis index or axis name only for pseudo coordinates The following is to be noted e The coordinate index for working range coordinates on the channel is al ways fixed e Pseudo coordinates in comparison can be added or transferred to a channel through the functions of the axis transfer In this process the coordinate index of other pseudo coordinates on the channel can be changed Through the possibility of specifying the physical axis index it is also pos sible with pseudo coordinates to work with fixed indexes e When specifying a physical axis that is not assigned to any pseudo coor dinate a run time error is reported e lf there is no active axis transformation then all coordinates are pseudo coordinates Thus access via the physical axis index is possible Regarding the functions AXO and CPOS which supply the data for block preparation or refer to the condition of the block preparation CPROBE only those coordinates that belong to the invoking channel can be queried If an attempt is made to address a
102. axes or rotatory working range coordinates the unit is always in de grees The instruction has the following structure DPC lt axis selection gt lt selection type gt lt axis selection gt See page 4 8 functions for coordinates or physical axes 1 n or name supplies shift value 0 supplies angle of rotation lt selection type gt See page 4 8 functions for coordinates or physical axes Examples 10 A DPC 1 Supplies the last programmed G138 shift of the coordi nate with the 1st coordinate index on the channel 15 B DPC XxX Supplies the last programmed G138 shift of the X axis coordinate on the channel 20 B DPC 2 Supplies the last programmed G138 shift of the coordi nate with the 2nd coordinate index on the channel 25 B DPC 2 0 Supplies the last programmed G138 shift of the axis with the 2nd physical axis index on the channel 30 ANGLE DPC 0 Supplies the last programmed G138 angle of rotation 100 C DPC 9 Runtime error since 9 is not a valid coordinate index if P there are only 8 axes in the system 4 28 System Functions BOSCH 4 8 Scaling SCL Supplies the parameters last programmed of the functions G37 and G38 pole coordinates scaling factors and angle of rotations for the current channel here channel in which the program with the SCL command is run ning Since G37 G38 only affect coordinates on the current channel an error message is is
103. bette eee Age eee es INStFUCHIONS ces cs atau eae INERAT een oo eee Eee ew ad Arithmetical operations 0 cee eee ees Logical operations 0 0 eee Conversion between numeric systems 02005 Relational operations 0 0 cece cee Repeat instructions 0 cece e cece eee eee Unconditional jump instruction 0 0 0 c eee eee eee Branch instructions conditional jump instructions Program roman ine cian snit ated wad a aa A ia Sub programs and Cycles 000000 Calling sub programs with G Mor P address Handling modal sub program calls 000 e scene Sub program call via CALL function 005 Parameter transfer to sub programs 0020e0005 System Functions 0 0 cece eee eee eee Standard functions 0 cece eee ees Axis and coordinate positions 0 cee eee eee Functions for coordinates or physical axes Functions for physical or logical axes 0 00 eee Functions for use with physical axes only Axis zero shift operations 00 cece ee eee ee Tool compensations 2 00 00 cee cece eee eee Access to the tool database 2 cece eee eee Contour SHITE srei wae cated wa ued Olde Veale eee ad Yau Compensation of workpiece position 00005 SCAG cs che ce eaten ee sete tee Reenter ea wae eee e
104. c Elements 2 1 2 2 2 CPL block Start of program BOSCH A CPL block consists of an instruction or declaration that is preceded by a line number If a CPL block concludes with a colon or a lt LINE FEED gt character it must be followed by another CPL block without a line number Example 30 IF X 3 THEN GOTO 150 ENDIF REM JUMP DESTINATION1 40 IF X 4 THEN GOTO 200 ENDIF REM JUMP DESTINATION2 50 WAIT 60 XPOS MPOS 1 YPOS MPOS 2 ZPOS MPOS 3 N100 G90 N110 G1 X XPOS Y YPOS Z ZPOS 115 REM Travel at G1 N120 GO X0 YO ZO The colon can also be interpreted as marking a comment within an REM instruction In this case the colon does not separate two CPL blocks A lt LINE FEED gt identifies the programmed line end It is automatically in serted into the program text by pressing the ENTER key However the lt LINE FEED gt character is neither visible on the screen nor on the hardcopy In the event that a CPL block does not conclude with a colon only a CPL block with a line number or an NC block may follow A CPL program is normally selected in the operating mode and started by means of CYCLE START These programs must either be com posed exclusively of CPL blocks or they may comprise combinations of both NC and CPL blocks 1070 073 740 111 02 11 GB BOSCH 2 3 Linking 2 4 Symbol names 1070 073 740 111 02 11 GB CPL Basic Elements 2 5 Subsequent to program selection via CPL
105. cnc 1070 073 740 111 02 11 GB BOSCH 6 12 Determine file date 1070 073 740 111 02 11 GB File Handling 6 17 FILEDATE In the CPL program the date of a file can be determined with FILEDATE An access error does not generate a part program error but instead the function supplies an empty string FILEDATE lt file name gt lt mode gt lt file name gt File name with the complete path as a string expression If no path is entered the file is searched for in the current directory The CPL function supplies a string expression as a return value lt mode gt Integer variable for the function mode default 1 1 Date of the file format dd mm yy 2 Time of the file format hh mm ss Example 10 DIM DATES 10 20 DATES FILEDATE usr user Test txt 1 30 IF LEN DATES gt 0 THEN 40 PRN 0 File date DATES 50 ENDIF 6 18 File Handling BOSCH Notes 1070 073 740 111 02 11 GB BOSCH Dialog Programming 7 1 7 Dialog Programming Dialog programming enables operator prompted data in and output Newly created CPL graphic programs make full use of the screen The SFK command always produces 8 softkeys Old CPL graphic programs of the CC 200 220 series only use the corre sponding pixel range of the CC 220 panel The SFK command always pro duces 5 softkeys An identifier in the old CPL graphic programs distinguishes them from new ones In order to enable old graphic programs
106. coor dinate system MCS e If there are no axis zero point shifts axis transformations or coordinate transformations SPOS and WPOS always supply identical values e For asynchronous axes SPOS always acts like WPOS p 4 11 In most cases of application the command position should not be deter mined at the time of block preparation but rather at the time of block exe cution In this case WAIT should be programmed in its own block before SPOS also see Section 4 1 standard functions WAIT Using SPOS without WAIT does not supply clearly predictable values as it is not exactly known how far the block execution lags behind the block processing When accessing axis values of a foreign channel it may be necessary to meet synchronization measures in order to measure a defined posi tion The instruction has the following structure SPOS lt axis selection gt lt axis selection gt physical axis index or physical axis name Example Channels as in the example configuration from page 4 5 30 POS1 SPOS 1 The current axis command value of the 1st physical axis in the system X axis on channel 1 is assigned to the POS1 variable 50 POS5 SPOS Y2 The current axis command value of the 5th physical a axis in the system Y2 axis on channel 2 is assigned to the POS5 variable 1070 073 740 111 02 11 GB BOSCH System Functions 4 19 4 3 Axis zero shift operations 1070 073 740 111 02 11 GB
107. coordinate foreign to the channel then a run time error occurs The function WPOS which supplies the actual workpiece coordinates may also be invoked by foreign channels but only when dealing with pseudo coordinates Transfer parameters for the functions AXO COF CPOS CPROBE and WPOS lt axis selection gt Index or name of the coordinate A name is interpreted as a coordinate name Only if no according coordinate name exists it is interpreted as a physical or a logical axis name An index is interpreted according to the given lt selection type gt Programming an axis coordinate that is not config ured leads to a run time error lt selection type gt optional Determines how an index programmed under lt axis selections is interpreted 0 physical axis index 1 coordinate index default The index is interpreted as a coordinate index with out lt selection type gt 1070 073 740 111 02 11 GB BOSCH 1070 073 740 111 02 11 GB System Functions 4 9 lt channel gt optional channel number only for WPOS If coordinates are to be read from foreign channels and if they are to be addressed by their index or names then the number of the channel that the coordinate is cur rently assigned to is entered in lt channel gt If no channel is given then the coordinates of the current channel will be accessed If a physical axis is addressed by name or index and a channel is entered at the same time then a
108. ctions using both constants and variables The simplest functions include the four basic arithmetical operations Addition gt plus sign Subtraction minus sign Multiplication asterisk Division slash character As arule multiplication and division take priority over addition and subtrac tion It is also possible to use parentheses the nesting of which to a depth of seven can be used with simple expressions containing no function calls Example 1 I 25 XACTUAL 10 2 XSET 150 100 1I XACTUAL XSET has the value 12 It is also possible to invoke arithmetical functions that act upon variables constants or CPL expressions which must be placed in rounded brackets immediately behind the respective instruction word The function always re fers to the internal numerical representation of the input value This repre sentation can be verified during program execution with the use of program check In the case of nested expressions and particularly when these con tain function calls the maximum possible nesting depth must be considered It is dependent upon the memory capacity required by the bracketed expres sions during their respective execution ABS Returns the absolute value of the input value i e negative values become positive and positive values remain positive Example 1 I 125 2 XVALUE 2 SORT ABS 100 I XVALUE has the value 10 INT Converts the i
109. d INP INP lt variable gt 7 7 Input of a value for the specified variable INP INP lt n gt lt variable gt lt variable gt 6 8 Read access to data from the file with the logical number lt n gt INSTR INSTR lt character string gt lt STRING expression gt lt start point gt 5 4 Beginning at the lt start point gt searches for a lt character string gt within a lt STRING expression gt and outputs its start position as an INTEGER value INT lt INTEGER number gt INT lt REAL expression gt 2 16 Converts a lt REAL expression gt to an lt INTEGER number gt by removing the deci mal places LEN LEN lt STRING expression gt 5 4 Returns the number of characters in a STRING expression The result is an INTEGER value LIN LIN lt X start gt lt Y start gt lt X end gt lt Y end gt 8 4 Draws a line 1070 073 740 111 02 11 GB A 6 Annex BOSCH Command Syntax Short description see page LJUST LJUST 6 5 Switches to left justified data output and is effective for all file outputs up to the end of the program run MCA MCA lt block gt lt index gt lt channel gt 4 29 Transfers the contents of a MACODA individual parameter MCODS MCODS lt type gt lt channel gt lt version gt lt buffer gt lt size gt lt P1 gt 4 48 Calls Motion Control Data services of the NCS by CPL Enables data and sta tuses to be output from the CNC MCOPS MCOPS lt fct gt
110. d index and or indices are specified in addition to the name of the field variable Example Dimensioning an ARRAY variable 10 DIM FIELDVAR 2 3 _____ INTEGER constant for field sizes index Name of variable REAL variable DIM instruction word Example Access to Array variable 100 FIELDVAR 1 1 MPOS 1 110 FIELDVAR 2 1 CPOS 1 120 FIELDVAR 1 2 MPOS 2 130 FIELDVAR 2 2 CPOS 2 140 FIELDVAR 1 3 MPOS 3 150 FIELDVAR 2 3 CPOS 3 Prior to the initial access to the field variables the index range and or the field size must be dimensioned with INTEGER constants e Field size of the field variable of the types INTEGER and REAL max 65536 e Field size of the field variables of the type CHARACTER max 1024 DIM lt name of variable gt lt fieldsizel gt lt fieldsize2 gt Dimensioning with DIM may not be applied to definable permanent variables Instead the dimensioning of these variables occurs in the file wmhperm dat or anwpwerm dat 2 14 CPL Basic Elements BOSCH Overview of variables CHARACTER and STRING variables A CHARACTER variable is identified by a trailing dollar sign This type of variable can accommodate a single character as well as a complete char acter string However character string instructions see section Processing Character Strings are possible only if a character string is stored in a one dimensional or a two dimensional field array of C
111. dditive coordinate shift G268 for the given axis Index2 268 2 1 8 Active value of the additive coordinate shift G268 for the given axis Index2 131 3 Tangential Supplies the offset angle in degrees Index2 131 4 tool guidance Supplies the adaptation angle in degrees Index2 328 G328 Last programmed precision barrier of G328 328 1 Last programmed precision barrier of G328 328 2 Last programmed distance from corners of G328 Currently not available 1070 073 740 111 02 11 GB 4 38 System Functions BOSCH Group Index1 Index2 Concerns the function Explanation Axis coupling m logical axis number of the master on the current channel s logical axis number of the slave on the current channel 581 0 1 8 m logical axis number m If the axis m is a master axis 0 if there is no master axis 581 1 8 S 0 Number of the master axis to which axis s is a slave 0 if s is not a slave axis 581 1 8 s 1 Programmed slave axis shift in programming units 0 if s is not a slave axis 581 1 8 s 2 Programmed coupling factor 0 if s is not a slave axis 581 1 8 s 3 Programmed master axis shift in programming units 0 if s is not a slave axis Currently not available 1070 073 740 111 02 11 GB BOSCH 4 10 Variable axis address 1070 073 740 111 02 11 GB AXP System Functions 4 39 This function permits the plane independent programming of part and m
112. e ea 8 5 8 6 Filling in closed contour surfaces 002 00ee eee aes 8 6 8 7 Clear commands 0 cece cee etter eee eens 8 6 8 8 Text output in the graphics grid 0 ce eee eee eee 8 7 8 9 Influencing the entire CPL dialog window 8 8 8 10 Display bitmap files 0 00 cece eee eee ee 8 8 1070 073 740 111 02 11 GB BOSCH 1070 073 740 111 02 11 GB Communication ies sccescveceseiewtewe nee nee ANNEX tissu recniddepeeteciwneteiodwiredececend Abbreviations jicsike cain cade obi pinnte iaie eves ene da de ead Overview of commands 0 cece eee eee eens Differences regarding the CPL commands Typ3 osa lt gt CC200 CC220 CC300 CC320 CPL commands and SD functions which are no longer applicable INANE T03 OBA i rriren ect sole ieee see eee a Re ae CPL commands and SD functions which have been changed inthe Typ3 08a era trao eee Other CPL changes in the Typ3 osa 2 00ee eee MACODA parameters list of changes 00 ASCII character set occ cies ee cad nena dae nae ed Additional keycodes 00 cece eens Index Contents Vil 9 1 A 1 AS A 2 A 10 A 10 A 12 A 13 A 14 A 16 A 16 A 17 yIII Contents BOSCH 1070 073 740 111 02 11 GB BOSCH Safety Instructions 1 1 1 Safety Instructions 1 1 Intended use 1070 073 740 111 02 11 GB Please read this manual before using the CPL programming la
113. e field variable has a length of 5 The remaining 95 characters are not as signed and are therefore not part of the length The content of the xyzs field variable after block 4 is ABCDET The field variable now has a length of 6 The remaining 94 characters are not assigned and are therefore not part of the length Example Overwriting a character field 1 DIM XYZS 100 3 MIDS XYZ 1 10 1234567890 4 MIDS XYZ 3 3 T The content of the xyz field variable after block 3 is 1234567890 The field variable has a length of 10 The content of the xyZ field variable after block 4 is 12T4567890 The field variable has a length of 10 The character 3 is overwritten by T The characters 4 and 5 are retained Example Prohibited access to the character field 1 DIM XYZS 100 3 MIDS XYZS 1 6 ABCDEF 5 MIDS XYZ 9 5 TESTE The XYZ field variable after block 3 contains ABCDEF The field variable has a length of 6 After block 5 an attempt is made to assign a constant to the 9t to 13 com ponents of the character field This however results in the error message CHARACTER AREA NOT USED because the 7t and 8t components are not assigned If the whole character field is to be accessed entering the variable name will suffice 1070 073 740 111 02 11 GB BOSCH Processing Character Strings 5 11 5 8 1 Assigning a STRING expression to a character field 107
114. e from 0 to 65535 can be transferred during the function call to the customer server for the selection of certain data The function is intended for customer s own developments in the area NC core Assignment of axis to channel Integer Array MCODS 43 1 lt version gt lt buffer gt lt size gt E Supplies the following information in lt buffer gt for each physical axis in the system gt 0 Channel number of the axis gt axis is synchronous 1 Axis is asynchronous 2 Axis is a spindle 3 Axis is not defined Number of channels Integer Array MCODS 44 1 lt version gt lt buffer gt 3 R Supplies in lt buffer gt in ascending order e the number of usable user channels e the number of channels at the interface e the number of all internal and external channels Number of axes Integer Array MCODS 45 1 lt version gt lt buffer gt 3 R Supplies in lt buffer gt in ascending order e the number of the drives existing in the system e the number of existing axes e the number of existing spindles 1 Data which the control unit provides cyclically are identified with Z Data available after each switching of blocks are identified with S Data which appear in irregular periods after a change are identified with an E Data which appear immediately when called for are identified with an mye Data which never change they onl
115. e returned In all other cases it will not be examined whether the program can be executed The function supplies 0 no error occurred A correspon ding run time error will be generated only during the proceeding link Examples ERR_VAR MCOPS 4 1 sect cne N50 N100 1 Program selection of sect cnc on channel 1 incl block search and link ERR_VAR MCOPS 4 1 usr user pl cnc Program selection of p1 cnc on channel 1 without block search and link ERR_VAR MCOPS 4 1 F1000G1X500 32 Selects on channel 1 the block F1000G1X500 under manual data input 4 74 System Functions BOSCH Effect Syntax description Exit program MCOPS 5 lt channel gt lt deselection type gt Exits a selected program or a selected MDI block in programmed lt channe1 gt e lt deselection type gt integer expression It sets the behavior of the functions The following list includes all defined behavior patterns Each pattern is preceded by a code number In order to set a certain pattern the corresponding code number must be transferred to lt deselection type gt If several patterns are to be combined the total of all corresponding code numbers must be transferred to lt deselection type gt Up to now the list includes only one element Code number 2 If the automatic program re selection is active then it can be suppressed in lt deselection type gt with the value 2 Example ERR_VAR MCOPS
116. e specification of the filename including the complete pre fixed path is permitted lt length gt Reserved length when creating the file in bytes A minimum length of 130 bytes is necessary since writing in a file causes at least 1 record 130 characters to be created and stored The following error message appears if this is not observed ILLEGAL FILE SIZE lt PGM remark gt Only one STRING expression is permitted for the pro gramming of the program remark parameter lt record length gt Number of bytes in a record range of values 1 1024 If the range of values is not adhered to the following error mes sage appears INVALID COMPONENT LENGTH 6 4 File Handling BOSCH Examples 50 OPENW 1 P500 1024 This is my best progam 40 A P500 B1 This is my best program 50 OPENW 9 AS 1024 B1 50 OPENW 7 PData_Meas DAT 1024 Store measurement data When the file is opened for writing a check is made to ensure that the random structure has been maintained If the structure has been damaged by the editor the following message ap pears INVALID COMPONENT LENGTH Example 10 OPENW 2 P200 1024 10 20 FOR I 1 TO 3 30 PRN 2 TEST 40 NEXT I 50 CLOSE 2 Result P2 TEST lt LF gt TEST lt LF gt TEST lt LF gt lt ETX gt lt LF gt When the file is opened for reading a check is made to ensure that the ran dom structure has been maintained All compon
117. e speeds or cutting velocities of all spindles in the system If G196 is active the cutting velocities are supplied in m min otherwise the current commanded spindle speeds in rpm The potentiometer the speed limits G192 G292 and the limits by the gear are included in the calculation If a spindle is not present 0 0 is returned at the relevant location in lt buffers Status InPos Integer MCODS 6 1 lt version gt lt buffer gt lt size gt Array Z Supplies in lt buffer gt in ascending channel independent order the value 0 or 1 as InPos signal for every feed and auxiliary axis Axis is in position 1 Axis is not in position 0 An axis is in position if it is in the parameterized InPos window MACODA parameter 1015 00100 and no travel command see also MCODS 47 is present Value of the feed potentiometer Real MCODS 7 lt channel gt lt version gt lt buffer gt 1 Z Supplies in lt buffer gt the current value of the feed potentiometer of lt channel gt in 1 100 percent Values of the spindle Real Array MCODS 8 1 lt version gt lt buffer gt lt size gt potentiometers Z Supplies in lt buffer gt in ascending order for all spindles in the system S and S1 S2 S3 etc the current values of the feed potentiometers in 1 100 percent Active length compensation Integer MCODS 9 lt channel gt lt version gt lt buffer gt 1 number S Supplies in lt buffer gt the length compensation number active in lt channel gt
118. e variable type integer real double character needed for lt buffer gt If not a simple variable but a field variable is needed the variable type is followed by array 1070 073 740 111 02 11 GB 4 58 System Functions BOSCH Function supplies lt buffer gt is Syntax refresh of type 2 description Number of feed axes auxiliary Integer MCODS 34 1 lt version gt lt buffer gt lt size gt axes spindles Array movement types drive types R Reserved Use MCODS 45 instead Actual axis position Real Array MCODS 35 1 lt version gt lt buffer gt lt size gt Z Supplies in lt buffer gt in ascending channel independent order the actual positions of all feed and auxiliary axes transmitted to the CNC from the drives by SERCOS ID no in the case of linear axes in mm in the case of rotary axes in degrees Set actual value e g G92 is not included in the calculation of the values Actual spindle speed Real Array MCODS 36 1 lt version gt lt buffer gt lt size gt Z Supplies in lt buffer gt in ascending order S and S1 S2 S3 etc the actual spindle speeds of all spindles in the system Included in the calculation are the potentiometer the speed limits G192 G292 and the limits by the gear If a spindle is not present 0 0 is returned at the relevant location in lt buffers Axis program value Double MCODS 37 1 lt version gt lt buffer
119. ea suring programs AXP lt axis number gt lt positional data gt lt axis type gt To use this function the instruction must be included in an NC block en closed in square brackets It will be programmed in lieu of the address values lt axis number gt lt positional data gt lt axis type gt Example Sub program 10 A S P1 B S P2 o 20 C P3 D P4 RA P5 logical or physical axis index Variable or value of positional data Determines whether lt axis number gt is inter preted as a physical or as a logical axis index 0 lt axis numbers is the physical axis index 1 lt axis numbers is the logical axis index of that channel in which the program is currently being executed If lt axis type gt is not programmed it will be occu pied with 1 default value Transferring axis no s from P1 and P2 to A and B Transferring command values 30 E 0 for G2 Constant for pole at G20 N40 G20 AXP A E AXP B E Plane switchover with G20 pole at 0 0 N50 G2 AXP A C AXP B D R RA F1000 Radius programming with G2 Planes are defined by A and B Subsequent plane switchover via G20 The axes conclude by traversing at F1000 in an arc that is defined by the variables C and D end point and RA radius 4 40 System Functions BOSCH 4 11 PLC interface IC The digital interface between CNC and PLC can be accessed by means of this function It can be
120. ed centered 7 10 Dialog Programming BOSCH Notes 1070 073 740 111 02 11 GB BOSCH 8 8 1 Graphic Programming 8 1 Graphic Programming Color selection 1070 073 740 111 02 11 GB Graphic programming allows the representation of text and drawings on the screen The following functions are available for this purpose Selection of color Selection of line type Selection of the graphics area Drawing of lines and circles Filling of closed contour surfaces Selective deletion of screen areas Text display in graphics grid Representation of bitmap files In CPL 2 fixed and 1 freely definable color tables are available Each color table contains 8 colors and each color is assigned a color code 0 to 7 integer Table 3 is assigned as Table 2 as a default setting for the time being The colors in Table 3 can be changed by RGB command Here the indi vidual color codes can also be assigned mixed colors Table 1 fix Table 2 fix Table 3 0 black 0 white 0 white 1 red 1 red 1 red 2 green 2 green 2 green 3 yellow 3 yellow 3 yellow 4 blue 4 blue 4 blue 5 purple 5 purple 5 purple 6 light blue 6 light blue 6 light blue 7 white 7 black 7 black color code When the program is started the first table is always automatically activated The colors for screen objects are preset as follows Color of Lines circles 1 Text 2 Text background 0 Softkeys 3 Softke
121. ed in the form of ASCII characters This enables both the usual access with the editor as well as the reading in and out of random files The advantage of the random file is that the required data can be accessed more quickly Furthermore the data of a record can be processed and or amended without changing the structure of the rest of the file Records which are not completely filled with data are filled up with blanks up to the defined length If an attempt is made to insert a STRING variable into a random file whose length is greater than the record length the record will be filled up to the de fined length with the first characters of the STRING variable and the remain ing characters are discarded When reading the file the file end is recognized by the EOF character The REWRITE and CLOSE instructions are used as with sequential files Sequential access to a random file is also possible 1070 073 740 111 02 11 GB BOSCH 6 2 Opening a file 1070 073 740 111 02 11 GB File Handling 6 3 In order to be able to access a file by means of file management commands in a CPL program this file must first be opened for the CPL program This is accomplished with the following commands OPENW OPENR The command used to open a file is dependent on the desired type of ac cess write access OPENW e read access OPENR If the file to be opened does not yet exist it is created during opening and the predetermined memory a
122. eed by an applica tion e g feed adapt function In case of feed programming in mm rev G95 it supplies the path feed in mm min 1 Data which the control unit provides cyclically are identified with Z Data available after each switching of blocks are identified with S Data which appear in irregular periods after a change are identified with an E Data which appear immediately when called for are identified with an Data which never change they only need to be called for once are identified with R 2 1070 073 740 111 02 11 GB Gives the variable type integer real double character needed for lt buffer gt If not a simple variable but a field variable is needed the variable type is followed by array yp 4 52 System Functions BOSCH Function supplies lt buffer gt is Syntax refresh of type _ description Lag Real Array MCODS 4 1 lt version gt lt buffer gt lt size gt Z Supplies in lt buffer gt in ascending order the lag of all physical axes in the case of linear axes in mm in the case of rotary axes in degrees If the transfer of the lag is not supported by the drives by SERCOS ID no the value 0 0 is returned Commanded spindle speed Real Array MCODS 5 1 lt version gt lt buffer gt lt size gt cutting velocity Z Supplies in lt buffer gt in ascending order S or S1 S2 S3 etc the commanded spindl
123. efinable CPL expressions 6 6 File Handling BOSCH If the result of an expression is to be output giving a format at least one of the expressions must be of the STRING type The format can be specified by using and in this format string The results are entered at the place of the format instruction specified with The first format instruction con tained in a STRING expression refers to the first subsequent expression which may be output with a format entry Boolean expressions cannot be for matted The number of all programmed format entries must be less than or equal to the number of expressions to be output If this condition is not ful filled the surplus symbols are displayed An expression is output in stan dard format if a format entry is not made If the output of an expression exceeds 1024 characters the following error message appears BLOCK EXCEEDS 1024 BYTES If the result cannot be output in the specified format the warning PRN FOR MAT INCORRECT is returned and asterisk characters are output instead of the faulty format If characters are to be created in the file itself no formattable expression may follow after the string within the PRN instruction The output of the character can also be performed with CHR 35 A line feed can be initiated during output with CHR 13 i e the further out put of the PRN command is continued in the next line i e in the next re co
124. el gt the operation modes of all axes on the specified channel and behind it those of the asynchronous axes will be supplied in ascending order in lt buffer gt Possible return values for the operation values 0 No operation mode and therefore no process is active 1 Jog mode Axes can be jogged 2 Traverse to reference point Axes can be started with the signals manual manual 3 Reserved 4 Manual data input Individual NC blocks can be specified for ma chining 5 Automatic Part programs are completely executed 6 Automatic program block Individual blocks of a part program are executed one after the other Each individual block is pre pared and started with cycle start 7 Automatic single step From an individual NC block in the part program the NC may generate and prepare several blocks In this operation mode cycle start always passes an individual block on to the interpolator for machining Reserved Reserved 0 Automatic single block With cycle start all blocks generated and prepared on the basis of a single NC block in the part pro gram are forwarded to the interpolator for machining 11 Return to path Axes can be removed manually from the contour and automatically or manually returned to it S 9 Status Feed inhibit Integer Array MCODS 49 lt channel gt lt version gt lt buffer gt lt size gt E If you specify the value 1 for lt channe
125. elds of the integer type and fields of the string type Data which are to be assigned to a field must be of the appropriate data type Make sure that variables used in instructions are of the same type as the field please refer to table below The table shows how the data are always stored in the 49 individual fields of a data set within the tool database This information is independent of the configuration of the tool database and cannot be influenced by the projector of a tool management system Field number Designation Data type Remark 1 Sector Integer No access 2 Place Integer No access 3 query_int1 Integer 4 query_int2 Integer 5 query_int3 Integer 6 query_int4 Integer 7 query_bitfield Integer 8 query_string String max 31 characters 9 48 data_int Integer 49 data_string String max 31 characters CAUTION Misinterpretation of field data possible During the configuration of the tool database it is defined how the data in the individual fields are to be identified by the control unit with respect to type string integer real digits before digits after decimal point etc and purpose tool name tool identification radius length etc Make sure that field data are correctly interpreted and if applicable converted in accordance with the current configuration of the data base Please refer to the following example 1070 073 740
126. ens Active system data 00 ccc eenees Variable axis AddreSS 6 2k tees PLC interface lt 2 sete dx Brera dete etalieut eutrlgnratdianeetaliniue unaiele ahareldinieai Time recording 06 cee eee teens Errors and Error Categories 0 cece cece V ok ODDNMAOANDAAKRAW yi Contents BOSCH 4 14 NCS COUPING reiris t areia asni aiai ob A ane ede eee 4 46 4 14 1 Possible error return values of the functions 4 46 4 14 2 Available functions 2 0 00 cece eee 4 48 4 14 3 Programming examples 0 eee eee eee eens 4 76 5 Processing Character Strings 5 1 5 1 Dimensioning character fields 202 0ce eee eee 5 1 5 2 Reading characters from a definable point into a character string 5 2 5 3 Modifying character stringS 0 cece eee eee eee 5 3 5 4 Character string length 000 cece eee eee eee eee 5 4 5 5 Searching for a character string a sssusa eeruan 5 4 5 6 Strings and numbers 00 cece ee eee teens 5 5 5 7 Removing leading and trailing spaces 00 5 8 5 8 Programming examples eee eee eee ees 5 9 5 8 1 Assigning a STRING expression to a character field 5 11 5 8 2 Comparisons of STRING expressions 00005 5 12 5 8 3 Chaining STRING expressions 00ee eee eeeeee 5 13 6 File Handling x chciseeshisk aw edad dead a ae ee we en 6 1 6 1 Filena
127. ents must have the identical length specified in the OPENR command Example 1 OPENW 2 P200 130 TEST 10 2 PRN 2 ABC 3 CLOSE 2 4 OPENR 1 P2 5 5 CLOSE 1 The program verifies whether the record length of file P2 is 5 However the record length of this file is 10 Example P1 N10 G1F10000X1000Y 1000Z1000 1 AS 01234567890123456789 2 BS TEST N20 X0 M30 Y OPENW 1 PMeas_ PRG 500 RANDOM FILE 10 OPENR 2 P1 DIM A 30 FOR I 1 TO 5 INP 2 A PRN 1 A NEXT CLOSE 2 CLOSE 1 vo NANNA wWNEe RESULT PMeas_PRG N10 G1F100 lt LF gt 1 A 0123 lt LF gt 2 BS TEST lt LF gt N20 xo lt LF gt M30 lt LF gt lt ETX gt lt LF gt lt LF gt If the structure was damaged by the editor the following message appears INVALID COMPONENT LENGTH 1070 073 740 111 02 11 GB BOSCH 6 3 Inscribing a file 1070 073 740 111 02 11 GB File Handling 6 5 LJUST NJUST With LJUST Left JUSTify a change over to left justified data output is carried out It is effective up to the end of the program run for all data outputs NJUST No JUSTify makes it possible to return prematurely to the for matted output A maximum of 7 places 4 pre decimal and three post decimal places are available for the REAL data type and a maximum of 9 places are available for the INTEGER data type when data is output to files Leading and trailing ze ros are sup
128. er for lt channel gt the travel command signals of all axes on the specified channel and behind it those of the asynchronous axes will be supplied in ascending order in lt buffer gt Travel command is present 1 Travel command is not present 0 A travel command is always set as soon as an axis is to execute a traversing movement by manual input or by input in the part program 2 1 Data which the control unit provides cyclically are identified with Z Data available after each switching of blocks are identified with S Data which appear in irregular periods after a change are identified with an E Data which appear immediately when called for are identified with an Data which never change they only need to be called for once are identified with R Gives the variable type integer real double character needed for lt buffer gt If not a simple variable but a field variable is needed the variable type is followed by array a 1070 073 740 111 02 11 GB BOSCH System Functions 4 61 Function supplies lt buffer gt is Syntax refresh of type 2 description Axis mode Integer Array MCODS 48 lt channel gt lt version gt lt buffer gt lt size gt E If you specify the value 1 for lt channel gt the operation modes of all physical axes will be supplied in ascending order in lt buffer gt If you specify an actually existing channel number for lt chann
129. erations can be effected by means of logical variables and decimal logical operations with the use of INTEGER variables As depicted in the diagram below logical operations can be represented with the usual operating symbols i e the and the symbol not in CPL however Here too the governing rule is that of priority of multiplication and division over addition and subtraction As a consequence the AND operation takes priority over the OR operation Bracket nesting up to a depth of seven is possible NOT AND OR XOR CPL provides four types of logical operation e the NOT function NOT the AND function AND the OR function OR e the EXCLUSIVE OR function XOR E1 E1 E1 b A amp La gt 1rKa A E2 E2 E2 NOT operation AND operation OR operation XOR operation E1 E2 A El E2 A E1 E2 E1 E2 A OR XOR Logical operations can be utilized for bit masking Example Is bit 0 set in 20 20 IF 20 AND 1 lt gt 0 THEN GOTO SET 30 ELSE GOTO UNSET ENDIF 1070 073 740 111 02 11 GB BOSCH CPL Basic Elements 2 19 2 5 3 Conversion between numeric systems BCD Converts binary value into BCD format lt BCD value gt BCD lt binary value gt Example 1 BCD_VALUE BCD 49 BCD VALUE has the value 73 BIN Converts BCD coded numbers into binary value lt binary value gt BIN lt BCD value gt Example
130. erts the numerical expression lt value gt to a string which can only be as signed to a character field Assignment to a STRING variable leads to a run time error lt value gt may be an INTEGER or REAL expression of single and double pre cision If lt format string gt is programmed the string can be output formatted The symbol indicates digits and indicates decimal points If lt format string gt is not programmed outputs are in standard format Standard formats INTEGER number 9 digits Single precision REAL number 4 digits before and 3 after the decimal point Double precision REAL number 9 digits before and 6 after the decimal point Example 10 DIM AS 50 20 DIM BS 21 30 AS STRS number 37 3 40 BS STR 2 5 Content of character field A number 12 333 Content of character field B 2 500 1070 073 740 111 02 11 GB BOSCH 1070 073 740 111 02 11 GB Processing Character Strings 5 7 VAL VAL lt STRING expression gt Returns the numerical value for a lt STRING expression gt If the string con tains a character other than a leading space the leading or sign the numbers 0 to 9 or the decimal point the conversion will be performed up to this other character Leading spaces and leading zeros are ignored for pur poses of value formation If none of the characters above appear then NUL is returned If the
131. es Beginning with the software version V5 1 x the MACODA parameters have received other numbers This list shows the change from old to new MACODA numbers old MACODA no new MACODA no up to and inclu V5 1 x and up ding V4 x x 1001 0000 1 1003 0000 1 1001 0000 2 1003 0000 2 1001 0000 3 1001 0000 1 1001 0000 4 1003 0000 4 1001 0000 5 1003 0000 5 1001 0000 6 1050 0000 1 1001 0000 7 7010 0003 0 1001 0000 8 obs 1001 0000 9 1003 0000 9 1001 0001 0 1003 0001 0 1001 0001 1 1003 0001 1 1001 0001 2 1003 0001 2 1001 0002 0 1003 0002 0 1001 0005 0 1003 0005 0 1001 0005 1 obs 1001 0005 5 1003 0005 5 1001 0005 6 1003 0005 6 1001 0005 7 1003 0005 7 1001 0006 0 1003 0006 0 1001 0006 1 1003 0000 8 1001 00100 1003 0010 0 1001 0100 1 obs 1001 0100 2 6020 0001 1 1001 0100 3 6020 0001 2 1010 0000 3 1010 0001 1 1010 0000 4 1010 0001 2 1010 0000 6 1010 0000 1 1010 0000 9 1010 0000 2 1015 0000 1 1015 0000 2 1015 0000 6 1015 00100 1015 0000 7 1015 0000 1 1030 0000 4 7030 0001 0 1030 0000 5 7030 0031 0 1030 0000 8 7030 0021 0 1030 0000 9 7030 0022 0 1030 0001 0 7030 0011 0 1030 0010 1 7040 0011 0 1030 0030 1 7050 00110 1030 0030 2 7050 0012 0 1030 0030 3 7050 0013 0 1030 0020 1 7020 0001 0 1030 0020 2 7010 0011 0 1040 0001 1 1050 0000 3 1040 0001 2 1050 0000 4 1070 073 740 111 02 11 GB BOSCH 1070 073 740 111 02 11 GB old MACODA no up to and inclu new MACODA no V5 1 x and up
132. es are possible e f no client has reported that it is able to process the MMC command then the corresponding return value 1 is assigned and the processing of the part program continues e lf a suitable client for processing the data of the MMC command is avail able then an assignment between the part program and the client oc curs After the client has sent a reply the corresponding return value is set and the execution of the part program continues The MMC command can have a maximum of 20 CPL variables as parame ters The name and the values of these variables are transmitted to the client The instruction has the following structure MMC lt CPL varl gt lt CPL var2 gt lt CPL varN gt lt CPL var1 gt lt CPL varN gt CPL variables N max 20 The client can write new values on the CPL variables stated in the MMC command The CPL variables stated in the MMC command can be used in the part program The MMC command supplies the following return values as a result 0 o k 1 no client available 2 error in the client Example 10 DIM PROGNAMES 50 20 PROGNAMES WinProg 30 INTPAR 1 40 REALPAR 1 1 50 I MMC PROGNAMES INTPAR REALPAR The CPL variables PROGNAMES INTPARS and REALPAR with their values are made available to the cli ent 60 IF I 0 THEN The block preparation 70 IF INTPAR 2 THEN of the part program BO 8 ainis is not continued in 90 ELSE line 60 u
133. escription Default assignment of axis to Integer MCODS 58 1 lt version gt lt buffer gt lt size gt channel R Supplies in lt buffer gt the following default assignment for each physical axes in the system gt 0 channel number of the axis gt axis is synchronous 1 Axis is asynchronous 2 Axis is a spindle 3 Axis is not defined In the case of 16 axes the lt buffer gt must have lt size gt 16 integer Active logical axis names Character MCODS 59 lt channel gt lt version gt lt buffer gt lt size gt Array E If the value 1 is entered for the lt channel gt then the names of all active logical axes will appear in lt buffer gt separated by the character 0 zero byte in increasing order at 9 bytes each If an already existing channel number is entered for lt channel gt then all the names of all axes on the given channel will appear in lt buffer gt separated by the character 0 zero byte in increasing order Names which are shorter than 8 characters will be completed with blanks up until the 8 character The size of the lt buffer gt appears in lt size gt It can be a maximum of 144 bytes with 16 axes 9 16 Example see chapter 4 14 3 page 4 76 Logical Axis Names Character MCODS 60 lt channel gt lt version gt lt buffer gt lt size gt Default Setting Array R If the value 1 is entered for the lt channel gt then the names of all logic
134. esult in an uncontrolled restart of the system First check the EMERGENCY STOP circuit then switch the system on DANGER Risk of personal injury and equipment damage Always subject new programmes to initial tests while inhibiting axis movements For this purpose as a function of the AUTOMATIC mode the controller provides the option to block axis movements or auxiliary functions by means of special softkey commands DANGER Incorrect or undesired control unit response Rexroth accepts no liability for damage resulting from the execution of an NC program an individual NC block or the manual movement of axes Furthermore Rexroth accepts no liability for consequential damage which could have been avoided by programming the PLC appropri ately DANGER Retrofits or modifications may adversely affect the safety of the products described The consequences may include severe injury damage to equipment or environmental hazards Possible retrofits or modifications to the system using third party equipment therefore have to be approved by Rexroth DANGEROUS ELECTRICAL VOLTAGE Unless described otherwise maintenance works must be performed on inactive systems The system must be protected against unau thorized or accidental reclosing Measuring or test activities on the live system are reserved to quali fied electrical personnel 1070 073 740 111 02 11 GB 1 6 Safety Instructions BOSCH
135. expression from which the partial string was taken changes then the non dimensioned character variable changes correspondingly If chaining e g MIDS AS B 2 3 occurs within the MID command the result can only be assigned to a character field MID lt STRING expression gt lt start point gt lt number of characters gt lt STRING expression gt String expression from which parts are to be taken lt start point gt Determines the position within the lt STRING ex pression gt character field from which the charac ters are to be taken lt number of characters gt Determines the number of characters taken If lt number of characters gt is not programmed all characters up to the end of the character field length will be taken The range of values for the 2 and 3 4 parameter encompasses INTEGER values from 1 to 1024 If the range of values is not adhered to the fault mes sage INVALID PARAMETER is returned NUL is returned if a character field part which has not yet been assigned is accessed Example DIM A 10 DIM BS 5 AS ABCDEFGHIJ BS MIDS AS 2 5 CS MIDS A 2 5 REM The variables BS and CS both have the content BCDEF NF PWNEH 7 AS QRSTUVWXYZ 8 REM The variable BS has the content BCDEF The variable C has the content RSTUV 1070 073 740 111 02 11 GB BOSCH Processing Character Strings 5 3 5 3 Modifying character strings 1070 073 740 111 02 11 GB MID
136. ext text background softkey text and softkey text background Also switches the color table cos lt function value gt COS lt input value gt 8 6 Application of the cosine function to the lt input value gt CPOS CPOS lt axis selection gt lt selection type gt 4 9 Transfers the last programmed absolute position of a coordinate CPROBE CPROBE lt axis selection gt lt selection type gt 4 10 Reads the measured value for one coordinate at a time CSF Deletion of the current softkey bar 7 3 DATE lt STRING variable gt DATE 4 42 DATE assigns the date in DD MM form to the lt STRING variable gt 1070 073 740 111 02 11 GB A 4 Annex BOSCH Command Syntax Short description see page DIM DIM lt variable name gt lt field sizel gt lt field size2 gt 2 13 5 1 Specifies the field size dimensioning of ARRAY variables with INTEGER constants DLF Moves the CPL dialog window to the screen foreground 8 8 DLG Start of a dialog input range 7 5 DPC DPC lt axis selection gt lt selection type gt 4 27 Supplies for the current channel here channel in which the program with the DPC command is running the parameters last programmed of the compensation of workpiece position G138 of a coordinate shift values and rotation angles DSP DSP lt line gt lt column gt lt expression1 gt lt expressionN gt 7 3 Formatted output of text on the screen positioned by l
137. f NC blocks appears in order NC blocks conform to DIN 66 025 and contain standard information such as preparatory functions axis positioning and auxiliary functions These are programmed with the use of either N block number or by omitting the block number Example N100 Gl X150 Y100 525 or G1 X150 Y100 525 For further details please refer to the DIN programming manual With the use of CPL it is also possible to write the word contents within a particular NC block with the exception of N addresses in a syntax that in cludes variables This makes it possible to effect parameterization of proc essing operations Itis instructive to note however that this practice must not be employed in order to exert during runtime an influence on the pro gram flow that could not have been already considered during the linking process The following example shows the application of variables in a sub program with the three parameters named P1 P2 and P3 Example 5 XVALUE P1 FEED P2 COMPTAB P3 M3 3 N10 G1 X XVALUE F FEED 2 1000 MI M3 N20 G22 K COMPTAB M30 The parameter values are transferred in the sub program call of the main program The square brackets depict the use of variables Block N10 indicates that not only the names of variables but also entire CPL expres sions may be used while enclosed in square brackets None of the addresses invoking a sub program are intended for vari able syntax 2 4 CPL Basi
138. f an INTEGER expression NUL lt variable gt NUL 2 15 Deleting a variable OPENR OPENR lt n gt lt PGM name gt lt record length gt 6 3 Opens a file for subsequent read access OPENW OPENW lt n gt lt PGM name gt lt length gt lt PGM remark gt lt record length gt 6 3 Opens a file for subsequent write access 1070 073 740 111 02 11 GB BOSCH Annex A 7 Command Syntax Short description see page OR lt expressionl gt OR lt expression2 gt 2 18 Binary operation of two BOOLEAN or INTEGER expressions with the OR func tion PDIM PDIM lt parameter name gt lt field size gt 3 3 If a sub program e with a string constant as transfer parameter is to be invoked and e the invoking program is selected without linking the PDIM command must be used PLC PLC lt type gt lt DM number gt lt address gt lt size gt 4 41 Access to PLC data PPOS PPOS lt axis selection gt lt axis type gt 4 15 Requests the axis actual position in the switch point of the measuring probe PRN PRN lt line gt lt column gt lt text gt lt format gt lt text gt 7 7 Display of the dialog text and determination of the input format PRN PRN lt n gt lt expression gt lt expression gt lt expression gt 3 6 5 Write access to a file with the logical number lt n gt PROBE PROBE lt axis selection gt lt axis type gt 4
139. f the content of the variable is at function call 0 the function de fined by lt type gt writes the requested data immediately in lt buffer gt In addition the function returns in lt version gt a version iden tification of the data supplied If this version identification is still contained in the variable the next time the function is in voked the function does not write the requested data imme diately into lt buffer gt but waits until after the next data change In this way for instance a program loop can be run through until a channel has reached a certain state Here you should however include a timeout condition e g counter or expired time period in the loop in order to avoid endless loops lt buffer gt In lt buffer gt the function returns the requested data values Depending on the type of data lt buffer gt must be asimple variable of the integer real or double type afield variable of the integer real or double type astring variable one dimensional character field In the case of field or string variables only the variable name may be given without dimension or index 1070 073 740 111 02 11 GB BOSCH Function overview MCODS 1070 073 740 111 02 11 GB System Functions lt size gt 4 49 Integer expression Defines the field size of lt buffer gt If lt buffer gt is not a field variable but a simple variable of the type integer real or double specify the value 1 f
140. face during actuation of the softkey CPL dialog if a CPL program is already active 7 2 7 2 Dialog Programming BOSCH CPL dialog in the editor After actuating the CPL DIALOG softkey in the editor the NC block currently selected in the editor is checked for a sub program call To do this the control unit searches in the machine parameters 3080 00006 and 3080 00007 for a corresponding link between sub program call G aux iliary function or sub program name and CPL dialog program program name If and when the control unit finds a link the NC block is forwarded to the corre sponding CPL dialog program If no link is present the NC block is forwarded to the CPL dialog program cpldlg05 dlg see Chap 7 1 Now the NC block selected in the editor can be read or even overwritten in the CPL dialog program For this use the CPL commands INP and PRN INP Transfers call parameters from the selected NC block to the CPL dialog pro gram In this way parameter values of the CPL dialog program can be occupied beforehand and displayed without having to input them in the dialog again INP 0 P1 P2 P3 Px Numeric or binary variable s into which the call parameters from the selected NC block are entered A variable type is la belled by adding the corresponding characters to the variable name INTEGER REAL no character BOOLEAN DOUBLE PRN Overwrites the selected NC block with data defined
141. first alphanumeric character bot lt offset gt lt text gt tom left image spot of the character string in lt Text gt The coor dinates must be within the defined graphics range and may be any INTEGER expressions Owing to the fact that in contrast to the other graphics com mands the use of the GPR also allows writing in the softkey area there is a difference of 40 pixels between the Y address ing of the GPR command and that of the other graphics com mands If especially in the case of variable addressing the Y coordi nate is supposed to be uniform this difference has to be taken into account in the form of an addition of 40 pixels lt Y pixel gt and lt offset gt together must not exceed the defined graphics range Any STRING expression constant or variable CPL dialog 632 414 max 632 Softkey range X Example 1 NR 49 REM ASCII character 49 1 2 FOR W 0 STEP 45 TO 360 3 X 754 WS Y 175 100 SIN W 4 NS CHRS NR amp NR NR 1 5 LIN X Y 10 X Y 10 LIN X 10 Y X 10 Y 6 GPR X 16 Y 40 pixel GPR X 64 Y 40 N T NEXT W 8 8 Graphic Programming BOSCH 8 9 Influencing the entire CPL dialog window CLG Clears the entire screen range allowed for CPL and moves the CPL dialog window to the background of the screen DLF Moves the CPL dialog window to the foreground of the screen 8 10 Display bitmap files BMP Displays bitmaps picture files of type
142. g is on the EOF pointer The INVALID COMPONENT error message appears if the range of values is not adhered to or if the specified record does not exist lt O gt Record offset Specifies at which byte within a record positioning should take place Range of values 1 Record length 1 If the record offset is not programmed for random files positioning of the file pointer is at the 1St byte of record lt k gt If the range of values is not adhered to the INVALID PARAMETER error message appears This parameter is only permitted for random files The INVALID PARAMETER error message appears if this parameter is pro grammed although it is a sequential file which has been opened for reading Example SEEK and sequential file 1DIM A 1 LJUST OPENW 1 P271 130 TEST FOR I 1 TO 10 PRNH 1 NEXT CLOSE 1 OPENR 2 P271 FOR I 1 TO FILESIZE 2 2 28 IF NOT EOF 2 THEN SEEK 2 1 INP 2 A ENDIF IF EOF 2 THEN PRN 0 1 BYTE lt EOF gt ELSE PRN 0 1I BYTE lt AS gt ENDIF NEXT I CLOSE 2 M30 Example SEEK and random file 1 OPENW 1 27272 200 TEST 1024 LJUST 2 FOR I 1 TO 10 3 PRN 1 1 Record 4 NEXT 5 SEEK 1 3 4 REM positioned at the 4th byte in the 3rd record 6 PRN 1 OVERWRITE THE 3RD RECORD FROM BYTE 4 WITH THIS TEXT 7 SEEK 1 11 PRN 1 11th record 8 SEEK 1 11 5 PRN 1
143. gle axis is ever measured with On the fly measurement Example Channel 1 as in the example configuration from page 4 5 No axis transformation is active i e logical coordinates correspond to log ical axes N10 G75 X100 Y100 250 20 IF SD 9 1 THEN N30 MSG Measuring probe was not deflected 40 GOTO ERROR 50 ELSE 60 ZMEAS CPROBE 3 The variable ZMEAS is as signed the value of the 70 ENDIF 3rd coordinate of the mea oe sured position WPOS WPOS supplies the current interpolated command position at the time of program interpretation referring to the current workpiece coordinate system WCS for a coordinate Please regard the following conditions e With WPOS it is possible to inquire about coordinates from foreign channels The current workpiece coordinate system is always that of the channel to which the coordinate is currently assigned e For asynchronous axes WPOS always acts like SPOS p 4 18 e In most cases of application the command position should not be deter mined at the time of block preparation but rather at the time of block exe cution In this case WPOS should be programmed in its own block WAIT See Section 4 1 standard functions WAIT Using WPOS without WAIT does not supply clearly predictable val ues as it is not exactly known how far the block execution lags be hind the block processing When accessing axis values of a foreign channel it may be necessary
144. gt lt size gt program coordinate system Array Z Supplies in lt buffer gt in ascending channel independent order the commanded workpiece related positions of the interpolator for all feed axes in the system in the case of linear axes in mm in the case of rotary axes in degrees Set actual value e g G92 and axis zero shift G54 G59 G154 G159 G254 G259 are not included in the calculation of the values Actual axis values Double MCODS 38 1 lt version gt lt buffer gt lt size gt machine coordinate system Array Z Supplies in lt buffer gt in ascending channel independent order actual values referring to the machine coordinates system Cartesian currently used The values are calculated from the axis actual positions by applying the machine specific kinematic forward transformation axis transformation specified for each channel If no kinematic axis transformation is active MCODS 38 will supply identical values like MCODS 35 The prerequisite for the application of MCODS 38 is a corresponding setting of the MACODA parameter 9030 00002 which is being used to configure whether and how frequently actual values of the machine coordinate system are being calculated 1 Data which the control unit provides cyclically are identified with Z Data available after each switching of blocks are identified with S Data which appear in irregular periods after a change are identified wit
145. h an E Data which appear immediately when called for are identified with an I Data which never change they only need to be called for once are identified with R 2 Gives the variable type integer real double character needed for lt buffer gt If not a simple variable but a field variable is needed the variable type is followed by array 1070 073 740 111 02 11 GB BOSCH System Functions 4 59 Function supplies lt buffer gt is Syntax refresh of type 2 description Status Dwell active Integer MCODS 39 lt channel gt lt version gt lt buffer gt 1 E Supplies in lt buffer gt the value 1 if a dwell is active in lt channel gt Otherwise 0 Status Acknowledgement com Integer MCODS 40 lt channel gt lt version gt lt buffer gt 1 pulsory auxiliary function active E Supplies in lt buffer gt the value 1 if an auxiliary function is waiting for acknowledgement in lt channel gt Otherwise 0 Status Load release Integer MCODS 41 lt channel gt lt version gt lt buffer gt 1 E Supplies in lt buffer gt the value 1 if the NC input signal Block transfer inhibit is set in lt channel gt Otherwise 0 Customer specific data MCODS 42 lt channel gt lt version gt lt buffer gt lt size gt lt P1 gt Supplies in lt buffer gt customer specific data from lt channel gt In lt P1 gt an integer value in the rang
146. he available memory capacity In the event that no more memory capacity is available for generating variables the Typ3 osa PNC will return an appropriate fault message 2 The names of definable permanent variables always begin with the character and a character string This character string consists of one capital letter character followed by any combination of capital letter or alphanumeric characters In the case of the definable permanent variables the first 16 characters of the name of the variable are significant If two names of variables ex hibit a difference only with the 17t character and following CPL will inter pret them as one single variable 3 Defined permanent variables may be of the INTEGER REAL DOUBLE BOOLEAN or CHARACTER type The type of the variable is specified by appending an identifier to the end of the name of the variable This specification must be entered into the part program ABCD defined permanent variable of INTEGER type EFGH defined permanent variable of REAL type without or IJKL defined permanent variable of DOUBLE type MNOP defined permanent variable of BOOLEAN type QRSTS defined permanent variable of CHARACTER type 4 One and two dimensional fields may be used The maximum field index is 65535 with field variables of the INTEGER REAL DOUBLE or BOOLEAN type With field variables of the CHAR ACTER type the maximum field index is 1024 2 10 CPL Basic Elements BOSCH
147. he digital interface between NC and PLC and or until a predefined period of time has lapsed WHILE WHILE lt condition gt DO lt routine gt END 2 21 Loop construction with query of abort condition before the first loop execution WPOS WPOS lt axis selection gt lt selection type gt lt channel gt 4 11 Transfers the interpolated command set position referred to the workpiece zero point of the current WCS XOR lt expressionl gt XOR lt expression2 gt 2 18 Binary operation of two BOOLEAN or INTEGER expressions with EXCLUSIVE OR function 1070 073 740 111 02 11 GB A 10 Annex BOSCH A 3 Differences regarding the CPL commands Typ3 osa lt gt CC200 CC220 CC300 CC320 This list includes the presently existing differences regarding the CPL com mand set of the Typ3 osa to the previous controls Typ1 osa CC200 CC220 CC300 CC320 A 3 A CPL commands and SD functions which are no longer applicable in the Typ3 osa The following CPL commands are no longer applicable in the Typ3 osa in comparison to the above mentioned previous controls Command Remark IC Command is not compatible as the interface assignment is different see ICL700 project planning manual Typ3 osa interface has been divided into the following groups channel axis and spindle TD TDR inapplicable as Typ3 uses no KS tables FIX FIXB FIXE Complex graphics can be quickly called up in the Typ3 osa with
148. he function selects the specified program or the specified MDI block an active program or an active manual data input is first exited An MDI block is started immediately We differentiate between 2 cases lt channel gt is not active the block is executed immediately as a nor mal MDI block lt channel gt is already active the block is executed immediately as a machine function For restrictions see code number 1024 Prerequisite for traversing axes in operation mode jog or when movements are to take place in operation mode jog in work piece coordinates Prerequisite for starting axes in operation mode Traverse to refer ence point Machine function Acts in connection with code number 128 An MDI block is executed parallel to the specified lt channe1 gt In the MDI block however only auxiliary functions and asynchronous axis moves are permissible A program which is already active is replaced by the newly selected one As a result all the modal states are retained In the case of manual data input the old character sequence is re placed by the new one Entering buffered NC blocks acts in connection with code number 32 While preceding blocks are being executed others can already be specified Attention If lt selection type gt 2 waiting until the NC condition has changed to READY is specified and the selected program does not exist or is not able to be executed then the error message 6 will b
149. he synchronous axes of a channel are related to each other in an interpolated manner Axes that are not assigned to a specific channel are called asynchro nous axes auxiliary axes By using the functions for axes exchange G510 ff synchronous axes can be switched to asynchronous axes and vice versa In the part program there are always coordinates programmed that are inter polated during program processing The so called axis transformation cal culates the command values for the respective axes from the current coordinate values The advantage of this procedure is that the part programs can be pro grammed independently from the structure of the machine kinematics The prerequisite is however that the respective axis transformation which takes the kinematics of the machine into consideration is available 4 6 System Functions BOSCH Please differentiate e No axis transformation active Logical axes and coordinates are identical i e the 15t logical axis is as signed to the 15t coordinate of the channel etc The coordinates which are directly assigned to a logical axis are also called pseudo coordinates The name of a coordinate then takes on the name of the logical axis to which it is assigned e Axis transformation active There is generally no linear relation between the logical axis and the coor dinates In certain cases a coordinate can influence several axes and several coordinates can affect the same ax
150. he validity of the format is checked during value input It is not possible to enter a value exceeding the valid format length Upon completion of the input via ENTER an automatic jump to the next input instruction is made Example 30 DLG 40 PRN 8 4 MAX CUTTING WIDTH MM WI 50 PRN 10 4 MAX CUTTING DEPTH MM DP 60 INP WI INP DP 70 ENDDLG 80 PRN 0 Q900 WI DP PRN Issues a text or displays the content of a variable in the specified format with text preceding or following e g to explain input and display the unit of mea surement PRN lt line gt lt column gt lt text gt or PRN lt line gt lt column gt lt text gt lt format gt lt text gt lt variable name gt lt line gt Constant in the value range from 1 to 46 cf page 7 4 lt column gt Constant in the value range from 1 to 79 cf page 7 4 lt text gt Any alphanumeric text for format information only lt format gt Defined input format of the variable represents placeholders for digits separates pre from post dec imal places lt variable name gt If the variable has a value assigned the value will be dis played in the defined format If the variable is not yet as signed the specified format will be displayed 7 8 Dialog Programming BOSCH SFK Depicts a softkey bar with 8 softkeys and awaits the actuation of a softkey After actuatio
151. he value 1 if G1 is active 20 B SD 1 4 1 B contains the active G function from index range 4 30 AY SD 2 1 A contains the active position of the feed potentiometer in percent 40 BY SD 5 1 1 Variable B contains the active feedrate speed Supplementary table for querying active G functions of group 1 Index G functions Index G functions 1 25 64 65 2 0 3 5 11 13 73 26 68 69 f 3 70 71 27 Currently not in use 4 90 91 189 190 191 28 145 845 146 5 63 66 29 114 115 6 543 30 160 167 7 93 95 31 Currently not in use 8 40 42 32 Currently not in use 9 6 7 33 10 17 20 34 11 8 9 35 12 Currently not in use 36 13 14 15 37 14 Currently not in use 38 15 78 79 39 16 80 86 40 17 Currently not in use 41 18 53 59 42 19 153 159 43 20 253 259 44 21 60 67 45 22 37 39 46 23 61 62 47 24 48 Programming example SD instruction probe query N4 G75 X120 60 IF SD 9 1 THEN N7 MSG PROBE WAS NOT DEFLECTED 80 GOTO ERROR 90 ELSE 100 XMEAS PPOS 1 110 ENDIF 1070 073 740 111 02 11 GB 2101 ed System Functions 4 37 In the SD probe query example the x axis is traversed in the direction of the specified position If the position is reached and the probe is not deflected a message is returned line N7 and a jump to the ERROR label is executed If the probe is deflected the cu
152. hed during read access Otherwise FALSE is returned Example 9 DIM A 10 10 OPENR 1 P 444 I 0 11 WHILE NOT EOF 1 DO 12 INP 1 AS 13 I I 1 14 END 15 CLOSE 1 CLOSE Closes a file Allin all max 9 files can be open at the same time If when 9 files are open access to a further file is necessary you must first close a file Open files should therefore as a rule be closed immediately upon completion of read or write operations CLOSE lt n gt lt I gt 1 to 9 Logical number of the file to be closed Example 90 DIM As 35 100 XPOS MPOS 1 110 YPOS MPOS 2 120 OPENW 1 P5 500 AXISPOS 130 REWRITE 1 140 PRN 1 X AXIS XPOS YPOS Y AXIS YPOS 150 CLOSE 1 160 OPENR 1 P5 170 INP 1 AS 180 CLOSE 1 In the above example the current positions of the X and Y axis are trans ferred into variables lines 90 to 110 File 1 is then opened and stored as part program P5 line 120 The file is subsequently written or overwritten and then closed lines 140 to 150 The file is then opened for reading and assigned the contents of the As variable It is closed again after read access lines 160 to 180 1070 073 740 111 02 11 GB BOSCH File Handling 6 11 6 7 Reading file pointer position 1070 073 740 111 02 11 GB FILEPOS The FILEPOS function returns the record number of the current record of a random file This record can be accessed
153. here in the CPL dialog program This behavior can be used as a programming aid for sub program calls with numerous transfer parameters PRN 0 lt expression gt lt expression gt lt expression gt lt expression gt Definable alphanumeric characters text in quotation marks format strings or variable s The specified expres sions overwrite the selected NC block 1070 073 740 111 02 11 GB BOSCH Dialog Programming 7 3 7 3 Data input and output 1070 073 740 111 02 11 GB CSF Deletes the currently depicted softkeys DSP Outputs data in a preset format at a specified line and column position on the graphics screen DSP lt line gt lt column gt lt expressioni gt lt expression2 gt lt expressionN gt lt line gt lt column gt Start of output Constants or variables may be of the REAL or INTEGER type If lt ine gt and lt column gt are of the REAL type they are rounded off to become IN TEGERs lt line gt may take on values from 1 to 46 lt column gt values from 1 to 79 An invalid starting position will lead to the Invalid line or column number in CPL command error message lt expression1 gt lt expressionN gt Any CPL expressions If the result of an expression is to be output in formatted form at least one of the expressions has to be a character string Using and in this character string it is possible to specify the format with repre
154. ics softkey in the Diagnostics operating mode The software version of Windows 95 or Windows NT may be displayed as follows 1 Click with right mouse key on the My Computer icon on your desktop 2 Select menu item Properties All trademarks of software installed on Rexroth products upon delivery are the property of the respective manufacturer Upon delivery all installed software is copyright protected The software may only be reproduced with the approval of Rexroth or in accordance with the license agreement of the respective manufacturer MS DOS and Windows are registered trademarks of Microsoft Corpo ration PROFIBUS is a registered trademark of the PROFIBUS Nutzerorganisa tion e V user organization SERCOS interface is a registered trademark of the Interessenge meinschaft SERCOS interface e V SERCOS interface Joint VDW ZVEI Working Committee 1070 073 740 111 02 11 GB BOSCH CPL Basic Elements 2 1 2 CPL Basic Elements 2 1 Program structure 1070 073 740 111 02 11 GB The objective in the development of the Customer Programming Language CPL was to provide the user with extended options for DIN programming CPL makes it possible to write and store any machining operation in the form of sub programs in a variety of formats With regard to its handling procedures and the available selection of its lan guage elements CPL adheres to the BASIC high level language s
155. in this record is lt LF gt The value 1 is returned if you are on the EOF pointer and read ing from the file is not permitted lt mode gt not programmed Supplies the record number of the current record which can be read or written The result is as follows if you are on the EOF pointer number of records 1 With sequential files Range of values 1 lt mode gt 1 or not programmed Supplies the offset to the current byte which can be read or writ ten If the range of values of lt mode gt is not adhered to the following error message appears INVALID PARAMETER 6 12 File Handling BOSCH Example FILEPOS and sequential file 1 OPENW 1 P2 200 TEST 2 FOR I 1 TO 10 3 PRN 1 TEST FOR FILEPOS 4 NEXT 5 CLOSE 1 6 OPENR 1 P2 7 SEEK 1 3 8 POS FILEPOS 1 9 POS1 FILEPOS 1 1 11 SEEK 1 0 REM POSITIONED ON END OF FILE 12 POS2 FILEPOS 1 13 POS3 FILEPOS 1 1 14 CLOSE 1 Result POS 3 gt byte number POS1 3 gt byte number POS2 171 gt byte number POS3 171 gt byte number Example FILEPOS and random file 1 OPENW 1 P2 200 TEST 1024 2 FOR I 1 TO 10 3 PRN 1 TEST FOR FILEPOS 4 NEXT 5 SEEK 1 3 2 6 POS FILEPOS 1 7 POS1 FILEPOS 1 1 8 POS2 FILEPOS 1 2 9 POS3 FILEPOS 1 3 10 PRN 1 OVERWRITING OF 3RD RECORD FROM BYTE 2 WITH THIS TEXT 11 SEEK 1 0 REM POSITIONED ON END
156. indication of such permanent variables can also be aug mented by appending letter characters to the number In addition the permanent one dimensional field variable _R can be used with 100 elements of Double The two permanent variables _RES_ DOUBLE and _RES_DWORD are reserved for internal applica tions and should not be used Definable permanent variables are also identified by a leading character followed by the name of a vari able The distinguishing characteristics of permanent variables are as follows 1 Definable permanent variables are not automatically declared as a com ponent of the system software but manually declared via user entry in the files named wmhperm dat for proprietary data supplied by the ma chine tool manufacturer and anwperm dat for end user specific data The declaration syntax is discussed under File structure of wmhperm dat and anwperm dat below During system start up the control searches for the files first in the root directory then in the user FEPROM and finally in the FEPROM The control system interprets the file identified by the first occurrence of the respective filename using the entries found therein to create defin able permanent variables provided they do not already exist Existing definable permanent variables that are not declared in one of the above named files will be deleted The maximum possible number of definable permanent variables is dic tated by t
157. ine and column number ENDDLG End of a dialog input range 7 5 EOF EOF lt n gt 6 10 Checks for end of file ERASE ERASE lt PGM identifier gt 6 15 Erases files FALSE lt BOOLEAN variable gt FALSE 2 13 Truth value of a BOOLEAN variable FIL FIL lt X value gt lt Y value gt lt fill pattern gt lt fill color gt 8 6 lt contour color gt Filling of closed contour surfaces FILEACCESS FILEACCESS lt file name gt 6 16 Returns the information whether a file exists and which access rights it has FILEDATE FILEDATE lt file name gt lt mode gt 6 17 Determines the date time of a file FILEPOS FILEPOS lt n gt lt mode gt 6 11 lt n gt logical file number lt mode gt mode Returns the record number of the current record and the record offset of a random file Returns in case of sequential files the current byte position of the file pointer FILESIZE FILESIZE lt n gt lt k gt 6 14 lt n gt logical file number lt k gt mode Transmits the size of a file or the limit up to which a file has already been written The file can be a sequential or a random file FOR NEXT FOR lt numerical variable gt lt start value gt STEP lt step size gt 2 20 TO lt end value gt lt routine gt NEXT lt numerical variable gt Loop construction with automatic counter FXC FXC lt axis selection gt lt G address gt lt axis ZS table gt lt units gt 4 19 Access to axis zero shift values 107
158. iners for data Data can be read from files or stored in files during a CPL program For instance measured values can first be stored and later displayed or printed out In the CNC data files are managed in the file system They are stored in a file system of hierarchical structure and accessed by means of directories and pathnames Data files can be managed in different operating modes For read or write access to files the corresponding file must first be opened see OPENW OPENR commands as soon as the access to the data is no longer needed you can close the file again see CLOSE command 6 1 Filenames and file structures 6 1 1 File names Filenames are governed by the following conventions e Maximum length 30 characters No distinction is made between the file name and its possible extension if one is used All alphanumeric charac ters plus the special characters and _ are permitted During the linking procedure the CNC generates a file the name of which consists of the original filename plus 2 added characters Accord ingly filenames of part programs may not be more than 28 characters in length The symbol may be used only for data files that are internally gen 1070 073 740 111 02 11 GB erated Names of files received from external sources via operator in terface or DNC may not contain a character e A distinction is made between upper and lower case letters Examples
159. inso far as sufficient memory is available in the part program memory Since this very quickly takes up a great deal of memory it is advisable to re serve a sufficiently large file length when creating the file with OPENW Example OPENW 1 P2 300 TEST PRN COMMAND AS TEST B FOR C PRN COMMAND PRN 1 A PRN 1 B PRN 1 C PRN 1 A 9 PRN 1 B 10 PRN 1 C 11 CLOSE 1 oo yAn Be UWUNEBEe Result P2 TEST lt LF gt FOR lt LF gt PRN COMMAND lt LF gt TESTFORPRNCOMMAND lt LF gt lt ETX gt lt LF gt Example 10 DIM E 50 20 OPENW 1 P2 300 TEST2 30 A 5000 40 R 1 231 50 B 4 3 60 D ABCDE 70 ES CDEFGHI 80 PRN 1 10 90 PRNH 1 HHHH HEH HHH H HHHHH AS R B DS ES 95 CLOSE 1 P2 10 5000 1 2311 33333ABCDECDEFGHI lt LF gt L J L J L J L J L J T T T T T AS R B D ES If data is already present in the opened file the new data is normally ap pended to the existing data when writing An existing file can however be overwritten by means of REWRITE without especially having to delete the contents that are no longer required When overwriting the range reserved in the OPENW command remains available in the part program memory REWRITE lt n gt lt n gt logical file number range of values 1 9 To overwrite a file it must be open 1070 073 740 111 02 11 GB 6 8 6 4 File Handling Reading a
160. is simultaneously These kinds of coordinates are called working range coordinates The names of the working range coordinates are set in the MACODA param eter 7080 00010 specific to the channel The names for the logical axes and the working range coordinates within a channel must be unique The coordinate index is the successive index in which all the coordinates on the current channel and the working range coordinates defined through active axis transformation as well as any pseudo coordinates that exist are taken into account in the order of their appearance During active axis transformation a channel can be assigned further axes in addition to the logical axis linked to the transformation These are pro grammed as pseudo coordinates see the following figure e g 5 axis trans formation Axis and coordinate names Exam ple active axis transformation pseudo coordinates Programming level 7 Coordinate indicator x y Z phi theta U V Coordinate index 1 2 3 4 5 6 i 8 A A A A A working range coordinates Coordinates configuration Coordinate names MACODA parameter 708000010 Y 7 Individual parameter 1 D 3 Af y Logical axis names x y Z A MACODA parameter 7010 00010 Individ param Log axis index 1 2 4 5 6 7 8
161. is too large In the input of external zero shifts the number of axis ZS groups is too large The specified syntax is unknown Improper index when entering an external tool compensation The number of corrections when entering an external tool compensa tion is too high may be in connection with the correction index Improper format when entering an external tool compensation Improper tool orientation when entering an external tool compensa tion Improper compensation group The axis addressed does not exist When entering an NC block with automatic start a runtime error was detected e g a syntax error When entering buffered NC blocks the buffer overflowed The entry for the coordinate filter is incorrect The magic number of the message is incorrect The NCS communication is disrupted The specified function is not available in this software version An internal error has occurred currently not in use If the invoking program also contains NC blocks the block process ing is generally ahead of the machining If at the time of block process ing by MCOPS or MCODS function a process service or a machine status is requested the conditions possibly necessary for this at the machine are not yet met This problem however applies only to functions which access pre cisely that channel in which they themselves are executed In this case use the WAIT command in the line before the function call This halts the block proce
162. l NC blocks may not exceed 4096 bytes including a final 0 byte e lt Start Block gt and lt End Block gt define the start and end block in the part program for machining Handling as with MCOPS 3 If the system interprets lt string gt as manual data input lt Start Block gt and lt End Block gt are ignored 1070 073 740 111 02 11 GB BOSCH Effect 1070 073 740 111 02 11 GB System Functions 4 73 Syntax description lt selection type gt Integer expression Defines the behavior of the function The subsequent list contains all the defined behavior patterns Each pattern is preceded by a code number If a certain behavior is set this code number must be transferred in lt selection type gt If several behavior patterns are to be combined the sum of all the correspon ding code numbers is to be transferred to the function in lt selection type gt 1 32 64 128 256 512 1024 2048 4096 During selection the system executes a link run If there is no link table one will be generated for the selected main program Link tables are necessary if sub program calls or CPL instructions exist in the programs The system acknowledges the permissibility of a selection only if the NC status changes to READY Normally the selection is acknowledged without waiting for the NC status READY The system interprets lt string gt as manual data input See also code number 128 Before t
163. l gt the signals of the feed inhibit of all physical axes will be supplied in ascending order in lt buffer gt If you specify an actually existing channel number for lt channel gt the feed inhibit of all axes on the specified channel and behind it those of the asynchronous axes will be supplied in ascending order in lt buffer gt 1 Feed inhibit is present 0 Feed inhibit is not present 1 Data which the control unit provides cyclically are identified with Z Data available after each switching of blocks are identified with S Data which appear in irregular periods after a change are identified with an E Data which appear immediately when called for are identified with an Data which never change they only need to be called for once are identified with R 2 1070 073 740 111 02 11 GB Gives the variable type integer real double character needed for lt buffer gt If not a simple variable but a field variable is needed the variable type is followed by array da 4 62 System Functions BOSCH Function supplies refresh Value of the axis potentiometers lt buffer gt is of type 2 Real Array Syntax description MCODS 50 lt channel gt lt version gt lt buffer gt lt size gt E If you specify the value 1 for lt channel gt the values of the axis potentiometers of all physical axes will be supplied in ascending order in lt buffer gt in 0
164. l values e In most cases of application the command position should not be deter mined at the time of the block preparation but rather at the time of block execution In this case WAIT should be programmed in its own block be fore MPOS also see Section 4 1 standard functions WAIT Using MPOS without WAIT does not supply clearly predictable values as it is not exactly known how far the block execution lags behind the block processing When accessing axis values of a foreign channel it may be necessary to meet synchronization measures in order to measure a defined posi tion The instruction has the following structure MPOS lt axis selection gt lt axis type gt lt channel gt Example Channel 2 as in the example configuration from page 4 5 No axis transformation is active i e logical coordinates correspond to log ical axes N10 GO G90 X2 150 Y2 100 20 WAIT 30 X2VALUE MPOS X2 X2VALUE is assigned the currently interpolated axis position of the N40 G91 X2 10 Y2 10 X2 axis 50 WAIT 60 X2VALUE MPOS 1 1 X2VALUE is assigned the currently interpolated axis position of the 1st logical axis on the current channel X2 axis 70 Y2VALUE MPOS Y2 1 2 Y2VALUE is assigned the currently interpolated axis position of the logical Y2 axis on the 22d channel 80 XVALUE MPOS 1 0 XVALUE is assigned the currently interpolated axis position of the 1st physical axis 10
165. layed can also linked with the current content of the CPL dialog window 0 Bitmap is copied over the contents of the CPL dialog win dow 1 White surface with the size of the bitmap is copied over the contents of the CPL dialog window 2 Black surface with the size of the bitmap is copied over the contents of the CPL dialog window 3 Bitmap is copied into the CPL dialog window The pixels of the bitmap source and those of the CPL dialog window target are linked here according to the following formula target source OR target 4 Like 3 but link formula here target source AND target 5 Like 3 but but link formula here target source XOR target 6 Like 3 but link formula here target source AND NOT target 7 Like 3 but link formula here target NOT source 8 Like 3 but link formula here target NOT source AND NOT target Example Source Target Result in copy type 1 8 10 Graphic Programming BOSCH Notes 1070 073 740 111 02 11 GB BOSCH Communication 9 1 9 Communication MMC Sends information from a part program to a client at program run time and waits for a response from this client This is carried out with the aid of CPL variables which can send values from the part program as well as return values to the part program The part program is stopped during run time at the point where the MMC command is received The following processing possibiliti
166. les Each character variable in this field is addressed via an index and may contain exactly 1 character The CPL instructions MID LEN INSTR ASC STR VAL and TRIM are available for string processing 5 1 Dimensioning character fields 1070 073 740 111 02 11 GB DIM In order to make a character field you must index a character variable by DIM instruction In this way character fields with a max capacity of 1024 characters can be made value range of the index 1 to 1024 If the value range is not adhered to the error message INVALID FIELD LIMIT appears Example 1 DIM VWX 14 In this example the character field vwxs consisting of 14 individual charac ter variables is made In vwx strings with up to 14 characters in length can therefore be stored Examples 1 DIM ABC 1 Character field for a string with a max length of 1 character 2 DIM BCDES 10 Character field for a string with a max length of 10 characters 5 2 5 2 Processing Character Strings BOSCH Reading characters from a definable point into a character string MID This function takes parts from a string expression The result can be transferred to a dimensioned or to a non dimensioned character variable e A dimensioned character variable receives the complete partial string defined in the MID command e Anon dimensioned character variable receives only the beginning ad dress and length of the defined partial string If the string
167. llowed by array yp 1070 073 740 111 02 11 GB BOSCH Function supplies refresh Active general tool compensation lt buffer gt is of type 2 Real Array System Functions 4 63 Syntax description MCODS 54 lt channel gt lt version gt lt buffer gt lt size gt S Supplies in lt buffer gt the actual values of general tool compensation in lt channel gt Order Radius compensation L3 length compensation L1 length compensation L2 length compensation Tool orientation Compensation type he following compensation types are defined no compensation drill tool milling tool lathe tool anglehead tool If no general tool compensation is active 0 0 will be returned in each case Fonm OCOHtH o Manufacturer s version Character Array MCODS 55 1 lt version gt lt buffer gt lt size gt lt axis number gt Provides the manufacturer s version of the drive The axis selection occurs in the parameter lt axis number gt by putting in the physical axis No 0 also supplies the 1S axis The manufacturer s version corresponds to the SERCOS ID No S 0 0030 An array with a maximum of 40 characters is delivered by the parameter lt buffer gt Control device type Character Array MCODS 56 1 lt version gt lt buffer gt lt size gt lt axis number gt R Provides the Control device type of the drive The axis selection
168. lt buffer gt the tool radius compensation active in lt channel gt in mm If no tool radius compensation is active 0 0 is returned Name of the active tool Character MCODS 13 lt channel gt lt version gt lt buffer gt lt size gt compensation table Array S Supplies in lt buffer gt the name of the tool compensation table active in lt channel gt lf none is active 3 blanks are returned as the string Name of the active axis zero shift Character MCODS 14 lt channel gt lt version gt lt buffer gt lt size gt table Array S Supplies in lt buffer gt the name of the axis zero shift table active in lt channel gt lf none is active 3 blanks are returned as the string Active axis zero shift values Real Array MCODS 15 lt channel gt lt version gt lt buffer gt lt size gt S Supplies in lt buffer gt the axis zero shift values of the 3 groups G53 G59 G153 G159 and G253 G259 active in lt channe1 gt for all feed axes in mm If no shift is active 0 0 is returned The following order applies e Shift of the 1St axis in group 1 e Shift of the 29 axis in group 1 e Shift of the nth axis in group 1 e Shift of the 15t axis in group 2 e Shift of the nth axis in group 2 e Shift of the nth axis in group 3 Programmed end positions incl Real Array MCODS 16 0 lt version gt lt buffer gt lt size gt shifts S Supplies in lt buffer gt in ascending channel independent order the end positi
169. lt group gt lt table gt lt unit gt Access to tool compensation data 4 23 TDA TDA lt sector no gt lt place no gt lt field no gt lt Tool tab no gt If the internal tool database is configured in the NC read or write access to indi vidual fields can be achieved by TDA 4 25 TFO TFO lt font gt lt size gt lt cut gt lt orientation gt Modifies the font in the CPL dialog 7 9 TIME lt STRING variable gt TIME TIME assigns the time in HH MM SS form to the lt STRING variable gt 4 42 TRIM TRIMS lt character string gt TRIMS lt character string gt L TRIMS lt character string gt R When a character field range is assigned to a STRING variable or character field this command returns a character string without preceding index L or sub sequent index R spaces The TRIM function without index masks out both preceding and concluding spaces 5 8 1070 073 740 111 02 11 GB BOSCH Annex A 9 Command Syntax Short description see page TRUE lt BOOLEAN variable gt TRUE 2 13 Truth value of a BOOLEAN variable VAL VAL lt STRING expression gt 5 7 Returns the numerical value for a lt STRING expression gt WAIT WAIT lt IC condition gt lt duration gt lt Result var gt 4 1 Stops block processing until all blocks programmed ahead of WAIT are pro cessed or until a certain state occurs at t
170. mes default setting see MCODS 60 Assignment of axis to channel see MCODS 43 Default assignment of axis to channel see MCODS 58 ID number from the cyclic axis message see MCODS 62 Units of measurement Unit of measurement of axes default setting see MCODS 61 Unit of measurement of axes see MCODS 53 Type of programming inch metric see MCODS 18 Spindles Movement functions of spindles see MCODS 63 Gear range of spindles see MCODS 64 Group classification of spindles see MCODS 65 Automatic or manual gear selection see MCODS 66 Information as to whether gear switching is active see MCODS 67 Drive Manufacturer s version see MCODS 55 Control device type see MCODS 56 Motor type see MCODS 57 Miscellaneous Messages in part program see MCODS 28 Path and name of the main program see MCODS 80 1070 073 740 111 02 11 GB BOSCH System Functions 4 51 Return to path strategy and recording of the jog see MCODS 46 movements Customer specific data see MCODS 42 Optional stop activated see MCODS 68 Skip block activate see MCODS 69 Automatic program re selection active see MCODS 70 t In the following tables integer constants are given in some cases as parameters in the syntax In lieu of these constants you can also pro gram integer variables bu
171. mes and file structures 0 cece e eee eee 6 1 6 1 1 FIG NAMES sisi cma aoa e eee eee eee eee aes 6 1 6 1 2 Sequential file structure 0 0 cece eee ees 6 2 6 1 3 Random file structure 0 2 eee eee 6 2 6 2 Opening a file 0 00 cece tenes 6 3 6 3 Inseribing a file 2 00 eee eee eee 6 5 6 4 Reading a file 0 0 cece cece ees 6 8 6 5 End of file recognition 0006 cece eee eee eee 6 10 6 6 Closing a file 0 c cece eee eee 6 10 6 7 Reading file pointer position 0200 cece eee eee 6 11 6 8 Setting file pointer 0 0 0 0 cece eee ee 6 13 6 9 Determining file size 2 keene 6 14 6 10 Erasing A Tile oerererirsi rrer Mente tbe Ha een ba eno Bb 6 15 6 11 Determine file access rights 00 cece eee eee eee 6 16 6 12 Determine file date 2 00 cece eee eee eens 6 17 7 Dialog Programming 2 00eeeeeeeeee 7 1 7 4 Calling CPL dialog via softkeys 00 cee eee nn 7 1 7 2 CPL dialog in the editor 0 000 ee eee eee eee 7 2 7 3 Data input and output 2 ee eee 7 3 8 Graphic Programming 002 0eeeeeeee 8 1 8 1 Color selection ccc cece tenet eee 8 1 8 2 IMGT S c ET dae toons ey dbs Ahad PETERE PETT PET 8 3 8 3 Defining the graphics area cece eee eee 8 3 8 4 JON MING ser wade bead Yee eb oe Mae hate Phebe Mba haa dada ad 8 4 8 5 CIOE ara ogi ioie ai ia ote Basen ne Se once ae e
172. meter of MACODA parameter 100100004 of the active chan nel type of axis movement is assigned to the ERG integer variable Example MCA instruction with a new software version V5 1 x and on New MACODA No 10 BLOCKNR 100300004 20 ERG MCA BLOCKNR 0 The contents of the first individual parameter of MACODA parameter 100300004 of the active chan nel type of axis movement is assigned to the ERG integer variable 4 30 System Functions BOSCH NCF Supplies the syntax of the NC function last programmed within the modal group of lt NC function gt The variable in which the result is to be stored has to be of the dimensioned character field type Type conflicts between the value transferred and the destination variable are detected during the program s runtime and acknowledged in the form of an error message The NCF function supplies values for all modal groups of the control unit and therefore supersedes the function SD 1 NCF lt NC function gt lt NC function gt Syntax of any NC function If a nonexistent syntax is programmed a runtime error will appear Example 10 DIM A 4 Dimensioning a character field for a string with a length of max 4 characters 20 AS NCF G1 The A string variable is assigned the syntax of the last programmed NC function of the group containing G1 as syntax N80 A The previously requested NC function is pro grammed again Enables read acce
173. ming cannot fully ex clude the occasional requirement for programming tricks it stands to reason that any programmer would best serve his own interest by annotating such tricks with the appropriate comments Error tolerant fault forgiving programs present a significant challenge be cause experience indicates that the creativity and imagination evidenced by users during the input dialog by far exceeds the capabilities of the most cre ative and imaginative programmers The foregoing observation notwith standing unfailing attempts on the part of the programmer must be directed toward making his program creation as failure proof and error tolerant as possible The number of input errors can also be reduced through the observation of software ergonomics For example menu options can be visually high lighted without great effort In doing so and while making full use of the perti nent capacities inherent in the computer good judgement should be used in order not to use an excessive variety of colors The stipulations of the DIN 66 234 standard provide excellent guidelines in this regard 1070 073 740 111 02 11 GB BOSCH 2 1 1 NC block 1070 073 740 111 02 11 GB CPL Basic Elements 2 3 In accordance with programming guidelines as stipulated in the DIN stan dard a complete CPL instruction is also referred to as a CPL block Because parts programming may utilize a combination of NC blocks and CPL blocks a brief discussion o
174. n be formulated as follows IF a specific condition is fulfilled THEN perform the routine or ELSE per form the other routine Accordingly the instruction is structured as follows IF lt condition gt THEN lt routine gt ELSE lt alternative routine gt ENDIF If the ELSE component is omitted the program provided that the condition is not fulfilled will continue to run immediately after processing the ENDIF instruction Because any possible variant of this command comprises a divi sion of program flow this is also termed a branch Both the THEN and the ELSE routine comprise program branches that do not have to be processed in every case The condition shares its line with the IF and is concluded by the THEN in that line Similar to the abort conditions for loop instructions the condition for the IF instruction may contain arithmetical trigonometrical and logical links Here too nesting is possible Although the IF instruction can also be written with out the ELSE instruction it must always be concluded with an ENDIF in struction because otherwise the end of the routine or that of the alternative routine will not be recognized As the placement of the ENDIF instruction de pends upon the program processing logic the computer sometimes fails to reliably detect and interpret a missing ENDIF instruction The result will be confusing or misleading fault messages It is therefore good practice for the programmer to verify the
175. n error message will be generated AXO AXO supplies the last activated G92 shift for a coordinate at the time of block preparation i e it supplies the last activated shift at the time of program in terpretation The instruction has the following structure AXO lt axis selection gt lt selection type gt AXO only allows access to shift values of its own channel Asynchro nous axes have no G92 shift thus AXO does not apply to asynchro nous axes Example Channel 1 as in the example configuration from page 4 5 No axis transformation is active i e logical coordinates correspond to log ical axes N10 G1 G90 X100 Y200 F1000 N20 G92 X75 Y125 30 XD AXO X XD is assigned the last activated G92 shift of the X coordinate on the cur rent channel XD 100 75 25 40 YD AXO 2 0 YD is assigned the last activated G92 shift of the 2nd physical axis YD 200 125 75 50 X2D AXO 4 0 Run time error since the 4th physical axis is assigned to channel 2 CPOS CPOS supplies the position of the last programmed in absolute units coor dinate in connection with the program coordinate system PCS at the time of block preparation In other words the position last programmed at the time of the program interpretation is supplied Please regard the following condition e f switched over to a workpiece coordinate system between program ming the coordinate and the inquiry of the position then the supplied
176. n of a softkey its number or its text is transferred to a variable The programmed softkey bar is displayed until the next SFK command CLG command or until the end of the program SFK lt variable gt lt text1 gt lt text2 gt lt text3 gt lt text4 gt lt text5 gt lt text6 gt lt text7 gt lt text8 gt lt variable gt If the variable is of the INTEGER type the number of the softkey being depressed will be transferred to it if it is of the STRING type it will receive the softkey s text Pressing the LEVEL RETURN key exits the SFK command and the value of the parameter lt variable gt remains unchanged lt text1 gt lt text8 gt STRING expressions for which 3 lines of text con sisting of 9 characters each are available Within the STRING expressions line breaks within the softkey s text are denoted by a amp sign Example A SOFTKEY1 10 SOFTKEY2 11 KEY 0 12 SFK KEY ABORT ACTION 13 IF KEY 2 THEN GOTO END ENDIF 14 IF KEY 4 THEN GOTO ACTION ENDIF 15 IF KEY 0 THEN GOTO SOFTKEY1 ELSE GOTO SOFTKEY2 ENDIF 30 ACTION 40 END 1070 073 740 111 02 11 GB BOSCH 1070 073 740 111 02 11 GB TFO Dialog Programming 7 9 Modifies the font in the CPL dialog The font of the dialog text displayed in the INP command cannot be modified TFO lt font gt lt size gt lt cut gt lt orientation gt lt font lt size gt
177. n the example configuration from page 4 5 No axis transformation is active i e logical coordinates correspond to log ical axes N70 G75 Y2 250 80 IF SD 9 1 THEN N90 MSG Measuring probe was not deflected 100 GOTO ERROR 110 ELSE 120 Y2MEAS PROBE 2 The measured actual position of the 2nd logical axis 130 ENDIF on the channel here Y2 axis on channel 2 is as signed to the Y2MEAS variable 1070 073 740 111 02 11 GB BOSCH System Functions 4 17 4 2 3 Functions for use with physical axes only The functions SPOS and APOS always supply axis values They can be accessed via the physical axis index or the physical axis names It is possible to access axes on the same channel as well as on for eign channels Transfer parameter for the functions APOS SPOS 1070 073 740 111 02 11 GB lt axis selection gt Index or name of a physical axis Programming an axis that does not exist will cause a run time error APOS APOS supplies the actual axis value of a physical axis that is currently is sued at the time of block preparation of the CPL block in which APOS is pro grammed Please regard the following conditions e The supplied value refers to the machine zero point not identical with the reference point which also refers to the machine zero point e In most cases of application the actual position should not be determined at the time of block preparation but rather at the time of block execu
178. nal local variable will again be available bearing the value that was current at the time the sub program was invoked from within the main program Global variables are identified by a leading number sign gate or hash character that is followed by the name of the variable Once a value has been assigned to a global variable it can be accessed read and or modified from within all pro gram parts for the remainder of the entire program Global variables are again deleted subsequent to end of program EP In the case of global variables the symbol counts as part of the name of the variable For this reason the symbol and the following 7 characters form the significant name of the variable 1070 073 740 111 02 11 GB BOSCH 1070 073 740 111 02 11 GB CPL Basic Elements 2 9 Permanent variables are identified by a leading at symbol character followed by the name of the variable They can be addressed from within any active program The variable will be permanently retained even subsequent to EP Deletion is possible only through direct overwriting As permanent variables are stored in a separate memory range clearing the entire memory will not affect the permanent variables Under the designation 1 through 100 permanent variables of the INTEGER type can be addressed for detailed information on the INTEGER type see Types of variables on page 2 12 To improve program readability the
179. name 23 1 m 1 2 Supplies the physical axis number of a logical axis of the in or voking channel log SD 23 lt 1 m gt String 1 value default value at the moment ical of block processing ra SD 23 lt 1 m gt String 2 value when active e signa 1 m logical axis number tion m max number of logical axes String logical axis name 24 1 m in 1 2 Supplies the physical axis number of a logical axis or logical SD 24 lt 1 m gt String lt 1 n gt 1 value default value at the axis moment of block processing de SD 24 lt 1 m gt String lt 1 n gt 2 value when active signa 1 9 channel number n max number of channels tion 1 m logical axis number m max number of logical axes String logical axis name 25 1 m Supplies the channel of a physical axis a SD 25 lt 1 m gt String value when active cal axis 1 m physical axis number desig m max number of physical axes nation String physical axis name Currently not available Number of a channel If the given channel is inactive it could be that axes on this channel have already been lent out i e they are presently active on another channel Despite this fact the axes which are lent out still belong to the given channel Example Axis X2 belongs to channel 2 inactive and X2 is synchronously being run on channel 1 The axis X2 is still regarded in both SD instructions number of synchronous axes of the channel of SD
180. ne of declaration always exhibits the following structure DEF lt type of variable gt lt name of variable gt lt comment gt Examples of wmhperm dat and anwperm dat DEF DEF DEF DEF DEF DEF DEF DEF INT ABCD simple INTEGER variable REAL EFGH simple REAL variable DOUBLE IJKL Ssimple DOUBLE variable BOOL MNOP Simple BOOLEAN variable CHAR PSTR1 3 CHARACTER variable with a length of 3 INT WZNR 9 1 dimensional INTEGER field with 9 variables INT WZKOR 9 2 2 dimensional REAL field with 18 variables CHAR PSTR2 9 2 2 dimensional CHARACTER field with 9 partial strings of 2 characters each 2 12 CPL Basic Elements BOSCH Types of variables Application examples of perm variables in the program 10 l 1 15 2 COUNTER 2 20 ABCD 3 25 EFGH 4 1 30 IJKL 5 12345 35 MNOP TRUE 40 PSTR1 ABC 45 WZNR 2 6 50 WZKOR 3 2 7 6 55 PSTR2 3 DE INTEGER variable An INTEGER variable occupies 32 bits of memory space It is identified by a percentage character appended to the name of the variable The value range extends from 2 147 483 648 through 2 147 483 647 10 NUMBERS 4 Le INTEGER variable Floating point variable REAL If no special identification is appended to the name of the variable the vari able will be interpreted as a REAL variable of single precision In this case the variable occupies 32 bits of
181. nently preset nu merical values and link instructions for this data The following tables list those keywords that are reserved exclusively for use in instruction words 2 6 CPL Basic Elements BOSCH 2 4 1 Reserved instruction words The key terms listed below must be used in stand alone fashion or delimited by special characters immediately identifying them as instruction words The selection of names for variables must not encompass any reserved in struction words Example GOTO 10 Jump to line 10 GOTO10 Definable symbol name variable on its own it will lead to error message RUNTIME ERROR 2167 MISSING because a value assignment is expected for the GOTO10 variable Key terms A ABS AXP B BCD C CASE CLS D DATE ACOS BIN CALL COF DIM AND BMP CHR COL DLG APOS CIR COM DLF ASC CLG COS DO ASIN CLOCK CPROBE DSP ATAN CLOSE CPOS DPC AXO CLR CSF E ELSE F FALSE FIXB G GETERR I Ic END FIL FIXE GMD IF ENDDLG FILEACCESS FOR GOTO INKEY ENDIF FILEDATE FXC GPR INP ENDCASE FILEPOS FXCR GWD INP EOF FILESIZE FXDEL INSTR ERASE FIX FXINS INT L LABEL M MCA MID N NCF NOT O OF OR LEN M MCODS MMC M NEXT NUL OPENR LIN MCOPS MPOS NJUST OPENW LJUST MIC MWD OTHERWISE PDIM REM SCL SIN TAN THEN r PLC REPEAT M SCS SPOS TC TIME PPOS REWRITE SD SQRT TD TRIM PRN RGB SDR STEP TDA TRUE PRN ROUND SEEK STR TDR TXT PROBE
182. ng that the first character must be a capital letter As CPL uses only the first 8 characters of the name of the variable to distin guish variables these 8 characters are termed significant However in order to enhance program documentation the name of the variable itself may be longer than 8 characters Examples of local global and permanent variables 10 NUMBER1 1 local INTEGER variable 20 NUMBER2 2 global INTEGER variable 30 36 3 permanent INTEGER variable 40 ABCD S 4 defined permanent INTEGER variable Declarations with regard to the effective range of variables are required due to the option of using sub programs and also due to the possible require ment to commit the values of variables to intermediate storage independent of the respective program being executed To this end a distinction is made between the following groups of variables Local variables take effect only within the program for which they have been declared As the referred program reaches the end of program EP the variables are de leted thus releasing the respective memory addresses In the case of a sub program call the name of a variable that is local with respect to the main program will not be visible to the sub program However the same variable can also be declared as a local variable in the sub program without conse quential interference due to the similarity of their respective names Upon return to the main program the origi
183. nguage Store this manual in a place to which all users have access at all times This manual contains information required for the proper use of the control unit For reasons of clarity however it cannot contain all details about all possible combinations of functions Likewise it is impossible to consider every conceivable case of integration programming or operation The Typ3 osa and PNC controls are used to e activate feed drives spindles and auxiliary axes of a machine tool via SERCOS interface for the purpose of guiding a processing tool along a programmed path to process a workpiece CNC Furthermore I O com ponents are required for the integrated PLC which in communication with the actual CNC controls the machine processing cycles holistically and acts as a technical safety monitor e program contours and the processing technology path feedrate spindle speed tool change of a workpiece Any other application is deemed improper use The products described hereunder e have been developed manufactured tested and documented in com pliance with the safety standards These products pose no danger to per sons or property if they are used in accordance with the handling stipulations and safety notes prescribed for their configuration mount ing and proper operation e comply with the requirements of e the EMC Directives 89 336 EEC 93 68 EEC and 93 44 EEC e the Low Voltage Directive 73 23 EEC e the harmonized
184. nput value REAL by cutting of the decimal places rounding to a whole number INTEGER The input value may be a constant or a va riable Example 1 XVALUE INT 10 9 a XVALUE has the value 10 1070 073 740 111 02 11 GB BOSCH 1070 073 740 111 02 11 GB CPL Basic Elements 2 17 ROUND Converts the input value into an INTEGER by rounding it off or up to a whole number INTEGER The input value can be a REAL expression Example 1 XVALUE Round 10 9 XVALUE has the value 11 2 XVALUE Round 5 5 XVALUE has the value 6 3 XVALUE Round 5 49 XVALUE has the value 5 SQRT This command forms the square root of an input value Because this is not defined the input value must not be a negative value Example 11 44 2 XSET 4 SORT 100 I XSET has the value 48 SIN COS TAN ASIN ACOS ATAN In the case of trigonometric functions that process angles in terms of con ventional degrees of arc it is useful to identify the angles as double preci sion REAL variables The following trigonometrical functions can be used SIN Sine function ASIN Antisine function cos Cosine function ACOS Anticosine function TAN Tangent function ATAN Arc tangent function Example 1 ANGLE 30 2 XVALUE SIN ANGLE XVALUE has the value 0 5 3 YVALUE ASIN XVALUE YVALUE has the value 30 2 18 CPL Basic Elements BOSCH 2 5 2 Logical operations Binary logical op
185. ntal specification Program only lt axis selection gt queries all active axis ZS values An axis name can alternately be given instead of a column index This determines the correspond ing column in the table A sign can be put in front of names for an incremental specification If the syntax of an axis name begins with then FXC may not be programmed with axis names 4 20 System Functions BOSCH lt G address gt lt axis ZS table lt units gt Examples 0 TAB usr user NPV1 npv al 9 FXC 2 54 1 80 FXC 1 54 TABS 20 FXC 1 54 TABS 2 FXC Z 54 TABS 2 FXC Z 160 0 40 FXC Z 254 TABS FXC U_CH1 54 TABS 20 FXC Z 255 40 X_SUM FXC X 10 25 4 3 axis ZS table 54 59 G54 G59 154 159 G154 G159 254 259 G254 G259 160 G160 260 G260 360 G360 File name with path 1 V1 database table 2 V2 database table 3 V3 database table external axis ZS 0 axis ZS table external axis ZS axis ZS table 0 mm 2 inch Non programmable G70 active inch G71 active mm Each table has got a table unit This is specified only once when setting up a new table according to the MACODA parameter 9020 00010 During read access the value is converted from the table unit into the programmed lt unit gt If no lt unit gt is programmed the value read determines the table unit During write access the value
186. ntil a cor 100 responding finished 110 ENDIF message has come 120 ENDIF 1070 073 740 111 02 11 GB 9 2 Communication BOSCH Notes 1070 073 740 111 02 11 GB BOSCH A A 1 Annex Abbreviations Abbreviation Description Cc CPL ESD Fx GOM HP LSEC MDI MP MSD MTB NC CNC Ol OM PE PLC SK SP Drive name in this case drive C hard disk drive Customer Programming Language Electro Static Discharge Abbreviation for all terms relating to elec tro static discharge e g ESD protection ESD hazards etc Function key with number x Group Operating Mode Main Program Hauptprogramm Lead Screw Error Compensation Mode Manual Data Input MACODA parameter Machine Status Display Machine Tool Builder Numeric Control Operator Interface Operating Mode Protective Earth Programmable Logic Controller Softkey Sub program 1070 073 740 111 02 11 GB Annex A 1 A 2 Annex BOSCH A 2 Overview of commands Command Syntax Short description see page ABS ABS lt input value gt 2 16 Returns the absolute value of the input value i e negative values become posi tive positive values remain positive ACOS lt function value gt ACOS lt input value gt 2 17 Application of arc cosine anticosine function to the lt nput value gt AND lt expressionl gt AND lt expression2 gt 2 18 Binary operation of two BOOLEAN or INTEGER expre
187. o new logical names can be assigned which must be previously defined in the MACODA parameter 7010 00020 Optional axis designation The logical axis indexes for the respective channel are newly defined after a change has been made to the axis configuration The physical axis index and the physical axis name are fixed and valid within the whole system The logical axis index and the logical axis name are valid related to the channel and can be changed during run time 1070 073 740 111 02 11 GB BOSCH System Functions 4 5 1 Example Configuration and assignment of the axis names to channels physical physical axis name Channel assignment Axis names on the channels axis index MACODA parameter MACODA parameter logical 1003 00001 1003 00002 Channel 1 axis index 1 X 1 X 1 2 Y k 1 ai Y 2 3 Z 1 Z 3 4 X2 2 UCHI 4 5 Y2 2 2 6 Z2 2 _ 7 gt U gt 1 1 _ 8 A 3 fa logical logical axis name logical axis index MACODA parameter Channel2 axis index 7010 00010 1 X2 1 1 _ gt l Y2 2 Bi Z2 3 2 3 ce _ 4 U CH1 7 5 a a 6 eS 7 rn logical 8 gaa Channel 3 axis index gt A 1 Definition of synchronous and asynchronous axes Definition of coordinates for active axis transformation 1070 073 740 111 02 11 GB Axes that are assigned to one channel are called synchronous axes machining axes T
188. occurs in the parameter lt axis number gt by putting in the physical axis No 0 also supplies the 1St axis The Control device type corresponds to the SERCOS ID No S 0 0140 An array with a maximum of 40 characters is delivered by the parameter lt buffer gt Motor type Character Array MCODS 57 1 lt version gt lt buffer gt lt size gt lt axis number gt R Provides the motor type of the drive The axis selection occurs in the parameter lt axis number gt by putting in the physical axis No 0 also supplies the 1S axis The motor type corresponds to the SERCOS SERCOS ID No S 0 0141 An array with a maximum of 40 characters is delivered by the parameter lt buffer gt 1 Data which the control unit provides cyclically are identified with Z Data available after each switching of blocks are identified with S Data which appear in irregular periods after a change are identified with an E Data which appear immediately when called for are identified with an Data which never change they only need to be called for once are identified with R 2 Gives the variable type integer real double character needed for lt buffer gt If not a simple variable but a field variable is needed the variable type is followed by array 1070 073 740 111 02 11 GB yp 4 64 System Functions BOSCH Function supplies lt buffer gt is Syntax refresh of type 2 d
189. ogram from within another part program e A sub program is incapable of invoking itself as a sub program recursive call not possible e Asub program call must always take place within a separate block During a sub program call parameters can be transferred to the respec tive sub programs 3 1 Calling sub programs with G M or P address Sub programs can be called from within a DIN block by means of G P and or M addresses For example the programs for the drilling cycles 99999081 through 99999086 are permanently assigned to the functions G81 through G86 For further details about sub programs please refer to the DIN program ming manual 3 2 Handling modal sub program calls 1070 073 740 111 02 11 GB Subsequent to their initial call modal sub programs will continue to be auto matically executed after each traversing movement prescribed by a DIN block This will continue until they are deselected via a special G function 3 2 Sub programs and Cycles BOSCH 3 3 Sub program call via CALL function CALL To execute sub program calls from within programs that consist exclusively of CPL instructions the CPL proprietary CALL instruction is required The CALL instruction must appear in its own separate CPL block The CALL key word is followed by the program name This in turn may be followed by transfer parameters enclosed in square brackets and to conclude the in struction the DIN identifier to influence the
190. one coordinate Please regard the following conditions e CPROBE only allows access to coordinates of its own channel There fore you cannot inquire about the positions of asynchronous axes e The measurement is activated with the function Probe input G75 e Since all the measured values are axis values based on the axis zero point coordinates of the machine coordinate system MCS a conversion to the coordinate level takes place when reading the values In this pro cess all transformations and shifts last programmed at the time of block preparation are taken into consideration including the lead screw error and cross compensation The supplied value is based on the last activated program coordinate system PCS e Because all axes coordinates can be linked to each other within the transformation chain especially in the case of active axis transforma tions the measuring probe in the MACODA parameter 1003 00012 must be entered as can be activated for all axes of the channel Other wise a run time error will occur when invoking CPROBE e You can test launching the measuring probe on the channel with the func tion SD 9 The instruction has the following structure 1070 073 740 111 02 11 GB BOSCH 1070 073 740 111 02 11 GB System Functions 4 11 CPROBE lt axis selection gt lt selection type gt CPROBE cannot be used together with the function On the fly mea surement G275 since only one sin
191. ons with reference to the workpiece coordinates of the active blocks of all feed and auxiliary axes e inthe case of linear axes in mm e inthe case of rotary axes in degrees All the shift values are calculated Set actual value e g G92 is not included in the calculation of the values 1 Data which the control unit provides cyclically are identified with Z Data available after each switching of blocks are identified with S Data which appear in irregular periods after a change are identified with an E Data which appear immediately when called for are identified with an mye Data which never change they only need to be called for once are identified with R 2 Gives the variable type integer real double character needed for lt buffer gt If not a simple variable but a field variable is needed the variable type is followed by array 1070 073 740 111 02 11 GB 4 54 System Functions BOSCH Function supplies lt buffer gt is Syntax refresh of type 2 description Type of programming inch metric Integer MCODS 18 lt channel gt lt version gt lt buffer gt 1 S Supplies in lt buffer gt the programming type of the axes present on the lt channel gt 0 Inch 1 Metric 2 Degree 3 No axis present Maximum spindle speed Real Array MCODS 19 0 lt version gt lt buffer gt lt size gt S Supplies in lt
192. or lt size gt lt axis number gt Integer expression Provides the axis number of a physi cal axis lt ID number Integer expression Supplies the value of an lt D number gt out of the cyclic axis message for all axes The size of a field variable used must first be defined by DIM command and may not be exceeded in the parameter lt size gt lt P1 gt Optional parameter dependent on lt type gt Positions Commanded position of axis see MCODS 1 Commanded position of axis see MCODS 2 Actual position of axis see MCODS 35 Actual values of axis machine coordinate system see MCODS 38 Lag see MCODS 4 Axis program value program coordinate system see MCODS 37 Programmed end positions incl shifts see MCODS 16 Programmed end positions without shifts see MCODS 23 Speed and spindle speed Path feed see MCODS 3 Programmed path feed see MCODS 24 function active Jog speeds see MCODS 27 Commanded spindle speed cutting velocity see MCODS 5 Actual spindle speed see MCODS 36 Maximum spindle speed see MCODS 19 Minimum spindle speed see MCODS 20 Programmed spindle speeds see MCODS 25 States Status InPos see MCODS 6 Status Test mode see MCODS 29 Status Traverse to reference point see MCODS 26 Status Dwell active
193. ored for purposes of value formation The digits 1 2 3 and 4 are converted to a REAL number The T character aborts the conversion because it cannot belong to a REAL number The remaining characters are not further processed The REAL variable x is NUL i e not assigned The conversion is aborted when the character A is recognized The value of the double precision REAL variable D is 1234567 234567 5 8 5 7 Processing Character Strings BOSCH Removing leading and trailing spaces TRIM TRIMS lt character string gt TRIMS lt character string gt L TRIMS lt character string gt R When a character field range is assigned to a STRING variable or character field TRIM returns a string without preceding index L or trailing in dex R spaces The TRIM function without index masks out both preceding and concluding spaces If chaining occurs within the TRIM command e g TRIM AS BS the re sult may be assigned only to a character field Example A ABCDEF B TRIM A D C TRIM A R TRIM A 1 ts E 15 BS ie 1 gt C lt 1 gt D lt OIHOAWNE g 4 ga ANNAN Leads to the following lines in the file with the logical number 1 opened for write access gt ABCDEF lt gt ABCDEF lt gt ABCDEF lt gt ABCDEF lt 1070 073 740 111 02 11 GB BOSCH Processing Character Strings 5 9 5 8 Programming examples
194. orizontal 8 3 vertical 8 3 PLC 4 41 PLC interface 4 40 PPOS 4 15 PRN 7 7 PRN 6 5 7 2 PROBE 4 16 Program remark 2 25 Program structure 2 1 Programming examples Character string 5 9 NCS functions 4 76 Pseudo coordinates 4 6 Q Qualified personnel 1 2 R REAL 2 7 2 12 Relational operations 2 19 Release 1 8 REM 2 25 REPEAT UNTIL 2 21 Repeat instructions 2 20 REWRITE 6 7 RGB 8 2 ROUND 2 17 S Safety instructions 1 4 Safety markings 1 3 Scaling 4 28 SCL 4 28 Screen Line and column grid 7 4 SCS 4 30 SCSL 4 31 SD 4 32 SDR 4 37 SEEK 6 13 SFK 7 8 SIN 2 17 Spaces Removing 5 8 Spare parts 1 6 SPOS 4 18 SQRT 2 17 Square bracket 2 3 Start of program 2 4 STR 5 6 STRING 2 14 STRING expressions Assigning 5 11 Chaining 5 13 Comparisons 5 12 Strings 5 5 Strings and numbers 5 5 Sub program call Modal 3 1 via CALL function 3 2 with G M or P address 3 1 1070 073 740 111 02 11 GB Sub programs 3 1 Symbol names 2 5 System data 4 29 System functions 4 1 T TAN 2 17 TC 4 23 TDA 4 25 Test activities 1 5 Text output Graphics grid 8 7 TFO 7 9 TIME 4 42 Time recording 4 42 Tool compensations 4 23 Tool database Access 4 25 Trademarks 1 8 TRIM 5 8 Types of variables 2 12 V VAL 5 7 Variables 2 8 CHARACTER 2 14 Definable permanent 2 9 Global
195. otatory working range coordinates the unit is always in de grees The instruction has the following structure COF lt axis selection gt lt selection type gt lt axis selection gt See page 4 8 functions for coordinates or physical axes lt selection type gt See page 4 8 functions for coordinates or physical axes 1070 073 740 111 02 11 GB BOSCH System Functions 4 27 Examples 10 A COF 3 Supplies the last programmed G60 shift of the coordi nate with the 3 49 coordinate index on the active channel 20 B COF X Supplies the last programmed G60 shift of the X axis coordinate on the active channel 30 C COF 2 0 Supplies the last programmed G60 shift of the 24 phy sical axis on the active channel 100 C COF 0 Runtime error since 0 is not a valid coordinate index 4 7 Compensation of workpiece position 1070 073 740 111 02 11 GB Supplies the parameters last programmed of the compensation of work piece position G138 of a coordinate shift value and angle of rotation for the channel in which the program with the DPC command is running Since the compensation of workpiece position only affects coordinates on the current channel an error message is issued if a coordinate not existing on the current channel is selected Compensation values are supplied in the active measuring unit of the cur rent channel i e with G70 in inches and with G71 in mm When working with rotary
196. ponents are installed in or removed from equip ment the equipment must be de energized 1070 073 740 111 02 11 GB BOSCH 1 6 Documentation Documentation software release and trademarks Safety Instructions 1 7 The present manual provides information on the operation syntax and com mands of the CPL programming language The present manual applies only to CPL programming of the CNC Subjects related to DIN programming are covered in a separate manual For programming of manufacturer specific MTB cycles please refer to the applicable documentation of the machine tool builder Overview of available documentation Typ3 osa Connectivity Manual for project engineering and maintenance Part no German 1070 073 704 English 1070 073 736 French Typ3 osa Software installation 1070 073 796 1070 073 797 PNC Connectivity Manual 1070 073 880 1070 073 881 PNC BF2xxT BF3xxT Control Panel Connectivity Manual 1070 073 814 1070 073 824 PNC Software installation 1070 073 882 1070 073 883 Description of functions 1070 073 870 1070 073 871 MACODA Operation and configuration of the machine parame ters 1070 073 705 1070 073 742 Operating instructions Standard operator interface 1070 073 726 1070 073 739 1070 073 876 Operating instructions Diagnostics Tools 1070 073 779 1070 073 780 Error Messages
197. pressed This also applies to left justified output Since blanks between the NC address and the value are suppressed with LJUST NC programs which can be executed under the AUTOMATIC mode can be created directly with CPL PRN PRN lt n gt lt expressiom lt expressiom lt expressiorm 3 lt n gt 1 to 9 Logical number of the file to be written into 0 Issuance is diverted to monitor as in the case of message programming by MSG command This setting can also be used for the CPL dialog within the editor in order to overwrite a selected block For relevant information see Chap 7 2 page 7 2 lt expression gt Any alphanumeric characters text in inverted commas format strings or variable the content of which is to be saved displayed Suppresses the automatic addition of a lt CR gt lt LF gt If a record is overwritten via the PRN command the following applies PRN command with semicolon If the length of the new data to be written is shorter than the length of the old data the new data is inserted and the rest of the old data is retained PRN command without semicolon If the length of the new data to be written is shorter than the length of the old data the new data is inserted and the rest of the old data is overwritten with blanks The type of variable is freely selectable Indexed variables and character fields can also be used Double precision REAL expressions can also be programmed as any d
198. quals 0 RN 0 Program stop with M0 M1 RN 0 feed halt in the channel RN 0 feed inhibit or a channel axis RN 0 block transfer inhibit entered by RN 0 Waiting for axis in case of axis WPV 4 78 System Functions BOSCH Example 5 Axis channel assignment 10 REM Program queries number of axes in the system and the 15 REM axis numbers of the channel axes Based on this information 20 REM the channel axes are traversed first to position 0 and then 40 REM to position lt channel number gt 50 CHAN SD 8 REM Own channel number 60 IDCHAX 43 REM Ncs_MCoEvGetChanAxis_Id 70 IDMAXAX 45 REM Ncs_MCoEvGetMaxAxisNumber_Id 80 DIM BUF 16 REM Buffer axis channel assignment 90 SIZE 16 100 ANZ 0 REM Maximum index of the physical axes 120 REM ChanAxis 130 VERSION 0 140 A MCODS IDCHAX CHAN VERSION BUF SIZE 150 VERSION 0 160 A MCODS IDMAXAX CHAN VERSION ANZ 1 170 FOR I 1 TO ANZ 180 IF BUF I CHAN THEN N190 F1000 AXP I 0 0 REM Traverse channel axes to 0 200 ENDIF 210 NEXT 220 FOR I 1 TO ANZ 230 IF BUF I CHAN THEN N24 MO N250 WAIT N260 F1000 AXP I CHAN 0 REM Traverse channel axes to CHAN 270 ENDIF 280 NEXT N290 M30 1070 073 740 111 02 11 GB BOSCH Processing Character Strings 5 1 5 Processing Character Strings In order to process strings in CPL they must be filed in a one dimensional field field array of identified character variab
199. rameter P P parameter lt ID no gt Number of the SERCOS parameter lt file name gt name of the ASCII file in which the list read is to be stored 4 32 System Functions BOSCH lt Result var gt Integer variable If lt Result var gt is put in no runtime error will be gener ated when an access error occurs The following return value is possible 0 access ok 1 access to SERCOS is presently not possible 2 access to file is erroneous If no lt Result var gt is put in then a runtime error will be generated when an access error occurs Access to drive data is not possible at certain times i e when other applica tions are accessing drive data The parameter lt Result var gt reacts to this error in the part program Renewed access can supply the desired drive date Continuous access to drive data can prevent access for other applica tions SD Reads system data of the control unit The instruction uses the following syntax SD lt group gt lt index1 gt lt index2 gt lt index3 gt The SD instruction returns INTEGER values The function SD 1 consists only of compatibility reasons for the Bosch CC series SD 1 will not be supplemented by new functions The group index of SD 1 corresponds to that of the CC series and is not compatible for the group classification of the Typ3 osa PNC described in DIN programming manual For writing new part programs use the NCF function instead of SD
200. rd Other control characters to be transferred with the CHR function e g when outputting via a serial interface Example PRN command with semicolon 1 OPENW 2 PProg123 PRG 200 35 2 PRN 2 TEST1 FOR PRN COMMAND WITH SEMICOLON 3 PRN 2 TEST2 FOR PRN COMMAND WITH SEMICOLON 4 PRN 2 TEST3 FOR PRN COMMAND WITH SEMICOLON 6 SEEK 2 1 7 PRN 2 OVERWRITE 8 CLOSE 2 RESULT in PProg123 PRG OVERWRITE PRN COMMAND WITH SEMICOLON lt LF gt TEST2 FOR PRN COMMAND WITH SEMICOLON lt LF gt TEST3 FOR PRN COMMAND WITH SEMICOLON lt LF gt lt ETX gt lt LF gt Example PRN command without semicolon 1 OPENW 2 P2 1000 36 1 REWRITE 2 2 PRN 2 TEST1 FOR PRN COMMAND W O SEMICOLON 3 PRN 2 TEST2 FOR PRN COMMAND W O SEMICOLON 4 PRN 2 TEST3 FOR PRN COMMAND W O SEMICOLON 6 SEEK 2 1 7 PRN 2 OVERWRITE 8 CLOSE 2 RESULT in P2 OVERWRITE lt LF gt TEST2 FOR PRN COMMAND W O SEMICOLON lt LF gt TEST3 FOR PRN COMMAND W O SEMICOLON lt LF gt lt ETX gt lt LF gt An lt ETX gt lt LF gt is inserted after the last block of the file The following error message appears if the length of the block exceeds 1024 characters BLOCK EXCEEDS 1024 BYTES 1070 073 740 111 02 11 GB BOSCH File Handling 6 7 If a sequential file is written and the end of the file is reached the file is copied automatically and the reserved range increased by the occupied length
201. re identified with an Data which never change they only need to be called for once are identified with R Gives the variable type integer real double character needed for lt buffer gt If not a simple variable but a field variable is needed the variable type is followed by array a 1070 073 740 111 02 11 GB BOSCH Function supplies refresh SAV and IPO states lt buffer gt is of type 2 Integer Array System Functions 4 57 Syntax description MCODS 32 lt channel gt lt version gt lt buffer gt 2 E Supplies in lt buffer gt from lt channel gt the SAV state and the state of the interpolator The following values are defined as SAV state 1 The operation mode is not active A process can be selected 2 The operation mode is ready A process can be started 3 The operation mode is active A program or NC block is being processed 4 Reserved 5 Reserved 6 An error has occurred in the operation mode which can only be remedied by control reset or deselection of program 7 Reserved 8 Control reset momentarily in progress 9 A program is selected and is momentarily in preparation e g linked 10 Cancel distance to go has been triggered and is not yet com pleted 11 The operation mode is active and is reprocessing existing buff ers 12 The operation mode is ready The process is at the start of the program and can be started 13 When entering b
202. rea is reserved Files which have already been opened can also be opened for read access by means of the OPENR command An open file cannot however be opened again for writing to it To open a random file an additional parameter is introduced which returns the length of the records in the file in bytes 1 byte length of a character In all other respects the command structure corresponds to that of the se quential file After an OPENR command the file pointer is positioned on the first file re cord which can then be read accessed After an OPENW command the file pointer is positioned on the EOF pointer that is after the last record of the file The commands have the following structure OPENW lt n gt lt PGM name gt lt length gt lt PGM remark gt lt record length gt OPENR lt n gt lt PGM name gt lt record length gt lt n gt Logical number under which the file can be addressed Values from 1 to 9 can be selected The logical number must be programmed as an INTEGER expression A logical number may not be assigned for reading and writing a file simulta neously Therefore a maximum of nine different files may be opened at the same time If the range of values is not adhered to the following error mes sage appears INVALID LOGICAL NUMBER lt PGM name gt Must be programmed as a STRING expression The string must contain at least the filename maximum of 30 characters including the extension Th
203. rom the contour and automatically or manually returned to it 12 CPL debugger Single blocks are processed as they appear in the part program 13 CPL debugger All blocks are processed until the next break point 14 Jog mode movement in workpiece coordinates 1070 073 740 111 02 11 GB BOSCH Effect System Functions 4 75 Syntax description A change of operation mode is only possible under the following conditions e The IF input signal NC I 3 0 operation mode specification by PLC may not be set e No program or block is selected at the NC switching is to take place exclusively between the automatic operation modes automatic program block single step or single block Example ERR_VAR MCOPS 7 2 5 Change of operation mode on the 214 channel after automatic Change return to path strategy MCOPS 8 lt channel gt lt how gt lt where to gt Sets return to path strategy in the programmed lt channel gt e lt how gt Integer expression States whether 1 automatic return to path 2 return to path with single block or 3 manual return to path is desired e lt where to gt Integer expression States whether return to path takes place 1 to the startpoint 2 to the endpoint or 3 to the breakpoint Stop return to path recording MCOPS 9 lt channel gt Stops the return to path recording on the programmed lt channel gt Jog move ments are now no longer recorded 1070
204. roup gt parameter Example IC instruction write access 30 REM Setting the 81st output signal of channel 1 40 IC 80 0 1 TRUE 1070 073 740 111 02 11 GB BOSCH 1070 073 740 111 02 11 GB System Functions 4 41 PLC This function permits access to the data of the PLC PLC lt type gt lt DM number gt lt address gt lt size gt lt type gt Data type refer to table below lt DM number gt Data module number entry is relevant only with lt Type gt 4 data word For other types no entry how ever the comma must always be written lt address gt Relative byte address from beginning of range lt size gt Size of data type 1 byte 2 word 4 double word Possible parameter combinations lt type gt Meaning lt DM number gt Input I Output O Marker M Data word D number of the data module Data buffer DB Data field DF Timer T Counter C Special marker SM 10 System range S 11 Extended input El 12 Extended output EO OONOOARWND The parameter lt address gt is checked according to the active PLC The parameter lt size gt has no meaning when reading timers lt type gt 7 and counters lt type gt 8 e The result the remaining time until the timer finishes is supplied in milli seconds when reading timers lt type gt 7 e The current value of the counter is returned when reading counter
205. rrent position with reference to the program coordinate system can be stored in XMEAS SDR This instruction reads system data of the NC control unit in REAL format Command syntax and application are similar to the SD instruction The syntax is as follows SDR lt group gt lt index1 gt lt index2 gt Group Index1 Index2 Concerns the function Explanation 1 1 8 Axis positions of all machining axes that were calculated in block search reentry index1 axis number If there is no block search 0 will be returned Addressing a non applied axis or auxiliary axis will result in a runtime error Active override position in percent for the respective potentiometer 2 A Feedrate o 2 Rapid traverse 2 3 Spindle SDR 2 3 0 if no spindle applied 2 4 2nd spindle SDR 2 4 0 if no 2nd spindle is applied 4 Currently not in use 5 Currently not in use 12 Currently not in use 202 1 8 Spindles current potentiometer value older SDR functions which are still valid SDR 2 3 SDR 2 4 G68 S 68 1 1 8 G168 Total of last programmed coordinate shifts G168 G268 for G268 the given axis Index2 68 2 1 8 Total of the active coordinate shifts G168 G268 for the given axis Index2 168 1 1 8 Value of last programmed coordinate shift G168 for the given axis Index2 168 2 1 8 Value of the active coordinate shift G168 for the given axis Index2 268 1 1 8 Value of the last programmed a
206. s Read access is permitted for all types MACODA parameter 2060 00100 indicates the number of the first data module for which write access is permitted MACODA parameter 2060 00110 indicates the number of all data mod ules for which write access is permitted Examples 30 REM Read byte 10 from input image 40 I PLC 1 10 1 80 REM Read one word from byte 2 in data module 98 90 J PLC 4 98 2 2 4 42 System Functions BOSCH 4 12 Time recording CLOCK Reads out the internal system time of the control unit in milliseconds Example 20 WAIT 30 START TIME CLOCK N4 G1X50Y70 40 WAIT 50 ENDTIME CLOCK DIFF ENDTIME START TIME Before and after the execution of block N4 the current time counter status is transferred to the START TIME and or END TIME variables The differ ence in contents of both variables forms the basis for determining the block processing time of N4 in milliseconds It is instructive to note that the WAIT instruction is an absolute requirement in time recording DATE Supplies the current value for date Example 30 A DATE The date is assigned to the A STRING variable in DD MM form Supplies the current value for time Example 40 BS TIME The time is assigned to the B STRING variable in HH MM SS form 1070 073 740 111 02 11 GB BOSCH System Functions 4 43 4 13 Errors and Error Categories 1070 073 740 111 02 11 GB GETERR This function calls in the c
207. s controls Command SDR 4 Remark Active zero shift values SDR 5 Active speeds and revolutions SDR 12 Spindle position with M19 Typ3 osa uses file names instead of file numbers A 3 B CPL commands and SD functions which have been changed in the Typ3 osa The following CPL commands have been changed in the Typ3 osa in com parison to the previous controls Command IC Remark Command is not compatible as the interface assignment is different see ICL700 project planning manual Typ3 osa interface has been divided into the following groups channel axis and spindle COL The meaning of parameters 3 4 and 5 of the COL com mand have been changed The color setting blinking no longer exists SFK The SFK command has been extended to 8 softkeys REM No further CPL block may follow a REM remark 10 REM this is a comment DSP Z S FA FB A B C 1070 073 740 111 02 11 GB BOSCH Annex A 13 The following SD functions functions for system data have been changed in the Typ3 osa in comparison to the previous controls Command SD 8 Remark Typiosa last main program number called Typ3o0sa channel number of the invoking channel SD 14 Typtosa active foreign language file order in the customer EPROM Typ3osa Active foreign language corresponds to the country code F 33 GB 44 etc SD 22
208. se line or regenerate erased line 3 dash dot line 4 dash dash line 8 3 Defining the graphics area 1070 073 740 111 02 11 GB GWD When the control unit is switched on the displayable graphics range is as follows e horizontal 0 632 pixels e vertical 0 374 pixels CPL dialog 632 374 max 374 max 632 Softkey range If only a portion of this graphics range is desired you can use the GWD com mand to define a rectangular graphic window GWD lt X left gt lt X right gt lt Y bottom gt lt Y top gt lt X left gt Left window edge INTEGER expression with lt X left gt greater than or equal to 0 lt X left gt smaller than lt X right lt X right gt Right window edge INTEGER expression with lt X right gt greater than lt X left gt lt X right gt smaller than or equal to 632 lt Y bottom gt Bottom window edge INTEGER expression with lt Y bottom gt greater than or equal to 0 lt Y bottom gt smaller than lt Y top gt lt Y top gt Top window edge INTEGER expression with lt Y top gt greater than lt Y bottom gt lt Y top gt smaller than or equal to 374 Programming example see Chap 8 5 8 4 Graphic Programming 8 4 Join line BOSCH MWD If the edges of the current graphics window are to take on values of another coordinate system for the next graphics programming this can be achieved using the MWD command When doing so make sure that the parameters of the c
209. selected 80 B TC 2 The radius compensation value valid at the time of the block processing is assigned to variable B in the unit of the active measuring system N85 G71 90 TC 1 745 0 A The value of variable A in mm is assigned to the exter nal length compensation G745 N90 G70 N91 WAIT 95 TC 3 347 0 A The general geometry compensation G347 is assigned the variable value A for length compensation L 2 4 in inch 100 B TC 2 345 0 The radius compensation value valid for the external compensation G345 is stored in variable B 110 A TC 2 39 usr user GK33 gt From the ASCII table GK33 in the direc tory usr user the radius compensation value of the compensation group 39 is assigned to variable A 1070 073 740 111 02 11 GB BOSCH System Functions 4 25 4 5 Access to the tool database TDA If the internal tool database is configured read or write access to individual fields is possible by TDA The instruction has the following structure TDA lt sector no gt lt place no gt lt field no gt lt Tool tab no gt lt sector no gt Sector number configuration specific lt place no gt Place number in the given sector configuration specific lt field no gt Field number within the data set 1 49 lt Tool tab no gt Number of the tool table where the value 1 is allowed only CAUTION Inconsistency of data types possible A data set contains both fi
210. senting individual digits and separating pre and post decimal places The first format instruction contained in a character string refers to the first expression thereafter to be output in a formatted manner Expressions of the BOOLEAN or STRING type cannot be output in format The number of all programmed formatting specifications must be smaller than or equal to the number of expressions to be output If this condition is not fulfilled surplus will be displayed If no format is specified for an expression it will be output in the default for mat The default output for the REAL data type has a maximum of 7 digits with leading zeros being suppressed The max output for the INTEGER data type is 9 digits Leading zeros are likewise suppressed If the right screen boundary is exceeded during output of an expression the output will be cut off at the screen boundary without an error message In case of string expressions with more than 77 characters the error mes sage maximum string length exceeded is issued If the result cannot be depicted in the specified format the format not per mitted error message will be displayed 7 4 Dialog Programming Line and column grid of the screen BOSCH CPL dialog 1S line 1St column 79th column 415t line 42nd line Softkey range 46th line Example 10 LIN 4 COL 1 20 FOR I 1 TO 10 30 DSP LIN S 1 COL IS ROOT OF SQORT I 1I
211. signment REAL variable 1 X1MIN 2097 876 __ value max 7 digits Assignment symbol equals sign double precision REAL variable Example Value assignment between variables 1 XSET XMIN Value double precision REAL variable Assignment symbol equals sign single precision REAL variable The variable to be assigned a value must be positioned to the left of the as signment symbol and the respective value to the right This declaration must be used with special caution especially in cases where the value of one variable is to be assigned to another variable NUL If a value has not been assigned to a variable it will have the value of NUL As aconsequence the statement lt VARIABLE gt NUL is true This signifies that the equals sign can also be used in expressions representing compari sons or conditional operations If the direct deletion of a local or global variable is desired this can be accom plished by assigning the NUL value In contrast a permanent variable can not be deleted but requires overwriting Example Deleting a variable 1 XSET NUL 2 IF XSET NUL THEN 3 PRN 0 Variable not assigned 4 ENDIF 2 16 CPL Basic Elements BOSCH 2 5 1 Arithmetical operations Besides the assignment of a value in the form of a constant expression nu merical or a variable it is also possible to assign the value of a CPL expres sion to a variable A CPL expression may contain fun
212. ss to SERCOS drive parameters of the active parameter set The instruction has the following structure SCS lt axis selection gt lt ID type gt lt ID no gt lt Result var gt lt axis selection gt physical axis index or physical axis name lt ID type gt String expression S S parameter P P parameter lt ID no gt Number of the SERCOS parameter lt Result var gt if lt Result var gt is entered then no runtime error will be generated when an access error occurs the following return value is possible 0 access ok 1 access presently not possible If lt Result var gt is not entered then a runtime error will be generated when an access error occurs lt Result var gt is an integer variable The content of the parameter is supplied without unit and weighting Parameters containing a list several values separated by commas cannot be read The control unit generates an error message in such cases 1070 073 740 111 02 11 GB BOSCH 1070 073 740 111 02 11 GB System Functions 4 31 If the drive data can be found in the SERCOS drive telegram they will be read from here see Servodyn D Parameter Manual Otherwise the drive data are read directly in the drive If other applications access to drive data the access to the drive data is not possible at this time In this case of error the parameter lt Result var gt leads to a response in the part program Renewed access can suppl
213. ssing until all the blocks before WAIT have really been executed 4 48 System Functions BOSCH 4 14 2 Available functions E MCODS Invokes motion control data services of the NCS by CPL In this way data and statuses can be read from the CNC All returned values refer to that time at which the CPL block is pro cessed by the block processing If the invoking program also contains NC blocks the block processing is generally ahead of the machining If program sequences are to be influenced by functions which determine current machine data or states you must eliminate the time lag between block processing and the current machine state This applies however only when you use functions which access precisely that channel in which they themselves are executed In this case use the WAIT command in the line before the function call This halts the block processing until all the blocks before WAIT have really been executed The functions supply a return value see section 4 14 from page 4 46 General syntax MCODS lt type gt lt channel gt lt version gt lt buffer gt lt size gt lt axis number gt lt ID number gt lt P1 gt lt type gt Integer expression States the function to be executed The subsequent table lists all the available functions lt channel gt Integer expression States the channel which the function is to affect lt version gt Initialized integer or real variable not a constant I
214. ssions with the AND func tion APOS APOS lt axis selection gt 4 17 Transfers the current actual axis value referred to the machine zero point ASC ASC lt character string gt 5 5 Outputs the ordinal number of the first character ASCII code in a lt character string gt as an INTEGER value ASIN lt function value gt ASIN lt input value gt 2 17 Application of arc sine antisine function to the lt input value gt ATAN lt function value gt ATAN lt input value gt 2 17 Application of arc tangent antitangent function to the lt input value gt AXO AXO lt axis selection gt lt selection type gt 4 9 Transfers an active G92 shift for a coordinate AXP AXP lt axis number gt lt positional data gt 4 39 The application of this function is carried out in an NC block It must be in square brackets and is programmed in lieu of the address values BCD lt BCD value gt BCD lt binary value gt 2 19 Converts a binary format to BCD format BIN lt binary value gt BIN lt BCD value gt 2 19 Converts a BCD format to binary format BMP BMP lt X value gt lt Y value gt lt file gt lt copy type gt 8 8 Displays bitmaps picture files of the bmp type in the CPL dialog window CALL CALL lt program number gt lt transfer parameter1 gt DIN 3 2 Sub program call from a CPL program 1070 073 740 111 02 11 GB BOSCH Annex A 3
215. standards EN 50081 2 and EN 50082 2 e are designed for operation in industrial environments i e e no direct connection to public low voltage power supply e connection to the medium or high voltage system via a transformer In residential environments in trade and commerce as well as small en terprises class A equipment may only be used if the following warning is attached This is a Class A device In a residential area this device may cause radio interference In such case the user may be required to introduce suitable countermeasures and to bear the cost of the same The faultless safe functioning of the product requires proper transport stor age erection and installation as well as careful operation 1 2 Safety Instructions 1 2 Qualified personnel BOSCH The requirements as to qualified personnel depend on the qualification pro files described by ZVEI central association of the electrical industry and VDMA association of German machine and plant builders in Weiterbildung in der Automatisierungstechnik edited by ZVEI and VDMA MaschinenbauVerlag Postfach 71 08 64 D 60498 Frankfurt The present manual is designed for e NC programming personnel and NC project engineers These persons need special knowledge of e the operation syntax and commands of the CPL and the DIN program ming languages Programming start and operation as well as the modification of programs or program parameters may only be
216. string contains a decimal point the result may only be assigned to a REAL or double precision REAL variable Assignment to an INTEGER variable in this case would lead to an INVALID ASSIGNMENT error message Example VAL VAL VAL I VAL Ke 1 23DE 123DE BBC 1 23DE OY ole VAL VAL VAL 000001234TEST4365 ABC1 23DE q 2 3 4 5 6 i 1234567 234567 OXN C T a O wo won S Line 1 leads to an error message because an assignment to an INTEGER variable is to take place The value of the INTEGER variable K is 123 The numbers 1 2 3 are con verted to an INTEGER number The D character aborts the conversion be cause it cannot belong to an INTEGER number The characters which follow it are ignored The value of the INTEGER variable J is NUL i e the variable is not as signed The A character aborts the processing of the lt STRING expres sion gt The value of the REAL variable R is 1 23 The character is recognized as a sign for the REAL number The digit 1 the character and the digits 2 and 3 are converted to a REAL number The D character aborts the conver sion because it cannot belong to a REAL number The E character is no longer processed The value of the REAL variable z is 1234 The character is recognized as a sign for the REAL number The spaces which follow as well as the leading zeros are ign
217. sued if a coordinate not existing on the current channel is se lected Compensation values are supplied in the active measuring unit of the cur rent channel i e with G70 in inches and with G71 in mm When working with rotary axes or with rotatory working range coordinates the unit is always in degrees The instruction has the following structure SCL lt selection gt lt axis selection gt lt selection type gt lt selection gt 0 Last progr angle of rotation of the main plane 1 Last programmed pole of a channel axis 2 Last progr scaling factor of a channel axis lt axis selection gt See page 4 8 functions for coordinates or physical axes lt selection type gt See page 4 8 functions for coordinates or physical axes Examples 10 W SCL 0 Writes the last programmed G38 angle into variable W 20 P SCL 1 2 Writes the pole of the coordinate with the 2nd coordinate index on the channel into variable P 30 F SCL 2 2 1 Writes the scaling factor of the coordinate with the 2nd coordinate index on the channel into variable F 40 D SCL 2 X Writes the scaling factor of the X coordinate on the active channel into variable D 1070 073 740 111 02 11 GB BOSCH 4 9 Active system data 1070 073 740 111 02 11 GB System Functions 4 29 MCA Notice that different MACODA numbers have been changed in the new version V5 1 x and on Please check existing part programs according to the lis
218. t Accordingly the REPEAT loop is struc tured as follows REPEAT lt routine gt UNTIL lt condition gt Example 30 REPEAT Loop until X 100 40 X X 1 50 UNTIL X 100 WHILE DO END If the loop abort condition is to be queried prior to the first processing of the routine the program can be instructed thus WHILE the condition is satis fied DO the routine Accordingly the WHILE loop is structured as follows WHILE lt condition gt DO lt routine gt END Example 30 WHILE SD 9 0 Wait loop until until SD 9 assumed 40 I I 1 the value of O 50 END 2 22 CPL Basic Elements BOSCH 2 5 6 Unconditional jump instruction GOTO Example 10 GOTO N20 Jump to block N20 N20 X100 30 GOTO 120 Jump to CPL block 120 120 GOTO TARG1 Jump to label TARG1 150 TARG1 Unconditional program jumps are programmed by means of the GOTO in struction Specified jump destinations can be CPL block numbers NC block numbers or labels jump markers Label A label that is to serve as a jump destination can be written only within a CPL block A label identifier consists of a decimal point followed by ASCII charac ters the first one of which must be a capital letter A label may not be a variable 1070 073 740 111 02 11 GB BOSCH CPL Basic Elements 2 23 2 5 7 Branch instructions conditional jump instructions 1070 073 740 111 02 11 GB IF THEN ELSE ENDIF A branch instruction ca
219. t 0 THEN 210 REM Axis name defined 220 PRN 0 I1 1 Axis name NAMES 230 ENDIF 240 NEXT 250 ENDIF N260 M30 1070 073 740 111 02 11 GB BOSCH 1070 073 740 111 02 11 GB System Functions Example 4 Channel Waiting state 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 M30 CHANS al VERSIONS STATES 0 ERR MCODS 87 CHAN VERSION STATES 1 IF ERR 0 THEN MASK 1 WHILE MASK lt CASE LABE LABE LABE LABE LABE LABE LABE LABE LABE LABE LABE LABE LABE Li Li Li Li Li Li Li Li Li Li Li Li Li LABEL ENDCASE MASK MASK 2 END ENDIF 1 16 32 64 128 256 512 1024 2048 4096 8192 STATES DO 4o tu td U U STATES AND MASK OF IP 2 customer RN 0 Synchronized movement stop between channels ASTOP exchange G511 RN 0 Waiting for permanent variable RN 0 Waiting for interface signal at an active time WAITA RN 0 Waiting for interface signal WAIT IC or RN 0 WAIT TIME during block preparation RN 0 Motion Control Data Services MCODS 4 77 RN 0 dwell time RN 0 acknowledgement compulsory auxiliary function RN 0 block transfer inhibit RN 0 feed in channel e
220. t category gt for values 0 unknown category Example DIM ERRNO 100 3 Only the variable name is to be entered without the dimension or index 4 44 System Functions BOSCH lt number gt Integer variable Default value 1 Defines the number or the error to be read 1 Default value gt 0 Parameter values are not tested for validity i e if the number of data to be read is larger than the array dimension no part program error is generated Example lt number gt 120 but DIM ERRNO 100 3 In this case 20 errors will not be read Example Display of errors in the information dialog 1 Station 0012 NC Typ3o0sa O Errors Warnings Messages No Ch Date Time ms Description 29 07 02 12 58 01 490 Drive error for coupled axis X1 12 55 01 490 Permanent CPL variable A not installed Memory full 12 45 56 490 Invalid axis index programmed 12 30 12 210 Axis 3 is used by another channel 12 11 00 340 Synchronous axes of channel 2 are not enabled 12 01 01 210 Axis 2 is used by another channel Selected info Syntax error with 9M119 k gt MDI Number 387 Class Part program error Channel Date Time Delete Set Info Filter Column headers No Error number Ch Channel on which the event has occurred Date Date on which the event occurred Time Time at which the event occurred ms Milliseconds In addition to time Description
221. t of changes in the annex A 4 to determine which MACODA numbers need to be changed Transfers the contents of a MACODA individual parameter Depending on the type of data this value can be of the integer float double or even string type The variable in which the transferred value is to be stored must be of the same type Type conflicts between the value transferred and the destination variable are detected during the program s runtime and acknowledged in the form of an error message MCA lt block gt lt index gt lt channel gt lt block gt Number of a MACODA parameter Within one MACODA pa rameter more than one MACODA individual parameter para meter list can be contained If a nonexistent parameter number is programmed a runtime error will appear lt index gt Index of the MACODA individual parameter beginning with 0 If a nonexistent index number is programmed a runtime error will appear lt channe1 gt Channel number If not programmed the function will supply the MACODA individual parameter of the channel in which the CPL program is presently being executed If a nonexistent channel number is programmed a runtime error will appear 1 supplies the values of the basic setting for channel depen dent parameters Example MCA instruction with an older software version Old MACODA No 10 BLOCKNR 100100004 20 ERG MCA BLOCKNR 0 The contents of the first individual para
222. t these must be occupied with the stated value at the time of the function call Function supplies refresh Commanded position of axis lt buffer gt is Syntax of type 2 description Double MCODS 1 1 lt version gt lt buffer gt lt size gt Array Supplies in lt buffer gt in ascending channel independent order the commanded positions of all feed and auxiliary axes in the system in the case of linear axes in mm in the case of rotary axes in degrees Set actual value e g G92 is included in the calculation of the values Commanded position of axis Integer MCODS 2 1 lt version gt lt buffer gt lt size gt Array Supplies in lt buffer gt in ascending channel independent order the commanded positions of all feed and auxiliary axes in the system in the case of linear axes in 0 0001 mm in the case of rotary axes in 0 0001 degrees Set actual value e g G92 is included in the calculation of the values Path feed Real Array MCODS 3 lt channel gt lt version gt lt buffer gt 3 Z Supplies in lt buffer gt in ascending order 3 values with current path feeds of lt channel gt incl feed potentiometer in the unit mm min 1 The commanded speed which is specified to the interpolator externally 2 The actual interpolator speed nomentary path velocity 3 The interpolator internal commanded speed It may have changed vis a vis the externally specified sp
223. tandard As a consequence in addition to an appropriate degree of language com prehensiveness CPL is also easy to learn For advanced applications structural elements similar to PASCAL are provided The application of CPL will facilitate e shortening of repeat procedures in NC programs and similar program segments and e status dependent program variants as a result of access to NC system data CPL functions can be utilized in the processing sequences of main and sub programs A program generally consists of a declaration part and an instruction part the latter of which although not being a mandatory requirement for CPL may still serve to provide an improved overview of the program For example the declaration part may be used to comment names of vari ables to dimension field variables or to assign variables Also fixed values can be listed in a list of constants thus reducing the effort required in the event of modifications Detailed information on this subject appears further on in this manual The instruction part provides the symbolic description of program execution This is accomplished by means of instructions linking data with the aid of symbol names and operators Program Declaration part Instruction part From within a particular program main program other programs can be ex ecuted by invoking sub program calls Once the execution of a sub program call has been concluded the main progr
224. th lt Start Block gt and ends with lt End Blocks If lt Start Block gt is missing or if the block is not found the machining begins at the beginning of the program If lt End Block gt is missing or if the block is not found the machining stops at the end of the program e The NC status changes to READY Example ERR_VAR MCOPS 3 2 N50 N100 Triggers Search block on channel 2 The main program is to be executed be ginning at N50 up to and including N100 4 72 System Functions BOSCH Effect Syntax description Select program or MCOPS 4 lt channel gt lt string gt lt Start block gt lt End select string for manual data input block gt lt selection type gt Selects on the programmed lt channe1 gt a program for machining or a string for machining under the manual data input operation mode e lt string gt string expression Depending on the lt selection type gt the sys tem interprets the parameter as e path name incl part program name of a part program max 100 characters to be selected or e lf 32 is specified in lt selection type gt as an NC block size max 512 bytes incl final O byte to be executed under the manual data input operation mode or lf 32 4096 are specified in lt selection type gt as several NC blocks which are to be executed under operation manual data input Several NC blocks are separated by NewLine n Hex 0x0A The max size of al
225. the CPL command BMP Bit map OPENR TTY CPL access to serial standard interfaces is no longer pos OPENW TTY sible MIC In the Typ3 osa the single word access to the NC inter face is done with the CPL command PLC CLX The CLX command when changing the background color is no longer programmed in the Typ3 osa instead the COL command is used TXT No longer applicable as the Typ3 osa uses no CPL text files 1070 073 740 111 02 11 GB BOSCH 1070 073 740 111 02 11 GB Annex A 11 The following SD functions functions for system data are no longer ap plicable in the Typ3 osa in comparison to the previous controls Command Remark SD 1 3 Power up condition of G functions SD 2 2 Setting of rapid traverse potentiometer Typ3 osa uses no rapid traverse potentiometer SD 3 Number of the last programmed or active tool compensa tion table SD 3 Number of the last programmed or active zero shift table SD 6 Last programmed help function SD 7 Active or programmed tool SD 16 Dry run to block with sub program call control of runs SD 17 Dry run to block with sub program call active G functions SD 20 Next available program number SD 21 File status and access rights SD 23 Panel type passive PC control panel color monochrome SD 24 Pointer to the active main and sub program SD 30 Prevents setting G codes back
226. tinues Examples 10 IF ERASE P1 lt gt 0 THEN 10 I ERASE P1 10 WHILE ERASE P1 lt gt 0 DO Example 10 OPENW 1 P2 200 11 OPENW 2 P3 200 20 PRN 1 TEST1 FOR ERASE 21 PRN 2 TEST2 FOR ERASE 31 CLOSE 1 32 CLOSE 2 40 ERASE P2 43 A P3 44 ERASE AS 6 16 File Handling BOSCH 6 11 Determine file access rights FILEACCESS With FILEACCESS of the CPL program it is possible to tell whether a file exists and which access rights privileges it has FILEACCESS lt file name gt lt file name gt File name with a complete path as a string expression If the lt file name gt contains no path the file is searched for in the current directory The CPL function supplies the return value as an integer value 1 file does not exist 0 file without access rights otherwise _ binary coded access rights Bit1 execution possible X Bit2 writing allowed W Bit3 reading allowed R Bit4 file is a directory D Bit5 file is an active program A An active program is a file which e is executed as a program e is executed as a sub program within a program e has been opened by a CPL command on a channel If the access rights of a zero shift or tool compensation table which are be ing used in a running part program are queried by the CPL FILEACCESS then the Bit5 is not set Example 10 I FILEACCESS usrfep test
227. tion standard compensation external compensation 18t external compensation general compensation 2nd external compensation standard compensation external compensation 1st external compensation general compensation 2nd external compensation 1 2 N O Or e O O 0 o N leg 145 845 147 847 file name with 48 System Functions 4 23 Length compensation H Radius compensation D Length compensation L 1 3 or Hext Radius compensation Rext Length compensation L 2 3 Radius compensation R Length compensation L 2 1 Length compensation L 2 2 Tool orientation TO Compensation type read access only Euler angle only absolute Euler angle amp only absolute Euler angle y only absolute for compensation group for G145 G845 for G147 G847 name of table path 4 K4 5 K5 0 no name 0 no name 0 mm 2 inch not pro G70 active inch grammable G71 active mm not pro G70 active inch grammable G71 active mm 4 24 System Functions BOSCH The addressed table can be read and overwritten During overwriting the old value can be replaced by the new value or the new value added to super impose the old value This can be determined by means of lt selection gt If lt selection gt is positive the programmed value is incorporated into the table If lt selection gt is negative the programmed value is added to the table value If the sum of the active tool compensation
228. tion In this case WAIT should be programmed in its own block before APOS also see Section 4 1 standard functions WAIT Using APOS without WAIT does not supply clearly predictable values as it is not exactly known how far the block execution lags behind the block processing When accessing axis values of a foreign channel it may be necessary to meet synchronization measures in order to measure a defined posi tion The instruction has the following structure APOS lt axis selection gt lt axis selection gt physical axis index or physical axis name Example Channels as in the example configuration from page 4 5 30 ACT4 APOS 4 The current actual axis value of the 4th physical axis in the system X2 axis on channel 2 is assigned to the ACT4 variable 50 ACT8 APOS A The current actual axis value of the 8th physical axis in the system A axis on channel 3 is assigned to the ACT8 variable 4 18 System Functions BOSCH SPOS SPOS supplies the axis command value of a physical axis that is currently issued at the time of block preparation of the CPL block in which SPOS is programmed Please regard the following conditions e The supplied value refers to the machine zero point not identical with the reference point which also refers to the machine zero point e SPOS and MPOS always supply identical values as MPOS is based on the machine zero point axis zero point coordinates of the machine
229. tion 4 5 COS 2 17 CPL Basic Elements 2 1 CPL block 2 4 CPL dialog Calling via softkey 7 1 in the editor 7 2 CPL dialog window Influencing 8 8 CPOS 4 9 CPROBE 4 10 CSF 7 3 Cycles 3 1 D Data input 7 3 Data output 7 3 DATE 4 42 Dialog programming 7 1 DIM 5 1 DLF 8 8 DLG 7 5 Documentation 1 7 DOUBLE 2 9 2 12 DPC 4 27 DSP 7 3 E EMC Directive 1 1 EMERGENCY STOP devices 1 5 ENDDLG 7 5 EOF 6 10 ERASE 6 15 Error return values 4 46 Errors and error categories 4 43 ESD Electrostatic discharge 1 6 grounding 1 6 workplace 1 6 ESD sensitive components 1 6 F Field variable 2 13 FIL 8 6 A 17 A 18 Annex BOSCH File Closing 6 10 Determine access rights 6 16 Determine date 6 17 Determining size 6 14 Erasing 6 15 Inscribing 6 5 Names 6 1 Opening 6 3 Pointer position 6 11 Reading 6 8 Recognition of end 6 10 Setting pointer 6 13 File handling 6 1 File structure Random 6 2 Sequential 6 2 FILEACCESS 6 16 FILEDATE 6 17 FILEPOS 6 11 FILESIZE 6 14 Floppy disk drive 1 7 FOR STEP TO NEXT 2 20 Function overview MCODS 4 49 Functions for axis and coordinate positions 4 7 for coordinates or physical axes 4 8 for NCS coupling 4 48 for physical or logical axes 4 13 for use with physical axes only 4 17 FXC 4 19 FXCR 4 21 FXDEL 4 21 FXINS 4 22 G GETERR 4 43 Global interface 4
230. to meet synchronization measures in order to measure a defined posi tion The instruction has the following structure 4 12 System Functions BOSCH WPOS lt axis selection gt lt selection type gt lt channel gt Example Channel 2 as in the example configuration from page 4 5 No axis transformation is active i e logical coordinates correspond to log ical axes 10 WAIT 20 Z2POS 100 WAIT 110 YPOS 120 XPOS WPOS 3 1 2 WPOS Y WPOS 1 Z2P0S is assigned the current inter polated workpiece position of the 3rd logical coordinate of the 274 channel Z2 axis YPOS is assigned the current interpo lated workpiece position of the log ical Y coordinate on the current channel XPOS is assigned the current interpo lated workpiece position of the 1st logical coordinate on the current channel 1070 073 740 111 02 11 GB BOSCH System Functions 4 13 4 2 2 Functions for physical or logical axes The functions MPOS PPOS and PROBE always supply axis values Access via physical index or axis names is intended for axes where the log ical axis index on the channel has changed because an axis has been ex changed Pseudo coordinates are always linked to certain logical axes but in the case of an active axis transformation the logical axis index and the logical coordinate index can be different Transfer parameters of the functions MPOS PPOS PROBE lt axis selection gt Index
231. to power up condition SD 31 Direct processing size offset and level of utilization SD 32 Program selection from the program memory and PC control panel SD 33 Read in files from PC control panel SD 34 Load files into PC control panel SD 2 5 Position of the 5 potentiometer SD 5 5 1 SD 5 5 2 Active or programmed feed of the oscillating axis The following SD functions functions for system data are no longer ap plicable in the Typ3 osa in comparison to the previous controls Typ1 osa CC220 Center Command SD 101 104 Remark Compensation of the workpiece position rotating and mirroring via SD function SD 105 Sub program call with simple auxiliary functions number of auxiliary functions SD 110 External tool compensations entering the tool number for the display D 111 Upper speed limit for spindles A 12 Annex BOSCH The following SD functions functions for system data are no longer ap plicable in the Typ3 osa in comparison to the previous controls Typ1 osa CC220 Lathe Command SD 140 142 Remark Piece counter D 143 144 Transmission ratio of the motorized tool Programmed and rated speed of the motorized tool SD 146 Minimum permitted distance to the axis of rotation SD 145 SD 147 Maximum tool length The following SDR functions are no longer applicable in the Typ3 osa in comparison to the previou
232. to produce correct graphic output in the control unit they have to contain the following DIN remark as first instruction N10 TYP2 7 1 Calling CPL dialog via softkeys 1070 073 740 111 02 11 GB In the basic level of the manual automatic manage and diagnostics group operating modes or in the editor one CPL dialog program can be called via the CPL DIALOG softkey All CPL dialog programs run in the channel defined by the MACODA param eter 3080 00005 If you change the entry in parameter 3080 00005 you must restart the oper ator interface of the control unit Only then will the change become effective In standard mode the control unit does not display the CPL DIALOG soft keys To have them displayed proceed as follows 1 Write the necessary CPL dialog programs 2 Save them under the following names cpldlg01 dlg CPL dialog program for the Manual GOM cpldlg02 dlg CPL dialog program for the Automatic GOM cpldlg03 dlg CPL dialog program for the Manage GOM cpldlg04 dlg CPL dialog program for the Diagnostics GOM cpldlg05 dlg CPL dialog program for the editor The programs must be stored in the root directory or the user FEPROM or FEPROM The control unit will search these directories in the stated sequence 3 Restart the operator interface of the Typ3 osa The MACODA parameter 6001 00020 controls the behavior of the oper ator inter
233. uffered NC blocks all blocks have been execu ted It is waiting for the next entry The following values are defined as IPO state 1 Interpolator running 2 Interpolator running down due to feed halt 3 Interpolator has stopped the axes Axis names Character MCODS 33 lt channel gt lt version gt lt buffer gt lt size gt Array R If you specify the value 1 for lt channe gt the names of all physical axes will be supplied in lt buffer gt separated by the character 0 zero byte in ascending order of 9 bytes each If you specify an actually existing channel number for lt channel gt the names of all axes on the specified channel separated by the character 0 zero byte will be supplied in lt buffer gt in ascending order Names which are shorter than 8 characters will be filled with blanks up until the 8 character The size of the lt buffer gt is specified in lt size gt It can be a maximum of 144 bytes with 16 axes 9 16 For an example see Chap 4 14 3 page 4 76 1 Data which the control unit provides cyclically are identified with Z Data available after each switching of blocks are identified with S Data which appear in irregular periods after a change are identified with an E Data which appear immediately when called for are identified with an I Data which never change they only need to be called for once are identified with R 2 Gives th
234. urrent errors in a CPL program It includes the ele ments current error no channel no of the error and the error category it be longs to Each occurring error is stored in an array with its elements The maximum number of errors that the array can record is limited by the dimensioning DIM of the parameter lt error no gt The GETERR function supplies the following return values e 1 Function could not be executed e 20 Number of present errors on lt channel gt GETERR lt channels lt category gt lt error no gt lt number gt lt channel gt Channel no of the queried channel 1 All channels gt 0 Channel no All warnings and errors default Minor system errors Control or drive errors Interpolator errors Hardware errors PLC errors Part program errors Runtime warnings MSD messages errors MSD messages warnings 10 MSD messages messages lt category gt OWDYIMAORWNYAO0 lt error no gt Result variable Two dimensional integer array with at least 3 elements in the second dimension DIM lt error no gt x 3 default value 0 The function supplies the present error numbers from lt channel gt in chronological order Meaning of the 3 elements of the 2 dimension lt error no gt x 1 error no lt error no gt x 2 error channel 1 applies to all channels lt error no gt x 3 error category if declared by means of DIM command See parameter l
235. urrent graphics window have the same ratio to each other as the pa rameters of the MWD command This means that the MWD rectangle must have the same side side ratio as that of the GWD rectangle The command format and parameterization correspond to those of the GWD command MWD lt X left gt lt X right gt lt Y bottom gt lt Y top gt Programming example see Chap 8 5 LIN Draws a line between starting and end point programming example see Chap 8 5 LIN lt X start gt lt Y start gt lt X end gt lt Y end gt lt X start gt lt Y start gt Pixel coordinates of the starting point Any INTEGER expressions lt X end gt lt Y end gt Pixel coordinates of the endpoint Any INTEGER expressions If a contour pass is being programmed the definition of the starting point is no longer required after the 2 line The last endpoint is regarded as the new starting point In this case it is possible to write as follows LIN lt X end gt lt Y end gt If lt X end gt or lt Y end gt remain unchanged compared to the preceding LIN instruction renewed specification of lt X end gt or lt Y ena gt may be omitted If no true to scale graphics window has been defined using the MWD com mand please see there the coordinate values will be interpreted as pixel values image spots of the monitor If REAL values are used instead of INTEGER values an internal conversion to integer pixel values will take place
236. used to query all inputs and outputs of the control unit IC lt bit gt lt group gt lt index gt lt bit gt The number of the interface signal within the chosen group Please refer to the PLC Project Planning Manual for the mean ing of individual signals lt group gt see table lt index gt see table lt bit gt lt group gt lt index gt Default 0 0 111 0 channel related input signals 0 max channel Default active channel 0 111 1 axis related input signals 1 max axis Default 1 0 111 2 spindle related input signals 1 max spindle Default 1 0 95 3 channel related output signals 0 max channel Default active channel 0 63 4 axis related output signals 1 max axis Default 1 0 63 5 spindle related output signals 1 max spindle Default 1 31 6 input signals in the global interface 1 0 0 31 7 output signals in the global interface 1 0 7 8 input signals in the HighSpeed inter 1 face 0 5 9 output signals in the HighSpeed inter 1 with face PNC 0 7 Example IC instruction read access 30 REM Load into variable A the value of the 6th input signal 35 REM of the 2nd axis direction of handwheel rotation 40 A IC 5 1 2 Write access is possible only to the channel related output signals 81 through 96 In this case the value 0 and not 3 must be specified for lt g
237. value already takes the new workpiece coordinate system into conside ration 4 10 System Functions BOSCH The instruction has the following structure CPOS lt axis selection gt lt selection type gt CPOS only allows access to coordinates of its own channel Thus it is not possible to inquire about positions of asynchronous axes via CPOS Example Channel 2 as in the example configuration from page 4 5 No axis transformation is active i e logical coordinates correspond to log ical axes N1 GO G90 X2 150 Y2 100 02 X2VALUE CPOS 1 X2VALUE is assigned the programmed abso lute position of the 1st coordinate on the current channel X2VALUE 150 N3 G91 X2 10 X2VALUE is assigned the programmed abso 04 X2VALUE CPOS 1 1 lute position of the 1st coordinate on the current channel X2VALUE 160 N5 X2 5 Y2 10 Y2VALUE is assigned the programmed abso 06 Y2VALUE CPOS Y2 1 lute position of the coordinate that the physical Y2 axis is assigned to Y2VALUE 110 07 X2VALUE CPOS X2 X2VALUE is assigned the programmed abso lute position of the X2 coordinate on the current channel X2VALUE 165 08 XVALUE CPOS 1 0 Run time error Access to the 1st system axis of channel 2 is not allowed axis is assigned to channel 1 CPROBE If a switching measuring probe is connected to the axes of a channel and a measurement is launched CPROBE can read the measured value for any
238. values is requested only the para meter lt selection gt needs to be programmed Each table has a table unit Each table has a table unit This is determined when creating a new table according to MACODA parameter 9020 00010 During read access the value is converted from the table unit into the pro grammed lt unit gt If no lt unit gt is programmed the value read determined the table unit During write access the value is interpreted i a w the programmed lt unit gt and standardized to the table unit then added to the table If no lt unit gt is programmed the value is written directly into the table without conversion Examples 10 TC 1 10 5 A Inthe tool compensation table K5 the values of the vari 20 TC 2 10 5 B ables A and B are assigned in the compensation group 10 for H and D 25 TC 1 10 5 0 25 4 In the tool compensation table K5 the same values for 26 1TC 1 11 5 2 H 25 4 mm and 1 inch are recorded in the compensation groups 10 and 11 30 TC 1 10 4 A In the tool compensation table K4 the values of the vari 40 TC 2 10 4 B ables A or B are added in the compensation group 10 for H and D 50 A TC 1 8 4 From the tool compensation table K4 the values of com 60 B TC 2 8 4 pensation group 8 for H and D are copied into the vari ables A and B 70 TC 1 17 A The length compensation value standing in variable A is transferred to compensation group 17 of the compensa tion table last
239. y E Shows the condition of the NC output signal skip block activate and the input signal skip block of lt channe I gt in lt buffers Optional stop activated Integer MCODS 69 lt channel gt lt version gt lt buffer gt 2 Array Shows the condition of the NC output signal Optional stop activated and the input signal Optional stop of the lt channel gt in lt buffer gt 2 1 Data which the control unit provides cyclically are identified with Z Data available after each switching of blocks are identified with S Data which appear in irregular periods after a change are identified with an E Data which appear immediately when called for are identified with an Data which never change they only need to be called for once are identified with R yp Gives the variable type integer real double character needed for lt buffer gt If not a simple variable but a field variable is needed the variable type is followed by array 1070 073 740 111 02 11 GB BOSCH System Functions 4 67 Function supplies lt buffer gt is Syntax refresh of type 2 description Automatic program re selection Integer MCODS 70 lt channel gt lt version gt lt buffer gt 1 acitve lt buffer gt shows whether the automatic program re selection has been applied on the given channel 0 function has not been applied 1 function has been applied
240. y background 4 Graphics background 0 To select a color use the COL command With this new screen objects to be displayed can be assigned a different color from the active color table or a specific color table can be activated at any time 8 2 Graphic Programming BOSCH COL Assigns new screen objects to be displayed a color from the active color table or activates a specific color table t When a color table is activated the entire screen is erased COL lt graphics gt lt text gt lt textBG gt lt tab gt lt SK gt lt SKBG gt lt graphics gt Color code for lines and circles lt text gt Color code for text lt textBG gt Color code for text background lt tab gt 0 Selection of color table 1 7 Selection of color table 2 10 Selection of color table 3 lt SK gt Color code for softkey text lt SKBG gt Color code for softkey text background As color code any INTEGER expression in the value range from 0 to 7 may be used If and when individual parameters are not to be specified at least the corre sponding commas must be written in front of the last programmed parame ter e g COL 3 Examples 10 COL 7 Selection of color table 2 Entire screen is erased 30 COL 10 Selection of color table 3 Entire screen is erased 50 COL 1 4 Color for softkey text 1 color for softkey text background 4 70 COL 4 Color for lines and circles 4 90 COL 6 5 Color for text 6
241. y need to be called for once are identified with R 2 Gives the variable type integer real double character needed for lt buffer gt If not a simple variable but a field variable is needed the variable type is followed by array 1070 073 740 111 02 11 GB 4 60 System Functions BOSCH Function supplies refresh Return to path strategy and recording of jog movements lt buffer gt is of type 2 Integer Array Syntax description MCODS 46 lt channel gt lt version gt lt buffer gt 3 E Supplies in lt buffer gt in ascending order for the specified lt channel gt e the return to path operation mode e the return to path point e the recording status of the jog movements As return to path operation mode the following values are poss ible 1 Automatic return to path 2 Return to path with single block 3 Manual return to path For the return to path point 1 Return to path to the startpoint 2 Return to path to the endpoint 3 Return to path to the breakpoint For the recording status 0 Recording not active 1 Recording active Status Travel command Integer Array MCODS 47 lt channel gt lt version gt lt buffer gt lt size gt Z If you specify the value 1 for lt channel gt the travel command signals of all physical axes will be supplied in ascending order in lt buffer gt If you specify an actually existing channel numb
242. y the desired drive date Continuous access to the drive data can prevent access for other ap plications Access to POSITION ERROR Error message drive data yes New actual position 0 none value of the ith axis no Old actual position value 1 SERCOS SERVICE of the ith axis remains CHANNEL IS LOCKED By evaluating the integer variables ERROR the part program can respond to the error Example 10 POSITIONS SCS 1 S 51 ERROR The integer variable POSITION is assigned to the actual position value of the 1st axis 12 IF ERRORS 0 THEN Error evaluation 13 REM actual position value could be read correctly 14 ELSE 15 REM actual position value could not be read 16 ENDIF SCSL Several of the SERCOS parameter are stored as lists in the drive These can be read with the command SCSL Since the length of a list is unknown and the necessary storage space the list elements read are stored in ASCII files Afterwards the data read can be processed with the help of CPL file commands The SCSL command causes the given file to be newly set up if no file al ready exists The contents of an already existing file are re written The instruction has the following structure SCSL lt axis index gt lt ID type gt lt ID no gt lt file name gt lt Re sult var gt lt axis index gt physical axis index or physical axis name lt ID type gt String expression S S pa
243. ze gt E Supplies the current status of the online correction WCS of the given channel to lt buffer gt First all working range coordinates then the pseudo coordinates of the channel 0 inactive 1 active 1 Data which the control unit provides cyclically are identified with Z Data available after each switching of blocks are identified with S Data which appear in irregular periods after a change are identified with an E Data which appear immediately when called for are identified with an I Data which never change they only need to be called for once are identified with R 2 Gives the variable type integer real double character needed for lt buffer gt If not a simple variable but a field variable is needed the variable type is followed by array 1070 073 740 111 02 11 GB 4 70 System Functions BOSCH MCOPS Invokes motion control process services of NCS by CPL This enables con trolling of channels in the CNC General syntax MCOPS lt fct gt lt channel gt lt P1 gt lt P2 gt lt P3 gt lt P4 gt lt fct gt Integer expression States the function to be executed All the available functions are described in the following table lt channel gt Integer expression States the channel which the function is to affect lt P1 gt lt P4 gt Optional parameters dependent on lt fct gt Comma se quences are permissible but

Download Pdf Manuals

image

Related Search

Related Contents

EKPrint Studio EKPrint Studio  Bedienungsanleitung  RVP200.0    工事提出図書一覧表(約款・要領等関係)  Service Manual  Warwick-Edinburgh Mental Well  

Copyright © All rights reserved.
Failed to retrieve file