hexagon logo

Z Offset

Hello. In my mind this seems like an easy thing to do but I was having a bit of difficulty getting it to actually work. I made a program that checks a part in its final form. What I want to do is take that program and modify it to accommodate an in-process check while the part still have the dovetail on it.

Basically everything is the same except the part is .127 thicker, top-to-bottom. I use the bottom of the part to set my Z. I assumed that all I had to do was pick up that surface and then offset Z .127 and be good.

Any tips and tricks to get this to work? Thank you.
  • Yep, you can do something like this:

    C1 =COMMENT/INPUT,NO,FULL SCREEN=NO,
    IF PROCESS 1 ENTER "1"
    IF PROCESS 2 ENTER "2"
    IF/C1.INPUT=="1"
    ASSIGN/V1=0.127
    END_IF/
    ELSE/
    ASSIGN/V1=0
    END_ELSE/
    PNT1 =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
    THEO/<0,0,5+V1>,<0,0,1>
    ACTL/<0,0,5>,<0,0,1>
    TARG/<0,0,5+V1>,<0,0,1>
    SHOW FEATURE PARAMETERS=NO
    SHOW CONTACT PARAMETERS=NO​
    


    This is a quickie code, but the V1 assignment can be done way at the beginning and then utilized throughout the program to provide you the correct offset.
  • If you only have 2 options, you could refine bfire85 code by eliminating the if/end_if and else statements and insert: ASSIGN/V1=IF(C1.INPUT==1,0,0.125).
    evaluating if c1.input = 1 as a true statement the offset will be zero, if it's anything but 1 the offset will be 0.125.