hexagon logo

I have a looping question

Where to start…. I have been programming for about a year. I am not too much of a noob but I do not have any one to really turn too and ask for help (besides you guys and gals). So I have been playing around with my cmm, making a program then making a loop program out of that…. Now I have ran into problems doing this.

-first problem is If I stop the program in the middle of the loop, pcdmis thinks that the current piece whether it be 2,3,4,5,6 is the first piece to start on. I noticed that the actual coordinates on features are off and stuck. Why is that?

-after avoiding that, my Theo’s keep changing on me. I do not have CAD models so I have to change my Theo’s manually. After running the program they always keep changing. Any way to stop that?

-I guess I am just asking someone to take a look over what I have, I need some senior programmers to teach this young buck some knowledge please here is a picture of my set-up and some code … any advice will help and I am not afraid to take criticism

p.s. I left my manual alignment to show y’all how its changing up on me.


=ALIGNMENT/START,RECALL:USE_PART_SETUP,LIST=YES
            ALIGNMENT/END
            MODE/MANUAL
            MOVESPEED/ 100
            FORMAT/TEXT,OPTIONS, ,HEADINGS,SYMBOLS, ;NOM,TOL,MEAS,DEV,OUTTOL, , 
            LOADPROBE/LLDAWG_TIP1 2X30 TIP2 3X50
            TIP/TIP1, SHANKIJK=0, 0, 1, ANGLE=0
         
MAN_PLNA   =FEAT/PLANE,CARTESIAN,TRIANGLE
            THEO/<10.39954,-0.91716,-27.00211>,<0,0,1>
            ACTL/<10.29746,-0.85066,-27.00047>,<0.0000813,-0.0034436,0.9999941>
            MEAS/PLANE,4
            HIT/BASIC,NORMAL,<2.24446,-0.9518,-26.99909>,<0.0002452,0.0062019,0.9999807>,<2.89135,-0.58091,-27.00009>,USE THEO=YES
            HIT/BASIC,NORMAL,<10.61085,-1.27203,-27.00125>,<0.0002452,0.0062019,0.9999807>,<18.65044,-0.42268,-26.99876>,USE THEO=YES
            HIT/BASIC,NORMAL,<16.79155,-0.97871,-27.00204>,<0.0002452,0.0062019,0.9999807>,<13.03635,-1.1995,-27.00427>,USE THEO=YES
            HIT/BASIC,NORMAL,<11.95131,-0.46609,-27.00607>,<0.0002452,0.0062019,0.9999807>,<6.6117,-1.19955,-26.99876>,USE THEO=YES
            ENDMEAS/
$$ NO,
            
A1         =ALIGNMENT/START,RECALL:STARTUP,LIST=YES
            ALIGNMENT/LEVEL,ZPLUS,MAN_PLNA
            ALIGNMENT/END
            COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
            ALIGNMENT
            MAKE LINE ON Y-MINUS/FRONT
$$ NO,
            
MAN_LINEB  =FEAT/LINE,CARTESIAN,UNBOUNDED
            THEO/<2.95008,-1.28824,-27.17141>,<1,0.0000004,0>
            ACTL/<2.24178,-1.54568,-27.14377>,<0.9999997,-0.0008179,0>
            MEAS/LINE,2,ZPLUS
            HIT/BASIC,NORMAL,<2.95008,-1.28824,-27.17326>,<-0.0008712,-0.9999996,0>,<2.24178,-1.54568,-27.14469>,USE THEO=YES
            HIT/BASIC,NORMAL,<18.51021,-1.3018,-27.16955>,<-0.0008712,-0.9999996,0>,<19.00739,-1.55939,-27.14285>,USE THEO=YES
            ENDMEAS/
$$ NO,
            
A2         =ALIGNMENT/START,RECALL:A1,LIST=YES
            ALIGNMENT/ROTATE,XPLUS,TO,MAN_LINEB,ABOUT,ZPLUS
            ALIGNMENT/END
MAN_PNTC   =FEAT/POINT,CARTESIAN
            THEO/<1.99161,-0.72581,-27.07116>,<-1,0.0000022,0>
            ACTL/<1.98758,-1.25369,-27.14727>,<-0.9999969,0.0009674,0.0022823>
            MEAS/POINT,1,WORKPLANE
            HIT/BASIC,NORMAL,<1.99161,-0.72581,-27.07116>,<-1,0.0000022,0>,<1.98758,-1.25369,-27.14727>,USE THEO=YES
            ENDMEAS/
