Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

One Little Typo, One Big Crash


Mick
 Share

Recommended Posts

We have a Toyoda FMS with two Toyoda FA1050s's running Fanuc 31i controls, and we encountered a fault on Friday evening. An old programme was being run (that had been hand written), and which had been proven, but had just been edited to modify a comment. Unfortunately, the person editing it had accidentally removed a ) from the end of the comment.

 

When the programme was run, it encountered the line missing the ) and reading it as a comment, skipped through the programme until it found the next ), and then began executing the programme. Unfortunately, in that block of skipped code, there was a tool call and a toochange command. The end result was a 155mm diameter boring bar attempted to execute a contouring cycle meant for a 30mm ball nose endmill. The outcome was a machine that had to be realigned, a toolholder with splits up the side, and a badly damaged (and scrapped) large aluminium casting.

 

I replicated the problem on another programme on the same machine, so I know it isn't programme specific, and I also tested the same thing on an earlier Fanuc control (which treated the line with the missing ) as a comment regardless, and carried on with the programme normally, and on a Mori Seiki control, it returned a syntax error.

 

I've never encountered an error like this before, and it has the potential to be really dangerous. Has anyone else encountered this? Is there possibly a parameter that modifies the behaviour of the control when this condition is encountered? I'm really keen to find out if this has been a problem for anyone else.

 

Cheers,

 

Mike

Link to comment
Share on other sites

Something would alarm out any of our Yasnac or earlier Fanuc controls.

I have a 31i-A5 and will be sure to watch out for something like that!

 

I'd be interested if you could replicate the same error on your machine.

 

Its easily done by putting a simple piece of code in like:

 

O001

M0

N1 M0 (PROGRAM CHECK

M0

G91 G28 Z0

(TEST COMMENT)

N2 M0 (IF YOU END UP HERE FROM N1 THEN YOU NEED TO BE CAREFUL)

M30

%

 

It was this piece of code I trialled on the machine to replicate the error. I singled blocked to N1 and then it jumped to N2, and preceding that the M0 and G91 G28 Z0 (TEST COMMENT) showed up as one comment. Pretty scary stuff.

Link to comment
Share on other sites

I'd be interested if you could replicate the same error on your machine.

 

Its easily done by putting a simple piece of code in like:

 

O001

M0

N1 M0 (PROGRAM CHECK

M0

G91 G28 Z0

(TEST COMMENT)

N2 M0 (IF YOU END UP HERE FROM N1 THEN YOU NEED TO BE CAREFUL)

M30

%

 

It was this piece of code I trialled on the machine to replicate the error. I singled blocked to N1 and then it jumped to N2, and preceding that the M0 and G91 G28 Z0 (TEST COMMENT) showed up as one comment. Pretty scary stuff.

 

 

I'll try to get to it tonight and let you know

Link to comment
Share on other sites

If I tried to load this test program into our Fanucs,everything

 

after

 

N1 M0 (PROGRAM CHECK

 

would be gibberish and the machine would error out if your tried to run it.

 

I don't know what would happen if you loaded a good file then edited out the right ")"

Link to comment
Share on other sites

That's brutal. :(

 

Like Hardmill said, no matter HOW small the change, it needs to be treated like a new program. A buddy of mine works with large parts, in repeat production, and he put written procedures in place that required fully documenting even the tiniest change, as well as having another competent person double check the change and sign off on it.

Link to comment
Share on other sites
A buddy of mine works with large parts, in repeat production, and he put written procedures in place that required fully documenting even the tiniest change

 

That is how we work also. We have procedures that need to be followed. No matter how minute the change is in the program it has to be documented for tracebility reasons. After the change the program gets reverted back to tape development status until 1st piece gets accepted again. Operators are not allowed to make any changes @ the control on production jobs. It gets pretty crazy when dealing with rotating components, but there are reasons for that.

Link to comment
Share on other sites

Had the same issue on an old yasnac mx3, just caught it before it crashed. No alarm, just skipped ahead, no hesitation, lots of head scratching as a result. I kept just restarting the program from the right place, had no idea what it was until I had stared at the code for a day or so.... Then it hit me like a truck, felt pretty stupid. But in that case I found the problem during prove-out, and didn't let it run without me restarting at that point because it was not so kosher. Sorry to hear you had some bad unexpected results.

 

Husker

Link to comment
Share on other sites

Well, this is interesting

 

I loaded the Program that you, (Mick) PMed me

 

O0001

M00 (SYNTAX TEST)

M00 (TEST LINE

M00

M00

M00

M00 (TEST LINE 2)

M00 (IF IT HAS MOVED TO HERE FROM TEST LINE THIS IS A PROBLEM)

M30

%

 

When it got to the control it looked like this *(<TEST> being what I named the prgm.)

 

%

<TEST>M00(SYNTAX TEST)

M00(TEST LINE;M00;M00;M00;M00 TEST LINE 2)

M00(IF IT HAS MOVED TO HERE FROM TEST LINE THIS IS A PROBLEM)

M30

%

 

Pretty much grabbed everything from the missing ")" until it found one, which means that were it to happen buried within a program it would jump right over everything contained within the ( )'s. I single blocked through it and yup, reads it and keeps on rolling.

Yikes!

 

Better make sure NObody screws around putting in messages, especially on THAT machine.

I don't think it'll take a hit very well. Screw the part

Link to comment
Share on other sites

Hi There,

 

In most programming languages you have the option to use block comments (everything enclosed between 2 markers is a comment) or single line codes (open ended comments - only one marker to initiate start of comment, a new line ends it). I know some controllers (Siemens I think) you can do single line comments with a semi colon. I'm not versed up in all controllers but it may be worth looking into to avoid such an occurrence in the future. HTH

 

brendan

Link to comment
Share on other sites

Just an after note

 

I tried to re-create the program in the control to match what Mick sent me ie:

the comment without the second ")".

In edit, everything within the markers highlites, not possible to just remove or change anything within them.

I tried to re-write the comment without the 2nd ")" and got a format error.

 

So I guess as long as the program comes in clean, its good to go

But it will load dirty as I showed above

Link to comment
Share on other sites

Yep, had this load via the RS232 before like this when forgetting a bracket (parenthesis) in the porgram header.

We have

(CUSTOMER)

(DESCRIPTION)

(PART NO)

(ISS NO)

etc

 

So we easily caught it as the line was one long one as you described above, and easy to see.

Never edited this area of prog on the machine though as never had a reason to.

Scary though...

Link to comment
Share on other sites

Yep, had this load via the RS232 before like this when forgetting a bracket (parenthesis) in the porgram header.

We have

(CUSTOMER)

(DESCRIPTION)

(PART NO)

(ISS NO)

etc

 

So we easily caught it as the line was one long one as you described above, and easy to see.

Never edited this area of prog on the machine though as never had a reason to.

Scary though...

 

Is your control a 31i? I tested it on earlier controls, and the earlier controls read the line with a close parenthesis as normal comment, and just moved onto the next line.

 

I think I will take James's advice and send it into Fanuc. We've already forwarded the error to Toyoda.

Link to comment
Share on other sites

For those using Vericut and are unaware there is a syntax check tab under word format options that lets you find the mistakes before they happen on the machine.

 

SP32-20111011-053544.jpg

 

+1, that is a very handy feature. I've used it a few times.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...