Variable Used To Contol Line Length

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Variable Used To Contol Line Length

    Hey, two new threads from me today. One on topic, one not so much.

    I have a part to measure which has a very short 'slot' with a radius on each end. The slot has only one straight side (the other is open). I need to measure a line (vector of 1,0,0) along this straight side. I am trying to do the following:

    Measure a circle at one end, re-measure the circle to ensure good hits.
    Measure a circle at the other end, re-measure the circle to ensure good hits.
    Pass the x values for the circle locations to a variable and subtract .02 from the difference between the x values. Then, I want to feed this variable into an autofeature line to control the length of my line. Doing this will allow my line to be as long as possible yet I can be sure the hits at the ends of the line won't fall on the radii.

    I'm having trouble with my line's vector not coming out correctly. It seems that one time it will work and then the next it will be flipped and so the probe crashes into the radius at one end because it moves the wrong direction to try to take the second hit.

    Here is the code:
    Code:
    CIR2       =AUTO/CIRCLE,SHOWALLPARAMS = NO,SHOWHITS = YES
                THEO/-3.395,0.25,PLN3.Z,0,0,1,0.27
                ACTL/-3.3978,0.2405,-0.3366,0,0,1,0.2666
                TARG/-3.395,0.25,PLN3.Z,0,0,1
                MEAS/CIRCLE
                HIT/BASIC,-3.3472,0.1154,-0.3866,-0.3746,0.9272,0,-3.3477,0.1168,-0.3862
                HIT/BASIC,-3.3192,0.1308,-0.3866,-0.5821,0.8131,0,-3.3198,0.1324,-0.3863
                HIT/BASIC,-3.2956,0.1524,-0.3866,-0.757,0.6534,0,-3.2967,0.1538,-0.3863
                HIT/BASIC,-3.2777,0.1789,-0.3866,-0.8894,0.4571,0,-3.2791,0.1802,-0.3863
                HIT/BASIC,-3.2666,0.2088,-0.3866,-0.972,0.2351,0,-3.2678,0.2096,-0.3863
                HIT/BASIC,-3.2628,0.2406,-0.3866,-1,0,0,-3.2643,0.2402,-0.3864
                HIT/BASIC,-3.2666,0.2723,-0.3866,-0.972,-0.2351,0,-3.2682,0.2713,-0.3864
                HIT/BASIC,-3.2777,0.3023,-0.3866,-0.8894,-0.4571,0,-3.2786,0.3011,-0.3864
                HIT/BASIC,-3.2956,0.3288,-0.3866,-0.757,-0.6534,0,-3.2967,0.3269,-0.3864
                HIT/BASIC,-3.3192,0.3504,-0.3866,-0.5821,-0.8131,0,-3.3199,0.3485,-0.3864
                HIT/BASIC,-3.3472,0.3658,-0.3866,-0.3746,-0.9272,0,-3.3477,0.3642,-0.3864
                ENDMEAS/
    CIR3       =AUTO/CIRCLE,SHOWALLPARAMS = NO,SHOWHITS = YES
                THEO/-3.545,0.25,PLN3.Z,0,0,1,0.27
                ACTL/-3.5498,0.2401,-0.3366,0,0,1,0.2682
                TARG/-3.545,0.25,PLN3.Z,0,0,1
                MEAS/CIRCLE
                HIT/BASIC,-3.6017,0.3649,-0.3866,0.3746,-0.9272,0,-3.6019,0.3636,-0.3864
                HIT/BASIC,-3.6297,0.3495,-0.3866,0.5821,-0.8131,0,-3.6296,0.348,-0.3863
                HIT/BASIC,-3.6533,0.3279,-0.3866,0.757,-0.6534,0,-3.6526,0.3261,-0.3863
                HIT/BASIC,-3.6712,0.3014,-0.3866,0.8894,-0.4571,0,-3.6696,0.2997,-0.3863
                HIT/BASIC,-3.6824,0.2714,-0.3866,0.972,-0.2351,0,-3.6804,0.2702,-0.3862
                HIT/BASIC,-3.6861,0.2397,-0.3866,1,0,0,-3.684,0.2399,-0.3862
                HIT/BASIC,-3.6824,0.208,-0.3866,0.972,0.2351,0,-3.6803,0.209,-0.3862
                HIT/BASIC,-3.6712,0.178,-0.3866,0.8894,0.4571,0,-3.6695,0.1797,-0.3862
                HIT/BASIC,-3.6533,0.1515,-0.3866,0.757,0.6534,0,-3.6522,0.1536,-0.3862
                HIT/BASIC,-3.6297,0.1299,-0.3866,0.5821,0.8131,0,-3.6292,0.1321,-0.3862
                HIT/BASIC,-3.6017,0.1145,-0.3866,0.3746,0.9272,0,-3.6015,0.1165,-0.3862
                ENDMEAS/
                PREHIT/ 0.05
                RETRACT/ 0.05
                MOVE/POINT,NORMAL,-3.5346,0.2435,-0.3865
                ASSIGN/V1 = ABS(CIR7.X-CIR8.X-.02)
    LIN5       =AUTO/LINE,SHOWALLPARAMS = NO,SHOWHITS = YES
                THEO/CIR8.X+.01,0.385,PLN3.Z-.050,-3.0005,0.385,-0.3866,V1
                ACTL/4.1904,7.3463,-13.8028,4.322,7.347,-13.8026,0.1316351
                TARG/-3.1305,0.385,-0.3866,-2.9989,0.385,-0.3866
                MEAS/LINE
                HIT/BASIC,-3.1305,0.385,-0.3866,0,-1,0,-3.1305,0.385,-0.3866
                HIT/BASIC,-3.0005,0.385,-0.3866,0,-1,0,-3.0005,0.385,-0.3866
                ENDMEAS/
    See any problems with this?

    EDIT: I forgot to mention that I think what might be screwing me up is that the x-locations of the circles are both negative.
    Last edited by #2#; 07-11-2007, 09:01 AM.

  • #2
    No takers huh?

    Well, I did find a couple of things. It still isn't working quite right though. Anyone ever try something like this before?

    Here are the things I've fixed so far.
    Code:
    CIR2       =AUTO/CIRCLE,SHOWALLPARAMS = NO,SHOWHITS = YES
                THEO/-3.395,0.25,PLN3.Z,0,0,1,0.27
                ACTL/-3.3978,0.2405,-0.3366,0,0,1,0.2666
                TARG/-3.395,0.25,PLN3.Z,0,0,1
                MEAS/CIRCLE
                
                ENDMEAS/
    CIR3       =AUTO/CIRCLE,SHOWALLPARAMS = NO,SHOWHITS = YES
                THEO/-3.545,0.25,PLN3.Z,0,0,1,0.27
                ACTL/-3.5498,0.2401,-0.3366,0,0,1,0.2682
                TARG/-3.545,0.25,PLN3.Z,0,0,1
                MEAS/CIRCLE
    
                ENDMEAS/
                PREHIT/ 0.05
                RETRACT/ 0.05
                MOVE/POINT,NORMAL,-3.5346,0.2435,-0.3865
                ASSIGN/V1 = ABS(CIR2.X-CIR3.X-.02)
    LIN5       =AUTO/LINE,SHOWALLPARAMS = NO,SHOWHITS = YES
                THEO/CIR2.X+.01,0.385,PLN3.Z-.050,-3.0005,0.385,-0.3866,V1
                ACTL/4.1904,7.3463,-13.8028,4.322,7.347,-13.8026,0.1316351
                TARG/-3.1305,0.385,-0.3866,-2.9989,0.385,-0.3866
                MEAS/LINE
                HIT/BASIC,-3.1305,0.385,-0.3866,0,-1,0,-3.1305,0.385,-0.3866
                HIT/BASIC,-3.0005,0.385,-0.3866,0,-1,0,-3.0005,0.385,-0.3866
                ENDMEAS/

    The part has three of these to measure. It seems that maybe paste with pattern doesn't play so well when a variable is included in the part to be pasted.

    Another thing I have noticed...
    If you have an autocircle and insert another feature's x, y, or z value in for the nominal, the target value will display as such (assuming you answer yes to update the target)

    Code:
    CIR15      =AUTO/CIRCLE,SHOWALLPARAMS = NO,SHOWHITS = YES
                THEO/CIR1.X,CIR1.Y,CIR1.Z,-1,0,0,2
                ACTL/3.4592,0.2377,-0.4711,-1,0,0,2
                TARG/CIR1.X,CIR1.Y,CIR1.Z,-1,0,0
                MEAS/CIRCLE
                
                ENDMEAS/
    Not so with an autoline. The target values seem to substitute the actual corresponding numerical value.

    Code:
    LIN5       =AUTO/LINE,SHOWALLPARAMS = NO,SHOWHITS = YES
                THEO/CIR3.X+.01,0.385,PLN3.Z-.050,-3.4098,0.385,-0.3866,V3
                ACTL/-3.5413,0.372,-0.3865,-3.4096,0.3747,-0.3865,0.1317199
                TARG/-3.5398,0.385,-0.3866,-3.4081,0.385,-0.3866
                MEAS/LINE
                
                ENDMEAS/
    Interesting. Different programmers working on these two different autofeatures?? Friday to Monday difference??

    Comment


    • #3
      Your variable reads 3.3978 - 3.5498 which equals -0.152 then you subtract 0.02 which equals -0.172. Maybe the answer being (-) is goofing you up.

      I caught the CIR7 and CIR8 thing but you corrected before I had a chance to post about it.

      EDIT I missed the ABS, forget it
      Last edited by inspector212; 07-11-2007, 10:06 AM.
      sigpic GDTPS - 0584

      Comment


      • #4
        Well, after much editing I got it to work like I wanted.

        Long story short...

        For 3.7MR3 DO NOT USE paste with pattern if any of your features/movepoints, etc. have references to other feature's actuals ie:
        Code:
        CIR15      =AUTO/CIRCLE,SHOWALLPARAMS = NO,SHOWHITS = YES
                    THEO/-0.05,4.1915,-2.2248,1,0,0,0.625
                    ACTL/-0.05,4.1915,-2.2248,1,0,0,0.6256
                    TARG/-0.05,4.1915,-2.2248,1,0,0
                    MEAS/CIRCLE
                    
                    ENDMEAS/
        CIR17      =AUTO/CIRCLE,SHOWALLPARAMS = NO,SHOWHITS = YES
                    THEO/0,CIR15.Y-1.15,CIR15.Z+.93,1,0,0,0.325
                    ACTL/0,3.0334,-1.2974,1,0,0,0.3273
                    TARG/0,CIR15.Y-1.15,CIR15.Z+.93,1,0,0
                    MEAS/CIRCLE
                    
                    ENDMEAS/
                    MOVE/POINT,NORMAL,0.2,CIR17.Y,CIR17.Z
        If you do use paste with paste with pattern (in this case the pattern wasn't edited) you will get the following:
        Code:
        CIR15      =AUTO/CIRCLE,SHOWALLPARAMS = NO,SHOWHITS = YES
                    THEO/-0.05,4.1915,-2.2248,1,0,0,0.625
                    ACTL/-0.05,4.1915,-2.2248,1,0,0,0.6256
                    TARG/-0.05,4.1915,-2.2248,1,0,0
                    MEAS/CIRCLE
                    
                    ENDMEAS/
        CIR17      =AUTO/CIRCLE,SHOWALLPARAMS = NO,SHOWHITS = YES
                    THEO/0,CIR18.Y-1.15,CIR18.Z+.93,1,0,0,0.325
                    ACTL/0,3.0334,-1.2974,1,0,0,0.3273
                    TARG/0,CIR18.Y-1.15,CIR18.Z+.93,1,0,0
                    MEAS/CIRCLE
                    
                    ENDMEAS/
                    MOVE/POINT,NORMAL,0.2,CIR19.Y,CIR19.Z
        CIR18      =AUTO/CIRCLE,SHOWALLPARAMS = NO,SHOWHITS = YES
                    THEO/-0.05,4.1915,-2.2248,1,0,0,0.625
                    ACTL/-0.05,4.1915,-2.2248,1,0,0,0.6256
                    TARG/-0.05,4.1915,-2.2248,1,0,0
                    MEAS/CIRCLE
                    
                    ENDMEAS/
        CIR19      =AUTO/CIRCLE,SHOWALLPARAMS = NO,SHOWHITS = YES
                    THEO/0,CIR18.Y-1.15,CIR18.Z+.93,1,0,0,0.325
                    ACTL/0,3.0334,-1.2974,1,0,0,0.3273
                    TARG/0,CIR18.Y-1.15,CIR18.Z+.93,1,0,0
                    MEAS/CIRCLE
                    
                    ENDMEAS/
                    MOVE/POINT,NORMAL,0.2,CIR19.Y,CIR19.Z
        So, when you paste with pattern, everything you pasted turns out ok but the references in the stuff that was copied gets changed to the references for the pasted stuff.

        I'm glad that didn't create an equipment destroying crash for me.

        Comment


        • #5
          I would suggest that whatever variables you use define THEO are also used to define TARG. I also found that the vectors would change for some reason, so to lock them down I would calculate what the IJK vectors should be and store the values for each IJK in a variable (ie, IVAR,JVAR,KVAR). Then I use the variables in the IJK part of the THEO and TARG.

          Comment

          Related Topics

          Collapse

          Working...
          X