$$ NO,
            
A3         =ALIGNMENT/START,RECALL:A2,LIST=YES
            ALIGNMENT/TRANS,ZAXIS,MAN_PLNA
            ALIGNMENT/TRANS,YAXIS,MAN_LINEB
            ALIGNMENT/TRANS,XAXIS,MAN_PNTC
            ALIGNMENT/END
$$ NO,
            
$$ NO,
            
C1         =COMMENT/INPUT,NO,FULL SCREEN=NO,
            what serial number is this?
$$ NO,
            
            ASSIGN/VCOUNT=0+C1.INPUT
$$ NO,
            
            MODE/DCC
$$ NO,
            
$$ NO,
            
$$ NO,
            
$$ NO,
            
V2         =LOOP/START,ID=YES,NUMBER=3,START=1,SKIP=,
              OFFSET:XAXIS=0,YAXIS=18.25,ZAXIS=5,ANGLE=0
V1         =LOOP/START,ID=YES,NUMBER=3,START=1,SKIP=,
              OFFSET:XAXIS=0,YAXIS=6,ZAXIS=0,ANGLE=0
            MODE/DCC
$$ NO,
            
            DISPLAYPRECISION/4
            FASTPROBEMODE/ON
            MOVESPEED/ 300
            PREHIT/0.1
            RETRACT/0.1
            TRACEFIELD/NO_DISPLAY,LIMIT=15 ; P.O. : 
            TRACEFIELD/NO_DISPLAY,LIMIT=25 ; DRAWING NUMBER : 
            TRACEFIELD/NO_DISPLAY,LIMIT=15 ; INSPECTOR : 
            TRACEFIELD/NO_DISPLAY,LIMIT=15 ; JOB NUMBER : 
            TRACEFIELD/NO_DISPLAY,LIMIT=15 ; HEAT NUMBER : 
            TRACEFIELD/NO_DISPLAY,LIMIT=15 ; VIN NUMBER : 
            TRACEFIELD/NO_DISPLAY,LIMIT=15 ; CUSTOMER : 
            TRACEFIELD/NO_DISPLAY,LIMIT=15 ; SERIAL NUMBER : VCOUNT
            MOVE/POINT,NORMAL,<-0.1515,0.5576,0.3125>
$$ NO,
            
PLNA       =FEAT/PLANE,CARTESIAN,TRIANGLE
            THEO/<8.4562,0.6582,0.0018>,<-0.0003726,0.0020609,0.9999978>
            ACTL/<8.4563,0.6577,-0.0255>,<-0.0003947,0.0122227,0.9999252>
            MEAS/PLANE,6
            HIT/BASIC,NORMAL,<0.1267,0.6388,0.0005>,<-0.0003726,0.0020609,0.9999978>,<0.1268,0.6387,-0.0391>,USE THEO=YES
            HIT/BASIC,NORMAL,<4.7994,1.0227,0.0027>,<-0.0003726,0.0020609,0.9999978>,<4.7995,1.0226,-0.0492>,USE THEO=YES
            HIT/BASIC,NORMAL,<11.7019,1.0676,-0.0009>,<-0.0003726,0.0020609,0.9999978>,<11.702,1.0675,-0.0561>,USE THEO=YES
            HIT/BASIC,NORMAL,<17.7592,0.4945,0.0109>,<-0.0003726,0.0020609,0.9999978>,<17.7593,0.4944,-0.0396>,USE THEO=YES
            HIT/BASIC,NORMAL,<11.9732,0.6058,-0.0022>,<-0.0003726,0.0020609,0.9999978>,<11.9733,0.6057,-0.0538>,USE THEO=YES
            HIT/BASIC,NORMAL,<4.3769,0.1195,0>,<-0.0003726,0.0020609,0.9999978>,<4.377,0.1194,-0.0252>,USE THEO=YES
            ENDMEAS/
            MOVE/POINT,NORMAL,<-0.1431,-0.1238,0.2051>
$$ NO,
            
