585,712 active members*
4,106 visitors online*
Register for free
Login
IndustryArena Forum > MetalWorking Machines > Okuma > how to set up origins from code ?
Results 1 to 20 of 20
  1. #1
    Join Date
    Jun 2015
    Posts
    4154

    how to set up origins from code ?

    hello, on a mill, there are those origins that you targer with "G15 H01" > X Y Z ....

    how can i input this values from program ? on a lathe is VSZOZ for Z, and VSZOC for C

    kindly !

  2. #2
    Join Date
    Apr 2006
    Posts
    822

    Re: how to set up origins from code ?

    you need to use the following code:
    VZOFX[x]=<value>
    VZOFY[x]=<value>
    VZOFZ[x]=<value>

    where the x in the square brackets is the number of the coordinate system you want to use.
    Activate the required coordinate system using:
    G15 Hx

    i.e. if you have:
    VZOFX[15]=123.456
    VZOFY[15]=150.0
    VZOFZ[15]=-125.5
    G15 H15

    This will set up coordinate system number 15 with the values stated for each axis and then activate coordinate system 15

    Cheers
    Brian.

  3. #3
    Join Date
    Jun 2015
    Posts
    4154

    Re: how to set up origins from code ?

    thank you

  4. #4
    Join Date
    Apr 2009
    Posts
    1262

    Re: how to set up origins from code ?

    Broby is 100% correct.

    FYI They can all be on the same line if that makes it easier. It will make things easier to read if you are using multiple fixture offsets.

    Ex: for 8 fixture offsets (8 parts)


    ( FIXTURE OFFSET SETUP )
    ( ************* )
    VZOFX[1]=-5.1606 VZOFY[1]=-.6262 VZOFZ[1]=3.698
    VZOFX[2]=-5.1597 VZOFY[2]=-4.0053 VZOFZ[2]=3.698
    VZOFX[3]=-2.0949 VZOFY[3]=-.6265 VZOFZ[3]=3.698
    VZOFX[4]=-2.0950 VZOFY[4]=-4.0041 VZOFZ[4]=3.698
    VZOFX[5]=+2.2778 VZOFY[5]=-.6259 VZOFZ[5]=3.698
    VZOFX[6]=+2.2780 VZOFY[6]=-4.0040 VZOFZ[6]=3.698
    VZOFX[7]=+5.3434 VZOFY[7]=-.6262 VZOFZ[7]=3.698
    VZOFX[8]=+5.3430 VZOFY[8]=-4.0043 VZOFZ[8]=3.698
    ( ************* )


    Best regards,

  5. #5
    Join Date
    Apr 2006
    Posts
    822

    Re: how to set up origins from code ?

    Fixture offsets can also be copied from one offset to another.
    For example, if your machine has a B axis and you are using multiple offsets (one zeroset posn per side) you can then make sure that the Y axis zeroset position is the same for each coordinate system
    Note also that the B axis Zeroset command is an offset command NOT a Zeroset as such.
    i.e. B axis is 'Offset' by a certain angle of rotation, therefore when rotating 90° to the next side of the job, B axis needs the same offset for each angle commanded.
    In this same, H7 is at B0 and H17 is at B180, so therefore to get X0 to "inline" the X axis zeroset for B180 is the mirror of the X axis at B0.
    this way, the programmer/operator/user only has to set the information once.

    VZOFX[7]=-81.550 (X0 is set to the left of the table centre)
    VZOFY[7]=427.956 (Y0 set)
    VZOFZ[7]=-59.273 (Z set as required)
    VZOFB[7]=0.0840 (B Axis corrected slightly to resolve setup alignment)
    VZOFX[17]=-[VZOFX[7]] (X0 is now to the Right hand side of table centre)
    VZOFY[17]=VZOFY[7] (Y0 is copied from the first Coordinate System)
    VZOFZ[17]=-115.45-VZOFZ[7] (Z is what Z is)
    VZOFB[17]=VZOFB[7] (B axis alignment copied from H7)

    Hope this info helps as well.
    Brian.

  6. #6
    Join Date
    Aug 2010
    Posts
    188

    Re: how to set up origins from code ?

    sorry to dig up an old thread, but, is there any way to calculate your work co-ordinates from within a program?

    I see that using the VZOFX[#]=0 you can set your work axis to zero, but what about calculating them from the current probe location?

  7. #7
    Join Date
    Jun 2015
    Posts
    4154

    Re: how to set up origins from code ?

    hello again

    i found G92 and it seems to be the solution for what i am trying to do, ive gotten it to work by MDI but it will not function from within the program. any insight?
    if you wish, pls share the error and/or the program

    I see that using the VZOFX[#]=0 you can set your work axis to zero
    vzof* [ arg ] = 0 should target a point located at the middle of * axis travel

    for example, middle of the table should be vzofx[arg] = 0 and vzofy[arg] = 0. considering, of course, that table center is near the middle of x_travel and y_travel ( this should be default before cnc shipment, or at least after cnc instalation at client )

    but what about calculating them from the current probe location?
    the shortest way, is to read ( record ) the output of the probe let's find the output of the probe, and continue from there

    unfortunately, i can not test and send you a nice program, but try this :
    ... mdi mode : probe / master tool in position
    ... auto mode : run *.min

    using G92 :
    Code:
        G15 H=VACOD (*1)
        G56 HA
        G92 X0 Y0 Z0
    
    (
    *1 i believe that code will work without that line, because the wcs is never 0, thus it is not
    deactivated by hitting reset button
       if you wish to run this program inside a wcs<>current_wvs, then specify it
    )
    using VWK** system variables ( check attached ) :
    Code:
       G15 H1
       G56 HA
       NOEX VZOFX [ arg ] = VWKAX or VWKBX ± something ? VZOFY [ arg ] = ... VZOFZ [ arg ]= ...
    
    (
     quick tip : | vwkaz - vwkbz | = z_offset = vtofh [ vtlcn ]
    )
    again, i can not test, so i am not sure if those codes work, but at least i believe that playing with all those shared system variables should deliver what you need / kindly
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

  8. #8
    Join Date
    Aug 2010
    Posts
    188

    Re: how to set up origins from code ?

    ok, so my goal was to be able to:

    1) place a new part on a jig

    2) press cycle start and have the "probe" move to the previous part X0 Y0 and then program stop

    3) mid-auto manual and use the pulse handle to dial the part

    4) cycle start to continue the program with G92 X Y being the first line read.

    (my probe is a Ø1/4" round stock in a weld-on holder lol)

  9. #9
    Join Date
    Jun 2015
    Posts
    4154

    Re: how to set up origins from code ?

    yup ... i imagine that your 'probe' is not outputing data, so you need to "manual" gauge

    i wonder if torque skip is available for mills ? if it would work, you could use gauge from code, with your actual probe

    cycle start to continue the program with G92 X Y being the first line read
    i am not near a vmc; if i would, then i would run some trials with the system variables from previous post ... if you wish, i can guide you to do this, but now i am a bit tired

    however, pls run this program ( carefull to avoid possible collisions ) and come back with the *.txt / kindly
    Code:
    G15 H1
    G56 HA
    G00 X10 Y20 Z30
    VC[1] = VACOD
    VC[2] = VWKAX
    VC[3] = VWKBX
    VC[4] = VWKAY
    VC[5] = VWKBY
    VC[6] = VWKAZ
    VC[7] = VWKBZ
    VC[8] = VZOFX [ 1 ]
    VC[9] = VZOFY [ 1 ]
    VC[10] = VZOFZ [ 1 ]
    
    FWRITC tmp.txt;C
    
    PUT VC[1]
    PUT VC[2]
    PUT VC[3]
    PUT VC[4]
    PUT VC[5]
    PUT VC[6]
    PUT VC[7]
    PUT VC[8]
    PUT VC[9]
    PUT VC[10]
    
    
    WRITE C
    CLOSE C
    
    M02
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

  10. #10
    Join Date
    Dec 2008
    Posts
    3109
    Quote Originally Posted by jay_dizzle View Post
    sorry to dig up an old thread, but, is there any way to calculate your work co-ordinates from within a program?

    I see that using the VZOFX[#]=0 you can set your work axis to zero, but what about calculating them from the current probe location?
    yeah.... bloody simple
    when in position.... go to work offset page ... highlight G15 number X or Y position and then Calculate 0 (C0) >> WRITE for each axis..... done

  11. #11
    Join Date
    Jun 2015
    Posts
    4154

    Re: how to set up origins from code ?

    hello jay-z, code would be something like this :

    Code:
        G15 H1
        G56 HA
        CALL OWCS LWCS=10 LX=0 LY=0 LZ=0
        G15 H10
        G56 HA
        M0 ( check if displayed coordinates are x0y0z0 )
    M02
    
    
    OWCS
    (
     wcs[ lwcs ] will be initialized, so to store
    coordinates LX LY LZ at current position
    )
    
    
        NOEX
    $   VZOFX [ LWCS ] = VZOFX [ VACOD ] + VWKAX + LX
    $   VZOFY [ LWCS ] = VZOFY [ VACOD ] + VWKAY + LY
    $   VZOFZ [ LWCS ] = VZOFZ [ VACOD ] + VWKBY + LZ
    
    
    RTS
    i can't check it, but i can help you to implement it even if it works ( maybe ), there is needed to do so some extra-checks, so to be sure that it delivers in any situation

    Quote Originally Posted by Superman View Post
    yeah.... bloody simple
    heeei Superman he wishes to avoid the keystrokes required for panel operation, so there is needed a code that does just that

    but who am i to say that ? most of the times i reply without reading, or without understanding what i read/write; i like gambling
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

  12. #12
    Join Date
    Aug 2010
    Posts
    188

    Re: how to set up origins from code ?

    sorry i was busy yesterday, i will try the most recent code youn supplied and get back to you as soon as possible.

    superman, im trying to avoid the keystrokes and screen changes associated with calculating the coord systems traditionally, i want to do this to avoid mistakes when i have inexperienced operators running large volume production runs. it will be one less thing they need to remember, and will drastically reduce operator fatigue on large quantity runs.

  13. #13
    Join Date
    Jun 2015
    Posts
    4154

    Re: how to set up origins from code ?

    ok, if you are going to test, pls also run the code from post #9 that outputs values inside a file: i need those values, so to write the correct formula that changes wcs

    also, when you run the code from #9, beside the file, pls share the value of Z offset of current tool


    if you have teamviewer on the machine, then, if u wish, let's talk in private / kindly
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

  14. #14
    Join Date
    Aug 2010
    Posts
    188

    Re: how to set up origins from code ?

    hey deadlykitten, sorry i went silent, we just got absolutely slammed with work this spring and i havnt had time to play with any of your suggestions. i will be in touch once we slow down and i have a min to try out some things.
    thanks again!

  15. #15
    Join Date
    Jun 2015
    Posts
    4154

    Re: how to set up origins from code ?

    ... and i have a min to try out some things
    *.min or 60 seconds ? keep it up
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

  16. #16
    Join Date
    Jun 2015
    Posts
    4154

    Re: how to set up origins from code ?

    me again : is hard to find time to test, create / debug, etc ... when i 1st put my hands on an okuma lathe, my shift ended at 3.30, but i was going home at 7 - 10 pm, for at least 6 months

    i invested a lot of time in these ... well, i am not saying that what i do is ' better '; i just wanna underline the extra-time

    also, i am aware that this is not possible anywhere, with anyperson : maybe someone has to travel 1 hour to work and back, maybe there are problems, etc ... so far i was always close to school, college, work, like 10minutes, etc, and most of my time goes into cnc's, including free time, when i could do something else

    for example now i have free time, but my mind is slow, i am tired ... i can't evolve now

    i like to help and share what i do, but i see that in many shops is a problem with finding/keeping the right person ...

    before cnc's, i was into classical machining sector for a while; after, i was stuck to a chair, and my body tonus got low, i am not longer as fast as i was before; only my mind is, but only sometimes; my medium body temperature got cca-0.2* under normal

    i am just saying / kindly

  17. #17
    Join Date
    Aug 2010
    Posts
    188

    Re: how to set up origins from code ?

    so.... its been too long im sure, BUT i have figured out how to do what i asked for help with so long ago.

    you can calculate the current machine position, to the work coordinates table by using the following:

    VZOFX[1]=VWKAX
    VZOFY[1]=VWKAY
    VZOFZ[1]=VWKAZ (provided you probe is set up as 0)

    EDIT*********************************

    nevermind, this doesnt work as i had intended............. back to the drawing board..............

  18. #18
    Join Date
    Jun 2015
    Posts
    4154

    Re: how to set up origins from code ?

    hy jay, if it works, is fine ... i can't test right now, but it should be one of the folowing :
    ... vzof* [ wcs ] = vwka* ( maybe + vzof* [ wcs ] )
    ... vzof* [ wcs ] = vwkb* ( maybe + vzof* [ wcs ] )
    | vwkaz - vwkbz | = z_offset, thus vwka is the machine, and vwkb is machine+offset, or viceversa, i don't remember who's who

    also G92 X0Y0Z0 should do the trick; i have seen that we discused about G92 in previous posts, but it has been a while, and i forgot exactly what it was / kindly
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

  19. #19
    Join Date
    Aug 2010
    Posts
    188

    Re: how to set up origins from code ?

    WOW.........

    G92......

    i just wasted a lot of time trying to do it the hard way, for no reason at all......

  20. #20
    Join Date
    Jun 2015
    Posts
    4154

    Re: how to set up origins from code ?

    i never get it right from the 1st time ( not even in the end ), but i can tell that what you consider ' the hard way ' is a mere introduction to okuma's system variables ... is good to know what they can do, so please don't consider that you have lost time for no reason

    actually, is the opposite : it takes time ; is ok / kindly
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

Similar Threads

  1. Replies: 51
    Last Post: 09-16-2020, 01:28 AM
  2. some origins
    By deadlykitten in forum Okuma
    Replies: 4
    Last Post: 01-23-2016, 06:19 AM
  3. corel.hpgl > sheetcam.tap > pronterface.g-code > slic3r.g.code> ramps 1.4 > H-BOT
    By thesignworks in forum Uncategorised CAM Discussion
    Replies: 0
    Last Post: 05-25-2014, 02:11 PM
  4. Replies: 8
    Last Post: 02-19-2010, 08:32 PM
  5. Defining part origins on a 2216?
    By slick_ride in forum Fadal
    Replies: 11
    Last Post: 01-07-2010, 10:41 PM

Tags for this Thread

Posting Permissions

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