What's new
What's new

Fanuc 0md Alarm 114 when running macro

lowCountryCamo

Stainless
Joined
Jan 1, 2012
Location
Savannah, Georgia, USA
I get alarm 114 at this area of a macro. Book says 114 is bad format

N300
IF[#7NE#0]GOTO1000(TEST FOR D INPUT)
IF[#21NE#0]GOTO2000(TEST FOR U INPUT)
IF[#22NE#0]GOTO3000(TEST FOR V INPUT)
IF[#24NE#0]THEN#33=1(TEST FOR X INPUT)
IF[#26NE#0]THEN#33=#33+1(TEST FOR Z INPUT)
IF[#33EQ2]GOTO7000(TEST FOR X AND Z INPUT)
IF[#24NE#0]GOTO4000(TEST FOR X INPUT)
IF[#25NE#0]GOTO5000(TEST FOR Y INPUT)
IF[#26NE#0]GOTO6000(TEST FOR Z INPUT)
#3000=1(INPUT ERROR - REQUIRED INPUT MISSING)

I was passing an X input so commented out these blocks and the macro went through without the alarm
(IF[#24NE#0]THEN#33=1(TEST FOR X INPUT)
(IF[#26NE#0]THEN#33=#33+1(TEST FOR Z INPUT)

What is wrong with these? Can I not use THEN in macro B Fanuc 0?

Thanks
Steve A
 
Look into the parameter manual. There might be a parameter which is preventing this.
 
It does not look like you can use THEN on a OM (at least according to my OMC manual) but on an Oi you can... See attachments from OMC manual and then "THEN" mentioned in a Oi manual.

I guess a workaround could be something like this
IF[#24NE#0]GOTO 333
GOTO 335
N333 #33=1(TEST FOR X INPUT)
N335 IF[#26NE#0] GOTO 334
GOTO 336
N334 #33=#33+1(TEST FOR Z INPUT)
N336 IF[#33EQ2]GOTO7000(TEST FOR X AND Z INPUT)

You can see if I understood what you wanted.
 

Attachments

  • DSC_0931.jpg
    DSC_0931.jpg
    87.9 KB · Views: 515
  • DSC_0930.jpg
    DSC_0930.jpg
    80.4 KB · Views: 288
It does not look like you can use THEN on a OM (at least according to my OMC manual) but on an Oi you can... See attachments from OMC manual and then "THEN" mentioned in a Oi manual.

From the example you posted and from what's printed in our 18i and 21i books it looks like you can't use "THEN" to make a branch in a program. This would explain a discussion Sinha and I had a couple of weeks ago about the use of "THEN". A subtle but important difference.
 
From the example you posted and from what's printed in our 18i and 21i books it looks like you can't use "THEN" to make a branch in a program. This would explain a discussion Sinha and I had a couple of weeks ago about the use of "THEN". A subtle but important difference.


A branch as in
IF [#500GT10.0]THEN #500=#500+1? That should work? Works fine on my Oi but I have not tried it on my OM
On my OiMc I use this type of structure all the time...
IF[#3012 GT 090000] THEN #3006 =1(CHECK PARTS COUNTER)
To keep track of parts

To the OP, Is this line correct or is it just a typo? IF[#33EQ2]GOTO7000(TEST FOR X AND Z INPUT) . I would think either #2 or something along the line of GE or LE or trying to round the digit somewhere for safety?
 
A branch as in

IF [#500GT10.0]THEN #500=#500+1? That should work? Works fine on my Oi but I have not tried it on my OM

A branch as in going to a different location in the program, like this: IF [CONDITION=TRUE] GOTO (Line Number)

What you have above should run fine on your OM. It works on our 18i 21i and 32i controllers.
 
A branch as in going to a different location in the program, like this: IF [CONDITION=TRUE] GOTO (Line Number)

What you have above should run fine on your OM. It works on our 18i 21i and 32i controllers.

I'm trying to understand this... Please bear with me if I am being an idiot.

So you are saying that-
IF [#100EQ#101] THEN GOTO 500
Should not work? But why use it anyway when
IF [#100EQ#101] GOTO 500
Would do the job? Maybe I don't have my nose deep enough into Macros to understand why or where the though of using "THEN" to move within a program would come up.
 
Both are correct.
Copied from this book:

The IF_THEN_ format has the following limitations:
• Only a single macro statement can be specified.
• An NC statement is not allowed.
Since GOTO n is a macro statement, it is also permissible to
command
IF [<a conditional expression>] THEN GOTO n;
which is equivalent to
IF [<a conditional expression>] GOTO n;
 








 
Back
Top