LINB       =FEAT/LINE,CARTESIAN,UNBOUNDED
            THEO/<0.6638,0.0267,-0.0699>,<1,-0.0000939,0>
            ACTL/<0.6638,0.0318,-0.0697>,<1,0.000208,0>
            MEAS/LINE,2,ZPLUS
            HIT/BASIC,NORMAL,<0.6638,0.0267,-0.0719>,<-0.0000939,-1,0>,<0.6639,0.0318,-0.0717>,USE THEO=YES
            HIT/BASIC,NORMAL,<17.5832,0.0251,-0.0679>,<-0.0000939,-1,0>,<17.5833,0.0353,-0.0677>,USE THEO=YES
            ENDMEAS/
            MOVE/POINT,NORMAL,<-0.2919,-0.3716,-0.0759>
PNTC       =FEAT/POINT,CARTESIAN
            THEO/<-0.0107,0.2214,-0.0721>,<-1,0.0000022,0>
            ACTL/<-0.0107,0.2214,-0.0721>,<-1,0.0000022,0>
            MEAS/POINT,1,WORKPLANE
            HIT/BASIC,NORMAL,<0.0002,0.2213,-0.0723>,<-1,0.0000022,0>,<-0.0107,0.2214,-0.0721>,USE THEO=YES
            ENDMEAS/
$$ NO,
            
            PREHIT/0.06
            RETRACT/0.06
A4         =ALIGNMENT/START,RECALL:A3,LIST=YES
            ALIGNMENT/LEVEL,ZPLUS,PLNA
            ALIGNMENT/ROTATE,XPLUS,TO,LINB,ABOUT,ZPLUS
            ALIGNMENT/TRANS,XAXIS,PNTC
            ALIGNMENT/TRANS,YAXIS,LINB
            ALIGNMENT/TRANS,ZAXIS,PLNA
            ALIGNMENT/END


$$ NO,=====================================================
            
GRP1       =GROUP/SHOWALLPARAMS=NO    HAD TO CONDENSE THIS
            ENDGROUP/ID=GRP1          @@@@@@PROGRAM@@@@@@@     
$$ NO,=====================================================


        

    
C2         =COMMENT/YESNO,NO,FULL SCREEN=NO,AUTO-CONTINUE=YES,TIME DELAY=5,
            KEEP GOING?
$$ NO,
            
            IF_GOTO/C2.INPUT=="NO" ,GOTO = L1
$$ NO,
            
            ASSIGN/VCOUNT=VCOUNT+1
$$ NO,
            [ATTACH=CONFIG]9069[/ATTACH]
            TRACEFIELD/NO_DISPLAY,LIMIT=15 ; SERIAL NUMBER : VCOUNT
            REPORT/LABEL, FILENAME= PPAP ITEM DIMENSION (2) NOT COPY.LBL
$$ NO,
            
L1         =LABEL/
$$ NO,

Attached Files
Parents
  • Wolman there is nothing wrong with aligning the features that are use in alignments once you have created the feature. In all the training I've done and what I've heard from other programmers this is the better way to do it. You could run into problems creating all your alignment features and then doing the alignment. What if after you creating or hit your level surface. you are rotating some holes on that surface. If you haven't leveled where is the measurment coming from?? The MCS?


    I do it this way, and I never have problems with THEOS changing on me. I used to do it where I would have 2 MANUAL ALIGN, 1- Level, Z-orgin, 2- XY , then 2 DCC ALIGN (the same), and I would have many problems. I read it somewhere on the forum that its a better to have 1 ALIGN, and 1 DCC ALIGN, and so I do it that way now.

    I am not saying its wrong how he did it, But personally I would not recommend.
Reply
  • Wolman there is nothing wrong with aligning the features that are use in alignments once you have created the feature. In all the training I've done and what I've heard from other programmers this is the better way to do it. You could run into problems creating all your alignment features and then doing the alignment. What if after you creating or hit your level surface. you are rotating some holes on that surface. If you haven't leveled where is the measurment coming from?? The MCS?


    I do it this way, and I never have problems with THEOS changing on me. I used to do it where I would have 2 MANUAL ALIGN, 1- Level, Z-orgin, 2- XY , then 2 DCC ALIGN (the same), and I would have many problems. I read it somewhere on the forum that its a better to have 1 ALIGN, and 1 DCC ALIGN, and so I do it that way now.

    I am not saying its wrong how he did it, But personally I would not recommend.
Children
No Data