What's new
What's new

Multiple values to same variable

BlackLake

Plastic
Joined
Apr 28, 2022
Hi all CNC-programmers.

We are getting an Okuma MB5000HII with a huge cube so i'm trying to invent some autofunctions to it.
Since the machine isn't here yet I can't really try things out.
So will pop some questions down.

1)
When defining variables, can i use another variable to loop it into an array?

Example:

DC=0

N100
DC=DC+1
FX[DC]=1
IF[DC EQ 32]N101
GOTO N100
N101


What i'm trying to achive is to set a number of "fixtures" as active by giving them the value 1 and use it as an array
I know i can repeat the line FX[1]=1 32 times but since alot of settings in the program will be about what fixture it's working on the FX[DC] function would be awesome.

Many Thanks
 
I don't see why you couldn't do it how you have it.
Although I'm not sure of what FX[DC]=1 is doing
Is that telling the program that FX=DC?
 
Yes. Sfriedberg is correct.

I have up to 32 fixtures in the same machine ( Tombstone style) but if i only have 3 parts left i don't want the machine to work in the air for 29 parts.

So the Array would be like:

FX[1]=1
FX[2]=1
FX[3]=1
etc etc

Also, if the machine detects a broken drill etc, i don't wanna risk other tools so then i will turn that specific fixture off and the program will simply skip that part for the rest of the machining with all tools. I rather have 1 unfinished part then half a tombstone not done because the machine stopped.
 
It should work fine just the way you have it. That's a great way to activate/deactivate work offsets. Pretty cool.
 








 
Back
Top