Vision Crashes When Measuring Circles

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

  • Vision Crashes When Measuring Circles

    Running PC-DMIS 2013 MR1 SP5 on Windows 7 PC connected to an Optiv Performance z443
    ------------------------------------------------------------------------
    Hello!
    I have several part programs that run though to completion using touch probes
    I received a part that requires vision due to the crossholes (there are a lot) being generally too small

    So I created the part program and was faced with many issues...
    (Such as all of the numbers randomly changing by thousandths, leaving me to clean up everything with 0+0's!)

    However, it is done, and I'm trying to check it, but it crashes at the first measurement.

    Strangely enough, it worked before!

    I have not been able to run this program all of the way through, it only crashes when it measures a crosshole.

    The way the program is set up is it performs an alignment using the touch probe, then switches to the camera
    The camera looks for a crosshole, and if it does not find it, it rotates 180° and tries again (where it will find it, or we made the part wrong!) Otherwise it continues as normal.

    However pretty much since I added the "OnError" stuff it starts crashing at the hole.

    I was able to verify that it works (the OnError) previously, and, upon this discovery, moved on to programming the rest of the part.
    I needed to get the crosshole perfect or I couldn't measure the part, you see.

    So it worked for a bit, but not anymore, and it keeps crashing. Strange!

    I tried to measure a different hole in the same program, and had the same issue.

    What's going on?

  • #2
    Can you provide a sketch of the part you are measuring? In addition, please provide the snippet of code with all parameters expanded for the hole you are trying to measure. It sounds like maybe there is an edge scanning the incorrect way, going light to dark instead of dark to light.

    Comment


    • #3
      I can't provide a sketch of the part, but it is a simple and common feature, so a description should suffice.
      I am measuring the distance from the face of a cylinder to a hole. Alignment is fine, getting to the hole is fine, I can see the hole, I can see that PC-DMIS tries to check it.
      It looks like it crashes as soon as it tries to draw the green points around it.

      I keep attempting to upload an image of the construction of the hole measurement, but it crashes when I open it!!

      I have tried to adjust the number of points (I have point density set to HIGH, maybe changing to LOW or something would help?) but as soon as I try it crashes and closes PC-DMIS

      So here's the code for it, HTH
      Crosshole_Code.png

      Comment


      • InspectorJester
        InspectorJester commented
        Editing a comment
        I feel I should mention that I have a program that does more or less the same thing (take point alignment, switch to camera, measure hole) that does not crash, however it also does not have 'on error'.

        I have plenty of programs that use vision and work no problem. I have tried removing the on error command, to no avail.
        I have tried checking different holes, which did not work
        I have tried creating a new circle entirely, which failed miserably.

        I'm not entirely sure what to do, but I'm fiddling with it now. Hopefully someone can point me in the right direction!
        Otherwise I'll post more of my findings as they are, well, found
        Last edited by InspectorJester; 09-27-2017, 09:18 AM. Reason: Syntax

    • #4
      It would appear as though I have multiple problems with this program. I will do my best to explain, hopefully that will help understand.

      I have a cylindrical part.
      The load instructions state to align a feature upright in a rotary table, and you'll be able to run the program. This part is easy.
      However, with other parts I've done, I could find a feature to align upright, and it would work regardless of it was at 0° or 180°, because the features were the same on both sides.

      This part is different.
      I have a hole at one location at 0°, but at 180° there is no hole. So I'm trying to use "OnError" to determine if the hole is there. If it's not, rotate 180° and try again. If it is, continue the program.

      I was able to get this section to work. I set the OnError command to Edge_Not_Detected, GoTo (Label that contains the other circle), which just rotates 180° and measures the same circle.

      A variable is created, determining if I am using the circle at 0° or 180° in relation to the rotab (so I know if I need to rotate and re-align or not)

      The rest of the program continues when the hole is actually measured.

      This worked fine and well, so I moved on to the rest of the program (there are only 48 crossholes of varying diameters and locations, not a waste of time at all!)

      When I finished the program (without creating dimensions, I just wanted to see if it would even run before I messed around with them!) that section stopped working.

      Not only that, every Vision circle I tried to measure in that program crashes PC-DMIS!

      So I more or less created a [theoretically] good program, but it doesn't want to run through for some reason.
      ----------------------------------------------------------------------------------------------------------------------------------------------------
      Randomly throughout the program, Everything would change and be funky.

      Vectors of {0,0,1} were transforming to random gibberish (sometimes they would even be in the same plane I left them!)
      More often than not 0,0,1 would become {-.000000015648, .0946521, -.99999784135484} or some such nonsense (notice the sign change)
      XYZ values would jumble around a few thousandths intermittently
      Fun!

      Well, I read that pretty much to prevent that, switch all the {0,0,1} with {0+0,0+0,1}, so I went through the painstaking process of adjusting all of them.
      I didn't really understand, because the ones I set to 0+0 would stay 0, but ones (say, X 2.765) would change. So I changed stuff to more or less 2.765+0.

      But it doesn't work. I can measure holes with Vision in other programs, I even added some line measurements to this one right after the probe change but before the holes. They work fine! The holes don't!
      Last edited by InspectorJester; 09-27-2017, 11:42 AM.

      Comment


      • #5
        I am unfamiliar with Rotary Tables, maybe JEFMAN could be of better assistance to you. My question is why do you use both top and ring light together? I haven't done it this way, I use one or the other. Maybe your part is a little different than what I run.

        If vectors are changing on you, I am curious as to how your alignment is set up. In addition, how do you calibrate your touch probes to vision?

        Comment


        • JEFMAN
          JEFMAN commented
          Editing a comment
          Thanks for your trust, even I can disappoint !
          I don't know about Optiv...

      • #6
        Im pretty sure the ring light is redundant, I really only need the top light. I just have it on because I haven't bothered to turn it off!

        I calibrate the standard way: Using the hexagon calibration plate.

        Measure the ring with vision, has moved, measure with probe, has not, measure sphere with probe, has moved, measure every other probe, has not

        The alignment takes 4 cylinders, 7 hits per ring, two rings, along the OD.
        1 point is taken on the face, and a plane of 6 points is taken inside a notch (to align upright)

        I level Y+ to the cylinder, rotate ZPlus to the plane about YPlus, Rotate YPlus to the cylinder about XPlus, Set X&Z axes to cylinder, set Y axis to face point.

        Then I measure a line on the face using vision, and I measure a line on an undercut. After that is the hole that crashes.

        If the hole is there, it crashes right away.
        If it's not, the program rotates 180° and measures the hole, and crashes right away

        Comment


        • #7
          Originally posted by InspectorJester View Post

          The alignment takes 4 cylinders, 7 hits per ring, two rings, along the OD.
          1 point is taken on the face, and a plane of 6 points is taken inside a notch (to align upright)

          I level Y+ to the cylinder, rotate ZPlus to the plane about YPlus, Rotate YPlus to the cylinder about XPlus, Set X&Z axes to cylinder, set Y axis to face point.

          Then I measure a line on the face using vision, and I measure a line on an undercut. After that is the hole that crashes.

          If the hole is there, it crashes right away.
          If it's not, the program rotates 180° and measures the hole, and crashes right away
          Can you post the code ?
          Why do you rotate twice ?
          Did you change any parameter on the PC (driver, video card...) ?
          Does the rtary gives correct values when it turns ? (for example, if the rotary turns around Y+ (part coordinates), Z and X should change of sign on a 180° rotation.

          You could also check all the dlls...
          Last edited by JEFMAN; 09-27-2017, 01:56 PM.

          Comment


          • #8
            The second rotation is redundant.
            I was told (as a "best practice") to have a level, two rotates, and 3 origins in an alignment. I only need to level to Y to achieve rotate Y about X.
            And yes:
            Code:
            FINE_ALIGN_0=ALIGNMENT/START,RECALL:STARTUP,LIST=YES
                        ALIGNMENT/LEVEL,YPLUS,FA_CYLOD
                        ALIGNMENT/ROTATE,ZPLUS,TO,FA_PLNROT,ABOUT,YPLUS
                        ALIGNMENT/ROTATE,YPLUS,TO,FA_CYLOD,ABOUT,XPLUS
                        ALIGNMENT/TRANS,XAXIS,FA_CYLOD
                        ALIGNMENT/TRANS,ZAXIS,FA_CYLOD                *Full DCC alignment
                        ALIGNMENT/TRANS,YAXIS,FA_PNTFACE
                        ALIGNMENT/END
                        CLEARP/ZPLUS,0.5,ZPLUS,0,OFF
                        MOVE/CLEARPLANE
                        MOVE/ROTAB,0,SHORTEST,FA_PLNROT                *Rotate to the plane
                        LOADPROBE/NO PROBE ATTACHED                    *Take off touch probe
                        LOADPROBE/ZOOM                        *Switch to camera probe
                        TIP/TIP1, SHANKIJK=0, 0, 1, ANGLE=0
            VIS_FACE   =FEAT/VISION/LINE/DEFAULT,CARTESIAN,BOUNDED
                        THEO/<-0.05,0,0.36>,<0.05,0,0.36>,<1,0,0>,<0,1,0>,<0,0,1>,0.1
                        ACTL/<-0.05,0,0.365>,<0.05,0,0.365>,<1,0,0>,<0,1,0>,<0,0,1>,0.1
                        TARG/<-0.05,0,0.36>,<0.05,0,0.36>,<1,0,0>,<0,1,0>,<0,0,1>
                        SHOW FEATURE PARAMETERS=YES
                          SURFACE=THEO_THICKNESS,0
                          MEASURE MODE=NOMINALS
                          RMEAS=NONE,NONE,NONE                    *Take a line on the face
                          CIRCULAR MOVES=NO
                          CLEARPLANE=NO
                          PREPOSITION=NO
                          GRAPHICAL ANALYSIS=NO
                          DIAGNOSTICS=NO
                          FEATURE LOCATOR=NO,NO,""
                        SHOW_VISION_PARAMETERS=YES
                          TYPE=AUTOMATIC HIT TARGET
                          COVERAGE=100%
                          COVERAGE ACTIVE TARGETS=4
                          MAGNIFICATION=1.5001
                          HIT TARGET COLOR=RED,NOMINAL COLOR=GREEN
                          HIT TARGET=EA1,0,1,HIGH,0.0067
                          FILTER=NO,YES,0,2.25
                          EDGE=SPECIFIED EDGE,15,[ ]->[|],-->,1,1,1,1,NO,Backlight=<OFF,0,OFF>,Toplight=<OFF,83.1,ON>,Ringlight=<OFF,55.9,ON>
                          FOCUS=NO
            A10        =ALIGNMENT/START,RECALL:STARTUP,LIST=YES
                        ALIGNMENT/LEVEL,YPLUS,FA_CYLOD
                        ALIGNMENT/ROTATE,ZPLUS,TO,FA_PLNROT,ABOUT,YPLUS
                        ALIGNMENT/ROTATE,YPLUS,TO,FA_CYLOD,ABOUT,XPLUS
                        ALIGNMENT/TRANS,XAXIS,FA_CYLOD                *"More accurate" Full DCC Alignment
                        ALIGNMENT/TRANS,ZAXIS,FA_CYLOD
                        ALIGNMENT/TRANS,YAXIS,VIS_FACE
                        ALIGNMENT/END
            UC_1       =FEAT/VISION/LINE/DEFAULT,CARTESIAN,BOUNDED
                        THEO/<-0.05,1.393,0.38>,<0.05,1.393,0.38>,<1,0,0>,<0,1,0>,<0,0,1>,0.1
                        ACTL/<-0.05,1.393,0.38>,<0.05,1.393,0.38>,<1,0,0>,<0,1,0>,<0,0,1>,0.1
                        TARG/<-0.05,1.393,0.38>,<0.05,1.393,0.38>,<1,0,0>,<0,1,0>,<0,0,1>
                        SHOW FEATURE PARAMETERS=YES
                          SURFACE=THEO_THICKNESS,0
                          MEASURE MODE=NOMINALS
                          RMEAS=NONE,NONE,NONE
                          CIRCULAR MOVES=NO
                          CLEARPLANE=NO
                          PREPOSITION=NO
                          GRAPHICAL ANALYSIS=NO
                          DIAGNOSTICS=NO                        *Measure an undercut with a line
                          FEATURE LOCATOR=NO,NO,""
                        SHOW_VISION_PARAMETERS=YES
                          TYPE=AUTOMATIC HIT TARGET
                          COVERAGE=100%
                          COVERAGE ACTIVE TARGETS=4
                          MAGNIFICATION=1.5001
                          HIT TARGET COLOR=RED,NOMINAL COLOR=GREEN
                          HIT TARGET=EA1,0,1,HIGH,0.01
                          FILTER=NO,YES,0,2.25
                          EDGE=SPECIFIED EDGE,5,[|]->[ ],-->,1,1,1,1,NO,Backlight=<OFF,0,OFF>,Toplight=<OFF,34.7,ON>,Ringlight=<OFF,55.9,ON>
                          FOCUS=NO                        
                        ONERROR/EDGE_NOT_DETECTED,GOTO LBL_HOLEALIGN        *Begin Hole measurements
            CIR_0      =FEAT/VISION/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR    
                        THEO/<0+0,1.595,0.365>,<0+0,0+0,1>,0.033,0,0
                        ACTL/<0.0069,1.5958,0.3648>,<0.0751523,0.0002583,0.997172>,0.0366,0,0
                        TARG/<0+0,1.595,0.365>,<0+0,0+0,1>
                        ANGLE VEC=<-1,0+0,0+0>
                        SHOW FEATURE PARAMETERS=YES
                          SURFACE=THEO_THICKNESS,0
                          MEASURE MODE=NOMINALS
                          RMEAS=NONE,NONE,NONE
                          CIRCULAR MOVES=NO
                          CLEARPLANE=NO
                          PREPOSITION=NO
                          GRAPHICAL ANALYSIS=NO
                          DIAGNOSTICS=NO                        *If the hole is there, GoTo LBL_HOLE
                          FEATURE LOCATOR=NO,NO,""                    *If the hole is not, GoTo LBL_HoleAlign
                        SHOW_VISION_PARAMETERS=YES
                          TYPE=AUTOMATIC HIT TARGET
                          COVERAGE=100%
                          COVERAGE ACTIVE TARGETS=4
                          MAGNIFICATION=1.5001
                          HIT TARGET COLOR=RED,NOMINAL COLOR=GREEN
                          HIT TARGET=EA1,0,1,NORMAL,0.0163
                          FILTER=NO,NO
                          EDGE=MATCHING EDGE,15,[|]->[ ],<--,1,1,1,NO,Backlight=<OFF,0,OFF>,Toplight=<OFF,55,ON>,Ringlight=<OFF,55.9,ON>
                          FOCUS=NO
                        ONERROR/EDGE_NOT_DETECTED,OFF
                        ASSIGN/VHOLE={CIR_0}
                        ASSIGN/VROT=0
                        GOTO/LBL_HOLE
            LBL_HOLEALIGN=LABEL/                            *Do this if the hole is not there
                        ASSIGN/VROT=180
                        MOVE/ROTAB,180,SHORTEST,FA_PLNROT
            FINE_ALIGN_180=ALIGNMENT/START,RECALL:STARTUP,LIST=YES
                        ALIGNMENT/LEVEL,YPLUS,FA_CYLOD
                        ALIGNMENT/ROTATE,ZPLUS,TO,FA_PLNROT,ABOUT,YPLUS
                        ALIGNMENT/ROTATE_OFFSET,180,ABOUT,YPLUS
                        ALIGNMENT/ROTATE,YPLUS,TO,FA_CYLOD,ABOUT,XPLUS
                        ALIGNMENT/TRANS,XAXIS,FA_CYLOD
                        ALIGNMENT/TRANS,ZAXIS,FA_CYLOD                *Adjust alignment to be rotated 180°
                        ALIGNMENT/TRANS,YAXIS,FA_PNTFACE
                        ALIGNMENT/END
            CIR_180    =FEAT/VISION/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
                        THEO/<0+0,1.595,0.365>,<0+0,0+0,1>,0.033,0,0
                        ACTL/<-0.0019,1.5959,0.365>,<0.0000573,0.0010758,0.9999994>,0.0368,0,0
                        TARG/<0+0,1.595,0.365>,<0+0,0+0,1>
                        ANGLE VEC=<-1,0+0,0+0>
                        SHOW FEATURE PARAMETERS=YES
                          SURFACE=THEO_THICKNESS,0
                          MEASURE MODE=NOMINALS
                          RMEAS=NONE,NONE,NONE
                          CIRCULAR MOVES=NO
                          CLEARPLANE=NO
                          PREPOSITION=NO
                          GRAPHICAL ANALYSIS=NO                    *Measure this hole
                          DIAGNOSTICS=NO
                          FEATURE LOCATOR=NO,NO,""
                        SHOW_VISION_PARAMETERS=YES
                          TYPE=AUTOMATIC HIT TARGET
                          COVERAGE=100%
                          COVERAGE ACTIVE TARGETS=4
                          MAGNIFICATION=1.5001
                          HIT TARGET COLOR=RED,NOMINAL COLOR=GREEN
                          HIT TARGET=EA1,0,1,HIGH,0.0163
                          FILTER=NO,YES,0,2.25
                          EDGE=MATCHING EDGE,15,[|]->[ ],<--,1,1,1,NO,Backlight=<OFF,0,OFF>,Toplight=<OFF,55,ON>,Ringlight=<OFF,55.9,ON>
                          FOCUS=NO
                        ASSIGN/VHOLE={CIR_180}                    *Continue on as normal
            LBL_HOLE   =LABEL/
            HOLE_1.595 =GENERIC/CIRCLE,DEPENDENT,CARTESIAN,OUT,$
                        NOM/XYZ,<VHOLE.X,VHOLE.Y,VHOLE.Z>,$
                        MEAS/XYZ,<VHOLE.X,VHOLE.Y,VHOLE.Z>,$
                        NOM/IJK,<VHOLE.I,VHOLE.J,VHOLE.K>,$
                        MEAS/IJK,<VHOLE.I,VHOLE.J,VHOLE.K>,$
                        DIAMETER/VHOLE.D,VHOLE.D
            FINE_ALIGN_START=ALIGNMENT/START,RECALL:STARTUP,LIST=YES
                        ALIGNMENT/LEVEL,YPLUS,FA_CYLOD
                        ALIGNMENT/ROTATE,ZPLUS,TO,FA_PLNROT,ABOUT,YPLUS
                        ALIGNMENT/ROTATE_OFFSET,VROT,ABOUT,YPLUS
                        ALIGNMENT/ROTATE,YPLUS,TO,FA_CYLOD,ABOUT,XPLUS
                        ALIGNMENT/TRANS,XAXIS,FA_CYLOD
                        ALIGNMENT/TRANS,ZAXIS,HOLE_1.595
                        ALIGNMENT/TRANS,YAXIS,FA_PNTFACE
                        ALIGNMENT/END
            
            $$ NO,
                        VROT is the rotation of the 1.595 Hole
            
                        CLEARP/ZPLUS,0.5,ZPLUS,0,OFF
                        MOVE/ROTAB,VROT,SHORTEST,FA_PLNROT

            Comment


            • InspectorJester
              InspectorJester commented
              Editing a comment
              Numbers have been changed to protect the identity of the deceased

            • InspectorJester
              InspectorJester commented
              Editing a comment
              Also, JEFMAN, the rotary table reads good data. If I tell it to go to 180, it goes to 180, etc. Everything's up to date and calibrated by Hexagon, and I calibrated last week thursday. I currently run other programs that check out fine. The error isn't in calibration, as far as I can see

          • #9
            In A10, why do you recall startup ?

            I don't understand this line :
            MOVE/ROTAB,0,SHORTEST,FA_PLNROT
            Maybe only because I don't use an Optiv (and maybe also because here it's late, and I'm not at the cmm to check rotary commands ! )

            Comment


            • #10
              Apologies.

              I recall startup for my own personal reasons.
              It lets me know it is an alignment that is not constrained within another alignment.
              Using that construction, I could recall any alignment.

              FA_PLNROT is the name of the plane I measure with a touch probe, which is what the rotary table uses to level out the holes

              Comment


              • #11
                I am wondering if the problems you are seeing are due to your alignment with addition to the Rotary Table. I have NEVER had more than one rotate to a feature in an alignment. Now, I have had a rotation and then an offset rotation, but never have a rotated in YPLUS and ZPLUS. That is what leveling to a feature does for you.

                It looks like you are leveling to a cylinder. How long is that cylinder? How many hits are you taking?

                Comment


                • #12
                  I reiterate:

                  I level YPLUS to the Cylinder about XPLUS, which is exactly the same as levelling to YPLUS. It doesn't take away from anything. The alignment is fine. I'm able to align perfectly, the construction is perfect, I can move to the exact hole location and see the hole. I can click Edit and hit Move To and move right to the feature. I can execute "Move rotab to FA_PLNROT" and it will rotate to the plane, I can offset by 180º and the rotab will move 180 and show me the exact hole location, and it is right smack dab in the middle of the circle.
                  The problem is not the alignment. If I remove the rotate to yplus about xplus in the alignment, it will do nothing to the alignment, just as adding it in to the alignment will do nothing.
                  HTH

                  Comment


                  • #13
                    When I go to edit the feature (as in I click the feature and press F9, or Right Click and choose Edit) I am able to open up the window that shows the properties of the auto circle. When I change anything (turn focus on or off, adjust the focus by anything, adjust lighting, change location, etc) PC-DMIS crashes and gives me the error reporting window

                    EDIT: Interestingly enough, I was able to adjust the program to have slightly different construction. It is now able to take points on the hole, however it doesn't continue execution. Like at all.

                    It moves over the hole, it freezes, it takes its little green dots, but then it just sort of sits there as if it's having trouble sending the data or something
                    Last edited by InspectorJester; 09-28-2017, 06:55 AM.

                    Comment


                    • #14
                      Can you start from scratch and rewrite the program? Maybe some how the program is corrupted.

                      I honestly haven't played with On Error and vision. I know some machines don't function correctly with On Error. Maybe On Error doesn't function correctly with version 2013? Try contacting Hexagon to validate.
                      Last edited by bfire85; 09-28-2017, 07:35 AM.

                      Comment


                      • #15
                        I'll check it out. I would imagine something similar.
                        I tried removing the OnError altogether which didn't fix the issue; rewriting will be tedious, but, such is life.

                        So that spawns an entirely different question. Any other way I could achieve the same thing (check for hole, if not there, do, else, etc) without OnError? I would imagine not as easily

                        Comment

                        Related Topics

                        Collapse

                        Working...
                        X