Looking for some code...

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

  • Looking for some code...

    Looking for some code. I'm trying to come up with a program to calibrate ring gages. Got everything I need but I would like to have the operator input the class and have the correct tolerances input into the report. Tech support helped, but I was not able to get right at it at the time and I seem to have forgotten most of it.

    Thanks in advance.

    John

  • #2
    This may be a little cumbersom, but you could use an input comment along with the Select/End Select and Case/Case End flow control commands
    Kevin

    Comment


    • #3
      John,

      I have a program that will measure any size ring gage. We wrote it during our CAD++ training class. It requires some knowlege of variables but it works great. Sorry it took me so long to answer, this is my 1st time on the board. If you will send me your email address I will get back w/ you in a couple of days. I need to look for the program to email to you.

      [email protected]

      Dale
      Last edited by TRD_racing; 03-03-2006, 01:49 PM.
      PCDmis 3.5mr2 CAD++

      Comment


      • #4
        Here is some code I have for measuring different sizes of a "tooling ball holding key", you enter the width of the key, it does the rest. You would need to put the variables in different places and different features, but it should help you get the idea:
        C1 =COMMENT/INPUT,What size key, please, in METRIC
        ASSIGN/V1 = C1.INPUT
        ASSIGN/V2 = V1/2
        ASSIGN/V3 = V2+3

        AA1 =AUTO/VECTOR POINT, SHOWALLPARAMS=YES
        THEO/0,0-V3,-15.7,1,0,0
        ACTL/0,-8,-15.7,1,0,0
        TARG/0,0-V3,-15.7,1,0,0
        THEO_THICKNESS = 0, RECT, SNAP = YES ,$
        AUTO MOVE = NO, DISTANCE = 5


        KEY01 =AUTO/VECTOR POINT, SHOWALLPARAMS=YES
        THEO/2.5,0-V2,-15.7,0,-1,0
        ACTL/2.5,-5,-15.7,0,-1,0
        TARG/2.5,0-V2,-15.7,0,-1,0
        THEO_THICKNESS = 0, RECT, SNAP = YES ,$
        AUTO MOVE = NO, DISTANCE = 5


        I have heard that if you don't include the math operation in some versions it will give you incorrect nominals.
        sigpic
        Originally posted by AndersI
        I've got one from September 2006 (bug ticket) which has finally been fixed in 2013.

        Comment


        • #5
          Ring gage code

          Here's a code I wrote to check your rings. (it will work with pins also with the ID switched to OD) It assumes you have CAD++. (I'm sure you can make something similar work if you don't have auto features) It also assumes the ring will be relatively close to the same x,y and z each time you put a new ring down. (I'd do a manual on the 1st ring, then just put all the rest close to the same place, the initial prehit is very large to accomodate for different ring thicknesses and not placing it on zero. The program will automatically find then level the part regardless of dia., then enter the correct tolerance according to class. I only used x, y and z tolerances and only went to rings up to 2.51 dia, but you should be able to fill in the rest now that you have an example and by using the same code logic. You can also add more levels or use math functions to convert english to metric


          PREHIT/ 0.5
          RETRACT/ 0.5
          MODE/DCC
          C1 =COMMENT/INPUT,Enter diameter
          ASSIGN/DIA = C1.INPUT
          ASSIGN/RAD = C1.INPUT/2
          RING_LOC =AUTO/CIRCLE, SHOWALLPARAMS=YES, SHOWHITS=NO
          THEO/0,0,0,0,0,1,DIA
          ACTL/0,0,0,0,0,1,2.5
          TARG/0,0,0,0,0,1
          THEO_THICKNESS = 0, RECT, IN, CIRCULAR, LEAST_SQR, ONERROR =
          AUTO MOVE = NO, DISTANCE = 1, RMEAS = None, READ POS = NO, FIND HOLE = NO, REMEASURE = NO ,$
          NUMHITS = 3, INIT = 0, PERM = 0, SPACER = 0, PITCH = 0 ,$
          START ANG = 0, END ANG = 360, DEPTH = 0.25 ,$
          ANGLE VEC = 1,0,0
          A2 =ALIGNMENT/START,RECALL:A1, LIST= YES
          ALIGNMENT/TRANS,XAXIS,RING_LOC
          ALIGNMENT/TRANS,YAXIS,RING_LOC
          ALIGNMENT/END
          PNT1 =AUTO/VECTOR POINT, SHOWALLPARAMS=YES
          THEO/RAD+.05,0,0,0,0,1
          ACTL/1.3,0,0,0,0,1
          TARG/RAD+.05,0,0,0,0,1
          THEO_THICKNESS = 0, RECT, SNAP = YES ,$
          AUTO MOVE = NO, DISTANCE = 1
          PNT2 =AUTO/VECTOR POINT, SHOWALLPARAMS=YES
          THEO/-RAD-.05,0,0,0,0,1
          ACTL/-1.3,0,0,0,0,1
          TARG/-RAD-.05,0,0,0,0,1
          THEO_THICKNESS = 0, RECT, SNAP = YES ,$
          AUTO MOVE = NO, DISTANCE = 1
          PNT3 =AUTO/VECTOR POINT, SHOWALLPARAMS=YES
          THEO/0,RAD+.05,0,0,0,1
          ACTL/0,1.3,0,0,0,1
          TARG/0,RAD+.05,0,0,0,1
          THEO_THICKNESS = 0, RECT, SNAP = YES ,$
          AUTO MOVE = NO, DISTANCE = 1
          PLN2 =FEAT/PLANE,RECT
          THEO/0.03333,0.18333,0,0,0,1
          ACTL/0,0.43333,0,0,0,1
          CONSTR/PLANE,BF,PNT1,PNT2,PNT3,,
          A3 =ALIGNMENT/START,RECALL:A2, LIST= YES
          ALIGNMENT/LEVEL,ZPLUS,PLN2
          ALIGNMENT/TRANS,ZAXIS,PLN2
          ALIGNMENT/END
          C2 =COMMENT/INPUT,Enter Tolerance
          ,1=X
          ,2=Y
          ,3=Z
          IF/C1.INPUT<=.825
          GOTO/SIZE1
          END_IF/
          IF/C1.INPUT<=1.51
          GOTO/SIZE2
          END_IF/
          IF/C1.INPUT<=2.51
          GOTO/SIZE3
          END_IF/
          SIZE1 =LABEL/
          IF/C2.INPUT==1
          ASSIGN/T = .00004
          END_IF/
          IF/C2.INPUT==2
          ASSIGN/T = .00007
          END_IF/
          IF/C2.INPUT==3
          ASSIGN/T = .0001
          END_IF/
          GOTO/SIZEFINAL
          SIZE2 =LABEL/
          IF/C2.INPUT==1
          ASSIGN/T = .00006
          END_IF/
          IF/C2.INPUT==2
          ASSIGN/T = .00009
          END_IF/
          IF/C2.INPUT==3
          ASSIGN/T = .00012
          END_IF/
          GOTO/SIZEFINAL
          SIZE3 =LABEL/
          IF/C2.INPUT==1
          ASSIGN/T = .00008
          END_IF/
          IF/C2.INPUT==2
          ASSIGN/T = .00012
          END_IF/
          IF/C2.INPUT==3
          ASSIGN/T = .00016
          END_IF/
          GOTO/SIZEFINAL
          SIZEFINAL =LABEL/
          PREHIT/ 0.05
          RETRACT/ 0.05
          RING =AUTO/CIRCLE, SHOWALLPARAMS=YES, SHOWHITS=NO
          THEO/0,0,0,0,0,1,DIA
          ACTL/0,0,0,0,0,1,2.5
          TARG/0,0,0,0,0,1
          THEO_THICKNESS = 0, RECT, IN, CIRCULAR, LEAST_SQR, ONERROR = NO ,$
          AUTO MOVE = NO, DISTANCE = 1, RMEAS = None, READ POS = NO, FIND HOLE = NO, REMEASURE = NO ,$
          NUMHITS = 25, INIT = 0, PERM = 0, SPACER = 0, PITCH = 0 ,$
          START ANG = 0, END ANG = 360, DEPTH = 0.25 ,$
          ANGLE VEC = 1,0,0
          DIM LOC1= LOCATION OF CIRCLE RING UNITS=IN ,$
          GRAPH=OFF TEXT=OFF MULT=1.00 OUTPUT=BOTH
          AX MEAS NOMINAL +TOL -TOL DEV OUTTOL
          D 2.50000 DIA T T 0.00000 0.00000 -#--
          END OF DIMENSION LOC1

          Good luck, hope it helps, let me know if you need further help. Some people post more questions to your questions than answers. It never ceases to amaze me how smart they want us to think they are and how unable others are when all most people need is a place to start and an example. I'm sure you can figure more out from this such as depths etc. If not, post again and maybe some will add something besides a question. If not, I will.

          Comment


          • #6
            Are you saying you calibrate your setting rings on your CMM ??

            What accuracy do you expect to get?

            I use my setting rings to validate the CMM, not the other way round.

            Comment


            • #7
              Originally posted by Vertman View Post
              Are you saying you calibrate your setting rings on your CMM ??

              What accuracy do you expect to get?

              I use my setting rings to validate the CMM, not the other way round.
              At the time I was using a B&S PMC 1000. Most accurate machine out there. I was capable to .000008 inches. Man I miss that machine..

              We weren't really calibrating them, we were just double checking our lab that did the calibrating for us.

              Comment


              • #8
                Originally posted by John Kugler View Post
                At the time I was using a B&S PMC 1000. Most accurate machine out there. I was capable to .000008 inches. Man I miss that machine..

                We weren't really calibrating them, we were just double checking our lab that did the calibrating for us.

                Is that a contact cmm??

                Thats two tenths of a micron.............

                Comment


                • #9
                  Originally posted by Vertman View Post
                  Is that a contact cmm??

                  Thats two tenths of a micron.............
                  Yeah, it was really a Leitz machine, B&S bought them out and slapped a B&S sticker on the Leitz machines.

                  Machine is also different than anything else. Different head, probes, etc.
                  Had continuous scan capability, and ran Quindos, and PC-DMIS. Great for gears, worms, etc. Machine had it's own climate-controlled room, I could tell when too many people were too close to the machine...

                  Comment

                  Related Topics

                  Collapse

                  • AuRules
                    Numeric sort
                    by AuRules
                    What's up fellows & beer drinkers and let's not forget the wino's.

                    How do you do a numeric sort of points

                    Example:...
                    05-31-2007, 02:19 PM
                  • AuRules
                    Array
                    by AuRules
                    I have a part that has a .250 radius around the outside edge. I'm taking 9 points and then using a array to sort for the lowest point and I'm doing this...
                    09-18-2009, 08:06 AM
                  • blackwater
                    Loading Report
                    by blackwater
                    I am inserting a bunch of assignments. When I insert "V1" for example it takes forever loading report.

                    Can I turn this off?
                    06-04-2009, 10:23 AM
                  • Bob Fairbrother
                    Assignment Problems
                    by Bob Fairbrother
                    Why is it when I try to use assignments I always end up with problems?

                    At the moment I am trying to construct a circle from 3 points which...
                    12-16-2008, 06:25 AM
                  • Rodney Edmonds
                    * * * Need Code Help * * *
                    by Rodney Edmonds
                    I have been away from PC-DMIS for a short while and thought I would jump in here and see if I could get a little help with some code. Here's my situation....
                    02-16-2010, 10:01 AM
                  Working...
                  X