model not moving with alignment while and if flow control

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

  • model not moving with alignment while and if flow control

    PCDMIS CAD++ 2013 MR1

    I'm working on a program to measure a fixture full of parts. It's in the barest stages at this point, but my CAD model is not moving/ snapping as expected as my alignments change. It's probably an error in my expectations, so I need help.

    At each location on the fixture, there could be part A, Part B or no part. Based on Z value of check, the program should jump to the correct section and measure. I need the CAD model to snap correctly because the critical measurement is of a profile.

    Here's what I have so far. If it's just total garbage, don't be afraid to say so. Thanks in advance! :-)

    Code:
    PART NAME  : FIRST_TRY_FIXTURE
    REV NUMBER :
    SER NUMBER :
    STATS COUNT : 1
    
    STARTUP    =ALIGNMENT/START,RECALL:USE_PART_SETUP,LIST=YES
                ALIGNMENT/END
                WORKPLANE/ZPLUS
                MODE/MANUAL
                FORMAT/TEXT,OPTIONS, ,HEADINGS,SYMBOLS, ;MEAS,NOM,OUTTOL,TOL, , ,
                LOADPROBE/3X50
                TIP/3mm X 50mm Stylus, SHANKIJK=0, 0, 1, ANGLE=0
                MODE/DCC
                ASSIGN/COUNT=1
                RECALL/ALIGNMENT,EXTERNAL,A1_NIDEC
                MOVE/POINT,NORMAL,<0.0000,0.0000,0.0000>
                PREHIT/0.5
                RETRACT/0.5
    $$ NO,
                MAKE CHECK DISTANCE (FIRST NUMBER BELOW) FAR ENOUGH TO FIND THE COVER OR FIND NOTHING.
                CHECK/3,1
    $$ NO,
                Z OF THE NEXT POINT SHOULD BE THE EXPECTED HEIGHT OF THE HOUSING.
                ONERROR/PROBE_MISS,GOTO NOPART
    MASTER     =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
                THEO/<0,0.8,-1.2>,<0,0,1>
                ACTL/<0,0.8001,-3.6981>,<0,0,1>
                TARG/<0,0.8,-1.2>,<0,0,1>
                SNAP=NO
                SHOW FEATURE PARAMETERS=NO
                SHOW CONTACT PARAMETERS=NO
                ASSIGN/V1=MASTER.Z.MEAS
                IF/V1<-1.2 AND V1>-1.3
                COMMENT/OPER,NO,FULL SCREEN=YES,AUTO-CONTINUE=NO,
                program will measure
                a housing now
    
    A2         =ALIGNMENT/START,RECALL:A1_NIDEC,LIST=YES
                ALIGNMENT/TRANS,ZAXIS,MASTER
                ALIGNMENT/END
    CS_HNG     =CALLSUB/NIDEC_HOUSING,Q:\PROGRAMS\NIDEC\NIDEC FIXTURE PROGRAM\XP5HNG01_REV.A_INCH.PRG:,
                END_IF/
                ELSE_IF/V1<-3.6 AND V1>-3.7
                COMMENT/OPER,NO,FULL SCREEN=YES,AUTO-CONTINUE=NO,
                program will measure
                a cover now
    
    A1         =ALIGNMENT/START,RECALL:A1_NIDEC,LIST=YES
                ALIGNMENT/TRANS,ZAXIS,MASTER
                ALIGNMENT/END
                CHECK/0.3,1
                CLEARP/ZPLUS,0.5,ZPLUS,0.5,OFF
                MOVE/CLEARPLANE
                PREHIT/0.1
                RETRACT/0.1
    PLN_ZPLUS  =FEAT/CONTACT/PLANE/DEFAULT,CARTESIAN,OUTLINE
                THEO/<0.1086,0.9792,0>,<0,0,1>
                ACTL/<0.1086,0.9792,0>,<-0.0018056,0.0009467,0.9999979>
                TARG/<0.1086,0.9792,0>,<0,0,1>
                ANGLE VEC=<1,0,0>,SQUARE
                SHOW FEATURE PARAMETERS=NO
                SHOW CONTACT PARAMETERS=NO
                MOVE/CLEARPLANE
                WORKPLANE/XMINUS
    LIN_XORIG  =FEAT/CONTACT/LINE/DEFAULT,CARTESIAN,UNBOUNDED
                THEO/<0.394,1.3,0.4>,<0,-1,0>,<-1,0,0>,<0,0,-1>,0.6
                ACTL/<0.3916,1.2999,0.4>,<0.0005791,-0.9999998,0>,<-0.9999998,-0.0005791,0>,<0,0,-1>,0.6
                TARG/<0.394,1.3,0.4>,<0,-1,0>,<-1,0,0>,<0,0,-1>
                SHOW FEATURE PARAMETERS=NO
                SHOW CONTACT PARAMETERS=NO
                WORKPLANE/ZPLUS
                MOVE/CLEARPLANE
                WORKPLANE/YMINUS
    LIN_XPLUSPART=FEAT/CONTACT/LINE/DEFAULT,CARTESIAN,UNBOUNDED
                THEO/<1.4119,-0.0061,0.4>,<1,0,0>,<0,-1,0>,<0,0,1>,1.2295
                ACTL/<1.4119,-0.0061,0.4>,<1,0,0>,<0,-1,0>,<0,0,1>,1.2295
                TARG/<1.4119,-0.0061,0.4>,<1,0,0>,<0,-1,0>,<0,0,1>
                SHOW FEATURE PARAMETERS=NO
                SHOW CONTACT PARAMETERS=NO
                MOVE/CLEARPLANE
                WORKPLANE/ZPLUS
    A1         =ALIGNMENT/START,RECALL:USE_PART_SETUP,LIST=YES
                ALIGNMENT/LEVEL,ZPLUS,PLN_ZPLUS
                ALIGNMENT/ROTATE,XPLUS,TO,LIN_XPLUSPART,ABOUT,ZPLUS
                ALIGNMENT/TRANS,ZAXIS,PLN_ZPLUS
                ALIGNMENT/TRANS,XAXIS,LIN_XORIG
                ALIGNMENT/TRANS,YAXIS,LIN_XPLUSPART
                ALIGNMENT/END
    PLN_Z2     =FEAT/CONTACT/PLANE/DEFAULT,CARTESIAN,OUTLINE
                THEO/<3.2105,0.2378,0>,<0,0,1>
                ACTL/<3.2105,0.2378,0.0005>,<0.0001962,0.0001496,1>
                TARG/<3.2105,0.2378,0>,<0,0,1>
                ANGLE VEC=<1,0,0>,SQUARE
                SHOW FEATURE PARAMETERS=NO
                SHOW CONTACT PARAMETERS=NO
                MOVE/CLEARPLANE
    SCN1       =FEAT/SET,CARTESIAN
                THEO/<1.5638,0.9021,0>,<0,0,1>
                ACTL/<1.5562,0.8946,0.0002>,<0,0,1>
                CONSTR/SET,BASIC,PLN_ZPLUS.HIT[1..PLN_ZPLUS.NUMHITS],PLN_Z2.HIT[1..PLN_Z2.NUMHITS],,
    DCC_DTMA   =FEAT/PLANE,CARTESIAN,TRIANGLE,YES
                THEO/<0,0,0>,<0,0,1>
                ACTL/<1.5562,0.8946,0.0002>,<-0.0000825,0.000146,1>
                CONSTR/PLANE,BF,SCN1,,
                OUTLIER_REMOVAL/OFF,3
                FILTER/OFF,WAVELENGTH=0
    PLN_TOP    =FEAT/CONTACT/PLANE/DEFAULT,CARTESIAN,OUTLINE
                THEO/<2.3558,0.1219,0.61>,<0,0,1>
                ACTL/<2.3558,0.1219,0.6103>,<0.0001848,-0.0001031,1>
                TARG/<2.3558,0.1219,0.61>,<0,0,1>
                ANGLE VEC=<1,0,0>,SQUARE
                SHOW FEATURE PARAMETERS=NO
                SHOW CONTACT PARAMETERS=NO
                MOVE/CLEARPLANE
                OPTIONPROBE/MAXFORCE=0.2,LOWFORCE=0.0167,UPPERFORCE=0.0833,TRIGGERFORCE=0.1,
                  PROBEACCURACY=0.1,POSACCURACY=0.1,#RETURNDATA=10,
                  RETURNSPEED=1,SCANPNTDENSITY=2.75,
                  SCANACCELERATION=9,SCANOFFSETFORCE=0.12,
                  PROBINGMODE=DFL,MANFINEPROBING=NO
                SCANSPEED/0.5
    SCN_5MM    =FEAT/SCAN,LINEARCLOSE,NUMBER OF HITS=678
                ,SHOW HITS=NO,SHOWALLPARAMS=YES
                EXEC MODE=RELEARN, NOMS MODE=FIND NOMS,CLEARPLANE=NO,SINGLE POINT=NO,THICKNESS=0
                FINDNOMS=0.1,SELECTEDONLY=NO,USEBESTFIT=YES,PROBECOMP=YES,AVOIDANCE MOVE=NO,DISTANCE=0,CAD Compensation=NO
                DIR1=NULLFILTER,
                HITTYPE=VECTOR
                INITVEC=0,-1,0
                DIRVEC=1,0,0
                CUTVEC=0,0,1
                PLANEVEC=1,0,0
                POINT1=1.5,0,0.1969
                MEAS/SCAN
                BASICSCAN/LINE,NUMBER OF HITS=678,SHOW HITS=NO,SHOWALLPARAMS=YES
                <1.5,0,0.1969>,<1.4803,0,0.1969>,CutVec=0,0,1,DirVec=1,0,0
                InitVec=0,-1,0,EndVec=0,-1,0,THICKNESS=0
                FILTER/NULLFILTER,
                EXEC MODE=RELEARN
                BOUNDARY/PLANE,<1.4803,0,0.1969>,PlaneVec=1,0,0,Crossings=2
                HITTYPE/VECTOR
                NOMS MODE=FINDNOMS,0.1
                ENDSCAN
                ENDMEAS/
    SCN_13MM   =FEAT/SCAN,LINEARCLOSE,NUMBER OF HITS=678
                ,SHOW HITS=NO,SHOWALLPARAMS=YES
                EXEC MODE=RELEARN, NOMS MODE=FIND NOMS,CLEARPLANE=NO,SINGLE POINT=NO,THICKNESS=0
                FINDNOMS=0.1,SELECTEDONLY=NO,USEBESTFIT=YES,PROBECOMP=YES,AVOIDANCE MOVE=NO,DISTANCE=0,CAD Compensation=NO
                DIR1=NULLFILTER,
                HITTYPE=VECTOR
                INITVEC=0,-1,0
                DIRVEC=1,0,0
                CUTVEC=0,0,1
                PLANEVEC=1,0,0
                POINT1=1.5,0,0.5118
                MEAS/SCAN
                BASICSCAN/LINE,NUMBER OF HITS=678,SHOW HITS=NO,SHOWALLPARAMS=YES
                <1.5,0,0.5118>,<1.4803,0,0.5118>,CutVec=0,0,1,DirVec=1,0,0
                InitVec=0,-1,0,EndVec=0,-1,0,THICKNESS=0
                FILTER/NULLFILTER,
                EXEC MODE=RELEARN
                BOUNDARY/PLANE,<1.4803,0,0.5118>,PlaneVec=1,0,0,Crossings=2
                HITTYPE/VECTOR
                NOMS MODE=FINDNOMS,0.1
                ENDSCAN
                ENDMEAS/
    A2         =ALIGNMENT/START,RECALL:A1,LIST=YES
                ALIGNMENT/LEVEL,ZPLUS,DCC_DTMA
                ALIGNMENT/TRANS,ZAXIS,DCC_DTMA
                ALIGNMENT/BF2D,ZPLUS,LEAST_SQR,CREATE WEIGHTS=NO,ROTANDTRANS,USE SCALING=NO,0.0001,-0.0001,0,0.0006
                ITERATEANDREPIERCECAD=NO
                Deviation Threshold=0.0003937
                SHOWALLINPUTS=NO,SHOWALLPARAMS=NO
                ALIGNMENT/END
    
    DIM DIST1= 2D DISTANCE FROM PLANE DCC_DTMA TO PLANE PLN_TOP PAR TO   ZAXIS,NO_RADIUS  UNITS=IN,$
    GRAPH=OFF  TEXT=OFF  MULT=1.00  OUTPUT=BOTH
    AX       MEAS    NOMINAL     OUTTOL       +TOL       -TOL
    M       0.6099     0.6100     0.0000     0.0030     0.0030 ----#----
                PRINT/REPORT,EXEC MODE=END,$
                  TO_FILE=ON,AUTO=43,$
                  TO_PRINTER=OFF,$
                  TO_DMIS_REPORT=OFF,FILE_OPTION=INDEX,FILENAME=Q:\Programs\SHELL2.dmo,$
                  REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMENSIONS=NO,$
                  PREVIOUS_RUNS=DELETE_INSTANCES
                COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
                did it save - check desktop?
                END_ELSEIF/
                ELSE/
    NOPART     =LABEL/
                COMMENT/OPER,NO,FULL SCREEN=YES,AUTO-CONTINUE=NO,
                no part found
                END_ELSE/
                RECALL/ALIGNMENT,EXTERNAL,A1_NIDEC
                MOVE/POINT,NORMAL,<0.0000,0.0000,0.0000>

  • #2
    as far as i know the cad will be in the location where you first aligned to it. when the program moves to another location on the fixture the cad will stay at the first location. this shoudn't affect the accuracy of the measurements because the cad model is just for reference for the operator. you could delete the cad from the program and it would still run as expected.

    we have a part that is made out of a sheet of material. (100's of parts in a grid) i looped the program to measure multiple parts. the cad stays in the lower left (first part measured) then the feature lines will show up at the locations of the subsequent measured parts but the cad will stay at the original location.
    sigpic

    Comment


    • EmilySue
      EmilySue commented
      Editing a comment
      The loop you describe is what I've done in the past. But when I need to report profile, it must compare to the model, so I'm bringing in an external alignment for each fixture position. Per a thread by NinjaBadger, this should work but I am stumbling through and I know I've made a mistake or two that is preventing me from getting further.

  • #3
    I agree with mckenzie . I haven't seen the CAD move with a loop. One suggestion, can you mess around with fixture builder to import multiple models in the placement you need them or use another CAD software to create the multiple part offsets you need?

    Comment


    • #4
      Yeah, I loop most of my routines. CAD won't shift with the loop.
      There are probably ways to make cad shift (recall fixture alignment then shift it by loop offset value) but to me, it's not worth the effort.

      Your looped profile evaluation should be completely unaltered, as long as it was associated to the CAD on the initial programing effort and you saved the file as read-only, with all nominals per CAD.
      To prove this out, rename your .CAD file, then open/execute. Reverting the rename and reopening the routine will return to unaltered state.

      Comment


      • #5
        Hmm, the difficulty you will have is using two different CAD models.

        This is probably one of the times I'd either use VB type automation to manage and run things, OR you might have some success with subprograms (I see you use one but I'm not sure what you're doing with it).

        Automettech - Automated Metrology Technology

        Comment


        • #6
          The only times CAD is necessary:
          1) Writing the initial program.
          2) Scanning with FINDNOMS.
          3) Graphing out the deviation results and making screenshots to show people exactly how the part is bad.
          4) Updating the program code to part geometry changes/revisions.

          So for programs that loop around different fixture stations, stick to touch point features and reporting simple print dimensions and you should be fine.

          Comment


          • EmilySue
            EmilySue commented
            Editing a comment
            #2 scanning with FINDNOMS :-/

            I was pulled away from this project, but it is still something we need as soon as we can get it done. Unfortunately, I need to hand it off, as we don't have time for me to work with my boss to figure it out. He's just going to take it while I do other things because we can't afford the time to double up man hours on it.

            I'll let everyone know how it goes though! I've learned a lot even though I haven't been successful with it yet - it's a bit of a monster with a lot of pieces that are new to me.

        Related Topics

        Collapse

        Working...
        X