mistux Site Admin
Joined: 25 Jun 2004 Posts: 1042 Location: South Bend, Indiana USA
|
Posted: Fri Jul 02, 2004 12:30 pm Post subject: How To: Keyboard Macro for Okuma OSP5000 |
|
|
Okuma allows you to read the state of various switches on the operator keyboard including Spindle Override, Feed Rate Override, Dry Run, Single Block, Auto Coolant and Optional Stop. You can take advantage of this to write a macro that checks the state of the keyboard when Cycle Start is pressed.
I use this to make sure that the operator hasn't accidentally turned Dry Run on or forgotten to turn the coolant back on. If Single block is ON, the macro exits without checking the switches. Use the Check Data key on the control to see these inputs. Look under EC Panel Input for bits to change while you move the switches.
To use the macro, paste this code into an editor (Predator has a great one!) and then send it to your OSP5000 control (using Predator DNC is a good way). It will be saved as O.SSB which is a System Sub Routine.
To edit the macro on the control you will have to enter O.SSB instead of using edit *.
To call the macro, insert CALL OALM in your machining program before each tool.
Code: | $O.SSB
OALM
N1 IF[[VDIN[1128] AND 2] EQ 2] NEND(MACHINE LOCK)
N2 IF[[VDIN[1138] AND 32] EQ 32] NALA7 (LOAD AUTO SET)
N3 IF[[VDIN[1128] AND 1] EQ 1] NALA1 (DRY RUN ON)
N4 IF[[VDIN[1128] AND 128] EQ 128] NEND (SINGLE BLOCK ON)
N5 IF[[VDIN[1132] AND 2] EQ 2] NALA2 (FEED RATE OVER)
N6 IF[[VDIN[1132] AND 8] NE 8] NALA2 (FEED RATE OVER)
N7 IF[[VDIN[1132] AND 1] EQ 1] NALA2 (FEED RATE OVER)
N8 IF[[VDIN[1132] AND 4] EQ 4] NALA2 (FEED RATE OVER)
N9 IF[[VDIN[1132] AND 16] NE 16] NALA3 (SPINDLE OVER)
N10IF[[VDIN[1132] AND 32] EQ 32] NALA3 (SPINDLE OVER)
N11IF[[VDIN[1132] AND 64] NE 64] NALA3 (SPINDLE OVER)
N12IF[[VDIN[1132] AND 128] EQ 128] NALA3 (SPINDLE OVER)
N13IF[[VDIN[1126] AND 128] NE 128] NALA5 (AUTO COOLANT)
GOTO NEND
NALA1 VUACM[1]='DRY RUN IS ON'
VDOUT[993]=1000
NALA2 VUACM[1]='FEED RATE NE 100'
VDOUT[993]=1000
NALA3 VUACM[1]='SPINDLE OVERRIDE'
VDOUT[993]=1000
NALA4 VUACM[1]='LOAD MONITOR'
VDOUT[993]=1000
NALA5 VUACM[1]='COOLANT NOT ON'
VDOUT[993]=1000
NALA7 VUACM[1]='LOAD AUTO SET'
VDOUT[993]=1000
NEND RTS
% |
Note: For OSP5020 controls change line N5 to read:
N5 IF[[VDIN[1132] AND 2] NE 2] NALA2 (FEED RATE OVER)
Okuma changed the state of the bit on the OSP 5020 for some reason.
Legal stuff: I provide this "As Is" and make no express guarantees that it will work and/or will work on your machine. It is intended as a guide and as with all programs should be fully tested before it is ran. |
|