PDA

View Full Version : If &Tool question



ken_rychlik
10-06-2010, 10:12 PM
I am digging into the programming to control my spindle semi-automatic mode. I can close some switches and have a pre-set hign, med, and low settings.

My question is this. Could I post this in the tool change file and do you think it would work.

If &tool = 11 then goto, low_speed
If &tool = 12 then goto, Med_speed
If &tool = 13 then goto High_speed

'sub routines for example

Low_speed:
SO,3,1 'this would turn on a relay tied to output 3
Return

Med_speed:
SO,6,1 'this would turn on relay tied to output 6
Return

High_speed:
SO,3,1 'both relays 3 & 6 on would run high speed
SO,6,1
Return

With a manual tool change file C9 would have this type of wording in it.
Then when a given tool is called for, it would run the spindle speed I have for that tool.

Any reason this wouldn't work? I am thinking of putting this just after the &tool line in the C9

I don't have a delta or yaskawa vfd, but do have ways of controlling it with relays.

Thanks

Gary Campbell
10-07-2010, 11:29 PM
Kenneth...
Can work if you leave out the commas after "goto"

logic doesnt require a setting for low... you could do this:

(normal state is low speed) set resistance to provide static voltage for low)
apply relay 3 for medium (parallel resitors lowers resistance, increases voltage)
apply relay 6 for high (same principal)
the variable &tool will persist in the software until changed or SB3 is shut down. Do the RPM change in the C6 before you turn the spindle on

ken_rychlik
10-08-2010, 12:39 AM
I have three speed settings after the base low that are available. That gives a net total of 4. So far I am liking the spindle.

Maybe the file should first turn off all outputs when a new file is ran. this way it would clear any settings left behind, before choosing the setting for the current tool.

I thought all outputs were turned off when a file was done :confused:

Thanks

Gary Campbell
10-09-2010, 12:44 AM
Kenneth...
All outputs are switched off after a file is complete. In your 1st post you were talking about MTC files, which are subs of the current cutting file.

Set your outputs in the C6 (mtc on) before the spindle OP is activated.


Turn them off (low) after spindle off in the C7 (MTC off) Leave the C9 alone