What's new
What's new

Okuma If/Then- UPDATE: Resolved

AWoodruff

Plastic
Joined
Dec 27, 2023
We have an Okuma MU-500VA 5-axis mill. With the program/part we are running it encounters a M0 and we have to flip the part and indicate a feature. Our control automatically goes back to the top if you go from memory to handle. Well... we all know what happens if you introduce a way to make a mistake. This was my initial approach, but with this being my first rodeo with an Okuma control and macros. I am not doing something correctly and get a syntax error 5 alarm. The objective is to jump to the block to restart automatically so I don't have a scrap part because "They forgot" to jump.

VC1=1
M0 (Flip part and indicate)
N226 (Chamfer opposite side)

At the top of the program I have the statement as follows:
IF [VC1 = 1] GOTO N226

Does it need to be:
IF [VC1 EQ 1] GOTO N226
At the end of the program before M02:

VC1=0
 
It's been years since my okuma, but this may work.

IF [VC1 EQ 1] GOTO 226

I think vc1 is a local variable, but can't remeber ,for sure. This application should use a local, not common, variable.
 
Why would you change to "Handle" mode during an "M00" operation?
I've owned Okuma for years and never had to do that.
Not sure if I was to vague... the part has to be "Timed" in... which requires you putting the machine in handle to move it. I am working with what I was given, and my instructions were to not reprogram the machine, to make due with what is existing. If the parts aren't clocked in, they'll be scrap. If the operator doesn't jump to the code they're scrap. I am choosing to battle the lesser evil with a simple line of code.
 
It's been years since my okuma, but this may work.

IF [VC1 EQ 1] GOTO 226

I think vc1 is a local variable, but can't remeber ,for sure. This application should use a local, not common, variable.

VC1 is a Common, which I am fine with using as it is common for an operator to hit reset and in this instance I do not want it to clear until I tell it to. I will give your suggestion a go and see if it works. I do believe that my "=" was the issue but for the sake of production I just commented it all out until I picked some brains.
 
Not sure if I was to vague... the part has to be "Timed" in... which requires you putting the machine in handle to move it. I am working with what I was given, and my instructions were to not reprogram the machine, to make due with what is existing. If the parts aren't clocked in, they'll be scrap. If the operator doesn't jump to the code they're scrap. I am choosing to battle the lesser evil with a simple line of code.
Ahh. OK.
Hmm. Why not do a "Sequence Restart" from the line you want to start from after the "M00?"
 
It's been years since my okuma, but this may work.

IF [VC1 EQ 1] GOTO 226

I think vc1 is a local variable, but can't remeber ,for sure. This application should use a local, not common, variable.


It was in fact the = sign that was the problem. Thanks for your help.
 








 
Back
Top