Page 2
MotionOne CM G&M Code Programming Manual MotionOne CM G&M Code Programming Manual Id.-Nr.: 1400.210B.0-01 ▪ Stand: 04/2018 Valid for G&M Code version since: V 6.06.04.00 Doc version: V 7.00.00.01 The German version is the original of this manual. All rights are reserved with respect to the content of this documentation and the availability to the product.
MotionOne CM G&M Code Programming Manual Content General information ................................5 Notes and symbols ............................... 5 Address letters ................................5 Axis numbers ................................5 Axis code word (AKW) ..............................6 Components of a NC program ..............................7 M Functions..................................... 8 G Functions .....................................
Page 4
MotionOne CM G&M Code Programming Manual Parameter programming ..............................62 Flexible G&M code Programming (FlexProg) ........................63 General ..................................63 Restrictions ................................64 General program structure ............................64 Data types ................................. 64 Functions (general) ..............................65 Function declaration ..............................65 Macros and Q parameters ............................
MotionOne CM G&M Code Programming Manual General information Notes and symbols This description uses the following symbols: Important notes, information or cross references to other descriptions. This symbol indicates an example. Address letters Character Function Block number Path condition A, B, C...
MotionOne CM G&M Code Programming Manual Axis code word (AKW) The cycle call-up parameters do not allow all axis letters of the andronic to be specified. This is why for some cycles the axis values other than XYZABC must be specified by means of a list containing the values for the individual axes and by means of an axis code.
MotionOne CM G&M Code Programming Manual Components of a NC program The sequence of a machining process on the machine is described by the NC program. It consists mainly of a sequence of program records. In a program record all the necessary information for a work step are included.
MotionOne CM G&M Code Programming Manual M Functions Note: The M functions initiate certain machine functions. These functions may differ depending on machine type/manufacturer. General M functions Function Programmed stop Optional stop End of program Spindle stop with defined end position...
MotionOne CM G&M Code Programming Manual G Functions General explanations Property: MODAL means that the command/function remains active until it is overwritten. Topic: The G functions can be divided into the following topics: interpolation type special command setup command ...
MotionOne CM G&M Code Programming Manual G00 Positioning in rapid traverse Property modal Topic Axis movement Position Syntax The path information G00 programs rapid traverse movements by specifying the target point. The target point is reached by entering it either in absolute or relative dimensions. The rapid traverse speed can be defined in the MotionCenter.
MotionOne CM G&M Code Programming Manual G01 Positioning at the feed rate Property modal Topic Axis movement Position Syntax The path information G01 programs feed movements by specifying the target point. The target point is reached by entering it either in absolute measure or relative measure. The feed rate can be defined in the MotionCenter or programmed by means of the F parameter.
MotionOne CM G&M Code Programming Manual G02 Circular interpolation - Clockwise G03 Circular interpolation - Counterclockwise Property modal Topic Axis movement Position Syntax G02 /G03 <Parameter list> For the circular interpolation, the axes are moved on an arc from the starting point to the end point.
MotionOne CM G&M Code Programming Manual G04 Dwell time Property Non modal Topic NC command Position Syntax G04 <Parameter list> Unit Seconds Dwell time The function G04 allows you to program a dwell time. The time is specified by the parameter X. The function is only effective blockwise.
MotionOne CM G&M Code Programming Manual G05 Spatial arc interpolation Property modal Topic Axis movement Position Syntax G05 <Parameter list> This function allows you to describe a spatial arc (spatial circle section). No information such as radius or direction of rotation exists for this function.
MotionOne CM G&M Code Programming Manual G14 Macro call Property non-modal Topic Special command Position Syntax G14 N = [“] Macro name [“] [Pn] A macro is a closed program part that must be programmed only once. A macro is not executed until it is defined or called by the main program or another macro.
MotionOne CM G&M Code Programming Manual G17 Plane XY G18 Plane ZX G19 Plane YZ Property modal Topic Setup command Position Preset G17 Syntax G17 / G18 / G19 ATTENTION: G18 in the CNC is not according to the DIN 66025.
MotionOne CM G&M Code Programming Manual G22 Sub program call Property non-modal Topic Special command Position Syntax G22 N = [“] Program name [“] [Pn] G22 N = [“] Database path: Program name [“] [Pn] Programs that must be repeated several times can be called from a main program by entering G22.
MotionOne CM G&M Code Programming Manual G23 Text - Functions Property non-modal Topic NC command Position Syntax G23 N = “Text “ P<Type> I<Index> The command G23 can be used to call up different functions with ASCII texts. The target is always to transmit a text with a length of 80 characters to the PLC, CNC or the display.
MotionOne CM G&M Code Programming Manual G25 RTCP Property modal Topic Transformation command Position Syntax G25 <Parameter list> RTCP describes the functionality of keeping a (TCP - Tool Center Point) constant during the move- ment of rotatory axes. Despite the use of rotatory axes, the position of the TCP relative to the work- piece does not change.
Page 20
MotionOne CM G&M Code Programming Manual Functional description Axis traverse movement in The use of axis traverse movement in milling lengthwise axis direction is possible by defining the milling lengthwise axis cinematic models regardless of an activated transformation. direction Activation/deactivation must be realised by adaptations in the PLC software:...
Page 21
MotionOne CM G&M Code Programming Manual EMERGENCY STOP by RTCP is not reset automatically. operator, PLC, control programs EMERGENCY STOP due to RTCP is not reset automatically. drive error Referencing all axes or one RTCP is not reset automatically. axis...
MotionOne CM G&M Code Programming Manual G26 Free plane Property modal Topic Setup command Position Syntax G26 <Parameter list> Syntax G26 without parameters deactivates the plane function The command is used for defining the rotation of the programming coordinate system. It effects a rotation around the specified angles in the given order, the center of rotation is the current zero point.
Page 23
MotionOne CM G&M Code Programming Manual G26 not belongs to the group of commands for change of plane. It can be combined with G17, G18 and G19. Pocket milling on non-parallel planes, kinematics swivel head/rotary table cuboid workpiece with pocket geometry on inclined plane ...
MotionOne CM G&M Code Programming Manual G27 Tool zero point Property modal Topic Transformation command Position Syntax G27 <Parameter list> The command is used to define a movement and rotation of the tool system. It causes a movement of the leading point of the control to the specified point. G27 does not cause any movement, but it causes a jump in the display of the control position when activated.
Page 25
MotionOne CM G&M Code Programming Manual Status The status of the tool zero compensation is displayed in the panel. If cycle G27 has been activated in MDI or AUTOMATIC, the corresponding symbol is displayed. G27 was activated for an electrode offset, at the same time RTCP was switched on.
MotionOne CM G&M Code Programming Manual G42 Milling cutter radius correction right Property modal Topic Tool command Position Syntax The milling cutter radius correction takes place on the right from the workpiece. The viewing direction is the direction of travel of the tool.
MotionOne CM G&M Code Programming Manual G43 Milling cutter radius correction up to Property modal Topic Tool command Position Syntax With G43 active, the tool path is corrected up to the contour. When an interpolation movement is carried out within the current plane, at the end of movement, the tool center in each axis is offset by the radius before the programmed end point.
MotionOne CM G&M Code Programming Manual G44 Milling cutter radius correction via Property modal Topic Tool command Position Syntax With G44 active, the tool path is corrected via the contour. When an interpolation movement is carried out within the current plane, at the end of movement, the tool center in each axis is offset by the radius behind the programmed end point.
MotionOne CM G&M Code Programming Manual Zero offsets and coordinate rotation The zero offset makes it possible to move the program or workpiece zero to any desired position within the control range. After a zero point offset, all programmed positions are referred to this new point.
MotionOne CM G&M Code Programming Manual G53 Deletion of the zero offset Property modal Topic Setup command Position Syntax G53 will switch off all zero offsets (G54 – G59 P0-P99, G92, G93). Id.-Nr.: 1400.210B.0-01 ▪ Stand: 04/2018...
MotionOne CM G&M Code Programming Manual G70 Units of measurement inch Property modal Topic Setup command Position Syntax The measures given are in inch. At the end of the program, the home position is always restored. In the home position, the default is always G71 (mm).
MotionOne CM G&M Code Programming Manual G73 Mirror image machining Property modal Topic Setup command Position Syntax G73 Axis designator [-1][+1] The sign of the programmed dimensional value of an axis can be inverted by mirror image machining. For example, a sign inversion of the X axis is a mirror imaging on the Y axis, if machining takes place in the XY plane.
MotionOne CM G&M Code Programming Manual G73 Scaling Property modal Topic Setup command Position Syntax G73 <Parameter list> The coordinate values of the linear axes of the control can be increased or decreased by a scaling factor. The reference point is the origin of the coordinate system, which will affect in general not only the shape of the workpiece but also its position on the clamping table.
MotionOne CM G&M Code Programming Manual G79 Cycle execution Property non-modal Topic Cycle command Position Syntax G79 <Axis positions> The function G79 executes a previously defined cycle. When the function is called without any additional parameters, the cycle will start at the position at which the individual axes are positioned.
MotionOne CM G&M Code Programming Manual G90 Absolute measure Property modal Topic Setup command Position Syntax When an absolute measure is entered, all measures given refer to a fixed zero point. This zero point is always the zero point of the control. The associated numeric value of the path information describes the target position in the coordinate system.
MotionOne CM G&M Code Programming Manual G91 Relative measure Property modal Topic Setup command Position Syntax G91 <Parameter list> When entering a relative measure (incremental measure), the numeric value of the path information corresponds to the traverse distance. The programmed sign determines the direction of travel. It is possible to switch between absolute measure input and relative measure input in the program any number of times.
MotionOne CM G&M Code Programming Manual G92 Relative zero point offset coordinate rotation Property modal Topic Setup command Position Syntax G92 <Axis positions> <Rotation> G92 moves the position of the zero point by the values specified in the current coordinate system. If the path condition G92 is called several times in a parts program, the offset vectors add up.
MotionOne CM G&M Code Programming Manual G93 Absolute zero point offset coordinate rotation Property modal Topic Setup command Position Syntax G93 <Parameter list> G93 defines the absolute position of the workpiece in the machine system. Translatory and rotatory offsets and data on the clamping position can be programmed.
Page 41
MotionOne CM G&M Code Programming Manual None of the programmed rotations is deactivated when the plane is changed. Example of Euler: G93 (X200 Y150 Z50 C30 H0 WY=1.2 WX=3.4) Example of order: G93 (X200 Y150 Z50 C30 H1 WY=1.2 WX=3.4 J2 K1)
MotionOne CM G&M Code Programming Manual G94 Speed programming Property modal Topic Setup command Position Syntax G94 <Parameter list> Depending on whether the dimensions are set by the path conditions G70 or G71, the feed speed is programmed in mm/min (degrees/min) or inch/min (degree/min). The function is automatically switched on when a G-Code program is loaded and is effective modally.
MotionOne CM G&M Code Programming Manual G95 Time programming Property modal Topic Setup command Position Syntax G95 <Parameter list> With the function G95 time programming, the machining time can be determined for a programmed path route. This is worthwhile when axes with different speed behaviors (e.g. linear axis and rotational axis) are involved in a movement.
MotionOne CM G&M Code Programming Manual G107 Eroding: Define the directional vector for the lift-off movement Property modal Topic Eroding command Position Syntax G107 < Parameter list > The command G107 can be used to define a direction vector for the lift-off movement during eroding.
MotionOne CM G&M Code Programming Manual G181 Probe calibration Property non-modal Topic Cycle command Position Syntax G181 < Parameter list > Emptying of the content of Emptying of the file 'andronin.log'. The content of the specified log file, but not the file itself, is log files: deleted.
MotionOne CM G&M Code Programming Manual G190 Absolute circle center Property modal Topic Setup command Position Syntax G190 <Parameter list> The dimensions for the circle center can be given either in absolute or incremental coordinates. One of the two functions is set automatically via the system configuration. G190 and G191 are active only when G90 is also active.
MotionOne CM G&M Code Programming Manual G191 Relative circle center Property modal Topic Setup command Position Syntax G191 <Parameter list> If G191 is active, the circle center can be programmed as the distance from the starting point of the circle.
MotionOne CM G&M Code Programming Manual G288 Set Look Ahead parameters When programming "G70 - Dimensions in inch", all lengths given in µm are evaluated in 1/10000 inch. G288,0 Look Ahead basic parameter Property modal Topic Setup command Position Syntax G288 <Parameter list>...
MotionOne CM G&M Code Programming Manual G488 Simple measurement block Property non-modal Topic Cycle command Position Syntax G488 <Parameter list> The cycle G488 Simple measurement block is used for determining the switching point of a selected control axis (axis numbers 0 to 15) in a selected plane (G17/G18/G19) or the axis combination X Y Z.
Page 50
MotionOne CM G&M Code Programming Manual G488 A1 X30 Y0 Z-30 B1000 E300 I5 K0 C0 R1 To determine the axis code word, the program WINAKW.exe in the directory 'C:/andron/Tools' can be used or the following table in which the example is shown for the axes X, Y and Z.
Page 52
MotionOne CM G&M Code Programming Manual Communication variables for Cycle Description Variable Meaning FlexProg Simple G488 IKV [2000] Cycle number measurement IKV [2001] Extended cycle number block IKV [2002] Tool number IKV [2003] Axis number used for carrying out the measurement...
MotionOne CM G&M Code Programming Manual G488,1 Simple measurement block Property non-modal Topic Cycle command Position Syntax G488,1 <Parameter list> The measuring cycle G488.1 is a reduction of cycle G488. That means, this cycle does not check whether an erosion control has been selected or a probe has been replaced. In addition, the cycle will stop at the current position after the first measurement, so that the measurement signal is still present.
MotionOne CM G&M Code Programming Manual G581 Continuous operation cycle rotation Property non-modal Topic Cycle command Position Syntax G581 <Parameter list> Cycle G581 is used for the continuous rotation of the rotary axes at a defined speed. Other axis travels (e.g. in the X, Y and Z axis directions) can be programmed independently of this rotary motion.
MotionOne CM G&M Code Programming Manual G783,0 Read/Write zero points Property modal Topic Special command Position Syntax Write to the zero offset table: G783,0 <Parameter list> G783,0 can be used for: activating zero points reading data from the currently active zero offset table and using them in the NC program or ...
MotionOne CM G&M Code Programming Manual G1000 Eroding: Velocity Property modal Topic Eroding command Position Syntax G1000 <Parameter list> The command G1000 can be used to define different eroding velocities. The following address letters are used for definition: Word Description...
MotionOne CM G&M Code Programming Manual G1001 Eroding: Directions Property modal Topic Eroding command Position Syntax G1001 <Parameter list> The command G1001 can be used to define different eroding directions. The following address letters are used for definition: Word Description...
MotionOne CM G&M Code Programming Manual G1002 Eroding: Factors and modes Property modal Topic Eroding command Position Syntax G1002 <Parameter list> The command G1002 can be used to define different eroding factors and modes. The following address letters are used for definition:...
MotionOne CM G&M Code Programming Manual G1003 Eroding: Time data Property modal Topic Eroding command Position Syntax G1003 <Parameter list> The command G1003 can be used to define different eroding time datas. The following address letters are used for definition:...
MotionOne CM G&M Code Programming Manual G1004 Eroding: Orbital movement in the selected plane Property modal Topic Eroding command Position Syntax G1004 <Parameter list> The G1004 command can be used to start or stop an orbital movement in the selected plane. The parameters listed below are used to define orbital movement.
MotionOne CM G&M Code Programming Manual Parameter programming These parameters allow the calculation with variables within the G-Code program, the formulation of the conditions for executing program parts and the use of program branches and loops. G-Code program s containing parameter instructions must contain the code "#Para" at the beginning of the file.
MotionOne CM G&M Code Programming Manual Flexible G&M code Programming (FlexProg) General A key enhancement of the functionality of the NC language and the parameter programming is the flexible programming (FlexProg). The use of global and local variables, the free definition of functions with call-up parameters and return value as well as the use of control structures for the conditional or repeated execute facilitate the programming of complicated procedures and calculations substantially.
MotionOne CM G&M Code Programming Manual Restrictions Despite great similarity of the language with the programming language 'C', it applies that the instructions are processed line by line. If more than one calculation expressions are used in one line, at least one space must be after ...
MotionOne CM G&M Code Programming Manual Functions (general) Functions consist of a declaration part and a definition part. Functions always have a type, a name and a list of call-up parameters that can also be empty. All instructions belonging to a function must stand in the relevant curly brackets (instruction block).
MotionOne CM G&M Code Programming Manual Function definition The function definition consists of the function head with the information on the function call and the instruction block that contains the variable agreements and instructions. Function definitions may not be nested. In contrast to the declaration, the Key word 'DECLARE' is missing and the parameter list must contain names for the individual parameters.
MotionOne CM G&M Code Programming Manual Communication These variables permit an exchange of data between G-Code program s and various control parameters and vice versa. These can be measurement values of the cycles or parameters from the variables tool management. The communication variables can be used for all permissible computing operations and instructions to NC addresses (axes).
MotionOne CM G&M Code Programming Manual Expressions and Expressions consist of operands and operators. The operands are variables, constants, parameters or expressions. The assessment of an expression supplies a value that is dependent on the type of operators the operators used. The value assignment is an expression. It is the most used form of assignment of values to variables and parameters.
MotionOne CM G&M Code Programming Manual Assignment of NC Constants, variables, parameters and also expressions can be assigned to the following addresses: addresses - X, Y, Z, A, B, C, U, V - I, J, K, R - F, S, D, E...
MotionOne CM G&M Code Programming Manual Instructions Simple instruction A simple instruction consists of a completed expression. An expression is deemed to be completed when all round brackets are closed again and behind the last valid part expression there is no operation sign but rather an empty space, tabulator or the end of the line.
MotionOne CM G&M Code Programming Manual FOR loops With FOR, the conditional and repeated execution of program parts can be formulated. For the case <Expression2> is true, the following program part, including <Expression3> is processed. In the case <Expression2> is not true, the system jumps to the next instruction after the loop. If an <Expression>...
MotionOne CM G&M Code Programming Manual SWITCH ... CASE With the SWITCH instruction, a multiple branching can be programmed very easily. The individual CASE branches can be terminated with BREAK and the system jumps to the end of the instruction. If branching the BREAK is not at the end of a branch, the following branch is also processed.
MotionOne CM G&M Code Programming Manual Index milling cutter radius correction left 27 milling cutter radius correction right 28 milling cutter radius correction up to 29 Absolute circle center 46 milling cutter radius correction via 30 absolute measure 37 milling lengthwise axis direction 19...
Page 79
MotionOne CM G&M Code Programming Manual zero offset table 56 zero offset 31, 32, 56 Id.-Nr.: 1400.210B.0-01 ▪ Stand: 04/2018...
MotionOne CM G&M Code Programming Manual Revisions Id.-Nr. Version Stand Additions and changes 1400.010B.0-00 V7.00.00.00 11/2016 First Version (only field test release) 1400.010B.0-01 V7.00.00.01 04/2018 New G code functions: G23 Text - Functions G181 Probe calibration G781,1 Spindle offset ...
Need help?
Do you have a question about the MotionOne CM and is the answer not in the manual?
Questions and answers