587,245 active members*
3,294 visitors online*
Register for free
Login
IndustryArena Forum > MetalWorking Machines > Okuma > OSP 5000L-G safety subroutine
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2006
    Posts
    24

    OSP 5000L-G safety subroutine

    Several years ago, we added this subroutine to our machine to prevent crashes.

    $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
    %

    Now we need to add a line to check to make sure the tailstock is retracted. I know the variable I need is VDIN[1168], just not sure what to set the EQ to, nor do I fully understand the AND part of the equation. If it helps, the machine is an LC-20 4-Axis Simulturn. Any help on this would be greatly appreciated.

  2. #2
    Join Date
    Apr 2006
    Posts
    824
    Hi Oti
    It has been a few years since I have worked the LC20, loved this old machine, it was so able to do a huge variety of work it was amazing for its age!
    The LC20 I worked on was also a 4 axis lathe with live tooling in the upper turret, along with in process gauging and a small OSR10 robot feeding it.

    The trick is to have a look at the screen that shows the status of the bits.
    Can not remember the name of the screen, but I seem to recall it was able to be brought up in either Auto, MDI or Manual modes.

    Look for the "bit" that turns on when the Tailstock is Retracted. You will see a line of "bits" that represent a whole pile of different things... need to refer to your maintenance manual to see what they are...
    Depending on which "bit" turns on when the Tailstock is retracted you will need one of the following lines.
    If the first bit (from the RH Side) is on then you need line 1
    Second bit is line 2 and so on...
    N1 IF [[VDIN[1168] AND 1] EQ 1] N...
    N2 IF [[VDIN[1168] AND 2] EQ 2] N...
    N3 IF [[VDIN[1168] AND 4] EQ 4] N...
    N4 IF [[VDIN[1168] AND 8] EQ 8] N...
    N5 IF [[VDIN[1168] AND 16] EQ 16] N...
    N6 IF [[VDIN[1168] AND 32] EQ 32] N...
    N7 IF [[VDIN[1168] AND 64] EQ 64] N...
    N8 IF [[VDIN[1168] AND 128] EQ 128] N...

    To breakdown what is happening here, you need to understand the bits are looked using binary coding. The AND statement is telling the program to check a certain bit and the EQ statement is seeing if it is ON (EQ) or OFF (not EQ).
    I will see if I can find the old maintenance manual and check for you when I get back to work. Like I said, it has been many years since I worked an LC20.
    Cheers and I hope this works for you,
    Brian.

  3. #3
    Join Date
    Sep 2006
    Posts
    24
    Thanks for your help Brian. Thought it was something binary, but wasn't sure. It all makes sense now. I think it is bit 3 for tailstock retract, if I remember correctly. The LC-20 is one of my favorite Okumas that we have. No live tooling, gaging, or robot loading, just a big old workhorse that takes anything we throw at it. Again, thanks for making it all make sense to me.

    Oti

Similar Threads

  1. M97, M98 subroutine call. How to use
    By bob1112 in forum Haas Mills
    Replies: 11
    Last Post: 03-13-2008, 01:41 AM
  2. Example of a Subroutine?
    By donl517 in forum Fadal
    Replies: 14
    Last Post: 06-27-2007, 04:05 PM
  3. Help with calling a subroutine
    By hindocarina in forum Mach Mill
    Replies: 2
    Last Post: 02-12-2007, 04:32 AM
  4. trying to call a subroutine
    By hindocarina in forum G-Code Programing
    Replies: 4
    Last Post: 02-12-2007, 03:01 AM
  5. Need help with subroutine
    By 2_jammer in forum Uncategorised CAM Discussion
    Replies: 1
    Last Post: 01-18-2005, 05:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •