After this page you can tell which lines of your program a FANUC Series 0i / 31i milling control stops on, and with which alarm. You can also decide which of DryRun's assumptions to check on your own control before you trust a clean result.
DryRun reads a program as the control does and runs it on a model of your machine. That is the FANUC ROBODRILL α-D21LiB5 from the catalogue, or your own machine with Controller set to FANUC in the Library. The demo /app?demo=demo-fanuc is a ROBODRILL with one program that runs through and one with three typical mistakes.
The page is written from the FANUC ROBODRILL α-DiA5 Operator's Manual, B-85314EN/01, for the Series 31i-B5 control. Where that manual is silent, the usual FANUC rule is used and marked assumed. Nothing here was tried on a real control.
What DryRun does at an alarm
A FANUC control checks a block, and if it cannot accept it, stops the program and shows a numbered alarm. DryRun does the same check. The line gets a Not executed entry with the control's number and message, then the cause:
PS0010 IMPROPER G-CODE: G90.1 is not a FANUC code — the control stops here; the simulation goes on as if you continued
An alarmed line changes nothing. The simulation goes on after it, so one pass shows every alarm. Any alarm makes the verdict DO NOT RUN, for example 1 rejected line — alarm PS0010 on line 4; the control stops the job there.
The decimal point
On a FANUC control a length without a decimal point is counted in thousandths. X100 is 0.100 mm, and X100. is 100 mm. This is parameter 3401 bit 0 at its factory value 0 (assumed; see check T13). The ROBODRILL manual tells you to "Specify each value with a decimal point" (section 33).
DryRun follows the machine's Decimal point setting:
- Standard (the default): a value of X, Y, Z, A, I, J, K, R, a peck's Q or
G04 Xwithout a point is multiplied by 0.001 (0.0001 in inch mode).X0needs no point. - Calculator (parameter 3401 bit 0 = 1):
X100is 100 mm.
The first such value in a program gets one warning: X100 has no decimal point: read as 0.100 mm (FANUC parameter 3401#0 = 0); write X100. for 100 mm. F, S, T, H, D, L, a canned cycle's K and G04 P are whole numbers in both settings.
How a program is read
- A program starts at the machine's Home position (machine 0 on the ROBODRILL) in G00, G17, G90, G54, G94 and G98, in millimetres.
- The first
%line is ignored. A second one ends the program, and lines after it get a warning (assumed). O0001–O9999names the program. A laterOline starts a subprogram in the same file.- Text in
( )is a comment.Nnumbers and spaces are accepted (assumed). ;ends the block. A;at the end of a line is dropped. A line with words after a;is skipped with the warningtext after ";" is the next block on a FANUC control (";" ends the block); line skipped(assumed, T12).- A line that starts with
/runs, with the warning"/" optional block skip: the line runs, as with BLOCK SKIP off on the control. - The same letter twice in a block: the last value counts, with a note (assumed, T6). Two G codes of one group, such as
G00 G01: the last one counts, with a note (manual, Appendix B, note 4). - A program that ends without M30 or M02 gets the warning
program has no M30.
PS alarms DryRun reports
The messages are the control's, from the manual's alarm list (Appendix D, pp. 962 and after).
| Alarm | Message on the control | When DryRun reports it |
|---|---|---|
| PS0003 | TOO MANY DIGIT | a length of 100 000 mm or more (the limit is assumed) |
| PS0005 | NO DATA AFTER ADDRESS | a letter without a number |
| PS0006 | ILLEGAL USE OF MINUS SIGN | a negative T, H, D, cycle K, M98 P or G04 P |
| PS0007 | ILLEGAL USE OF DECIMAL POINT | a point in one of those words; two points in one value |
| PS0009 | IMPROPER NC-ADDRESS | a letter other than G M X Y Z I J K R F S T H D P Q L N O; A on a machine without an A axis |
| PS0010 | IMPROPER G-CODE | a G code that is not in the table below |
| PS0011 | FEED ZERO (COMMAND) | G01, G02, G03 or a canned cycle before any F, or with F0; in G93 without F on the block; in G95 without S |
| PS0020 | OVER TOLERANCE OF RADIUS | an I, J, K arc whose end is more than 0.005 mm off its radius (the tolerance is assumed, T8) |
| PS0022 | R OR I,J,K COMMAND NOT FOUND | G02 or G03 with neither |
| PS0025 | CIRCLE CUT IN RAPID (F0) | G02 or G03 with F0 |
| PS0030 | ILLEGAL OFFSET NUMBER | H or D above 200, the ROBODRILL's offset count |
| PS0031 | ILLEGAL P COMMAND IN G10 | G10 L2 with P outside 0–6, G10 L20 or G54.1 with P outside 1–48 |
| PS0043 | ILLEGAL T-CODE COMMAND | a T word on a block without M06 |
| PS0044 | G27-G30 NOT ALLOWED IN FIXED CYC | G28 or G30 while a canned cycle is active |
| PS0045 | ADDRESS Q NOT FOUND (G73/G83) | G73 or G83 without Q, or with Q0 |
| PS0046 | ILLEGAL REFERENCE RETURN COMMAND | G30 with a P other than 2 |
| PS0074 | ILLEGAL PROGRAM NUMBER | O0, or an O number above 9999 |
| PS0076 | PROGRAM NOT FOUND | M98 P to an O number that is not in the file |
| PS0077 | TOO MANY SUB,MACRO NESTING | subprograms more than 10 deep (the depth is assumed) |
| PS0078 | SEQUENCE NUMBER NOT FOUND | M99 P to an N number that is not in the file |
| PS0250 | TOOL CHANGE ILLEGAL Z AXIS COMMAND | a Z word on the M06 block |
| PS0251 | TOOL CHANGE ILLEGAL T COMMAND | M06 T outside 1 to the machine's Tool pockets (21) |
Three more stops have no PS number:
- Alarm 252 (ATC): M06 while G41 / G42, G43 / G44 or a canned cycle is active. The manual gives the condition, not the message text.
- OT0500 / OT0501: a move past an axis's travel. The run stops there, as the machine does:
X 712.000 > max 700.000 — OT0500 (X) + OVERTRAVEL (SOFT 1) — the machine stops here; the rest of the job does not run. #3000 = 5 (TEXT)in the program is the control's macro alarm:macro alarm #3000 = 5: TEXT — the program raises it on every run.
G codes
"On the control" is from the manual's G-code list (Appendix B, pp. 953–956) unless the row says assumed. In the DryRun column, Runs means simulated. No effect means accepted without changing the path. Ignored means the code is dropped and the rest of the line runs. Line skipped means the line does not run. Alarm stops the line as above.
| Code | On the control | In DryRun | Message |
|---|---|---|---|
| G00 | Rapid; each axis at its own speed, so a diagonal move is a dog-leg (assumed, T7) | Runs; the path follows G0 path | — |
| G01 | Linear feed | Runs | PS0011 without F |
| G02, G03 | Arc by R (R below 0: over 180°) or by I, J, K from the start point; a third axis makes a helix | Runs. An R arc back to its own start point does not move (assumed) | PS0020, PS0022, PS0025 |
| G04 | Dwell: P in ms, X in seconds (assumed; the manual's examples are G04 P200 and G04 X1.) |
Runs | PS0007 for G04 P1.5 |
| G05.1, G05.4, G08, G09, G61, G62, G63, G64 | AI contour control, exact stop and cutting modes | No effect | — |
| G10 | L2 P1–P6 writes G54–G59, L20 P1–P48 writes G54.1 P1–P48 (manual, section 37) |
Runs: the offset changes for the rest of the job. L2 P0 and other L values: the line is skipped. L10–L13 (tool offsets): ignored |
PS0031; G10 changes the stored work offset on the controller (it persists after the job) … |
| G15, G50, G50.1, G67, G69 | Cancel polar coordinates, scaling, mirror, modal macro call, rotation | No effect | — |
| G16, G68 | Polar coordinates, coordinate rotation | Ignored | G68: not simulated; positions after this line may differ from the controller |
| G17, G18, G19, G20, G21, G90, G91, G98, G99 | Plane; inch, mm; absolute, incremental; a canned cycle returns to the start level, to R | Runs | — |
| G22, G23 | Stored stroke check 2 on, off | No effect | — |
| G27, G29, G31, G37, G51, G51.1, G76, G87, G88 | Reference check and return, skip (probing), tool length measurement, scaling, mirror, fine and back boring | Line skipped | G31: not simulated; line skipped, positions after this line may differ from the controller |
| G28 | Rapid to the point on the block, then the named axes to the reference position (assumed) | Runs, to the machine's G28 position (machine 0). Without axis words nothing moves. In G90 a warning: the point is a work position | PS0044 in a canned cycle |
| G30 | The same, to the second reference position | Runs, to the G30 position | PS0046 for P3 or P4 |
| G40 | Cutter compensation off | Runs | — |
| G41, G42 | Cutter compensation left, right, by offset D | Runs without compensation: right only if D holds a wear value, not the cutter radius. The span is a note in the Problems list | cutter compensation not simulated: lines 12–40, path off by D1 |
| G43, G44, G49 | Tool length compensation +, −, off | Runs: H n takes tool n's length from the setup | PS0030; tool 5 is not in the setup tool table |
| G52 | Local coordinate system: shifts every work offset; G52 X0 Y0 Z0 cancels (assumed) |
Runs; M30 cancels it too | — |
| G53 | Machine coordinates for this block, at rapid | Runs | — |
| G54–G59, G54.1 | Work offsets; G54.1 P1–P48 (also written G54 P1) are the 48 additional ones |
Runs, from the setup's work zeros | PS0031; G54.1 P1 is not set for this program; using zero offset |
| G60 | One-direction positioning | Runs as G00 | G60 one-direction positioning is simulated as G00 … |
| G65, G66, G66.1 | Macro call | Line skipped; a note in the Problems list | macro P9810 not simulated (line 12); its motion is not checked |
| G73, G83 | Peck drilling; Q is the peck | Runs; the retract (G73) and the clearance (G83) are 1 mm (assumed, T9) | PS0045 |
| G74, G84 | Tapping, left and right | Runs: feed to Z, dwell P, feed back to R | G84 tapping: the spindle reversal at the bottom is not simulated |
| G80 | Canned cycle off; G00–G03 cancel a cycle too (Appendix B, note 5) | Runs | — |
| G81, G82 | Drill; drill with dwell P in ms | Runs | — |
| G85, G86, G89 | Bore: feed out; stop and rapid out; dwell and feed out | Runs | — |
| G92, G92.1 | Shift the work coordinates; clear the shift on the named axes (assumed) | Runs. G92.1 without axis words clears every axis |
— |
| G93, G94, G95 | Inverse time, feed per minute, feed per revolution | Runs. G95 is timed as F × S (assumed) | PS0011 |
| Any other G code (G12, G90.1, G59.1) | "An unusable G code is specified" (Appendix D) | Alarm | PS0010 |
Canned cycles. R and Z are absolute positions and K is the repeat count (assumed). K0 stores the cycle without drilling. L is read as K, with a note. A cycle in G91 or outside G17 is not simulated: its line is skipped with a warning. More than one repeat in G90 warns K3 in G90 repeats the same hole; repeats need G91.
M codes and the tool change
"On the control" is from the manual's M-code list (section IV-2.7.3, pp. 156–158).
| Code | On the control | In DryRun | Message |
|---|---|---|---|
| M00, M01, M07, M08, M09, M19, M29 | Program stop, optional stop, air blow, coolant on and off, spindle orientation, rigid tapping | No effect: the simulation does not pause | — |
| M02, M30 | End of program | Runs: the program ends and the modes reset | — |
| M03, M04, M05 | Spindle clockwise, counter-clockwise, stop | Runs: the spindle readout only | — |
| M06 | Tool change | Runs; see below | PS0250, PS0251, alarm 252 |
| M98, M99 | Subprogram call and return | Runs. M98 P50010 calls O10 five times, and M99 P100 returns to N100 (assumed). M99 in the main program ends the run |
PS0076, PS0077, PS0078; M99 in the main program repeats it forever on the controller; simulated once |
| M198 | Subprogram from external memory | Line skipped | M198: not simulated; line skipped … |
| M10–M17, M20–M28, M31–M79, M90–M97, M100–M133, M170–M172 | ROBODRILL machine functions: clamps, probe, doors, counters | Ignored | M10: machine M code, no motion simulated |
| Any other M code | Depends on the machine builder's ladder (assumed) | Ignored | M200: not a ROBODRILL M code: what it does depends on the machine's ladder (PMC); ignored |
| T alone on a block | The turret has no pre-selection: "M06 is not specified in a block that specifies a T code" (Appendix D) | Alarm | PS0043, with The ROBODRILL turret has no pre-selection; turn off 'preload tool' in the post |
M06 on the ROBODRILL (manual, section III-6, pp. 198–200). M06 T2 moves Z to the reference position, then changes the tool. X and Y on the same block move at the same time. M06 P2 takes the second pocket clockwise from the current one. DryRun rapids Z to machine 0 and adds the machine's Tool change time (0.9 s) to the estimate. The move above Z 0 into the turret is not simulated.
The manual forbids M06 while tool length compensation, cutter compensation or a canned cycle is active, and allows G49 and G80 on the M06 block. A generic post that writes G91 G28 Z0 and then T2 M06 hits alarm 252 at the second tool. DryRun's hint is Add G49 (and G80) to the M06 block or before it; the ROBODRILL post does this. An S word on the M06 block gets a warning: the manual says not to write it there.
PS0250, PS0251 and alarm 252 apply while the machine's Tool change setting is Tool table (G43 H), the FANUC default.
After M30 or M02 the modes go back to the codes Appendix B marks as the reset state: G00, G17, G90, G54, G40, G49, G80, G94 and G98. G52 is cancelled. Units, the position, the tool and the work offsets stay. G92, F and S are kept (assumed).
Macros
Custom macro B is not executed. DryRun sorts each macro line by what it would do:
#100 = 5.and other assignments move nothing. They are skipped, with one warning per program.#3006 = 1 (TEXT)is skipped with a note.G65andG66calls are skipped and noted in the Problems list. A probing call (P9853, or one with an S word) readsG54 set by probe on line 12 — the setup's G54 is assumed to match where the probe finds the stock.GOTO,IF … GOTO,WHILEand any word with a#value stop the simulation:macro not simulated — results after line 12 not checked. DryRun cannot know which lines run next.
Assumed, and how to check it on your control
Each item is what DryRun assumes, then the check.
- T13. A length without a decimal point is in thousandths.
- Read parameter 3401, bit 0 (DPI) on the control.
- If it is 1, set the machine's Decimal point to Calculator.
- T7. G00 is a dog-leg: each axis runs at its own rapid. The real path is rounded by acceleration, which DryRun does not model.
- Read parameter 1401, bit 1 (LRP).
- If it is 1, the rapid is one straight line: set G0 path to Interpolated.
- T6. A letter written twice takes its last value.
- Read parameter 3403, bit 6 (AD2).
- If it is 1, the control raises PS5074 ADDRESS DUPLICATION ERROR instead. Treat DryRun's note on such a line as an alarm.
- T15. Two G codes of one group: the last one counts. This is the 31i-B5 rule; a Series 0i-F may raise an alarm.
- In MDI, with the axes clear, run
G91 G00 G01 X1. F100.(1 mm in X). - An alarm means your control differs: treat DryRun's note as an alarm.
- In MDI, with the axes clear, run
- T8, T9. The arc tolerance is 0.005 mm; the G73 retract and the G83 clearance are 1 mm.
- Read parameters 3410 (arc tolerance), 5114 (G73) and 5115 (G83).
- With a larger 3410, a PS0020 in DryRun may not stop your control. The peck values change only the short moves between pecks.
- T10. M06 moves Z to the reference position and leaves X and Y where they are.
- Run
M06 T1in air from a low Z and watch the axes.
- Run
- T11. A T word without M06 is PS0043. This is the ROBODRILL's turret. A FANUC machine with an arm-type changer accepts a pre-selected T.
- Look up tool pre-selection in your machine builder's manual.
- If your machine accepts it, DryRun's PS0043 is not an alarm on it.
- T12. Lower-case words are read (with one warning), and a
;ends the block.- Keep both out of the program: write upper case and put comments in
( ).
- Keep both out of the program: write upper case and put comments in
- T14. M99 in the main program repeats the program forever. DryRun runs it once and says so.
- Every rule marked "assumed" above without a T number is the usual FANUC rule, not one the ROBODRILL manual states.
- Find the rule in your control's Operator's Manual: B-64484EN for Series 30i / 31i / 32i-B, B-64604EN for Series 0i-F.
- Where it differs, do not rely on DryRun's result for that line.
- Only DryRun's choice, with no source: G95 timed as F × S; a feed move after G93 and G94 needs a new F; PS0031 for
G54.1with P outside 1–48; how the control shows a#3000alarm; the text of alarm 252; the catalogue ROBODRILL's G30 position at machine 0.
Sources
- FANUC ROBODRILL α-DiA5 Operator's Manual, B-85314EN/01 (Series 31i-B5): Appendix B, G codes (pp. 953–956); Appendix D, alarms (pp. 962 and after); section III-6, tool change (pp. 198–200); section IV-2.7.3, M codes (pp. 156–158); section 37, G10 templates.
- FANUC, ROBODRILL α-DiB Plus series brochure: standard and optional functions (48 additional work offsets, 200 tool offsets, custom macro, helical interpolation).
- Not read, named for checking: the FANUC Series 30i / 31i / 32i-B Operator's Manual, B-64484EN; the Series 0i-F Operator's Manual, B-64604EN; the parameter manuals B-64490EN and B-64610EN.