Okuma help

Started by Jon@NOWHERE, June 20, 2023, 10:32 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jon@NOWHERE

Hey guys,

We have an old Okuma MX-60HB with an OSP-U100L control.  We had a couple of accidents where the operators ran a program meant for the other pallet instead of the one loaded in the machining chamber.  Is there an M-code, or some other way, that will cause the machine to alarm out if the wrong pallet is loaded? 

YoDoug

VPLNO is the system variable for what pallet is in the machine. You could add the following to your program. Note for pallet 2 program change the EQ 1 to EQ 2. This will generate an alarm when this code is read if the wrong pallet is in the machine.

IF [VPLNO EQ 1] GOTO NOK1
NALM1 VUACM[1]='WRONG PALLET'
VDOUT[992]=1234
NOK1
"In all my years here and on the old forum I have heard, and likely said, some pretty unhinged stuff. But congrats, you're the new leader in clubhouse."  - ghuns, 6/06/2025

Jon@NOWHERE

Quote from: YoDoug on June 21, 2023, 04:46 AMVPLNO is the system variable for what pallet is in the machine. You could add the following to your program. Note for pallet 2 program change the EQ 1 to EQ 2. This will generate an alarm when this code is read if the wrong pallet is in the machine.

IF [VPLNO EQ 1] GOTO NOK1
NALM1 VUACM[1]='WRONG PALLET'
VDOUT[992]=1234
NOK1

Ok we tried to test and got the following alarm.  It is having a problem with the if statement cause I commented that line out and it will throw the user alarm wrong pallet.


YoDoug

Quote from: Jon@NOWHERE on June 21, 2023, 08:04 AMOk we tried to test and got the following alarm.  It is having a problem with the if statement cause I commented that line out and it will throw the user alarm wrong pallet.



Try removing the GOTO for the IF statement.

Also you could try the following instead if the previous suggested code.

RP=1 M289    (M289 is Okuma M code for pallet check, RP = pallet number)
"In all my years here and on the old forum I have heard, and likely said, some pretty unhinged stuff. But congrats, you're the new leader in clubhouse."  - ghuns, 6/06/2025

JakeL

Here's the code we use. Same concept, just a slightly different format. This won't throw an alarm, it will just call a pallet change.

IF [VPLNO EQ 1] N120 (NUMBER AFTER EQ IS PALLET NUMBER)
GOTO N130
N120 M60
N130

Now I have to ask, how on earth did you post a picture in this forum!?!?  :hairpull:

Jon@NOWHERE

Quote from: JakeL on June 21, 2023, 10:22 AMHere's the code we use. Same concept, just a slightly different format. This won't throw an alarm, it will just call a pallet change.

IF [VPLNO EQ 1] N120 (NUMBER AFTER EQ IS PALLET NUMBER)
GOTO N130
N120 M60
N130

Now I have to ask, how on earth did you post a picture in this forum!?!?  :hairpull:

I upload it to a image hosting site like imgbb and then copy and paste the bbcode directly into my post.
Like Like x 1 View List

Jon@NOWHERE

Quote from: YoDoug on June 21, 2023, 09:23 AMTry removing the GOTO for the IF statement.

Also you could try the following instead if the previous suggested code.

RP=1 M289    (M289 is Okuma M code for pallet check, RP = pallet number)

Removing the goto statement didn't help, still got the same alarm.  But the RP=1 M289 did work for us so thank you for your help!

YoDoug

Quote from: Jon@NOWHERE on June 21, 2023, 12:08 PMRemoving the goto statement didn't help, still got the same alarm.  But the RP=1 M289 did work for us so thank you for your help!

Either the machine is older than the VPLNO variable or you don't have the USER Task II option.
"In all my years here and on the old forum I have heard, and likely said, some pretty unhinged stuff. But congrats, you're the new leader in clubhouse."  - ghuns, 6/06/2025

Jon@NOWHERE

Quote from: YoDoug on June 21, 2023, 12:34 PMEither the machine is older than the VPLNO variable or you don't have the USER Task II option.

I did try setting a variable to that variable in mdi(VC002=VPLNO).  It didn't alarm out but I believe it set it to 0 which I guess means it's not active?  Is there any other way to see if it is active or not?

YoDoug

Quote from: Jon@NOWHERE on June 21, 2023, 06:17 PMI did try setting a variable to that variable in mdi(VC002=VPLNO).  It didn't alarm out but I believe it set it to 0 which I guess means it's not active?  Is there any other way to see if it is active or not?

I don't know that I have ever seen that variable come back with a 0 value. That would be a question for Okuma.
"In all my years here and on the old forum I have heard, and likely said, some pretty unhinged stuff. But congrats, you're the new leader in clubhouse."  - ghuns, 6/06/2025

Jon@NOWHERE

Quote from: YoDoug on June 22, 2023, 04:59 AMI don't know that I have ever seen that variable come back with a 0 value. That would be a question for Okuma.

I just basically figured that it was a variable that wasn't being set in the pallet change macro.