changing a program tool and base number

  • hello every one,
    I'm working with a KR20 and a KRC4 (KSS 8.3.39)and i have generated a .src program with Rhinorobot program for machining and which i have sent with the robot program to try it. My problem now that i have created a cinematic and a tool that i want to use in this program but the problem is that when i start this program the robot assigned automatically the tool[1] and the nullframe base to this program or it's not what i want. so here is my question: how can i change the tool and the base number of this program so when i run it, it doesn't change and keep the parameters that i want to. Because all my points are invalid with this tool and frame and i have to use what i measured for the tool and the base at the same time. I tried to write $base = base_tool[30 ], $tool = tool_data[16 ] but when i run the program, the submit doesn't take it and use the first tool and the nulframe base which i didn't configured. thnk u guys.

    Edited once, last by bigboss ().

  • $base = Base_data[] and $tool = tool_data[] should work unless at a later point in your program it is set back to base and tool 1.
    As a second option you could always put your values base 30 en tool 16 into tool and base 1. But i recommend if you have the time to search through your code to find other base declarations.

    Every problem has a solution, that isn't the problem. The problem is the solution.

  • the first problem is that i put my tool 16 in tool 1 but when i tried to do the same with my base i discovered that the program uses the nullframe (base 0) which normally we can't modify because it's predetermines by KUKA. and the second probelm is that i don't have a .dat file because the rhinorobot program generates only the .src file with points such LIN(X: 233, Y:343, Z:435, A .........) so i cant find how to define my proper base.

  • oke, but somewhere in your src file a base and tool is/should be defined. i am not familiar with rhino so i cannot comment on that but do you have any options there to set your base? when you added $base = base_data[30] and $tool = tool_data[16] where in your program did you do that?


    In your code it should look something like this:

    Code
    $tool = tool_data[16]
    $load = load_data[16]
    $base = base_data[30]
    
    
    LIN{x ..,y ..}

    Every problem has a solution, that isn't the problem. The problem is the solution.

  • you're right! i have this but i wrote $base = base_data [30] and $tool = tool_data [16] in the program and once in run the .src file it didn't take it as values. it take the tool 1 and the nullframe base.

  • If your program relies on using $BASE=BASE_DATA[ ] and/or $TOOL=TOOL_DATA[ ] , you have to populate the BASE_DATA and TOOL_DATA arrays with XYZABC values that match what your Rhino simulation assumes the robot configuration to be. By default, these arrays are populated with 0s. They are permanent parts of the system $CONFIG.DAT file, but can be written from a program.


    OTOH, if your Rhino SRC output simply assigns $BASE and $TOOL directly, like ={X 111.1, Y 222.2, etc, then the arrays are not in play and can be ignored.

  • So, your program is using TOOL_DATA[16] and BASE_DATA[30].


    The key is to ensure that the contents of those two global variables match whatever your Simulation is set up for.


    So, I don't know Rhino, but in any robot simulation software, it is necessary to set up a Base and Tool that need to match the physical setup of your hardware. And in order for any program output from the simulation to work in the real-world robot, the robot's Base and Tool config must match the simulation config.


    So, it's going to be necessary to locate the Tool and Base information that Rhino is using for this simulation, and copy that data into TOOL_DATA[16] and BASE_DATA[30]. Or, alternatively, replace your current $TOOL= and $BASE= lines with the raw Tool and Base data your Rhino simulation is using:

    Code
    $TOOL = { X 111.1, Y 222.2,Z 333.3,A 0.1,B 0.2,C 0.3}
    $BASE = {X 1000,Y 500,Z 200,A 1.0.B 2.0,C 3.0}


    But those numbers would have to be replaced with what your Rhino configuration is using, of course.


    Hm... just to be safe, you should also check the sizes of the arrays in $CONFIG.DAT. TOOL_DATA should be 16 or more by default, but it's possible that BASE_DATA might be limited to 16.

Advertising from our partners