Вы находитесь на странице: 1из 12
GIT G20 621 G28 G29 G31 G35 G36 637 G40 G41 G42 G43 G44 Gar G49 G50 G51 G52 G52 G52 G53 G54 G55 G56 G57 G58 G59 G60 G61 G64 * Select Work Coordinate System G52 (Yasnac) Function: Rapid Motion =. Linear Interpolation Motion CW Interpolation’ Motion CCW interpolation Motion Dwell Exact Stop Programmable’ Offset Setting CW Circular Pock Milling (Yasnac) COW Circular Pock Milling (Yasnac) XY Plane Selection ZX Plane Selection YZ Plane Selection Inch Programming Selection Metric Programming Selection Return To Machine Zero Move to Location Through G29 Reference Skip Functions. Automatic Tool Diameter Measurement © Automatic Work Offset Measurement Automatic Toal Length Measurement. + Cutter Comp Cancel Cutter Compensation Lett Cutter Compensation Right Tool Length Compensation + Tool Length Compensation ~ Engraving G43/644 Cancel G51 Cancel Scaling Set Local Coordinate System (Fanuc) Set Local Coordinate System (HAAS) Non-Modal Machine Coatdinate Selection Select Work Coordinate System Select Work Gqordinate System 2 Select Work Coordinate System 3 Select Work Coordinate System 4 Select Work Coordinate System 5 Select Work Coordinate System 6 Unidirectional Positioning Exact Stop Modal G61 Cancel 42 Gé5 G70 Macro Subroutine Cail Rotation ¥ 668 Cancel Bolt Hole Gircle (Yasnac) Boit Hole Arc (Yasnac) Bolt Holes Along an Angle (Yasnac) High Speed Peck Drill Canned Cycle Reverse Tap Canned Cycle Fine Boring Canned Cycle Back Bore Canned Cycle Canned Cycle Cancel Orill Canned Cycle Spot Drill Canned Cycle Peck Drill Canned Cycle Bore/Stop Canned Cycle Bore/Manual Retract Canned Cybi Bore/Dwell Canned Oycle Bore Canned Cycle Absolute * Incremental Set Work Coordiaites © PANUC or HAAS Set Work Caordinats = YASNAC Initial Point Return R Plane DisablefMirror tmage Enable'Mirror Image Programmable Output To RS-232 Block Lookahead Lin Select Work Coordinate System 7 Select Work Coordifiéte System 8 Select Work Coordinate System 9 Select Work Coordinate System 10 Select Work Coordinate System 11 Select Work Goordinate System 12 'S, Select Work Coordinate System 13 Select Work Coordinate System 14 Select Work Coordinate System 15 Select Work Coordinate System 16 Select Work Coordinate System 17 Select Work Coordinate System 18 Select Work Coordinate System 19 Select Work Coordinate System 20 Select Work Coordinate System 21 Select Work Coordinate System 22 Select Work Coordinate System 23 Select Work Coordinate System 24 RAS epaye ‘Tapping Canned Cycle Zio Boring Canned zeheqn ing 75 76 deper7 78 79 80 80 80 at 81), at 81 at 814 a2 a3 83 83 83 ‘Select Work Coordinate System 26 Automatic Work Offset Center Measurement G150 oo + General Purpose Pocket Milling aoe G187 00 <2. , Accuracy Control for High Speed Machining = a] ae. Each 6 code defined in this control is'part of a group of @ codes. The Group 0 codes are non-madal; that is, they specify a function applicable to this block only and do not affect other blocks. The other groups are modal and the specification of one code in the group cancels the previous code applicable from that group. A modat & code applies tg. ibsequent blocks so those blocks do not need to re-specify the same G code. ‘There is also one case where the Group 01 6 codes will cancel the Group 9 ‘canned cycles) codes. Ita canned cycle is active (G73 through G88), the use of G00 or GOt will cancel the canned cycle. 4 ; 62000 af Only one M code may be pragrammed per block of a program, AllM codes are effective or cause an action to ® Gecur atthe end of the block. However, when Parameter 278 bit"CNCR SPINDLE" is set to 1, an M03 (spindle = start) will occur at the beginning of a block Stop Program Optional Program Stop Program End M3 Pepinde Forward Moa Spindle Reverse Mos Spindle Stop : MOB Tool Change ‘ Moe Coolant On Moo Coolant OF M10. Engage 4th Axis Brake f Mit Release 4th Axis Brake & M12 Engage Sth Axis Brake m3 Release Sth Axis Brake wis Too Change (sameas M06) * Mn? Unciamp APC Pallet And Open APC Door (used for maintenance only) Me Clamp APC Pallet And Close APC Door (used for maintenance onl) Mig Orient Spindle, P and R values optional M2i-M28 Optional Pulsed User M Function with Fid ® 130 Prog End and Rewind" war Chip Conveyor Forward * : ‘M32 Chip.Conveyor Reverse. 3 i M33 chip Conveyor Stop ae Moe Incrggrent Coolant Spigot Position Mas Dectmnt Cookant Spigot Position M36. Palle it a9 Rotate Tob Turret ‘ mai Low Gear Overide m2 High Gear Override M0 Execute Pallet Crange MSIMSS Set Optional User M i MS9 ‘Set Output Relay - MBI-M68 Clear Optional User M Mas Clear Output Relay M75 Set G35 at G136 Reference Point M76 Disable Displays { Mrz Enable Displeys : M7é Alarm if skip signal found + ie Me Alarm ifskip signal not found Mea ‘Auto Door Open Met ‘Auto Door Close i: Maz. ‘Tool Unctamp " mes Air un On wes airGun Of Mes Too! Clamp ee ‘Through the Spindle Coolant ON se-sn00ree : AAAS 258 -apeare aR GQ vom Operator's Manual © ees Y Mao ‘Through the Spindle Cootant OFF . M93 Start Axis POS Capture * Moa Stop Axis POS Capture M95 Sleep Mode M96 Jump ifno Input M97 Local Sub-Program Call Moe, ‘Sub Program Cail ge Sub Program Return Or Loop M109 Interactive User Input x 4 M00 Stop Program ‘The M00 code is used to stop a program. It aso stops the spindle and turns off the cGoignt and stops interpre- tation lookahead processing. The program pointer will advance to the next block and'stop. Acycle start will continue program operation from the next block. f the Through the Spindle Coolant option is ON, MOO will shut itoft mot Optional Program Stop ‘The MO1 code is identical to M00 except that it only stops if OPTIONAL STOP is turned on from the front panel. Acycle start will continue program operation from the next block. If the Through the Spindle Coolant option is ON, MOt will shut it of. M02 Program End ‘The MO2.code will stop program operation the same as MOO but does not advance the program pointer to the next biock M03 Spindle Forward The MOS code will start the spindle moving is a clockwise direction at whatever speed was previously set, The block will delay until the spindle reaches about 90% of commanded speed ‘When Parameter 278 bit 10,"CNCR SBINDLE”, is setto 1, the machine will not wat forthe spindle to come Up to speed immediately after an MO3 command. Instead, it will check and/or wait for the spindle to come up to speed immediately before the next interpolated motion is initiated M04 Spindle Reverse et The M04 code will start the spindle mioving is a counterclockwise direction ver speed was previously set, The biock will delay until the spindle reaches about 90% of commanded sbead When Parameter 278 bit 10, "CNGR SPINDLE", is set to 1, the machine will net wait for the spindle to come up to speed immediately after an M04 command. Instead, it will check and/or wait for the spindle to come up to speed immediately before the next interpolated motion is initiated. Running an M04 command with TSC on is not recommended Mos: Spindle Stop ‘The MOS code is used to stop the spindle. The biock is delayed until the spindle slows below 10 RPM. ) 260 AMS 96-8000 rev E oa Operator's Manual} woes mo6 Tool Change The MO6 code is used to initiate a tool change. The previously selected tool (Tn) is put into the spindle. Ifthe spindle was running, itwill be stopped. No previous axis commands are requited before the tool change unless there is a problem with tool/partfixture clearance. The Z-axis will automatically move up to the machine zero position and the selected too! willbe put into the spindle, The Z-axis is left at machine zero. The spindle will not be started again after the too! change but the Snnnnn speed and gear will be unchanged. The Tnn must be in the same block or in a previous block. The coolant pump will be turned off during a tool change When the Through the Spindle Coolant (TSC) is ON, MOS will orient the spindle and move the Z-axis to tool change position, turn off the TSC pump, purge the coolant from the drawbr, then perform a tool change. TSC will remain OFF unti an M88 is called. Mos Coolant On ‘The M08 code will turn on the coolant supply. Note that the M code is performed at the end of a block: so that if a motion is commanded in the same block, the coolant is turned on after the motion. The low coolant status 's only checked at the start of a pragram so a low coolant condition will not stop a program which is already running Mos Coolant off ‘The M03 code will turn off the cootant supply. M10 —_—_Engage 4th Axis Brake ‘The M10 code is used to apply the brake to the 4th axis. The brake is normally engaged, so M10 is only required when M11 is used to release the brake, M11 activates a relay that releases the brake. M10 deactives this relay, engaging the brake. mit Release 4th Axis Brake ‘The M11 code will pre-release” the 4th axis brake. This is useful in preventing fhe delay that otherwise occurs when a 4th axis is used with a brake and a motion is commanded in that axis. if'isnot required but, without prior M11, there will be a delay in motion in order to release the air. wiz Engage Sth Axis Brake ‘The M12 code is used to apply the brake to the Sth axis. The brake is normally engaged, so M12 is only required when M13 is used to release the brake. M13 activates a relay that releases the brake, M12 deactives this relay, engaging the brake. M13 Release Sth Axis Brake ‘The M13 code will “pre-release” the Sth axis brake, This is useful in preventing the delay that otherwise occurs when a Sth ax's is used with a brake and a motion is commanded in that axis. Its not required but, without 2 prior M13, there will be a delay in motion in order to release the alr. M16 Tool Change The M16 code is used to intite a tool change. In the present machine configuration, M16 works exactly like Mos. M17 Unclamp APC Pallet And Open APC Door Used for maintenance only M18 Clamp APC Pallet And Close APC Door Used for maintenance only M19 Orient Spindle. P and R values optional ‘The M19 code is used to orient the spindie to a fixed position, The spindle is oriented electronically. AP value can be added as an option that will cause the spindle to be oriented to a particular angle (in degrees). For example, M19 P270 will orient the spindie to 270 degrees. An R value will recognize up to four places to the right of the decimal point. An M19 R123.4567 will position the spindle to the angle specified by the R value. 85-4000 rev AAS 261 @ meaoes Operator's Manual} M21-M28 Optional User M The M21 through M28 codes are optional for user interfaces. They will activate one of relays (see parameter 352), wait for the M-fin signal (discrete input 1009), release the relay, and wait for the Mefin signal to cease. The RESET button will terminate any operation thatis hung-up waiting for M-fin M30 Prog End and Rewind The M30 code is used to stop a program, It also stops the spindle and turns off the coolant. The program Pointer will be reset to the first block of the program and stop, The parts counters displayed on the Current ‘Commands display are also incremented. M'30 will also cancel tool length offsets. When the Through the Spindle Coolant (TSC) option is ON, M30 will shut it OFF, and then perform an M30 operation. M31 Chip Conveyor Forward M31 starts the chip conveyor motor in the forward direction. The forward direction is defined as the direction that the conveyor must move to transport chips out of the work cell. The conveyor will not turn if the door is open. This may be overridden by setting bit 17 of parameter 209 (CNVY DR OVRO), M32 Chip Conveyor Reverse M32 starts the chip conveyor motor in the reverse direction, The reverse direction is defined as the direction. ‘opposite of forward. The conveyor will not turn if the dooris open. This may be overridden by seiting bit 17 of parameter 203 (CNVY DR OVRD). M33 Chip Conveyor Stop M33 Stops Conveyor motion. M34 “> increment Coolant Spigot Position [M34 Increments the current spigot position one place. incrementing the spigot position causes the spigot to ‘advance one piace from the home position. The home position is designated as zero. Ifthe current home Position is designated as 5 and M34 is executed, then the current spigot position will advance to position 6. jThe.spigot home places the spigot at the most positive Z axis location the spigot can atiain. Incrementing the BL = BBB en lowers te coolant steam arecton C M35 Decrement Coolant Spigot Position M35 decrements the coolant spigot position one place. Decrementing the spigot position causes the spigot to move toward the spigot home position. The home position is designated as zero. Ifthe current spigot position is 6 and M35 is executed, then the current spigot position will move to 4. The spigot home position for a horizontal mill places the spigot at the most positive Z axis location, Decrementing the spigot will raise the coolant stream direction, M36 Wait Pallet Ready This is used on Horizontal mills only. Flashes PART READY button on the front switch box. Itdelays the pallet change execution until the PART READY button is depressed, M39 Rotate Tool Turret ‘The M39 code is used to rotate the too! turret without performing a tool change. The desired tool pocket number (Th) mustbe programmed previous to the M39, 7 This M code may be useful to move an empty pocket to face the spindle. This is not normally required but is Useful for diagnostic purposes or to recover from a tool changer crash, Remember that the pocket facing the spindle must always be empty for a tool change. mat Low Gear Override The M41 code is used to override the spindle gear implied by the nnn command. With M41, the spindle gear will always 08 low. Ifthe speed commanded is above the low gear limit, the spindle speed wil be the low gear limit. This M code does not tura the spindle on or off Ifthe spindle was turning before this command, it wil be ‘Started again. IFit was stopped before this command itwillbe left off. M41 is ignored if there is no gear box. 282 AMS 96-2000 reve M42 High Gear Override ‘The M42 code is used to override the spindle gear implied by the Snnn command. With M42, the spindle gear «will always be high. Note that this may reduce the torque at the tool. This M code does not turn the spindle on cr off. f the spindle was turning before this command, it will be started again. iit was stopped betore this command it willbe left off. M42 is ignored if there is no gear box. M50 Execute Pallet Change Signals the calling program and executes a pallet change sequence. M51-MS8 Set Optional User M ‘The M51 through MS8 codes are optional for user interfaces, They will activate one of relays (see parameter 352) and leave it active, These are the same relays used for M21-M28. Use M61-MG8 to turn these off. The RESET key will turn off all of these relays. ‘See 6M option section for more information on additional user outputs, Ms59 Set Output Relay ‘This M-code directly enables a discrete output relay. The syntax for its usage is MS9 Prin where “nn” specifies the number of the relay being tumed ON. An M59 command can be used to turn ON any of the discrete output relays in the range of 1100 and 1155. For example, MS9 P1103 does the same thing as #1103=1 except that it is processed as an M code (pro cessed when coming out of the queue instead of going into the queue). To turn off a relay, use M69. M61-M68 Clear Optional User M ‘The M61 through M68 codes are optional for user interfaces. They will deactivate one of relays (see parameter 352). These are the same relays used for M21-M28. M69 Clear Output relay This M-code directly disables a discrete output relay. The syntax for its usage is M69 Prin where “nn” specifies the number of the relay being turned OFF. An M69 command can be used to turn OFF any of the discrete output relays in the range of 1100 and 115. For example, M69 P1103 does the same thing as #1103=0 except thatit is processed as an M-code (processed when coming out of the queue instead of going into the queve). To turn on a relay, use M59. M75 Set G35 or G136 Reference Point This code is used to set the reference point used for G35 and G136. it must be used after a mation which is terminated with the skip function. M76 —_Disable Displays This code is used to disable the updating of the screen displays. Itis not necessary for machine performance. M77 _Enable Displays This code is used to enable the updating of the screen displays. Its only used when M76 has been used to disable the displays. M78 Alarm if Skip Signal Found This code is used to generate an alarm ifthe previous skip function actually got the skip signal. This is usually used when a skip signal is not expected and may indicate a probe crash. This code can be placed in a block with the skip function or in any subsequent block. The skip functions are G31, G36, and G37. M73 _ Alarm if Skip Signal Not Found “This code is used to generate an alarm ifthe previous skip function did not actually get the skip signal. This is usually done when the absence of the skip signal means a positioning error of a probe. This code can be placed in a block with the skip function or in any subsequent block. The skip functons are G31, G36, and G37. 36.6000 € HAS 263 GQ reves Operator's Manual }———____ M80 and M81 Auto Door Open / Close Them. Codes that control the Auto Door have been changed. The new M-codes are MEO to open and M8t to ose the Auto door. Note: Setting §1 DOOR HOLD OVERRIDE must be set to ON parameter 57 bit 31 DOOR STOP SF must be set to zero and setting 131 AUTO DOOR sett ON, an MSD imi one the door to open and an M81 will cause itto close. Also, the control will beep while the door isin maken M82 Tool Unclamp re Cade is Used to release the ool from the spindle. Its not normally needed as tool change operations do pecatematcally and a manual TOOL RELEASE button is avaiable tothe operater Shiga ‘CODE IS NOT Fe UMENDED FOR USE AS THE TOOLWILL BE OROPPED FROM THe SPINDLE ance oe DAMAGE THE TOOL, THE MACHINE, OR YOUR SETUP. M83 and M84 Air Gun On/ Off Se eaaltutn the Air Gun on, and an Me4 wil tur it off, Additionally, an M&S Pnnn (where nnn in milisec- Snes) wil tur iton for the specified time, then off automatically Note: The Air Bla e assigned to discrete output #1138, M86-——‘Tool Clamp ‘This code will clamp a too! into the spindle. Itis not normally needed as tool ‘change operations do this auto- matically and a manual TOOL RELEASE button is available to the operator M88 Thru Spindle Coolant ON TR Code is used to turn onthe Through the Spindle Coolant (TSC) option When Mas is called, the spindle wit Stop, then the TSC pump will tun on, and the spindle will restart M89_—_Thru Spindle Coolant OFF [iis code fs used to tur off the Through the Spindle Coolant (TSC) option, When Mé9 is called the spindle witt Stop and the TSC pump wil shut off, Tuens on purge for the amount of ime specihen ss parameter 237 then turns off purge C M93 Start Axis Pos Capture and M94 Stop Axis Pos Capture {Trese M codes permit the contro to capture the position of an auxiliary axis when discrete input goes high. The format is: M93 Px Qx (where P isthe axis number and Q is aiserete input number from 0 to 63) M94 M33 causes the control to waich the discrete input specified by the Q value, and when itgoes high, captures Stage ation ofthe axis specified by the P value. The positon is then copied to haven mene variable 749, Ma4 Stops the capture. MSS and M4 were introduced to support the Horizontal Mil bar hee oe, mgs Sleep Mode Ma6 (hh:mm) pe comment immediately following the MOS must contain the hours and minutes that the machine is to sleep {or For example, if the current time were 6pm and the user wanted the machine vy Sleep until 6:30am the next Tmoming, the following command would be used. ‘M95 (12:30) Up to 89 hours can be specified thus allowing the machine to sleep for over 4 days. Ifthe time is specified onto clea nag Format, alarm 324 DELAY TIME RANGE ERROR willbe generated. When sno machine enters sleep mode and the following message is displayed HAAS. SLEEP MODE REMAINING TIME nnn MIN. OO WAG 26-5000 rev Operator's Manual} wcvees QD ‘The message will be re-displayed in a different position on the screen each second so that the user can see at a glance that the machine is sleeping, This has the advantage of preventing the message from being "burned" into one spot on the screen. When less than one minute of sieep time remains, the message will change to REMAINING TIME nn SEC, ifthe user presses any key or opens the door, sleep mode willbe cancelled and the active program wit wait at the block following the MG6 unti the user presses the Cycle Start key. For the last 30 seconds of the sleep time, the machine will beep and display an additional message: WAKE UP IN nn SECONDS When the sleep time has elapsed and the active program will continue at the block following M95, M96 Jump If No Input P Block to branch to when consitional test succeeds Q —_ Discrete input to test, 0..31 ‘This code is used to test a discrete input for 0 status. When this block is executed and the input signal specified by Qis 0, a branch to the block specified by P is performed. APnnnn code is required and must ‘match a line number within the same program, The Q value must be in the range of 0 to 31. These correspond {o the discrete inputs found on the diagnostic display page with the upper left being input 0 and the lower right being 31. Qis not required within the M96 block. The last specified Q will be used. This command stops the lookahead queue unti the testis made at runtime. Since the lookahead queue is exhausted, M96 cannot be ‘executed when cutter compensation is invoked. M86 cannot be executed from a main ONC program. If you wish to use M96 in DNC, it must be ina resident subroutine called from the DNC program The following is an M96 example: NOSM96P5Q8 (TEST INPUT DOORS, UNTIL CLOSED); N10 (START OF SOME PROGRAM LOOP); (PROGRAM THAT MACHINES PART); N85 Mat (EXECUTE AN EXTERNAL USER FUNCTION) 1 N90 M96 P10 Q27 (LOOP TO N10 IF SPARE INPUT IS 0); N95 M30 (IF SPARE INPUT IS 1 THEN END PROGRAM); M97 Local Sub-Program Call This code is used to call a subroutine referenced by a line N number within the same program. APnnnn code is required and must match a line number within the same program. This is useful for simple subroutines within ‘a program and does not require the complication of a separate program. The subroutine must stitbe ended ‘with an M99, An L count on the MS7 biock will repeat the subroutine call that number of times. M98 Sub Program Call This code is used to call a subroutine. The Pannn code is the number of the program being called. The Pnnan code must be in the same block. The program by the same number must already be loaded into memory and it must contain an M99 to return to the main program. An L count can be put on the line containing the M98 and will cause the subroutine to be called L times before continuing to the next block. 36-8000 reve, AMS 265 @ coves Operator's Manual +} 266 Ms9 Sub Program Return Or Loop This code is used to return to the main program from a subroutine or macro. It will also cause the main pro- gram to loop back to the beginning without stopping if itis used in other than a subprogram without 2P code. If an M99 Pnann is used, itwil cause a jump to the line containing Nnnnn of the same number. M99 Pann in the HAAS control varies from that seen in FANUC compatible controls. In FANUC compatible controls M89 Prin will return to the calling program and resume execution at block N specified in Pann. For the HAAS control, M99 will NOT return to the calling program, but instead will jump to block N specified in Pnnnnin the current program. ‘You can simulate FANUC behavior by using the following code. calling program: HAAS FANUG (O0o001 (00001 N50 M98 P2 NSO Mos P2 N51 M99 P100 se N100 (continue here) N100(continuehere) 5 M30 M0 subroutine: 00002 ‘©0002 ge Mg9P100 Wfyou have macros, you can use a global variable and speciy a block to jump to by adding #nnn=dddd in the ‘subroutine and then using M88 P#fnnn after the subroutine call. There are many ways to jump conditionally after a M99 return when using macros, M109 INTERACTIVE USER INPUT This M code allows a G-code program to place a short prompt on the screen, get a single character input from the user and store it in a macro variable, The first 15 characters from the comment following the M109 willbe. displayed as a promptin the lower left corner of the screen. A macro variable in the range 500 through $98 must be specified by a P code. Note also that due to the look-ahead feature, it is necessary to include a loop in the program following the M109 to check for a non-zero response before continuing. The program can check for any character that can be entered from the keyboard by comparing with the decimal equivalent of the ASCII character. Here are a few common characters: A-65 a-97 N-78 n-110 1-49 - 45 B-66 b-98 Y-89 y-121 2-80 * 42 C-67 ¢-99 0-48 +-43 3-51 1 47 The following sample program will ask the user a Yes or No question then wait for either a Y or an N to be entered. All other characters will be ignored, . N1 #501=0. (CLEAR THE VARIABLE) M109 PS01 (Sleep 1 min?) NS IF [#501 EQ 0. ] GOTOS (WAIT FOR AKEY) IF {#501 £Q 89, }GOTO10 (Y) IF [ #501 EQ 78. | GOTO20 (Ny GOTO} (KEEP CHECKING) N10(AY WAS ENTERED) M95 (00:01) GOTO30 N20 (ANN WAS ENTERED) G04 P1. (DO NOTHING FOR 1 SECOND) N30 (STOP) M30 Fae Operator's Manual + GD ‘The following sample program will ask the user to select a number then wait for a 1, 2ora 3 to be entered. All other characters will be ignored. ~~ 000234 (SAMPLE PROGRAM) ¥ N1#501= 0. (CLEAR THE VARIABLE) M109 P501 (Pick 1, 20r3:) , NS IF [#501 EQ 0. | GOTOS (WAIT FOR AKEY) : IF [#501 EQ 49, ]GOTO10(1) > IF [#501 EQ 50. ]GOTO20 (2) iF [#501 EQ 51, ]GOTO3O (3) GOTO1 (KEEP CHECKING) N10 (A 1 WAS ENTERED) M5 (20:01) : GOTO30 N20 (A2 WAS ENTERED) & G04 P5. (D0 NOTHING FOR § SECONDS) + N30 (A 3 WAS ENTERED) 7 M30 Bee “

Вам также может понравиться