585,888 active members*
3,972 visitors online*
Register for free
Login
Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2010
    Posts
    171

    An easy way to align part

    Hello

    Im working on a small macro progam to make it easier for operators to align the part and i can't get it to work as i want, hopefully someone out there can help out.
    So lets say you have a part with some holes you need to put on a tombstone, today the operator needs to align the holes perfectly with the Y or X axis, what i want it to just find one hole calculate the angle and use G68 to rotate the program.
    I did some test's where i position the tool at X25 Y-43.3 then G65 P9999 C120. and position to X43.3 Y-25. here i would think that it shouldn't have moved since the new position is the old one.

    This is what i got.

    O9999(FIND ANGLE FOR PART)
    G90G69
    (USAGE G65 P9999 C=ANGLE OF ORIGIN HOLE)
    IF [#3 EQ #0] THEN [#3=0]
    #101=ATAN [#5041]/[#5042]-#3 (CALCULATED ANGLE)
    G68 X0.Y0. R#101 (maybe this should be G68 X-#5041 Y-#5042 R#101)
    M99

  2. #2
    Join Date
    Feb 2006
    Posts
    1792

    Re: An easy way to align part

    Interchange 5041 and 5042 (it is Y followed by X, i.e., height followed by base of the right-angled triangle)
    In G68, X and Y are center of rotation. Use accordingly. If you skip X and Y, the current tool position becomes the center of rotation.

  3. #3
    Join Date
    Jan 2010
    Posts
    171

    Re: An easy way to align part

    U sure? ATAN[43.3]/[-25.] gives me 120 which is correct ATAN=[X]/[Y]

  4. #4
    Join Date
    Feb 2006
    Posts
    1792

    Re: An easy way to align part

    It is [height]/[base].
    But, it depends on how you define angle/height/base.
    Therefore, if you get expected result, continue with your method.

  5. #5
    Join Date
    Jun 2015
    Posts
    4154

    Re: An easy way to align part

    hey proto / i also use something prety similar; here are the steps :

    program 1 : detection of whatever geometry ( for example center of 2 holes ), so to compute the rotational angle + log the value

    program 2 : check whatever else geometry, so to verify that rota angle was corect ( eq : check position of a 3rd hole, so to be sure that it is where it should be ); this step is not critical, but it gives peace of mind

    main program : run



    sometimes it may be possible ( by accident ) to forget to run program 1, or a fail on program 1 that won't make the operator aware : as a result, the rota angle is not computed correct; here are some sugestions, to handle this case :
    ... run program 2, or
    ... check inside main program, right at the begining, if program 1 was executed :
    ...... succesfull, and/or :
    ...... just before main program, and/or :
    ...... for the actual running session of the main program, and not for the previous run
    * safety checks depend on available control functions

    you know, safety 1st, or bet on the operators kindly

    ps : if things are simple, than also it may be better to join all steps inside a single program, so to avoid the need to switch between programs; in such a case, it may be required to restart the program at a machining sequence, thus jumping over the step where the rota angle is computed; this can be achieved by /, or a restart flag, or a prompt, etc
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

  6. #6
    Join Date
    Jun 2015
    Posts
    4154

    Re: An easy way to align part

    just one more thing : when probing a tilted part, computing the rota angle requires a bit of math with the output data from the probe

    in most cases, pls be aware that output data is not absolute, but relative; however, the result is ( can be considered ) absolute

    in attached image, for a given part ( black countour ), the probing points will be somewhere among the blue lines; the distance between the 2 blue lines is affected by how the probe handles cosine directions; if the probe handles them well, than it is possible to get the center of a known diameter with only 1 probe touch, or more points, located in a tight vecinity, among an arch with a minimal length

    such probes are generally on coordinates measuring machines / kindly
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

Similar Threads

  1. Would it be easy to machine this part?
    By king2004s in forum Mastercam
    Replies: 2
    Last Post: 11-21-2013, 12:51 PM
  2. Easy question: cutout perimeter of 3d part
    By mikemaat in forum Mastercam
    Replies: 3
    Last Post: 07-15-2012, 05:50 AM
  3. Nead easy turned part
    By rdoty in forum North America RFQ's
    Replies: 2
    Last Post: 03-06-2012, 04:57 PM
  4. Align Honing or Align Boring ?
    By jonbanquer in forum MetalWork Discussion
    Replies: 10
    Last Post: 11-09-2008, 04:33 PM
  5. Is making a part as easy as drawing it in 3d?
    By randyf1965 in forum Commercial CNC Wood Routers
    Replies: 13
    Last Post: 04-05-2006, 01:23 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
  •