585,727 active members*
3,825 visitors online*
Register for free
Login
IndustryArena Forum > MetalWorking Machines > Okuma > Using sub programs and datum shifts, on the P300M controller
Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2008
    Posts
    125

    Using sub programs and datum shifts, on the P300M controller

    Hi guys,

    We're getting 2 new MB8000H machines next month and I'm starting to write the post processor for our CAM system.

    Does anyone know if you can pass through X Y and Z data into a sub program in order to do a datum shift?

    I have an example where an X and Y is passed thro ...

    CALL OABCD PXCN=10 PYCN=10

    and then in the sub program you have this code ......

    VZOFX[200]=VZOFX[1]+PXCN
    VZOFY[200]=VZOFY[1]+PYCN
    VZOFZ[200]=VZOFZ[1]
    VZOFB[200]=VZOFZ[1]
    G15 H200

    Obviously this only works for X and Y, but I need to be able to shift in Z too.

    Anyone else tried this?

    Thanks,
    Mark

  2. #2
    Join Date
    Jul 2010
    Posts
    287
    Absolutely.
    Gotta revisit some old notes about a P300M, been working on an L machine recently.
    It may be different. The 300L changed some of that with VSZOX,Y,Z and I don't remember what they did on the M off the top of my head.

  3. #3
    Join Date
    Jun 2008
    Posts
    125
    Cheers for the reply.

    Having done some more work the morning I've changed my mind on how to tackle this.
    Now in my main program I set 3 VC variables (VC47 VC48 and VC49 in this example) to zero every time I call a new datum. Then before I call a sub program I'll set 3 new VC variables (VC50 VC51 and VC52) and set these to be the datum shift.
    In the sub program I'll call G10 to cancel datum shift, then set VC47=VC47+VC50 and so on. Now I can use G11 to shift the coord system during that sub program, using G11 X=VC47 Y=VC48 Z=VC49. Any deeper nested sub programs should also work the same way.
    At the end of each sub program I'll do a VC47=VC47-VC50 which should reset the initial VC47 variable all the way out of the nesting.

    We haven't got our machines yet but this works in the Vericut model we have.

    Not sure what it will be like on the actual controller and how user friendly it will be but at least I've got a method to compare to.

  4. #4
    Join Date
    Jul 2010
    Posts
    287
    Have you looked into:
    VWKBX/Y/Z
    or
    VWKAX/Y/Z?

    And I quote from the P300M Programming manual:

    VWKA*
    It can read current position of work coordinate system with offset amount of current tool length,
    attachment rotation, and rotary spindle head. The mark * refers to an axis name.
    VWKB*
    It can read current position of work coordinate system without offset amount of current tool
    length, attachment rotation, and rotary spindle head. The mark * refers to an axis name.
    • Example:
    VC1=VWKAX
    VC2=VWKBY

Similar Threads

  1. Andre, datum and datum origin
    By Doggitter in forum Dolphin CAD/CAM
    Replies: 2
    Last Post: 09-12-2013, 12:18 PM
  2. How to activate Setup Datum on Heidenhain controller
    By kiemkhach in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 6
    Last Post: 07-31-2010, 05:32 AM
  3. Programs duplicated in controller????
    By Geof in forum Haas Lathes
    Replies: 16
    Last Post: 01-21-2010, 12:19 AM
  4. Cannot Edit Programs on Fanuc 31i-A5 controller
    By PeterTheWolf in forum Fanuc
    Replies: 3
    Last Post: 07-29-2009, 09:44 PM
  5. Chevalier mill with heidenhain controller won't do datum cycle
    By Kavanthony in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 2
    Last Post: 03-13-2007, 09:52 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
  •