NCT® 99M NCT® 2000M Controls for Milling Machines and Machining Centers Programmer's Manual
Manufactured by NCT Automation kft. H1148 Budapest Fogarasi út 7 : Address: H1631 Bp. pf.: 26 F Phone: (+36 1) 467 63 00 F Fax:(+36 1) 363 6605 E-mail: nct@nct.hu Home Page: www.nct.
Contents 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.1 The Part Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Word . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Address Chain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.4.2 Exact Stop Mode (G61) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4.3 Continuous Cutting Mode (G64) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4.4 Override and Stop Inhibit (Tapping) Mode (G63) . . . . . . . . . . . . . . . . . . . . . . . . 6.4.5 Automatic Corner Override (G62) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4.6 Internal Circular Cutting Override . . . . . . . . . . . . . . . . . .
13.1 Sequence Number (Address N) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13.2 Conditional Block Skip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13.3 Main Program and Sub-program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13.3.1 Calling the Sub-program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13.3.2 Return from a Sub-program . . . .
17.1.4 Canned Cycle Cancel (G80) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17.1.5 Drilling, Spot Boring Cycle (G81) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17.1.6 Drilling, Counter Boring Cycle (G82) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17.1.7 Peck Drilling Cycle (G83) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17.1.8 Tapping Cycle (G84) . . . . . . . . . . . . . . . . . . . . . .
20.13.1 Definition, Substitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20.13.2 Arithmetic Operations and Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20.13.3 Logical Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20.13.4 Unconditional Divergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20.13.5 Conditional Divergence . . . . . . . . . . . . .
© Copyright NCT July 2, 2002 The Publisher reserves all rights for contents of this Manual. No reprinting, even in extracts, is permissible unless our written consent is obtained. The text of this Manual has been compiled and checked with utmost care, yet we assume no liability for possible errors or spurious data and for consequential losses or demages.
1 Introduction 1 Introduction 1.1 The Part Program The Part Program is a set of instructions that can be interpreted by the control system in order to control the operation of the machine. The Part Program consists of blocks which, in turn, comprise words. Word: Address and Data Each word is made up of two parts - an address and a data. The address has one or more characters, the data is a numerical value (an integer or decimal value). Some addresses may be given a sign or operator I.
1 Introduction Block A block is made up of words. The blocks are separated by characters s (Line Feed) in the memory. The use of a block number is not mandatory in the blocks. To distinguish the end of block from the beginning of another block on the screen, each new block begins in a new line, with a character > placed in front of it, in the case of a block longer than a line, the words in each new line are begun with an indent of one character.
1 Introduction return from the sub-program to the calling program. DNC Channel A program contained in an external unit (e.g., in a computer) can also be executed without storing it in the control's memory. Now the control will read the program, instead of the memory, from the external data medium through the RS232C interface. That link is referred to as "DNC channel". This method is particularly useful for the execution of programs too large to be contained in the control's memory.
1 Introduction 1.2 Fundamental Terms The Interpolation The control system can move the tool along straight lines and arcs in the course of machining. These activities will be hereafter referred to as "interpolation". Tool movement along a straight line: program: G01 Y__ X__ Y__ Fig. 1.2-1 Tool movement along an arc: program: G03 X__ Y__ R__ Although, in general, the table with the workpiece and not the tool moves, this description will refer to the motion of the tool against the workpiece. Fig. 1.
1 Introduction Reference Point The reference point is a fixed point on the machine-tool. After power-on of the machine, the slides have to be moved to the reference point. Afterwards the control system will be able to interpret data of absolute coordinates as well. Coordinate System The dimensions indicated in the part drawing are measured from a given point of the part. That point is the origin of the workpiece coordinate system.
1 Introduction Absolute Coordinate Specification When absolute coordinates are specified, the tool travels a distance measured from the origin of the coordinate system, i.e., to a point whose position has been specified by the coordinates. The code of absolute data specification is G90. The block G90 X50 Y80 Z40 will move the tool to a point of the above position, irrespective of its position before the command has been issued. Fig. 1.
1 Introduction the code of G90 (absolute data specification) and the value of F (Feed), specified in block N15, will be modal in blocks N16 and N17. Thus it is not necessary to specify those functions in each block followed. One-shot (Non-modal) Functions Some codes or values are effective only in the block in which they are specified. These are one-shot functions. Spindle Speed Command The spindle speed can be specified at address S. It is also termed as "S function".
1 Introduction Cutter Radius Compensation Machining a workpiece has to be done with tools of different radii. Radius compensation has to be introduced in order to write the actual contour data of the part in the program, instead of the path covered by the tool center (taking into consideration the tool radii). The values of radius compensations have to be set in control system. Hereinafter reference can be made to cutter compensations at address D in the program. Fig. 1.
2 Controlled Axes 2 Controlled Axes Number of Axes (in basic configuration) 3 axes In expanded configuration 5 additional axes (8 axes altogether) Number of axes to be moved simultaneously 8 axes (with linear interpolation) 2.1 Names of axes The names of controlled axes can be defined in the parameter memory. Each address can be assigned to one of the physical axes. In the basic configuration, the names of axes in a milling control system: X, Y and Z.
2 Controlled Axes The rotational axes are always provided with degrees as units of measure. The input increment system of the control is regarded as the smallest unit to be entered. It can be selected as parameter. There are three systems available - IS-A IS-B and IS-C. The increment systems may not be combined for the axes on a given machine. Having processed the input data, the control system will provide new path data for moving the axes.
3 Preparatory Functions (G codes) 3 Preparatory Functions (G codes) The type of command in the given block will be determined by address G and the number following it. The Table below contains the G codes interpreted by the control system, the groups and functions thereof. G code Group G00* Function Page positioning 22 linear interpolation 22 G02 circular, helical interpolation, clockwise (CW) 24 G03 circular, helical interpolation, counter-clockwise (CCW) 24 G04 dwell 52 G05.
3 Preparatory Functions (G codes) G code Group G39 G40 Function cutter compensation corner arc * G41 cutter radius/3 dimensional tool compensation cancel 07 G42 G43* Page 100 85 cutter radius compensation left/3 dimensional tool compensation 85, 88 cutter radius compensation right 85, 88 tool length compensation + 80 tool length compensation – 80 tool offset increase 81 tool offset decrease 81 tool offset double increase 81 tool offset double decrease 81 tool length compensation c
3 Preparatory Functions (G codes) G code Group Function Page G80* canned cycle cancel 141 G81 drilling, spot boring cycle, 141 G82 drilling, counter boring cycle 142 G83 peck drilling cycle 143 G84 tapping cycle 144 G84.2 rigid tap cycle 145 G84.
4 The Interpolation 4 The Interpolation 4.1 Positioning (G00) The series of instructions G00 v refers to a positioning in the current coordinate system. It moves to the coordinate v. Designation v (vector) refers here (and hereinafter) to all controlled axes used on the machine-tool. (They may be X, Y, Z, U, V, W, A, B, C) The positioning is accomplished along a straight line involving the simultaneous movements of all axes specified in the block. The coordinates may be absolute or incremental data.
4 The Interpolation Feed along the axis Y is ............................. Feed along the axis U is ............................. Feed along the axis C is where x, y, u, c are the displacements programmed along the respective axes, L is the vectorial length of programmed displacement: G01 X100 Y80 F150 Fig. 4.2-1 The feed along a rotational axis is interpreted in units of degrees per minute (°/min): G01 B270 F120 In the above block, F120 means 120deg/minute.
4 The Interpolation 4.3 Circular and Spiral Interpolation (G02, G03) The series of instructions specify circular interpolation. A circular interpolation is accomplished in the plane selected by commands G17, G18, G19 in clockwise or counter-clockwise direction (with G02 or G03, respectively). Fig. 4.3-1 Here and hereinafter, the meanings of Xp, Yp, and Zp are: Xp: axis X or its parallel axis, Yp: axis Y or its parallel axis, Zp: axis Z or its parallel axis.
4 The Interpolation Further data of the circle may be specified in one of two different ways. Case 1 At address R where R is the radius of the circle. Now the control will automatically calculate the coordinates of the circle center from the start point coordinates (the point where the control is in the instant of the circle block being entered), the end point coordinates (values defined at addresses Xp, Yp, Zp) and from the programmed circle radius R.
4 The Interpolation The feed along the path can be programmed at address F, pointing in the direction of the circle tangent, and being constant all along the path. L Notes: – I0, J0, K0 may be omitted, e.g. G03 X0 Y100 I-100 – When each of Xp, Yp and Zp is omitted, or the end point coordinate coincides with the start point coordinate, then: a. If the coordinates of the circle center are programmed at addresses, I, J, K the control will interpolate a complete circle of Fig. 4.3-4 360°. E.g.: G03 I-100, b.
4 The Interpolation The program detail below is an example of how a spiral interpolation (circle of varying radius) can be specified by the use of addresses I, J, K. G17 G90 G0 X50 Y0 G3 X-20 I-50 Fig. 4.
4 The Interpolation The feed specified at address F is effective along the circle path. Feed component Fq along axis q is obtained from the relationship where Lq: displacement along axis q, Larc: length of circular arc, F: programmed feed, Fq: feed along axis q. Fig. 4.4-1 For example: G17 G03 X0 Y100 Z20 R100 F150 The series of instructions define a multi-dimensional spatial helical interpolation in which q, r, s are optional axes not involved in the circle interpolation.
4 The Interpolation – The specified tool-radius compensation is implemented invariably in the plane of the circle. 4.5 Equal Lead Thread Cutting (G33) The instruction G33 v F Q G33 v E Q will define a straight or taper thread cutting of equal lead. The coordinates of maximum two axes can be written for vector v. The control will cut a tapered thread if two coordinated data are assigned to vector v. The control will take the lead into consideration along the long axis. If "<45°, i.e.
4 The Interpolation An example of programming a thread-cutting: N50 N55 N60 N65 N70 N75 N80 N85 N90 ...
4.6 Polar Coordinate Interpolation (G12.1, G13.1) 4.6 Polar Coordinate Interpolation (G12.1, G13.1) Polar coordinate interpolation is a control operation method, in case of which the work described in a Cartesian coordinate system moves its contour path by moving a linear and a rotary axis. Command G12.1 switches polar coordinate interpolation mode on.
4.6 Polar Coordinate Interpolation (G12.1, G13.1) Programming length coordinates in the course of polar coordinate interpolation In the switched-on state of the polar coordinate interpolation length coordinate data may be programmed on both axes belonging to the selected plane; The rotary axis in the selected plane functions as the second (virtual) axis. If e.g. axes X and C have been selected by means of command G17 X_ C_ address C can be programmed like axis Y in the case of plane selection G17 X_ Y_.
4.6 Polar Coordinate Interpolation (G12.1, G13.1) The diagram beside shows the cases when straight lines parallel to axis X (1, 2, 3, 4) are programmed. )x move belongs to the programmed feed within a time unit. Different angular moves (n1, n2, n3, n4) belong to )x move for each straight lines (1, 2, 3, 4). Apparently, the closer the machining gets to the origin the larger angular movement the rotary axis has to make within a time unit in order to keep the programmed feed.
4.6 Polar Coordinate Interpolation (G12.1, G13.1) N070 G17 G0 X200 C0 N080 N090 N100 N110 N120 N130 N140 N150 N160 N170 N180 N190 N200 N210 N220 ... % 34 G94 Z-3 S1000 M3 G12.1 G42 G1 X100 F1000 C30 G3 X60 C50 I-20 J0 G1 X-40 X-100 C20 C-30 G3 X-60 C-50 R20 G1 X40 X100 C-20 C0 G40 G0 X150 G13.
4.7 Cylindrical Interpolation (G7.1) 4.7 Cylindrical Interpolation (G7.1) Should a cylindrical cam grooving be milled on a cylinder mantle, cylindrical interpolation is to be used. In this case the rotation axis of the cylinder and of a rotary axis must coincide.
4.7 Cylindrical Interpolation (G7.1) Application of tool radius compensation in case of cylindrical interpolation Commands G41, G42 can be used in the usual manner in the switched-on state of cylindrical interpolation. Though the following restrictions are in effect regarding its application: – Switch-on of cylindrical interpolation (command G7.1 Qr) is only possible in state G40.
4.7 Cylindrical Interpolation (G7.1) N140 N150 N160 N170 N180 ... % G2 Z-10 C335 R35 G1 C360 G40 Z-20 G7.
5 The Coordinate Data 5 The Coordinate Data 5.1 Absolute and Incremental Programming (G90, G91), Operator I The input coordinate data can be specified as absolute or incremental values. In an absolute specification, the coordinates of the end point have to be specified for the control, for an incremental data, it is the distance to go in the block. G90: Programming of absolute data G91: Programming of incremental data G90 and G91 are modal functions.
5 The Coordinate Data Example: G90 G16 G01 X100 Y60 F180 Both the radius and the angle are absolute data, the tool moves to the point of 100mm; 60°. G90 G16 G01 X100 YI40 F180 The angle is an incremental data. A movement by 40° relative to the previous angular position is moved. Fig. 5.2-1 With the radius, specified as an incremental value, the instantaneous position of the axes will be the origin of the polar coordinate system. A circle can be programmed with polar coordinate data command (G16).
5 The Coordinate Data N3 N4 N5 N6 N7 N8 Y120 Y180 Y240 Y300 Y360 G15 G0 X100 5.3 Inch/Metric Conversion (G20, G21) With the appropriate G code programmed, the input data can be specified in metric or inch units. G20: Inch input programming G21: Metric input programming At the beginning of the program, the desired input unit has to be selected by specifying the appropriate code. The selected unit will be effective until a command of opposite meaning is issued, i.e., G20 and G21 are modal codes.
5 The Coordinate Data The value ranges of the length coordinates are shown in the Table below. input unit mm output unit increment system mm inch mm inch inch mm inch value range of length coordinates IS-A ± 0.01-999999.99 IS-B ± 0.001-99999.999 IS-C ± 0.0001-9999.9999 IS-A ± 0.001-39370.078 IS-B ± 0.0001-3937.0078 IS-C ± 0.00001-393.70078 IS-A ± 0.001-99999.999 IS-B ± 0.0001-9999.9999 IS-C ± 0.00001-999.99999 IS-A ± 0.01-999999.99 IS-B ± 0.001-99999.999 IS-C ± 0.
5 The Coordinate Data Enabling the handling of roll-over The function is affected by setting parameter 0241 ROLLOVEN_A, 0242 ROLLOVEN_B or 0243 ROLLOVEN_C to 1 for axes A, B or C, respectively, provided the appropriate axis is a rotary one. If the given parameter ROLLOVEN_x – =0: the rotary axis is regarded as linear axis and the setting of further parameters is uneffective, – =1: handling of roll-over is applied for the rotary axis, the essence of which is discussed below.
5 The Coordinate Data Movement of rotary axis in case of incremental programming In case of programming incremental data input the direction of movement is always according to the programmed sign. The appropriate parameter ROLLAMNT_x to be applied for movement setting can be set at parameter 0247 RELROUND_A, 0248 RELROUND_B or 0249 RELROUND_C for axis A, B or C, respectively. If the appropriate parameter RELROUND_x – =0: parameter ROLLAMNT_x is out of use, i.e.
6 The Feed 6 The Feed 6.1 Feed in rapid travers G00 commands a positioning in rapid traverse. The value of rapid traverse for each axis is set by parameter by the builder of the machine. The rapid traverse may be different for each axis.
6 The Feed The feed value (F) is modal. After power-on, the feed value set at parameter FEED will be effective. 6.2.1 Feed per Minute (G94) and Feed per Revolution (G95) The unit of feed can be specified in the program with the G94 and G95 codes: G94: feed per minute G95: feed per revolution The term "feed/minute" refers to a feed specified in units mm/minute, inch/minute or degree/minute.
6 The Feed The Table below shows the maximum programmable range of values at address F, for various cases. input units mm inch inch mm output units mm mm inch inch increment system value range of address F unit IS-A 0.001 - 250000 IS-B 0.0001 - 25000 mm or deg/min IS-C 0.00001 - 2500 IS-A 0.0001 - 5000 IS-B 0.00001 - 500 IS-C 0.000001 - 50 IS-A 0.0001 - 9842.5197 IS-B 0.00001 - 984.25197 IS-C 0.000001 - 98.25197 IS-A 0.00001 - 196.85039 IS-B 0.000001 - 19.685039 IS-C 0.
6 The Feed automatically in the course of program execution. The maximum jog feed can also be clamped separately by parameters for human response times. 6.3 Automatic Acceleration/Deceleration In rapid traverse, the control will automatically perform a linear acceleration and linear deceleration when starting and ending a movement. The extent of acceleration is defined by the machine tool builder, in parameter ACCn, depending on the dynamics of the machine. Fig. 6.
6 The Feed The control is monitoring the changes in tangential speeds. This is necessary to attain the commanded speed in a process of continuous acceleration, if necessary, through several blocks. The acceleration to the new feed (higher than the previous one) is commenced by the control invariably in the execution of the particular block, in which the new feed value is specified. That process may, if necessary, cover several blocks.
6 The Feed 6.4.3 Continuous Cutting Mode (G64) Modal function. The control will assume that state after power-on. It will be canceled by codes G61, G62 or G63. In this mode the movement will not come to a halt on the completion of the interpolation, the slides will not slow down. Instead, the interpolation of the next block will be commenced immediately. Sharp corners cannot be machined in this mode, because they will be rounded off. 6.4.
6 The Feed Deceleration and acceleration will be commenced at distances Ll and Lg before and after the corner, respectively. In the case of (circles) arcs, distance Ll and Lg will be calculated by the control along the arc. Distances Ll and Lg will be defined in Fig. 6.4.5-3 parameters DECDIST and ACCDIST, respectively. The value of override can be selected as a percent in parameter CORNOVER.
7 The Dwell 7 The Dwell (G04) The (G94) G04 P.... command will program the dwell in seconds. The range of P is 0.001 to 99999.999 seconds. The (G95) G04 P.... command will program the dwell in terms of spindle revolutions. The range of P is 0.001 to 99999.999 revolutions. Depending on parameter SECOND, the delay may refer always to seconds as well, irrespective of the states of G94, G95. The dwell implies invariably the programmed delay of the execution of the next block. It is a nonmodal function.
8 The Reference Point 8 The Reference Point The reference point is a distinguished position on the machine-tool, to which the control can easily return. The location of the reference point can be defined as a parameter in the coordinate system of the machine. Work coordinate system can be measured and absolute positioning can be done after reference point return. The parametric overtravel positions and the stroke check function are only effective after reference-point return. Fig. 8-1 8.
8 The Reference Point 8.2 Automatic return to reference points 2nd, 3rd, 4th (G30) Series of instructions G30 v P will send the axes of coordinates defined at the addresses of vector v to the reference point defined at address P. P1=reference point 1 P2=reference point 2 P3=reference point 3 P4=reference point 4 The reference points are special positions defined by parameters (REFPOS1, ..., REFPOS4) in the coordinate system of the machine-tool, used for change positions, e.g.
8 The Reference Point taken into account in the new coordinate system. In the second phase it will move from the intermediate point to the point v defined in instruction G29. If coordinate v has an incremental value, the displacement will be measured from the intermediate point. When the cutter compensation is set up, it will move to the end point by taking into account the compensation vector. A non-modal code. An example of using G30 and G29: ... G90 ... G30 P1 X500 Y200 G29 X700 Y150 ... ... Fig. 8.
9 Coordinate Systems, Plane Selection 9 Coordinate Systems, Plane Selection The position, to which the tool is to be moved, is specified with coordinate data in the program. When 3 axes are available (X, Y, Z), the position of the tool is expressed by three coordinate data X____ Y____ Z____ : Fig. 9-1 The tool position is expressed by as many different coordinate data as is the number of axes on the machine. The coordinate data refer invariably to a given coordinate system.
9 Coordinate Systems, Plane Selection 9.1.1 Setting the Machine Coordinate system After a reference point return, the machine coordinate system can be set in parameters. The distance of the reference point, calculated from the origin of the machine coordinate system, has to be written for the parameter. 9.1.2 Positioning in the Machine Coordinate System (G53) Instruction G53 v will move the tool to the position of v coordinate in the machine coordinate system.
9 Coordinate Systems, Plane Selection Fig. 9.2.1-2 Furthermore, all work coordinate system can be offset with a common value. It can also be entered in setting mode. 9.2.2 Selecting the Work Coordinate System The various work coordinate system can be selected with instructions G54...G59. G54........work coordinate system 1 G55........work coordinate system 2 G56........work coordinate system 3 G57........work coordinate system 4 G58........work coordinate system 5 G59........
9 Coordinate Systems, Plane Selection After a change of the work coordinate system, the tool position will be displayed in the new coordinate system. For instance, there are two workpieces on the table. The first work coordinate system (G54) has been assigned to zero point of one of the workpieces, which has an offset of X=300, Y=800 (calculated in the machine coordinate system).
9 Coordinate Systems, Plane Selection If, e.g., the tool is at a point of X=150, Y=100 coordinates, in the actual (current) X, Y work coordinate system, instruction G92 X90 Y60 will create a new X', Y' coordinate system, in which the tool will be set to the point of X'=90, Y'=60 coordinates. The axial components of offset vector v' between coordinate systems X, Y and X', Y' are v'x=150-90=60, and v'y=100–60=40. Fig. 9.2.4-1 Command G92 will prevail in each of the six work coordinate systems, i.e.
9 Coordinate Systems, Plane Selection will create a local coordinate system. – If coordinate v is specified as an absolute value, the origin of the local coordinate system will coincide with the point v in the work coordinate system. – When specified as an incremental value, the origin of the local coordinate system will be shifted with v offset (provided a local coordinate system has been defined previously, or else the offset is produced with respect to the origin of the work coordinate system).
9 Coordinate Systems, Plane Selection The local coordinate system will be offset in each work coordinate system. Fig. 9.3-2 Programming instruction G92 will delete the offsets produced by instruction G52 on the axes specified inG92 - as if command G52 v0 had been issued. Whenever the tool is at point of X=200, Y=120 coordinates in the X, Y work coordinate system, instruction G52 X60 Y40 will shift its position to X'=140, Y'=80 in the X', Y' local coordinate system.
9 Coordinate Systems, Plane Selection Xp=X or an axis parallel to X, Yp=Y or an axis parallel to Y, Zp=Z or an axis parallel to Z. The selected plane is referred to as "main plane".
10 The Spindle Function 10 The Spindle Function 10.1 Spindle Speed Command (code S) With a number of max. five digits written at address S, the NC will give a code to the PLC. Depending on the design of the given machine-tool, the PLC may interpret address S as a code or as a data of revs/minute. When a movement command and a spindle speed (S) are programmed in a given block, function S will be issued during or after the motion command. The machine tool builder will define the way of execution.
10 The Spindle Function 10.2.1Constant Surface Speed Control Command (G96, G97) Command G96 S switches constant surface speed control function on. The constant surface speed must be specified at address S in the unit of measure given in the above table. Command G97 S cancels constant surface speed control. The desired spindle speed can be specified at address S (in revs/min).
10 The Spindle Function 10.2.3 Selecting an Axis for Constant Surface Speed Control The axis, which position the constant surface speed is calculated from, is selected by parameter 1182 AXIS. The logic axis number must be written at the parameter. If other than the selected axis is to be used, the axis from which the constant surface speed is to be calculated can be specified by means of command G96 P.
10 The Spindle Function 10.5 Spindle Positioning (Indexing) A spindle positioning is only feasible after the spindle position control loop has been closed after orientation. Accordingly, this function is used for closing the loop. The loop will be opened by rotation command M3 or M4. If the value of parameter INDEX1=1 (indicating that the main drive position control loop can be closed) and the value of parameter INDEX_C1=0, the spindle indexing will be performed by function M.
10 The Spindle Function Start of Spindle Speed Fluctuation Detection As the effect of new rotation speed the detection is suspended by the control. The speed fluctuation detection starts when - the current spindle speed reaches the specified spindle speed within the tolerance limit determined by value "q", or Fig. 10.
10 The Spindle Function Detecting Error In the course of detection the control sends error message in case the deviation between current and specified spindle speed exceeds - the tolerance limit specified by value "r" in percent of the command value and - also the absolute tolerance limit specified by value "d" When the current speed has exceeded both tolerance limits, the NC sets flag I656 to PLC. The speed range, in which the NC issues alarm, can be seen on the 3rd figure.
11 Tool Function 11 Tool Function 11.1 Tool Select Command (Code T) With a number of max. four digits written at address T, the NC will give a code to the PLC. When a movement command and a tool number (T) are programmed in a given block, function T will be issued during or after the motion command. The machine tool builder will define the way of execution. 11.2 Program Format for Tool Number Programming There are basically two different ways of making reference to a tool change in the part program.
11 Tool Function This procedure is described in the part program as follows. Part Program ................. ....Tnnnn........ ................. ...M06 Tmmmm.... ................. ................. ...M06 Tpppp..... ................. .................
12 Miscellaneous and Auxiliary Functions 12 Miscellaneous and Auxiliary Functions 12.1 Miscellaneous Functions (Codes M) With a numerical value of max. 3 digits specified behind address M, the NC will transfer the code to the PLC. When a movement command and a miscellaneous function (M) are programmed in a given block, function M will be issued during or after the motion command. The machine tool builder will define the way of execution.
12 Miscellaneous and Auxiliary Functions M98= call of a subprogram (subroutine) It will call a subprogram (subroutine). M99= end of subprogram (subroutine) It will cause the execution to return to the position of call. 12.2 Auxiliary Function (Codes A, B, C) Max. three digits can be specified at each of addresses A, B, C provided one (or all) of those addresses is (are) selected as auxiliary function(s) in parameters. The value specified for the auxiliary function will be transferred to the PLC.
13 Part Program Configuration 13 Part Program Configuration The structure of the part program has been described already in the introduction presenting the codes and formats of the programs in the memory. This Section will discuss the procedures of organizing the part programs. 13.1 Sequence Number (Address N) The blocks of the program can be specified with serial or sequence numbers. The numbering can be accomplished at address N. The blocks can be numbered with max. 5 digits at address N.
13 Part Program Configuration main program O0010 ...... ...... M98 P0011 next block subprogram comment execution of (main-) program O0010 –––> O0011 <––– ...... ...... ...... M99 calling sub-program O0011 execution of subprogram O0011 return to the calling program resumption of program O0010 ...... ...... The series of instructions M98 P.... L.... will call the subprogram (specified at address P) repeteatedly in succession specified at address L. The limit of address L is 1 to 9999.
13 Part Program Configuration main program O0010 ...... ...... ...... N101 M98 P0011 N102 ...... subprogram comment execution of program O0010 –––> O0011 <––– ...... ...... ...... M99 ...... ...... calling sub-program O0011 execution of subprogram O0011 return to the next block of the calling program resumption of program O0010 The use of instruction M99 P...
13 Part Program Configuration 13.3.3 Jump within the Main Program The use of instruction M99 in the main program will produce an unconditional jump to the first block of the main program, and the execution of the program will be resumed there. The use of this instruction results in an endless cycle: O0123 N1... ... ..... ..... M99 < The use of instruction M99 P.....
14 The Tool Compensation 14 The Tool Compensation 14.1 Referring to Tool Compensation Values (H and D) Reference can be made to tool length compensation at address H, tool radius compensation at address D. The number behind the address (the tool compensation number) indicates the particular compensation value to be applied. The limit values of addresses H and D are 0 to 999. The Table below shows the division of the compensation memory. Code H compensation number 01 02 . . . geometry -350.200 830.
14 The Tool Compensation Limit values of geometry and wear: input units mm inch inch mm output units mm mm inch inch increment system geometry value wear value IS-A ±0.01 ÷99999.99 ±0.01÷163.80 IS-B ±0.001÷9999.999 ±0.001÷16.380 IS-C ±0.0001÷999.9999 ±0.0001÷1.6380 IS-A ±0.001÷9999.999 ±0.001÷6.448 IS-B ±0.0001÷999.9999 ±0.0001÷0.6448 IS-C ±0.00001÷99.99999 ±0.00001÷0.06448 IS-A ±0.001÷9999.999 ±0.001÷16.380 IS-B ±0.0001÷999.9999 ±0.0001÷1.6380 IS-C ±0.00001÷99.
14 The Tool Compensation 14.3 Tool Length Compensation (G43, G44, G49) Instruction G43 q H or G44 q H will set up the tool length compensation mode. Address q means axis q to which the tool length compensation is applied (q= X, Y, Z, U, V, W, A, B, C). Address H means the compensation cell, from which the tool length compensation value is taken.
14 The Tool Compensation If, however, instruction G49 is used, any reference to address H will be ineffective until G43 or G44 is programmed. At power-on, the value defined in parameter group CODES decides which code is effective (G43, G44, G49). The example below presents a simple drilling operation with tool length compensation taken into account: length of drilling tool, H1=400 Fig. 14.
14 The Tool Compensation With G45 programmed (increase by the offset value): a. movement command: 20 b. movement command: 20 compensation: 5 compensation: -5 Fig. 14.4-1 a. movement command: -20 compensation: 5 Fig. 14.4-3 Fig. 14.4-2 b. movement command: -20 compensation: -5 Fig. 14.4-4 With G46 programmed (decrease by the offset value): a. movement command: 20 cases b, c, d are similar to G45 compensation: 5 Fig. 14.
14 The Tool Compensation With G47 programmed (double increase by the offset value): a. movement command: 20 cases b, c, d are similar to G45 compensation: 5 Fig. 14.4-6 With G48 programmed (double decrease by the offset value): a. movement command: 20 cases b, c, d are similar to G45 compensation: 5 Fig. 14.4-7 If, after command G45...
14 The Tool Compensation NC command G45 XI0 D1 G46 XI0 D1 G45 XI-0 D1 G46 XI-0 D1 displacement x=12 x=-12 x=-12 x=12 A tool radius compensation applied with one of codes G45...G48 is also applicable with ¼ and ¾ circles, provided the centers of the circles are specified at address I, J or K.
14 The Tool Compensation 14.5 Cutter Compensation (G38, G39, G40, G41, G42) To be able to mill the contour of a two-dimensional workpiece and to specify the points of that formation as per the drawing in the program (regardless of the size of the tool employed), the control must guide the tool center parallel to the programmed contour, spaced by a tool radius from the latter.
14 The Tool Compensation compensation calculations are performed for interpolation movements G00, G01, G02, G03. The above points refer to the specification of positive tool radius compensation, but its value may be negative, too. It has a practical meaning if, e.g., a given subprogram is to be used for defining the contours of a "female" part and of a "male" one being matched to the former. A possible way of doing this is to mill the female part with G41 and the male part with G42.
14 The Tool Compensation An auxiliary data is to be introduced before embarking on the discussion of the details of the compensation computation. It is """, the angle at the corner of two consecutive blocks viewing from the workpiece side. The direction of " depends on whether the tool goes around the corner from the left or right side. The control will select the strategy of going around in the intersection points as the function of angle ". If ">180°, i.e.
14 The Tool Compensation 14.5.1 Start up of Cutter Compensation After power-on, end of program or resetting to the beginning of the program, the control will assume state G40. The offset vector will be deleted, the path of the tool center will coincide with the programmed path. Under instruction G41 or G42 the control will exit from state G40 to enter in radius-compensation computation mode. The value of compensation will be taken from the compensation cell (D register).
14 The Tool Compensation Going around the outside of a corner at an obtuse angle, 90°#"#180° Fig. 14.5.1-2 Going around the outside of a corner at an acute angle, 0°#"<90° Fig. 14.5.1-3 Special instances of starting up the radius compensation: If values are assigned to I, J, K in the compensationselecting block (G41 or G42) - but only to those in the selected plane (e.g.
14 The Tool Compensation ... G91 G17 G40 ... N110 G42 G1 X-80 Y60 I50 J70 D1 N120 X100 ... In this case the control will always compute a point of intersection regardless of whether an inside or an outside corner is to be machined. Fig. 14.5.1-5 Unless a point of intersection is found, the control will move, at right angles, to the start point of the next interpolation. Fig. 14.5.
14 The Tool Compensation If zero displacement is programmed (or such is produced) in the block containing the activation of compensation (G41, G42), the control will not perform any movement but will carry on the machining along the above-mentioned strategy. ... N10 N15 N20 N25 ...
14 The Tool Compensation 14.5.2 Rules of Cutter Compensation in Offset Mode In offset mode the compensation vectors will be calculated continuously between interpolation blocks G00, G01, G02, G03 (see the basic instances) until more than one block will be inserted, that do not contain displacements in the selected plane. This category includes a block containing dwell or functions. Basic instances of offset mode: Computation of intersection point for inside corners, 180°<"<360° Fig. 14.5.
14 The Tool Compensation It may occur that no intersection point is obtained with some tool-radius values. In this case the control comes to a halt during execution of the previous interpolation and returns error message 3046 NO INTERSECTION G41, G42. Fig. 14.5.2-2 Going around the outside of a corner at an obtuse angle, 90°#"#180° Fig. 14.5.
14 The Tool Compensation Going around the outside of a corner at an acute angle, 0°#"<90° Fig. 14.5.2-4 Special instances of offset mode: If zero displacement is programmed (or such is obtained) in the selected plane in a block in offset mode, a perpendicular vector will be positioned to the end point of the previous interpolation, the length of the vector will be equal to the radius compensation.
14 The Tool Compensation 14.5.3 Canceling of Offset Mode Command G40 will cancel the computation of tool radius compensation. Such a command can be issued with linear interpolation only. The control will return error message 3042 G40 IN G2, G3 to any attempt to program G40 in a circular interpolation. Basic instances of canceling offset mode: (G42) G02 X_ Y_ R_ G40 G1 X_ Y_ (G42) G01 X_ Y_ G40 X_ Y_ Going around an inside corner, 180°<"<360° Fig. 14.5.
14 The Tool Compensation Going around the outside of a corner at an acute angle, 0°#"<90° Fig. 14.5.3-3 Special instances of canceling offset mode: If values are assigned to I, J, K in the compensation cancel block (G40) - but only to those in the selected plane (e.g., to I, J in the case of G17) - the control will move to the intersection point between the previous interpolation and the straight line defined by I, J, K.
14 The Tool Compensation Unless a point of intersection is found, the control will move, at a right angle, to the end point of the previous interpolation. Fig. 14.5.3-6 If the compensation is canceled in a block in which no movement is programmed in the selected plane, an offset vector perpendicular to the end point of the previous interpolation will be set and the compensation vector will be deleted by the end of the next movement block. ...G42 G17 G91... N110 G1 X80 Y40 N120 G40 N130 X-70 Y20 ... Fig.
14 The Tool Compensation 14.5.4 Change of Offset Direction While in the Offset Mode The direction of tool-radius compensation computation is given in the Table below. Radius compensation: positive Radius compensation: negative G41 left right G42 right left The direction of offset mode can be reversed even during the computation of tool radius compensation. This can be accomplished by programming G41 or G42, or by calling a tool radius compensation of an opposite sign at address D.
14 The Tool Compensation Unless a point of intersection is found in a linear-to-linear transition, the path of the tool will be: Fig. 14.5.4-2 Unless a point of intersection is found in a linear-to-circular transition, the path of the tool will be: Fig. 14.5.
14 The Tool Compensation 14.5.5 Programming Vector Hold (G38) Under the action of command G38 v the control will hold the last compensation vector between the previous interpolation and G38 block in offset mode, and will implement it at the end of G38 block irrespective of the transition between the G38 block and the next one. Code G38 is a single-shot one, i.e., it will not be modal. G38 has to be programmed over again if the vector is to be held in several consecutive blocks.
14 The Tool Compensation The start and end points of the arc will be given by a tool-radius long vector perpendicular to the end point of the path of previous interpolation and by a tool-radius vector perpendicular to the start point of the next one, respectively. G39 has to be programmed in a separate block: ...G17 G91 G41... N110 G1 X100 N120 G39 N130 G3 X80 Y-80 I80 ... Fig. 14.5.
14 The Tool Compensation 14.5.7 General Information on the Application of Cutter Compensation In offset mode (G41, G42), the control will always have to compute the compensation vectors between two interpolation blocks in the selected plane. In practice it may be necessary to program between two interpolation blocks in the selected plane a non-interpolation block or an interpolation outside of the selected plane.
14 The Tool Compensation If no cut is feasible in direction Z unless the radius compensation is set up, the following procedure may be adopted: ...G17 G91... N110 G41 G0 X50 Y70 D1 N120 G1 Z-40 N130 Y40 ... Now the tool will have a correct path as is shown in the Figure. Fig. 14.5.7-3 If, however, movement in direction Z is broken up into two sections (rapid traverse and feed), the path will be distorted because of the two consecutive interpolations outside of the selected plane: ...G17 G91...
14 The Tool Compensation The path of tool will be as follows when instructions G22, G23, G52, G54-G59, G92 G53 G28, G29, G30 are inserted between two interpolations. When command G22, G23, G52, G54-G59 or G92 is programmed in offset mode between two interpolation blocks, the compensation vector will be deleted at the end point of the previous interpolation, the command will be executed and the vector will be restored at the end point of the next interpolation.
14 The Tool Compensation If G28 or G30 is programmed (followed by G29) between two blocks in offset mode, the compensation vector will be deleted at the end point of the block it positions the tool to the intermediate point, the tool will move to the reference point, and the vector will be restored at the end point of the returning block G29. For example: ...G91 G17 G41... N110 G1 X80 Y–50 N120 G28 Y80 N130 G29 Y0 N140 X80 Y50 ... Fig. 14.5.
14 The Tool Compensation Fig. 14.5.7-10 A particular program detail or subprogram may be used also for machining a male or female workpiece with positive or negative radius compensation, respectively, or vice-versa. Let us review the following small program detail: ... N020 N030 N040 N050 N060 ... G42 G1 X80 D1 G1 Z-5 G3 I-80 G1 Z2 G40 G0 X0 Fig. 14.5.
14 The Tool Compensation When a full circle is being programmed, it may often occur that the path of tool covers more than a complete revolution round the circle in offset mode. For example, this may occur in programming a direction reversal along the contours: ...G17 G42 G91... N110 G1 X30 Y-40 N120 G41 G2 J-40 N130 G42 G1 X30 Y40 ... The tool center covers a full arc of a circle from point P1 to point P1 and another one from point P1 to point P2. Fig. 14.5.
14 The Tool Compensation Two or more compensation vectors may be produced when going around sharp corners. When their end points lie close to each other, there will be hardly any motion between the two points. When the distance between the two vectors is smaller than the value of parameter DELTV in each axis, the vector shown in the Figure will be omitted, and the path of the tool will be modified accordingly.
14 The Tool Compensation In the other words the control will check wether the compensated displacement vector has a component opposite to the programmed displacement vector or not. Fig. 14.5.8-2 If parameter ANGLAL is set to 1, the control will, after an angle check, return an interference error message 3048 INTERFERENCE ALARM one block earlier than the occurrence of the trouble. Fig. 14.5.
14 The Tool Compensation If parameter ANGLAL is set to 0, the control will not return an error message, but will automatically attempt to correct the contour in order to avoid overcutting. The procedure of compensation is as follows. Each of blocks A, B and C are in offset mode. The computed vectors between blocks A and B are PL1, PL2, PL3, PL4; the compensation vectors between blocks B and C are PL5, PL6, PL7, PL8. - PL4 and PL5 will be ignored if there is an interference between them.
14 The Tool Compensation Machining an inside corner with a radius smaller than the tool radius. The control returns error message 3048 INTERFERENCE ALARM or else overcutting would occure. Fig. 14.5.8-5 Milling a step smaller than the tool radius along an arc. If parameter ANGLAL is 0, the control will delete vector PL2 and will interconnect vectors PL1 and PL3 by a straight line to avoid a cut-in.
14 The Tool Compensation In the above example an interference error is returned again because the displacement of the compensated path in interpolation B is opposite to the programmed one. Fig. 14.5.8-8 14.6 Three-dimensional Tool Offset (G41, G42) The 2D tool radius compensation will offset the tool in the plane selected by commands G17, G18, G19. The application of the three-dimensional tool compensation enables the tool compensation to be taken into account in three dimensions. 14.6.
14 The Tool Compensation Command G40 or D00 will cancel the three-dimensional offset compensation. The difference between the two commands is that D00 will delete the compensation only, leaving state G41 or G42 unchanged. If a reference is made subsequently to a new address D (other than zero), the new tool compensation will be set up as the function of state G41 or G42. If, however, instruction G40 is used, any reference to address D will be ineffective until G41 or G42 is programmed.
14 The Tool Compensation Instruction G42 functions in the same manner as G41 with the difference that the compensation vector is computed in a direction opposite to G41: A change-over from state G41 to G42 or vice versa is only feasible in a linear interpolation block. The previous values will be modal if - with the three-dimensional tool compensation set up - I and J and K are all omitted in an interpolation.
15 Special Transformations 15 Special Transformations 15.1 Coordinate System Rotation (G68, G69) A programmed shape can be rotated in the plane selected by G17, G18, G19 by the use of command G68 p q R The coordinates of the center of rotation will be specified at address p and q. The system will only interpret the data written at coordinates p and q of the selected plane.
15 Special Transformations Example: N1 G17 G90 G0 X0 Y0 N2 G68 X90 Y60 R60 N3 G1 X60 Y20 F150 (G91 X60 Y20 F150) N4 G91 X80 N5 G3 Y60 R100 N6 G1 X-80 N7 Y-60 N8 G69 G90 X0 Y0 Fig. 15.1-3 15.2 Scaling (G50, G51) Command G51 v P can be used for scaling a programmed shape. P1...P4: points specified in the part program P1'...P4': points after scaling P0: center of scaling The coordinates of the scaling center can be entered at coordinates of v. The applicable addresses are X, Y, Z, U, V, W.
15 Special Transformations For example: N1 G90 G0 X0 Y0 N2 G51 X60 Y140 P0.5 N3 G1 X30 Y100 F150 (G91 X30 Y100 F150) N4 G91 X100 N5 G3 Y60 R100 N6 G1 X-100 N7 Y-60 N8 G50 G90 X0 Y0 Fig. 15.2-2 15.3 Programmable Mirror Image (G50.1, G51.1) A programmed shape can be projected as a mirror image along the coordinates selected in v by command G51.1 v in such a way that the coordinates of the axis (or axes) of mirror image can be specified in v. The v coordinate may be X, Y, Z, U, V, W, A, B, C.
15 Special Transformations Example: subprogram O0101 N1 G90 G0 X180 Y120 F120 N2 G1 X240 N3 Y160 N4 G3 X180 Y120 R80 N5 M99 Fig. 15.3-1 main program O0100 N1 G90 N2 M98 P101 N3 G51.1 X140 N4 M98 P101 N5 G51.1 Y100 N6 N7 N8 N9 M98 P101 G50.1 X0 M98 P101 G50.
15 Special Transformations Fig. 15.4-1 It is evident from the figure that the order of applying the various transformations is relevant. The programmed mirror image is a different case. It can be set up in states G50 and G69 only, i.e., in the absence of scaling and rotation commands. On the other hand, with mirror imaging set up, both scaling and rotation can be applied. Mirror images also may not be overlapped with scaling and rotation commands.
16 Automatic Geometric Calculations 16 Automatic Geometric Calculations 16.1 Programming Chamfer and Corner Round The control is able to insert chamfer or rounding between two blocks containing linear (G01) or circle interpolation (G02, G03) automatically. A chamfer, the length of which equals to the value specified at address ,C (comma and C) is inserted between the end point of the block containing address ,C and the start point of the forthcoming block. E.g.: N1 G1 G91 X30 ,C10 N2 X10 Y40 Fig. 16.
16 Automatic Geometric Calculations Command containing a chamfer or a corner rounding may also be written at the end of more successive blocks as shown in the below example: ... G1 Y40 ,C10 X60 ,R22 G3 X20 Y80 R40 ,C10 G1 Y110 ... L Note: – Chamfer or rounding can only be programmed Fig. 16.1-3 between the coordinates of the selected plane (G17, G18, G19), otherwise error message 3081 DEFINITION ERROR ,C ,R is sent by the control.
16 Automatic Geometric Calculations Fig. 16.2-1 For e: exampl G17 G90 G0 X57.735 Y0 ... G1 G91... X100 ,A30 (this specification is equivalent to X100 Y57.735 where 7.735=100A tg30°) Y100 ,A120 (this specification is equivalent to X-57.735 Y100 where !57.735=100/tg120°) X-100 ,A210 (this specification is equivalent to X-100 Y-57.735 where !57.735=!100A tg30°) Y-100 ,A300 (this specification is equivalent to X57.735 Y-100 where 57.735=!100/tg120°) Fig. 16.
16 Automatic Geometric Calculations 16.3 Intersection Calculations in the Selected Plane Intersection calculations discussed here are only executed by the control when tool radius compensation (G41 or G42 offset mode) is on. If eventually no tool radius compensation is needed in the part program turn the compensation on and use D00 offset: With tool radius compensation: Without tool radius compensation: G41(or G42) ...Dnn ... intersection calculations ... G40 G41(or G42) ...D00 ...
16 Automatic Geometric Calculations 16.3.1 Linear-linear Intersection If the second one of two successive linear interpolation blocks is specified the way that its both end point coordinates in the selected plane and also its angle is specified, the control calculates the intersection of the straight lines referred to in the first block and the straight line specified in the second one. The straight line specified in the second block is determined over.
16 Automatic Geometric Calculations the control as end point, but as a transit position binding the straight line with the start point.
16 Automatic Geometric Calculations Intersection calculation can also be combined with a chamfer or corner rounding specification. E.g.: Fig. 16.3.1-3 G17 G90 G41 D0... G0 X90 Y10 N10 G1 X50 Y33.094 ,C10 N20 X10 Y20 ,A225 G0 X0 Y20 ... Fig. 16.3.1-4 G17 G90 G41 D0... G0 X90 Y10 N10 G1 X50 Y33.094 ,R10 N20 X10 Y20 ,A225 G0 X0 Y20 ... In the above examples chamfering amount is measured from the calculated intersection, as well as rounding is inserted to the calculated intersection.
16 Automatic Geometric Calculations 16.3.2 Linear-circular Intersection If a circular block is given after a linear block in a way that the end and center position coordinates as well as the radius of the circle are specified, i.e., the circle is determined over, then the control calculates intersection between straight line and circle. The calculated intersection is the end point of the first block, as well as the start point of the second one.
16 Automatic Geometric Calculations G17 G41 (G42) N1 G1 ,A or X1 Y1 N2 G2 (G3) G90 X2 Y2 I JRQ Fig. 16.3.2-1 G18 G41 (G42) N1 G1,A or X1 Z1 N2 G2 (G3) G90 X2 Z2 I KRQ G19 G41 (G42) N1 G1 ,A or Y1 Z1 N2 G2 (G3) G90 Y2 Z2 J KRQ Fig. 16.3.2-2 The intersection is always calculated in the plane selected by G17, G18, G19.
16 Automatic Geometric Calculations Let us see the following example: Fig. 16.3.2-3 %O9981 N10 G17 G42 G0 X100 Y20 D0 S200 M3 N20 G1 X-30 Y-20 N30 G3 X20 Y40 I20 J-10 R50 Q-1 N40 G40 G0 Y60 N50 X120 N60 M30 % Fig. 16.3.
16 Automatic Geometric Calculations 16.3.3 Circular-linear Intersection If a linear block is given after a circular block in a way that the straight line is defined over, i.e., both its end point coordinate and the angle are specified, then the control calculates intersection between the circle and the straight line. The calculated intersection is the end point of the first block, as well as the start point of the second one. G17 G41 (G42) N1 G2 (G3) X1 Y1 I J or R N2 G1 G90 X2 Y2 ,A Q Fig. 16.3.
16 Automatic Geometric Calculations Let us see an example: Fig. 16.3.3-3 %O9983 N10 G17 G0 X90 Y0 M3 S200 N20 G42 G1 X50 D0 N30 G3 X-50 Y0 R50 N40 G1 X-50 Y42.857 ,A171.87 Q-1 N50 G40 G0 Y70 N60 X90 N70 M30 % Fig. 16.3.3-4 %O9984 N10 G17 G0 X90 Y0 M3 S200 N20 G42 G1 X50 D0 N30 G3 X-50 Y0 R50 N40 G1 X-50 Y42.857 ,A171.87 Q1 N50 G40 G0 Y70 N60 X90 N70 M30 % Linear block N40 is defined over because both the end point coordinates (X–50 Y42.875) and the angle (,A171.87) of the straight line are specified.
16 Automatic Geometric Calculations 16.3.4 Circular-circular Intersection If two successive circular blocks are specified so that the end point, the center coordinates as well as the radius of the second block are given, i.e., it is determined over the control calculates intersection between the two circles. The calculated intersection is the end point of the first block, as well as the start point of the second one. G17 G41 (G42) N1 G2 (G3) X1 Y1 I1 J1 or X1 Y1 R1 N2 G2 (G3) G90 X2 Y2 I2 J2 R2 Q Fig. 16.
16 Automatic Geometric Calculations I, J, K coordinates defining the circle center, are always interpreted by the control as absolute data (G90). Of the two resulting intersections the one to be calculated by the control can be specified at address Q. If the address value is less than zero (Q<0, e.g., Q–1) the first intersection is calculated, while if the address value is greater than zero (Q>0, e.g., Q1) it is the second one.
16 Automatic Geometric Calculations Let us see the following example: Fig. 16.3.4-3 %O9985 N10 G17 G54 G0 X200 Y10 M3 S200 N20 G42 G1 X180 D1 N30 G3 X130 Y-40 R-50 N40 X90 Y87.446 I50 J30 R70 Q–1 N50 G40 G0 Y100 N60 X200 N70 M30 % Fig. 16.3.4-4 %O9986 N10 G17 G54 G0 X200 Y10 M3 S200 N20 G42 G1 X180 D1 N30 G3 X130 Y-40 R-50 N40 X90 Y87.
16 Automatic Geometric Calculations 16.3.5 Chaining of Intersection Calculations Intersection calculation blocks can be chained, i.e., more successive blocks can be selected for intersection calculation. The control calculates intersection till straight lines or circles determined over are found. Let us examine the example below: Fig. 16.3.
17 Canned Cycles for Drilling 17 Canned Cycles for Drilling A drilling cycle may be broken up into the following operations.
17 Canned Cycles for Drilling where Xp is axis X or the one parallel to it Yp is axis Y or the one parallel to it Zp is axis Z or the one parallel to it. Axes U, V, W are regarded to be parallel ones when they are defined in parameters. The drilling cycles can be configured with instructions G98 and G99. G98 : The tool is retracted as far as the initial point in the course of the drilling cycle. A normal (default) status assumed by the control after power-on, reset or deletion of cycle mode.
17 Canned Cycles for Drilling The code of drilling: For meanings of the codes see below. Each code will be modal until an instruction G80 or a code is programmed, that belongs to G code group 1 (interpolation codes: G01, G02, G03, G33). As long as the cycle state is on (instructions G73, G74, G76, G81,...G89), the modal cycle variables will be modal between drilling cycles of various types, too.
17 Canned Cycles for Drilling tool is to be withdrawn from the surface can be specified at addresses I, J or K. The control will interpret the addresses in conformity with the plane selected. G17: I, J G18: K, I G19: J, K Each address is interpreted as an incremental data of rectangular coordinates. The address may be a metric or inch one. The mirror image, coordinate system rotation and scaling commands are not applicable to data of I, J, K. The latter are modal values.
17 Canned Cycles for Drilling Cut-in value (Q) It is the depth of the cut-in, in the cycles of G73 and G83. It is invariably an incremental, rectangular positive data (a modal one). Its value will be deleted by G80 or by the codes of the interpolation group. The scaling does not affect the value of cut-in depth. Auxiliary data (E) The extent of retraction in the cycle of G73 and value of clearance in the cycle of G83 is specified on address E. It is always an incremental, rectangular, positive data.
17 Canned Cycles for Drilling Examples of using cycle repetitions : If a particular type of hole is to be drilled with unchanged parameters at equally spaced positions, the number of repetitions can be specified at address L. The value of L is only effective in the block, in which it has been specified. N1 G90 G17 G0 X0 Y0 Z100 M3 N2 G91 G81 X100 Z–40 R–97 F50 L5 Under the above instructions the control will drill 5 identical holes spaced at 100mm along axis X.
17 Canned Cycles for Drilling 17.1 Detailed Description of Canned Cycles 17.1.1 High Speed Peck Drilling Cycle (G73) Fig. 17.1.1-1 The variables used in the cycle are G17 G73 Xp__ Yp__ Zp__ R__ Q__ E__ F__ L__ G18 G73 Zp__ Xp__ Yp__ R__ Q__ E__ F__ L__ G19 G73 Yp__ Zp__ Xp__ R__ Q__ E__ F__ L__ The operations of the cycle are 1. rapid-traverse positioning 2. 3. rapid-traverse movement to point R 4. 5. drilling as far as the point Z, with feed F 6. 7. with G99, retraction to point R, in rapid traverse 8.
17 Canned Cycles for Drilling 17.1.2 Counter Tapping Cycle (G74) Fig. 17.1.2-1 This cycle can be used only with a spring tap. The variables used in the cycle are G17 G74 Xp__ Yp__ Zp__ R__ (P__) F__ L__ G18 G74 Zp__ Xp__ Yp__ R__ (P__) F__ L__ G19 G74 Yp__ Zp__ Xp__ R__ (P__) F__ L__ Prior to start the cycle, the spindle has to be started or programmed to rotate in the direction of M4 (counter-clockwise). The value of feed has to be specified in conformity with the thread pitch of the tapper.
17 Canned Cycles for Drilling 17.1.3 Fine Boring Cycle (G76) Fig. 17.1.3-1 Cycle G76 is only applicable when the facility of spindle orientation is incorporated in the machinetool. In this case parameter ORIENT1 is to be set to 1, otherwise message 3052 ERROR IN G76 is returned. Since, on the bottom point, the cycle performs spindle orientation and recesses the tool from the surface with the values specified at I, J and K, the part will not be scratched when the tool is withdrawn.
17 Canned Cycles for Drilling – spindle re-started in direction M3 17.1.4 Canned Cycle Cancel (G80) The code G80 will cancel the cycle state, the cycle variables will be deleted. Z and R will assume incremental 0 value (the rest of variables will assume 0). With coordinates programmed in block G80 but no other instruction is issued, the movement will be carried out according to the interpolation code in effect prior to activation of the cycle (G code group 1). 17.1.5 Drilling, Spot Boring Cycle (G81) Fig.
17 Canned Cycles for Drilling 17.1.6 Drilling, Counter Boring Cycle (G82) Fig. 17.1.6-1 The variables used in the cycle are G17 G82 Xp__ Yp__ Zp__ R__ P__ F__ L__ G18 G82 Zp__ Xp__ Yp__ R__ P__ F__ L__ G19 G82 Yp__ Zp__ Xp__ R__ P__ F__ L__ the operations of the cycle are 1. rapid-traverse positioning in the selected plane 2. 3. rapid-traverse movement as far as point R 4. 5. drilling as far as the bottom point, with feed F 6. dwell for the time specified at address P 7.
17 Canned Cycles for Drilling 17.1.7 Peck Drilling Cycle (G83) Fig. 17.1.7-1 The variables used in the cycle are G17 G83 Xp__ Yp__ Zp__ R__ Q__ E__ F__ L__ G18 G83 Zp__ Xp__ Yp__ R__ Q__ E__ F__ L__ G19 G83 Yp__ Zp__ Xp__ R__ Q__ E__ F__ L__ The oprations of the cycle are 1. rapid-traverse positioning in the selected plane 2. 3. rapid-traverse movement to point R 4. 5. drilling to the bottom point, with feed F 6. 7. with G99, rapid-traverse retraction to point R 8. 9.
17 Canned Cycles for Drilling Distance E will be taken from the program (address E) or from parameter CLEG83. 17.1.8 Tapping Cycle (G84) Fig. 17.1.8-1 This cycle can be used only with a spring tap. The variables used in the cycle are G17 G84 Xp__ Yp__ Zp__ R__ (P__) F__ L__ G18 G84 Zp__ Xp__ Yp__ R__ (P__) F__ L__ G19 G84 Yp__ Zp__ Xp__ R__ (P__) F__ L__ Direction of spindle rotation M3 (clockwise) has to be selected prior to starting the cycle.
17 Canned Cycles for Drilling 9. 10. with G98, rapid-traverse retraction to the initial point - 17.1.9 Rigid (Clockwise and Counter-clockwise) Tap Cycles (G84.2, G84.3) In a tapping cycle the quotient of the drill-axis feed and the spindle rpm must be equal to the thread pitch of the tap.
17 Canned Cycles for Drilling – In state G94 (feed per minute), where P is the thread pitch in mm/rev or inches/rev, S is the spindle speed in rpm In this case the displacement and the feed along the drilling axis and the spindle will be as follows (Z assumed to be the drilling axis): displacement Z feed z= distance between point R and point Z S – In state G95 (feed per revolution), where P is the thread pitch in mm/rev or inches/rev.
17 Canned Cycles for Drilling 4. 5. 6. 7. 8. 9. 10. spindle orientation (M19) linear interpolation between the drilling axis and the spindle, with the spindle rotated in clockwise direction linear interpolation between the drilling axis and the spindle, with the spindle being rotated counter-clockwise with G98, rapid-traverse retraction to the initial point - Fig. 17.1.9-2 In the case of G84.3, the operations of the cycle are 1. rapid-traverse positioning in the selected plane 2. 3.
17 Canned Cycles for Drilling 17.1.10 Boring Cycle (G85) Fig. 17.1.10-1 The variables used in the cycle are G17 G85 Xp__ Yp__ Zp__ R__ F__ L__ G18 G85 Zp__ Xp__ Yp__ R__ F__ L__ G19 G85 Yp__ Zp__ Xp__ R__ F__ L__ The operations of the cycle are 1. rapid-traverse positioning in the selected plane 2. 3. rapid-traverse movement to point R 4. 5. boring as far as the bottom point with feed F 6. 7. retraction to point R with feed F 8. 9. with G98, rapid-traverse retraction to the initial point 10.
17 Canned Cycles for Drilling 17.1.11 Boring Cycle Tool Retraction with Rapid Traverse (G86) Fig. 17.1.11-1 The variables used in the cycle are G17 G86 Xp__ Yp__ Zp__ R__ F__ L__ G18 G86 Zp__ Xp__ Yp__ R__ F__ L__ G19 G86 Yp__ Zp__ Xp__ R__ F__ L__ The spindle has to be given rotation of M3 when the cycle is started. The operations of the cycle are 1. rapid-traverse positioning in the selected plane 2. 3. rapid-traverse movement to point R 4. 5. boring as far as the point Z with feed F 6.
17 Canned Cycles for Drilling 17.1.12 Boring Cycle/Back Boring Cycle (G87) The cycle will be performed in two different ways. Fig. 17.1.12-1 A. Boring Cycle, Manual Operation at Bottom Point Unless the machine is provided with the facility of spindle orientation (parameter ORIENT1=0), the control will act according alternative "A".
17 Canned Cycles for Drilling Fig. 17.1.12-2 B. Back Boring Cycle If the machine is provided with the facility of spindle orientation (parameter ORIENT1=1), the control will act in conformity with case "B". The variables of cycle are G17 G87 Xp__ Yp__ I__ J__ Zp__ R__ F__ L__ G18 G87 Zp__ Xp__ K__ I__ Yp__ R__ F__ L__ G19 G87 Yp__ Zp__ J__ K__ Xp__ R__ F__ L__ The spindle must be given rotation M3 when the cycle is started. The operations of cycle are rapid-traverse positioning in the selected plane 1.
17 Canned Cycles for Drilling 17.1.13 Boring Cycle (Manual Operation on the Bottom Point) (G88) Fig. 17.1.13-1 The variables used in the cycle are G17 G88 Xp__ Yp__ Zp__ R__ P__ F__ L__ G18 G88 Zp__ Xp__ Yp__ R__ P__ F__ L__ G19 G88 Yp__ Zp__ Xp__ R__ P__ F__ L__ The spindle must be given rotation M3 when the cycle is started. The operations of the cycle are 1. rapid-traverse positioning in the selected plane 2. 3. rapid-traverse movement to point R 4. 5. boring as far as the bottom point with feed F 6.
17 Canned Cycles for Drilling 17.1.14 Boring Cycle (Dwell on the Bottom Point, Retraction with Feed) (G89) Fig. 17.1.14-1 The variables used in the cycle are G17 G89 Xp__ Yp__ Zp__ R__ P__ F__ L__ G18 G89 Zp__ Xp__ Yp__ R__ P__ F__ L__ G19 G89 Yp__ Zp__ Xp__ R__ P__ F__ L__ The operations of the cycle are 1. rapid-traverse positioning in the selected plane 2. 3. rapid-traverse movement to point R 4. 5. boring as far as the bottom point, with feed F 6. dwelling with the value specified at address P 7.
17 Canned Cycles for Drilling To illustrate the foregoing, let us see the following example.
18 Measurement Functions 18 Measurement Functions 18.1 Skip Function (G31) Instruction G31 v (F) (P) starts linear interpolation to the point of v coordinate. The motion is carried on until an external skip signal (e.g. that of a touch-probe) arrives or the control reaches the end-point position specified at the coordinates of v. The control will slow down and come to a halt after the skip signal has arrived.
18 Measurement Functions The interpolation can be executed in state G40 only. Programming G31 in state G41 or G42 returns error message 3054 G31 IN INCORRECT STATE. Again, the same error message will be returned if state G95, G51, G51.1, G68 or G16 is in effect. The value specified at coordinates v may be an incremental or an absolute one.
18 Measurement Functions and the touch-probe signal has arrived at the point of coordinate Q, the control will – add the difference Q-q to the wear of compensation register selected on address H earlier (if parameter ADD=1) – or will subtract the difference from it (if parameter ADD=0). The appropriate H value and the length compensation have to be set up prior to commencement of the measurement. – G37 is a single-shot instruction.
19 Safety Functions 19 Safety Functions 19.1 Programmable Stroke Check (G22, G23) Instruction G22 X Y Z I J K P will forbid to enter the area selected by the command.
19 Safety Functions limit data of coordinates specified for that axis will limit the movement by stopping the tip of the tool at the limit. If, however, the compensation is not set up, the reference point of the tool holder will not be allowed into the prohibited area. It is advisable to set the border of the forbidden area at the axis of the tool for the longest one. – Programable stroke check function is not available for the additional axes.
19 Safety Functions 19.3 Stroke Check Before Movement The control differentiates two forbidden areas. The first is the parametric overtravel area which delimits the physically possible movement range of the machine. The extreme positions of that range are referred to as limit positions. During movements the control will not allow those axes to move beyond the limits of that area defined by parameters. The limit positions are set by the builder of the machine; The user may not alter those parameters.
20 Custom Macro 20 Custom Macro 20.1 The Simple Macro Call (G65) As a result of instruction G65 P(program number) L(number of repetitions) the custom macro body (program) specified at address P (program number) will be called as many times as is the number specified at address L. Arguments can be assigned to the macro body. They are specific numerical values assigned to definite addresses, that are stored in respective local variables during a macro call.
20 Custom Macro particular number. For example, G65 A2.12 B3.213 J36.9 J–12 E129.73 P2200 variable #1=2.12 #2=3.213 #5=36.9 #8=–12 #8= ERROR In the above example, variable #8 has already been assigned a value by the second address J (value, -12), since the value of address E is also assigned to variable #8, the control returns error message 3064 BAD MACRO STATEMENT. A decimal point and a sign can also be transferred at the addresses. 20.2 The Modal Macro Call 20.2.
20 Custom Macro G0 Z-[#18+#26] M99 % (retraction of the tool to the initial point) (return to the main program) 20.2.2 Macro Modal Call From Each Block (G66.1) As a result of command G66.1 P(program number) L(number of repetitions) all subsequent blocks will be interpreted as argument assignment, and the macro of the number specified at address P will be called, and will be executed as many times as is the number specified at address L.
20 Custom Macro In the case of G66.1, the rules of block execution: The selected macro will be called already from the block, in which code G66.1 has been specified, taking into account the rules of argument assignment described at point 1. Each NC block following G66.1 to a block containing code G67 will produce a macro call with the rules of argument assignment described under point 2. No macro will be called if an empty block is found (e.g.
20 Custom Macro 20.4 Custom Macro Call Using M Code Maximum 10 different M codes can be selected by parameters, to which macro calls are initiated. Now the series of instructions Nn Mm have to be typed. Now code M will not be transferred to the PLC, but the macro of the respective program number will be called. The particular program number to be called by the calling M code has to be selected by parameters.
20 Custom Macro 20.6 Subprogram Call with T Code With parameter T(9034)=1 set, the value of T written in the program will not be transferred to the PLC, instead, the T code will initiate the call of subprogram No. O9034. Now block Gg Xx Yy Tt will be equivalent to the following two blocks: #199=t Gg Xx Yy M98 P9034 The value assigned to address T will be transferred as an argument to common variable #199.
20 Custom Macro If reference is made again to the same address in the subprogram started by code A, B or C, the subprogram will not be called again, but the value of the address will be transferred already to the PLC or interpolator. If a call of a user G, M, S, T code is made in the subprogram, FGMAC=0, not enabled (executed as ordinary codes M, S, ... G) FGMAC=1, enabled, i.e. a new call is generated. 20.
20 Custom Macro Including only the interpolations, the sequence of executions will be (1–13) (1–11) (2–20) (1–16) (3–30) Level of call ))) Level 0 (3–31) ))) Level 1 (2–20) (2–20) ))) Level 2 Of the numbers in brackets, the first and the second ones are the numbers of the programs and block being executed, respectively. Instruction G67 specified in block N14 will cancel the macro called in block N12 (O0003); the one specified in block N15 will cancel the macro called in block N10 (O0002).
20 Custom Macro 20.10 Format of Custom Macro Body The program format of a user macro is identical with that of a subprogram: O(program number) : commands : M99 The program number is irrelevant, but the program numbers between O9000 and O9034 are reversed for special calls. 20.11 Variables of the Programming Language Variables instead of specific numerical values can be assigned to the addresses in the main programs, subprograms and macros.
20 Custom Macro – Referring to program number O, block number N or conditional block / by a variable is not permissible. Address N will be regarded as a block number if it is preceded only by address "/" in the block. – The number of a variable may not be substituted for by a variable, i.e. ##120 is not permissible. The correct specification is #[#120]. – If the variable is used behind an address, its value may not exceed the range of values permissible for the particular address. If, e.g.
20 Custom Macro Difference between a vacant variable and a 0 - value one in a conditional expression will be if #1= if #1=0 #1 EQ #0 * fulfilled #1 EQ #0 * not fulfilled #1 NE 0 * fulfilled #1 NE 0 * not fulfilled #1 GE #0 * fulfilled #1 GE #0 * not fulfilled #1 GT 0 * fulfilled #1 GT 0 * not fulfilled 20.12 Types of Variables With reference to the ways of their uses and their properties, the variables are classified into local, common and system variables.
20 Custom Macro protected will be written to parameters WRPROT1 and WRPROT2, respectively. If, e.g., the variables #530 through #540 are to be protected, the respective parameters have to be set as WRPROT1=530 and WRPROT2=540. 20.12.3 System Variables The system variables are fixed ones providing information about the states of the system. Interface input signals - #1000–#1015, #1032 16 interface input signals can be determined, one by one, by reading the system variables #1000 through #1015.
20 Custom Macro Interface output signals - #1100–#1115, #1132 16 interface output signals can be issued, one by one, by assigning values to variables #1100 through #1115.
20 Custom Macro Tool compensation values - #10001 through #13999 The tool compensation values can be read from variables #10001 through #13999, or values can be assigned them. H No.
20 Custom Macro Work zero-point offsets - #5201 through #5328 The work zero-point offsets can be read at variables #5201 through #5328, or values can be assigned them. No.
20 Custom Macro The axis number refers to the physical ones. The relationship between the numbers and the names of axes will be defined by the machine tool builder by parameters in group AXIS. Usually axes 1, 2 and 3 are assigned to addresses X, Y and Z, respectively, but different specifications are also permissible. Alarm - #3000 By defining #3000=nnn(ALARM), a numerical error message (nnn=max. three decimal digits) and the text of error message can be provided. The text must be put in (,) brackets.
20 Custom Macro Suppression of stop button, feed override, exact stop - #3004 Under the conditions of suppression of feed stop function, the feed will stop after the stop button is pressed when the suppression is released. When the feedrate override is suppressed, the override takes the value of 100% until the suppression is released. Under the conditions of the suppression of the exact stop, the control will not perform a check until the suppression has been released.
20 Custom Macro The bits have the following meanings: 0 = no mirror imaging 1 = mirror imaging on. If, e.g., the value of the variable is 5, mirror image is on in axes 1 and 3. The axis number refers to a physical axis, the parameter defining the particular name of axis pertaining to a physical axis number. Number of machined parts, number of parts to be machined - #3901, #3902 The numbers of machined parts are collected in counter #3901 by the control.
20 Custom Macro Positional information - #5001 through #5108 Positions at block end system variable #5001 #5002 : #5008 position information reading in during motion block end coordinate of axis 1 block end coordinate of axis 2 possible block end coordinate of axis 8 The block end coordinate will be entered in the variable – in the current work coordinate system – with the coordinate offsets taken into account – in Cartesian coordinates – With all compensations (length, radius, tool offset) ignored.
20 Custom Macro Skip signal position system variable nature of position information #5061 #5062 : #5068 Skip signal coordinate of axis 1 (G31) Skip signal coordinate of axis 2 (G31) entry during motion possible Skip signal coordinate of axis 8 (G31) The position, in which the skip signal has arrived in block G31 will be entered in the variable – in the work coordinate system – with the coordinate offsets taken into account – in Cartesian coordinates – with all compensations (length, radius, tool offs
20 Custom Macro Fig. 20.12.3-2 Servo lag system variable nature of position information #5101 #5102 : #5108 servo lag in axis 1 servo lag in axis 2 entry during motion not possible servo lag in axis 8 The readable servo lag is a signed value in millimeters. 20.13 Instructions of the Programming Language The expression #i = is used for describing the various instructions. The expression may include arithmetic operations, functions, variables or constants.
20 Custom Macro 20.13.2 Arithmetic Operations and Functions Single-Operand Operations Single-operand minus: #i = – #j The code of the operation is –. As a result of the operation, variable #i will have a value identical with variable #j in absolute value but opposite in sign. Arithmetic negation: #i = NOT #j The code of the operation is NOT As a result of the operation, variable #j is converted first into a 32-bit fixed-point number.
20 Custom Macro Division: #i = #j / #k The code of the operation is /. As a result of operation, variable #i will assume the quotient of variables #j and #k. The value of #k may not be 0 or else the control will return error message 3092 DIVISION BY 0 #. Remainder: #i = #j MOD #k The code of the operation is MOD. As a result of the operation, variable #i will assume the remainder of the quotient of variables #j and #k.
20 Custom Macro Arc tangent - #i = ATAN #j The code of the function is ATAN. As a result of operation, variable #i will assume the arc tangent of variable #j in degrees. The result, i.e. the value of #i, lies between +90° and -90°. Exponent with base e: #i = EXP #j The code of the function is EXP. As a result of the operation, variable #i will assume the #j-th power of the natural number (e). Logarithm natural: #i = LN #j The code of the function is LN.
20 Custom Macro Complex Arithmetic Operations - Sequence of Execution The above-mentioned arithmetic operations and functions can be combined. The sequence of executing the operations, or the precedence rule is function - multiplicative operations - additive operations. For example, #110 = #111 + #112 * COS #113 1 2 3 Sequence of operations Modifying the Sequence of execution The sequence of executing the operations can be modified by the use of brackets [ and ]. Brackets can be nested in 5 levels.
20 Custom Macro 20.13.5 Conditional Divergence: IF[] GOTOn If [], put mandatorily between square brackets, is satisfied, the execution of the program will be resumed at the block of the same program with sequence number n. If [], is not satisfied, the execution of the program will be resumed at the next block. Error message 3091ERRONEOUS OPERATION WITH # is returned unless IF is followed by a conditional expression.
20 Custom Macro – Instructions DOm and ENDm must be put in pairs. : DO1 : DO1 : END1 : false or : DO1 : END1 : END1 : false – A particular identifier number can be used several times. : DO1 : END1 : : : DO1 : END1 : correct – Pairs DOm ... ENDm can be nested into one another at three levels.
20 Custom Macro – Pairs DOm ... ENDm may not be overlapped. : DO1 : DO2 : : : END1 : END2 false – A divergence can be made outside from a cycle. : DO1 : GOTO150 : : : END1 : N150 : correct – No entry is permissible into a cycle from outside.
20 Custom Macro – A subprogram or a macro can be called from the inside of a cycle. The cycles inside the subprogram or the user macro can again be nested up to three levels. : DO1 : M98... : G65... : G66... : G67... : END1 : correct correct correct correct 20.13.
20 Custom Macro – The characters are output in ISO or ASCII code. The characters to be output are alphabetic characters (A, B, ..., Z) numerical characters (1, 2, ..., 0) special characters (*, /, +, –) The control will output the ISO code of a space character (A0h) instead of *. – The values of variables will be output by the control in 4 bytes (i.e. in 32 bits), beginning with the most significant byte.
20 Custom Macro – For the rules of character outputs, see instruction BPRNT. – For the output of variable values, the numbers of decimal integers and fractions must be specified, in which the variable is to be out put. The digits have to be specified in square brackets [ ]. The condition 0 < c + d < 9 must be fulfilled for the specification of digits. The procedure of outputting the digits begins with the most significant digit. In outputting the digits, the negative sign (-) and the decimal point (.
20 Custom Macro Data output at PRNT=1: 7 6 5 4 3 2 1 0 1 0 0 0 1 0 1 0 0 1 0 0 0 1 0 0 1 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 0 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 0 1 0 0 1 1 1 0 1 1 0 0 0 1 1 0 0 0 0 0 1 0 0 1 1 0 0 1 0 1 0 1 0 1 0 0 0 1 0 1 0 0 1 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 1 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 0 ----------------------------------------- X 3 5 Decimal Point (.) 8 9 7 Y Negative Sign (–) 1 5 0 Decimal Point (.
20 Custom Macro – a block containing a conditional divergence or iteration instruction (IF, WHILE) – blocks containing control commands (GOTO, DO, END) – blocks containing macro calls (G65, G66, G66.1, G67, or codes G, or M that initiate macro calls). 20.15 Execution of NC and Macro Instructions in Time The macro blocks can be executed by the control parallel to NC blocks or in consecutive order. Parameter SBSTM determines the execution of NC and macro blocks.
20 Custom Macro Example: SBSTM =0 SBSTM =1 %O1000 ... N10 #100=50 N20 #101=100 N30 G1 X#100 Y#101 N40 #100=60 (definition after N30) N50 #101=120 (definition after N60 G1 X#100 Y#101 %O1000 ... N10 #100=50 N20 #101=100 N30 G1 X#100 Y#101 N40 #100=60 (definition during N30) N50 #101=120 (definition during N30) N60 G1 X#100 Y#101 N30) Definition commands in blocks N40 and N50 are executed after the movement of block N30.
20 Custom Macro 20.18 Pocket-milling Macro Cycle Instruction G65 P9999 X Y Z I J K R F D E Q M S T will start a pocket-milling cycle. For the execution of the cycle, macro of program number O9999 has to be filled in the memory, from the PROM memory of the control. Prior to calling the cycle, the tool must be brought over the geometric center of the pocket in the selected plane, at a safety distance over the workpiece. At the end of the cycle the tool will be retracted to the same point.
20 Custom Macro E = width of cutting, in percent of milling diameter with + sign, machining in counter-clockwise sense, with – sign, machining in clockwise sense. Two types of information can be specified at address E. The value of E defines the width of cutting in percent of milling diameter. Unless it is specified, the control will automatically assume +83%.
20 Custom Macro Unless the width of pocket and the rounding radii of corners have been specified, the tool diameter applied will be taken for the width of pocket (groove). Fig. 20.18-3 If neither the length nor the width of pocket has been specified, only address R has been programmed, a circular pocket of radius R will be milled. Fig. 20.18-4 If neither length, nor width, nor radius have been specified, the cycle will "degenerate" into drilling.
20 Custom Macro – The size specified for the length or width of pocket is smaller than twice of the pocket radius. – The length or width of pocket is smaller than the diameter of tool called at address D. – The value specified for the width of cutting is 0 or the tool radius called is 0 – The value of depth of cut is 0, i.e. 0 has been programmed at address Q.
Notes Notes 202
Index in Alphabetical Order Index in Alphabetical Order: #0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 #10001–#13999 . . . . . . . . . . . . . . . . . 173 #1000–#1015 . . . . . . . . . . . . . . . . . . . 172 #1032 . . . . . . . . . . . . . . . . . . . . . . . . . 172 #1100–#1115 . . . . . . . . . . . . . . . . . . . 173 #1132 . . . . . . . . . . . . . . . . . . . . . . . . . 173 #195 . . . . . . . . . . . . . . . . . . . . . . . . . . 166 #196 . . . . . . . . . . . . . . . . . . . . . . .
Index in Alphabetical Order Feed . . . . . . . . . . . . . . . . . . . . . . . 12, 176 Feed Reduction . . . . . . . . . . . . . . . . . . . 51 Format . . . . . . . . . . . . . . . . . . . . . . . . . . 10 full arc of circle . . . . . . . . . . . . . . . . . . . 106 full circle . . . . . . . . . . . . . . . . . . . . . . . 106 going around sharp corners . . . . . . . . . . 107 Going around the outside of a corner . . 9396 Inch . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Increment System . . .
Index in Alphabetical Order LIMP2n . . . . . . . . . . . . . . . . . . . . . . 158 M(9001) . . . . . . . . . . . . . . . . . . . . . . 165 M(9020) . . . . . . . . . . . . . . . . . . . . . . 165 M-NUMB1 . . . . . . . . . . . . . . . . . . . . . 67 MD8 . . . . . . . . . . . . . . . . . . . . . . . . . 192 MD9 . . . . . . . . . . . . . . . . . . . . . . . . . 192 MODGEQU . . . . . . . . . . . . . . . . . . . 164 MULBUF . . . . . . . . . . . . . . . . . . . . . . 21 O_LINE . . . . . . . . . . . . . . . . . .
Index in Alphabetical Order Local . . . . . . . . . . . . . . . . . . . . . . . . 171 Vacant . . . . . . . . . . . . . . . . . . . . . . . 170 varying radius . . . . . . . . . . . . . . . . . . . . . 28 Vector Hold . . . . . . . . . . . . . . . . . . . . . 100 Wear Compensation . . . . . . . . . . . . . . . 16 Word . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Work Coordinate System . . . . . . . . . . . .