کدهای برنامه نویسی کنترل فانوک
G کدهای کنترل فانوک :
G00 – Positioning (Rapid Feed Rate)
G01 – Linear Interpolation
G02 – Circular and Helical Interpolation Clockwise
G03 – Circular and Helical Interpolation Counter Clockwise
G04 – Dwell/Exact Stop
G05 – High Speed Machining
G09 – Exact Stop
G10 – Data Setting
G11 – Data Setting Mode Cancel
G15 – Polar Coordinate Command Cancel
G16 – Polar Coordinate Command
G17 – XpYp Plane Selection
G18 – ZpXp Plane Selection
G19 – YpZp Plane Selection
G20 – Inch Input
G21 – Millimeter Input
G22 – Turn On Stored Stroke Function
G23 – Turn Off Stored Stroke Function
G27 – Check Reference Position Return
G28 – Return To Reference Position
G29 – Return From Reference Position
G30 – Second, Third and Fourth Reference Position Return
G31 – Skip Function
G33 – Thread Cutting
G37 – Automatic Tool Length Measurement
G39 – Corner Offset Circular Interpolation
G40 – Cancel Cutter Compensation
G41 – Compensate Cutter Left
G42 – Compensate Cutter Right
G43 – Compensate Tool Length in Plus Direction
G44 – Compensate Tool Length in Minus Direction
G45 – Increase Tool Offset
G46 – Decrease Tool Offset
G47 – Tool Offset Double Increase
G48 – Tool Offset Double Decrease
G49 – Cancel Tool Length Compensation
G50 – Cancel Scaling
G51 – Scaling
G52 – Set the Local Coordinate System
G53 – Select the Machine Coordinate System
G54 – Select Work Piece Coordinate System 1
G55 – Select Work Piece Coordinate System 2
G56 – Select Work Piece Coordinate System 3
G57 – Select Work Piece Coordinate System 4
G58 – Select Work Piece Coordinate System 5
G59 – Select Work Piece Coordinate System 6
G60 – Single Direction Positioning
G61 – Exact Stop Mode
G62 – Automatic Corner Override
G63 – Tapping Mode
G64 – Cutting Mode
G65 – Macro Call
G66 – Macro Modal Call
G67 – Cance Macro Modal Call
G68 – Coordinate Rotation
G69 – Cancel Coordinate Rotation
G73 – Peck Drilling Cycle
G74 – Counter Tapping Cycle
G76 – Fine Boring Cycle
G80 – Cancel Canned Cycle/External Operation Function
G81 – External Function, Drilling Cycle or Spot Boring Cycle
G82 – Drilling Cycle of Counter Boring Cycle
G83 – Peck Drilling Cycle
G84 – Tapping Cycle
G85 – Boring Cycle
G86 – Boring Cycle
G87 – Back Boring Cycle
G88 – Boring Cycle
G89 – Boring Cycle
G90 – Absolute Command
G91 – Incremental Command
G92 – Setting to Work Coordinate System or Clamp at Maximum Spindle Speed
G94 – Feed per Minute
G95 – Feed per Revolution
G96 – Constant Surface Speed Control
G97 – Cancel Constant Surface Speed Control
G98 – Return to Initial Point in Canned Cycle
G99 – Return to R Point in Canned Cycle
M کدهای کنترل فانوک :
M01 – Conditional Program Stop. Same as M00 except that the m-code is only executed if another condition has been met by the operator. In most cases this condition is manual activation of a maintained push button or toggle switch. This switch is typically labeled OPTIONAL STOP. If this condition is not met M01 will be read but will have no effect.
M02 – End Of Program. The machining operation is stopped but the program is not rewound or reset.
M03 – Spindle Rotation CW. The spindle will be started and will run in the clockwise direction. The RPM at which the spindle rotates is controlled the speed command (S-Code). If no S-Code is specified with the M03 the spindle runs at the last commanded speed. If the S-Code has been reset, by cycling the NC power, etc the spindle will run in the clockwise direction at 0 RPM (no spindle motion).
M04 – Spindle Rotation CCW. Same as M03 but spindle direction is counter-clockwise.
M05 – Spindle Rotation Stop.
M06 – Tool Change Cycle. This command is normally used to start the automatic tool change cycle. When used on a machining center M06 is primarily used to begin execution of a separate program known as a tool change macro. This macro program contains all of the necessary commands (G-codes, M-codes, etc) to remove the current tool from the spindle, place the next tool in the spindle and re-start the main program at the block immediately following the M06 command line. This function can also be carried out completely within the PLC (ladder program) without the need for a macro program. Since a tool change cycle for a turning center involves simply rotating the turret the tool change is almost always performed as a function of the PLC without a macro program.
M07 – The function of this m-code will vary by machine. It may be used to turn on either a mist coolant or air/oil mist system. It is also commonly used to turn on a CTS (gun drill) motor.
M08 – Almost always turns on the flood coolant system regardless of machine type.
M09 – Coolant Off. Turns off any coolant system that has been activated my M07 or M08.
M10 – Clamp. The most common function for M10 is to clamp a workholding device. This device may be the fourth axis (rotary axis) of a machining center, a pallet or even a group of fixtures attached to a table. In the case of a horizontal machining center M10 sometimes will clamp the table itself.
M11 – Unclamp. Same as M10 description but is used to unclamp.
M19 – Spindle Orient. Rotates the spindle to a pre-determined position and locks it in place. This position is typically defined by parameter. Spindle orientation can be released either by M05 or by pressing the Reset button depending on how the parameters are set.
M30 – Program Reset and Rewind. The M30 command is placed at the end of the program. When read the program is reset to the first command line. All machine functions are ceased and the machine is readied to execute the program again. Program execution can be commenced by pressing the cycle start pushbutton. It is possible to configure the parameters such that M30 cause the program to rewind but not reset.
M98 – Sub Program Call. M98 is used to call up and execute another program within the main program. The number of the subprogram is specified in the M98 command line (i.e. M98 P0001). Upon completion of the sub program the main program resumes execution at the command line following the M98 command.
M99 – Return To Main Program. M99 is used to return to the main program once execution of the sub program has been completed. M99 is also use to loop a program. Placing M99 at the end of a program (other than a sub program) will cause the program to automatically reset and execute continually
کد و توضیح آلارمهای فانوک ۶
Fanuc 6 Alarms
Program errors or Operator’s Error
000
Re-apply the power after the parameter has been input
001
TH Alarm (A character with incorrect parity was input) Correct the tape
002
TV Alarm (The number of characters in a block is odd). This alarm will be generated only when the TV check is effective
003
Data exceeding the maximum allowable number of digits was input
004
A numeral or the sign (-) was input without an address at the beginning of the block
005
The address was not followed by the appropriate data but was followed by another address of EOB code
006
Sign “-” input error (sign “-” was input after a address with which it can’t be used. Or two “-” signs were used).
007
Decimal Point “.” Input error (A decimal point was input after a address with which it can’t be used. Or two decimal points were input).
008
The switch position of the tape reader was not AUTO (without reel) or REEL ON/REEL OFF (with reels).
009
Unusable character was input. (E).
010
A unusable G code was commanded. (The alarm is generated also when a G code with which the control is not equipped as an option is commanded).
011
Feedrate was not commanded at cutting feed or the feedrate was inadequate
015
The number of the commanded axes exceeded that of the allowable simultaneously controlled axis
017
The move commanded of the additional axis was commanded without equipping with an optional additional axis.
018
An additional axis was commanded with the other axis simultaneously.
021
The axis not included in the selected plane (by using G17, G18, G19) was commanded in circular interpolation.
022
In circular interpolation, radius designation was performed in the NC which is not equipped with the radius designation option.
023
In circular interpolation by radius designation, Zero was commanded for address R.
030
The tool offset number is too large for the D or H function.
031
In setting of offset amount by G10, The offset number following address P was excessive or it was not specified.
032
In setting of offset amount by G10, the offset amount was excessive.
035
Skip Cutting (G31) was commanded in cutter compensation mode.
036
G45-G48 (Tool Offset) was commanded in cutter compensation mode.
037
The selected (by using G17, G18 or G19) changed in cutter compensation mode.
038
Over cutting will occur in cutter compensation because the arc start point or end point coincides with arc center
041
Overcutting will occur in cutter compensation.
044
One of G27-G30 was commanded in canned cycle mode. An ATC cycle (M06) was commanded in canned cycle mode.
045
An ATC cycle (M06) was commanded for the NC which is not equipped with optional reference point return feature.
046
Other than P2, P3 and P4 was specified in the 2nd, 3rd and 4th reference point return commands.
047
G27 to G30 was commanded for and axis which does not have a reference point.
058
In 4-digit S code binary 12-bit/analogue output A, A command was specified exceeding the maximum or minimum number of spindle revolutions.
059
No program for selected work number is found (external work number select A function).
060
Commanded sequence number was not found in the sequence number search,
065
Scaling Magnification was specified as other than 1-99999.
066
Scaling was applied and as a result, movement value, coordinate value, circular arc radius, etc. exceed maximum programmable dimension.
067
G51 (scaling ON) was specified in cutter compensation mode.
070
The Fanuc memory area is insufficient.
071
The address to be searched was not found.
072
The number of programs to be stored exceeds 95 or 191. (191 is a option(.
073
The program number has already been used.
074
The program number is other then 1-9999
075
The program number or sequence number was not found at the start block of the program
076
The address P was commanded in the block with includes a M98 command.
077
The subprogram was called in triple
078
The sequence number which was specified by address P in the block which includes a M98 or M99 was not found
079
Memorized program and tape contents do not coincide
085
When storing data in memory by using ASR or RS232C interface, an over-run or framing error was generated
086
The signal level of RS232C interface was incorrect
087
When storing data in the memory by using the Fanuc RS232 interface, the time required to store the data is insufficient.
090
The reference point return cannot be performed normally because the reference point return start point is to close to the reference point or one revolution signal is not input owing to a fault in the pulse coder.
091
Reference point return cannot be executed normally, because of the feedrate is too low to synchronise the one revolution signal of the pulse coder with the reference counter,
092
The axis designated by G27 did not return to reference point.
094
No P type can be specified for program restart (because after program interruption, coordinate system setting or ORIGIN, etc. was executed)
095
No P type can be specified for program restart (because after program interruption, external work zero point offset value changed)
096
No P type can be specified for program restart (because after program interruption, work zero point offset value changed).
097
No P type can be specified for program restart (because after program interruption, no automatic operation has been executed).
100
The switch to set parameters is on. Push the reset button after turning off the switch.
101
The power was turned off while rewriting the contents of memory in the part program storage & editing operation. When this alarm is generated you must turn on the power while pushing the DELETE and RESET buttons to clear the memory.
110
Absolute value of data of fixed point representation exceeds the upper bound (99999999).
111
Exponent of data of floating point representation exceeds the upper bound.
112
Divisor is 0
113
A function that cannot be used by user macro A is used
114
Format error except for
115
Value not defined as variable number is assigned
116
Left side of substituted sentence is a variable of prohibited substitution
118
Nesting of brackets exceeds the upper limit (5).
119
Argument of SQRT is negative , Or argument of BCD is negative
122
Nesting of macro exceeds the upper limit (4)
123
Macro control command is uded in tape mode
124
DO END is not 1:1 corresponding
125
Format error of (formula)
126
Not 1 £ n £ ۳ in DO n
127
NC command and macro command are mixed
128
Not 0 £n £۹۹۹۹ in GO TO n
129
Unallowable address is used in .
130
In external data input, greater-address data contains an error
131
In external alarm message, five or more alarms have occurred
132
In external alarm message, clear, no corresponding alarm number exsists
133
In external alarm message and in external operator message, smaller- address data contains an error
170
Programs of numbers 8000 – ۸۹۹۹ and 9000 – ۹۸۹۹ are being edited, But this alarm occurs only when parameter setting inhibits these programs to be edited.
Error on Stroke Limit Switch
210
The movable part of machine touched the X Axis plus stroke limit switch
211
The movable part of machine touched the X Axis minus stroke limit switch
212
While the X Axis was moving in the plus direction, It entered into the forbidden area of the stored stroke limit 1
213
While the X Axis was moving in the minus direction, It entered into the forbidden area of the stored stroke limit 1
214
While the X Axis was moving in the plus direction, It entered into the forbidden area of the stored stroke limit 2
215
While the X Axis was moving in the minus direction, It entered into the forbidden area of the stored stroke limit 2
220
The movable part of the machine touched the Y axis plus stroke limit switch
221
The movable part of the machine touched the Y axis minus stroke limit switch.
222
While the Y axis was moving in the plus direction, it entered into the forbidden area of the stored stroke limit 1
223
While the Y axis was moving in the minus direction, it entered into the forbidden area of the stored stroke limit 1
224
While the Y axis was moving in the plus direction, it entered into the forbidden area of the stored stroke limit 2
225
While the Y axis was moving in the minus direction, it entered into the forbidden area of the stored stroke limit 2
230
The movable part of the machine touched the Z axis plus stroke limit switch
231
The movable part of the machine touched the Z axis minus stroke limit switch
232
While the Z axis was moving in the plus direction, it entered into the forbidden area of the stored stroke limit 1
233
While the Z axis was moving in the minus direction, it entered into the forbidden area of the stored stroke limit 1
234
While the Z axis was moving in the plus direction, it entered into the forbidden area of the stored stroke limit 2
235
While the Z axis was moving in the minus direction, it entered into the forbidden area of the stored stroke limit 2
240
The movable part of the machine touched the 4th axis plus stroke limit switch
241
The movable part of the machine touched the 4th axis minus stroke limit switch
Error on servo system
400
The control received the X, Y or Z axis overload signal
401
The READY signal (VRDY) of the X, Y or Z axis velocity control has turned off
402
The control received the 4TH axis overload signal
403
The READY signal (VARY) of the 4TH axis velocity control has turned off
404
The READY signal (VARY) of the X, Y or Z axis velocity control does not turn off even though the READY signal (PRDY) of the position control has turned off
The READY signal (VARY) of velocity control already on even though the READY signal (PRDY) of the position control is off yet at power on condition
405
In reference point return, reference point return is not performed in correctly by abnormality of NC control section or servo system. Perform manual reference point return again
410
The content of error register of the X axis is larger than the value allowed while the machine is stopped
411
The content of error register of the Y axis is larger than the value allowed while the machine is moving
412
Drift in X axis is excessive. (Exceeds 500VELO)
413
The content of the error register of the X axis exceeded =32767. Or the velocity command value of the DA converter is out of the range of +8191~ – ۸۱۹۲٫ Incorrect settings will cause this alarm
414
The resolver/inductosyn position detecting system of X axis is trouble
415
A feed rate exceeding 511875 detection units/sec was commanded in the X axis
An incorrect setting of CMR causes this error
416
X axis pulse coder position feedback is abnormal. (Disconnection alarm)
420
The content of the error register of the Y axis is larger than the value allowed while the machine is stopped
421
The content of the error register of the Y axis is larger than the value allowed while the machine is moving
422
Drift in Y axis is excessive. (Exceeds 500VELO)
423
The content of the error register of the Y axis exceeded =32767. Or the velocity command value of the DA converter is out of the range of +8191~ – ۸۱۹۲٫ Incorrect settings will cause this alarm
424
The DSCG position detecting system of the Y axis is trouble
425
A feed rate exceeding 511875 detection units/sec was commanded in the Y axis
An incorrect setting of CMR causes this error
426
Y axis Fanuc pulse coder position feedback is abnormal. (Disconnection alarm)
430
The content of the error register of the Z axis is larger than the value allowed while the machine is stopped
431
The content of the error register of the Z axis is larger than the value allowed while the machine is moving
432
Drift in Z axis is excessive. (Exceeds 500VELO)
433
The content of the error register of the Z axis exceeded =32767. Or the velocity command value of the DA converter is out of the range of +8191~ – ۸۱۹۲٫ Incorrect settings will cause this alarm
434
The resolver/inductosyn position detecting system of Z axis is trouble
435
A feed rate exceeding 511875 detection units/sec was commanded in the Z axis
An incorrect setting of CMR causes this error
436
Z axis pulse coder position feedback is abnormal. (Disconnection alarm)
440
The content of the error register of the 4TH axis is larger than the value allowed while the machine is stopped
441
The content of the error register of the 4TH axis is larger than the value allowed while the machine is moving
442
Drift in 4TH axis is excessive. (Exceeds 500VELO)
443
The content of the error register of the 4THaxis exceeded =32767. Or the velocity command value of the DA converter is out of the range of +8191~ – ۸۱۹۲٫ Incorrect settings will cause this alarm
444
The resolver/inductosyn position detecting system of the 4TH axis is trouble
425
A feed rate exceeding 511875 detection units/sec was commanded in the 4TH axis
An incorrect setting of CMR causes this error
426
Additional axis pulse coder position feedback is abnormal. (Disconnection alarm)
Connection alarm between each PCB
600
Data transferring error took place in the connection unit or in PC-model C
601
Slave relay was turned off. (Connections among unit, MDI/DPL (MDI/CRT) and master PCB are trouble. Another case change connection unit)
602
PC program has not yet been loaded
603
The correspondence between NC and PC is incorrect or interrupted. Change power sequence control PCB or master PCB
604
No hold is effective to PC-model B side MPU
605
A system error has occurred in PC-model B side MPU
606
RAM/ROM parity has occurred in PC-model B side MPU
607
Data transferring error took place in Fanuc MDI & CRT
Overheat alarm
700
Overheat of the master PCB
701
Overheat of the PCB for 4TH axis
702
Overheat of DC motor for X, Y, Z axis
703
Overheat of DC motor for 4TH axis
Errors on memory
900
Fault in bubble device. (Fault of input signal for bubble device)
901
Fault in bubble device. (The initial point in the bubble was not detected immediately after power on)
902
Fault in bubble device. (Page size error, undefined command)
903
Fault in bubble device. (Transfer missing, page size over)
904
Fault in Fanuc bubble device. (Parity error)
905
Fault in bubble device. (No marker)
906
Fault in bubble device. (Many defect loops)
910
RAM parity error (low byte)
911
RAM parity error (high byte)
920
System error (watch dog timer alarm)
930
CPU error (0, 3, 4 type interrupt generation)
997
ROM parity error (PC ROM)
998
ROM parity error (Basic ROM)
999
ROM pair error (No correspondence between high and low)
منبع : http://cnchome.ir
این وبلاگ در زمینه رشته مکانیک فعال می باشد