Fanuc · Subprogram and macro

Fanuc alarm 112: Divided by zero

Most often: argument missing in the G65 call, so the variable is empty. First step: check the arguments at the start of the macro.

By cnccode · Updated
On this page
  1. What it means
  2. Common causes
  3. How to clear it
  4. Example
  5. Related codes
  6. Same group: subprogram and macro
  7. Frequently asked questions

What it means

A macro calculation divides by zero, or uses the tangent of 90°. On 0i-D, 0i-F and the 30i series the same alarm has the number PS0112.

Common causes

  • Argument missing in the G65 call, so the variable is empty
  • Number of holes or passes is 0

How to clear it

  1. Check the arguments at the start of the macro
  2. Stop with your own message if a value is missing

Example

Gives the alarm
#10=360./#11
Correct
IF[#11EQ0]THEN #3000=1(HOLES MISSING)
#10=360./#11

Before you continue: After the correction do not start in the middle of the program. Go back to the last tool change, use single block and a low rapid override, and watch the distance to go.

Same group: subprogram and macro

Number and message follow the Fanuc 0i, 16, 18 and 21 series. Wording can differ a little between models. Alarms from 1000 upwards and messages from 2000 upwards come from the machine builder in most cases: look in the manual of the machine, not of the control. Fanuc and Grbl are names of their owners. This site is independent.

The alarm comes back?

Post the block before the alarm, your control model and what you have checked.

Ask the community

Frequently asked questions

What does Fanuc alarm 112 mean?
A macro calculation divides by zero, or uses the tangent of 90°.
How do I fix Fanuc alarm 112?
Check the arguments at the start of the macro. Stop with your own message if a value is missing.
Was this page helpful?