hexagon logo

* * * Need Code Help * * *

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. I am using the CMM (version 3.7 MR2) to measure plug gauges for parts that will be shipped to the customer. The plug gauges are anywhere from 3 inches to 6 inches in diameter and usually about a 1/2 inch in height. They are mounted on rectangular plates (one Go Plug/one NoGo Plug) on each one. There are approximately 30 of these fixtures. I would like to be able to create just one program that I could use to measure all the fixtures at calibration time. I'm not sure how to set the program up for input of the size plug that I will be measuring. Example Prompt: "What size diameter is the Go Plug?". I would like to be able to plug this information in and have it routed to the Go Plug Diameter portion of the program. The same would apply for the next prompt "What size diameter is the NoGo Plug?". And so on. Any help would be greatly appreciated. I usually follow code better than explanation.
Thanks,
R. Edmonds Slight smile
  • 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. I am using the CMM (version 3.7 MR2) to measure plug gauges for parts that will be shipped to the customer. The plug gauges are anywhere from 3 inches to 6 inches in diameter and usually about a 1/2 inch in height. They are mounted on rectangular plates (one Go Plug/one NoGo Plug) on each one. There are approximately 30 of these fixtures. I would like to be able to create just one program that I could use to measure all the fixtures at calibration time. I'm not sure how to set the program up for input of the size plug that I will be measuring. Example Prompt: "What size diameter is the Go Plug?". I would like to be able to plug this information in and have it routed to the Go Plug Diameter portion of the program. The same would apply for the next prompt "What size diameter is the NoGo Plug?". And so on. Any help would be greatly appreciated. I usually follow code better than explanation.
    Thanks,
    R. Edmonds Slight smile

    Use the INPUT comment command, this allows you to enter the value, use the value in the feature code.
    C1         =COMMENT/INPUT,NO,'what size gage?'
    P001       =AUTO/CIRCLE,SHOWALLPARAMS = YES,SHOWHITS = NO
                THEO/0,0,0,0.1769992,-0.9539957,-0.2419989,C1.INPUT,0
                ACTL/0,0,0,0.1769992,-0.9539957,-0.2419989,101,0
                TARG/0,0,0,0.1769992,-0.9539957,-0.2419989
                THEO_THICKNESS = 0,RECT,OUT,CIRCULAR,LEAST_SQR,ONERROR = NO,$
                AUTO MOVE = BOTH,DISTANCE = 35,RMEAS = None,None,None,$
                READ POS = NO,FIND HOLE = NO,REMEASURE = NO,$
                NUMHITS = 4,INIT = 0,PERM = 0,SPACER = 3,PITCH = 0,$
                START ANG = 0,END ANG = 180,DEPTH = 0.35,$
                ANGLE VEC = -0.8071466,0,-0.590351
    


    While you do NOT see it, the value I input for the comment was 101 and you can see it in the actual line of the circle feature.
  • * * * Thanks * * *

    Thanks Matthew.

    One more quick question. If I have a program for multiple size ring gauges and I want to create one program for them all, can I have the results from one feature transferred to another? Example: In the process of locating the ring gauge on the CMM for Alignment using a manual Plane and Circle, can I use the diameter results of the manual circle to place into the auto circle size? Once I create the alignment, the CMM would know what size to measure the ring in Auto Mode.

    Again, thanks.

    R. EdmondsSlight smile
  • ASSIGN/MANDIAMETER = MANCIRCLE.D AND THEN

    THEO/0,0,0,0.1769992,-0.9539957,-0.2419989,MANDIAMETER,0

    tk
  • Or...

    THEO/0,0,0,0.1769992,-0.9539957,-0.2419989,[COLOR="Red"]MANCIRCLE.D[/COLOR],0


    ...even.
  • Or...

    THEO/0,0,0,0.1769992,-0.9539957,-0.2419989,[COLOR="Red"]MANDIAMETER.D[/COLOR],0


    ...even.


    Well actually in this example I guess it would be MANCIRCLE.D but yes your example is more direct. I don't remember exactly why but I do remember these changing during edits and the assignment prevented that.

    In any case, Rodney, pay heed to vpt.se's advice, I've never found him / her to be wrong.

    Good luck,

    TK
  • Of course you are right, tking.

    Edited my post to reflect the correct syntax.

    Thanks for the heads-up!