hexagon logo

Rotating B inside a loop command

Question
I have a cylinder with 6 holes on the side, I program 1 hole and create a loop to do the other 5. My cmm head (Renishaw PH10M) starts at A90B-90. My cylinder is in the Z axis direction, I am working on some code to set the B rotation with a variable but no success can use some help if anyone knows of a way to solve this. Your help is greatly appreciated.
Thank you,
Bob
  • To be clear, do you want the variable to affect the B axis rotation of the Renishaw head?

    That is a parameter of the tip qualification. The name of the tip "A90B-90" is merely a name that is chosen by the software to describe the orientation of that calibrated tip, it is not an editable command telling the head to rotate by a set number of degrees. During program execution the software comes across a TIP/ command, reads the name of the tip, looks up in the Probe file what angles that tip is, and rotates the head.

    Just to be sure, I tried this just now.
                ASSIGN/VANG=97.5
                TIP/[COLOR="Red"]T1A60BVANG[/COLOR], SHANKIJK=-0.866, 0, 0.5, ANGLE=90
    


    So it doesn not work. A TIP command must be followed by the name of a claibrated tip, or it turns red meaning that line of code is invalid.


    In other softwares you must choose the name of each tip, some people make them all crazy but that's another story.


    ~~~~~~~~~~~~~~~`

    EDIT:
    I would go ahead and program all 6 holes individually.
  • Thanks for the help really appreciate it, nice code can we do a additional eddeting on the code and ad a say +30 on the ASSIGN/VANG=(97.5+30) Im new to advanced programming and I know that we need to reverse angles to negative side after 180 deg. So if we use this inside a loop command it would send B to the next logical angle, what do you think?
    Appreciate your help, thanks.
  • Thanks for the help really appreciate it, nice code can we do a additional eddeting on the code and ad a say +30 on the ASSIGN/VANG=(97.5+30) Im new to advanced programming and I know that we need to reverse angles to negative side after 180 deg. So if we use this inside a loop command it would send B to the next logical angle, what do you think?
    Appreciate your help, thanks.



    Um, please read my entire 1st reply more closely. The code I posted is to demonstrate that it does not work.

    See the red? If you have red code in your program, PC-DMIS is telling you that the line of code will not function.

    As far as I know, and of course I could be wrong, what you are asking for is impossible.

    Sorry.

    I recommend programming each of the six holes individually, and between them programming in move points and probe tip changes.

    Looping is a way of saving time so you don't have to program the same thing over again many times.

    If this were 66 holes, the programming time savings of looping would be worth it - but you can do 6.

    You do have the needed probe angles already calibrated, right?

    - Josh
  • try looping this:

    ASSIGN/VANG=0
    ASSIGN/TIPSTR="T1A60B"+VANG
    TIP/TIPSTR, SHANKIJK=-0.866, 0, 0.5, ANGLE=90
    ASSIGN/VANG=VANG+60
  • I STAND CORRECTED!

    Thanks Slesh, I learned something new today.
  • Thanks Josh, I appreciate your help doh I miss read sorry.
    I used the 6 hole theory just to get started but in actuallyty I have parts with 12 - 40 holes it varies and programs can get really long. so if we can make this work it would save us allot of time and our company allot of money.
    do have all the tips in active list and calibrated I program offline so it is nice and only virtual crashing.
  • Thanks Slesh, I put this in and simmulated offline did not see the B axis rottate but no red in the code. do I need to actually run on the CMM? here is my code thanks for your help.

    V1 =LOOP/START, ID = YES, NUMBER = 4, START = 1, SKIP = ,
    OFFSET: XAXIS = 0, YAXIS = 0, ZAXIS = 0, ANGLE = 36
    ASSIGN/VANG = 0
    ASSIGN/TIPSTR = "T1A-90B"+VANG
    TIP/TIPSTR, SHANKIJK=-0.9511, 0.309, 0, ANGLE=-90
    ASSIGN/VANG = VANG+35
    CIR A =FEAT/CONTACT/CIRCLE,CARTESIAN,IN,LEAST_SQR
    THEO/<0,-1.4987,-1.115>,<0,-1,0>,0.125,0,360
    ACTL/<0,-1.4987,-1.115>,<0,-1,0>,0.125,0,360
    TARG/<0,-1.4987,-1.115>,<0,-1,0>
    ANGLE VEC=<1,0,0>
    DIRECTION=CCW
    SHOW ADVANCED MEASUREMENT OPTIONS=NO
    SHOW_CONTACT_PARAMETERS=YES
    NUMHITS=3,DEPTH=0.04,PITCH=0
    SAMPLE HITS=0,SPACER=0
    AVOIDANCE MOVE=BOTH,DISTANCE=0.65
    FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
    SHOWHITS=NO
    LOOP/END
  • It absolutely can be done. I'll post a snippet of successfully executed code on Monday.
  • Yessir, just go a little further and it'll work fine-


    ASSIGN/VANG=T1A60B + (Your angle here)
                TIP/VANG, SHANKIJK=-0.866, 0, 0.5, ANGLE=90




    And yes, just make sure you have all potential angles created and calibrated. If your Assign statement tells it to find a tip that is not created, you run into problems.