Define TOOL and BASE in KRL

  • Hello,

    I created a program in my robot to move it to the coordinates and orientation sent to it through EthernetKRL with the option to define BASE, TOOL and other parameters of the movement. I have also created a script in C# in my PC to send the commands to the robot and I am able to make it move to the specified coordinates and orientation.

    The problem I am having is that I cannot define the new TOOL and BASE to use when a movement command is sent, so all movements are made relative to the default $WORLD coordiante system and with the default TCP.

    I don't want define each tool and base beforehand in the SmartPAD and just change the $ACT_BASE and $ACT_TOOL numbers because this would take away some of the flexibility of the program, so I'm looking to do it in the KRL program itself. Can anyone help me with this?

    Here is my code:



    Communication confguration XML:

    I am using a KR3 R540 robot with the KRC4 compact controller running KSS V8.3.37

    Sorry for the long post and thank you!!


  • Place your Ad here!
  • So, where in your code are you setting $TOOL and $BASE? That BAS (#INITMOV,0 ) sets them both to $NULLFRAME (all 0s). You need to either pre-define your Tools and Bases in $CONFIG.DAT (or just by using the pendant menus) and use $TOOL=TOOL_DATA[ x ], $BASE=BASE_DATA[ x ], or you need to use your incoming XYZABC values to fill a FRAME variable and set $TOOL and/or $BASE equal to it.

    So, you either need to add an option switch to your EKI and run the EKI data transaction 3 times (once for location, once for Tool, once for Base), then apply all of those, or you need to expand your EKI to pull in three FRAMEs' worth of XYZABC values in parallel.

  • lines 117 and 121 can assign user frames to tool and base but...

    user frames are set as nullframes in lines 36 and 37 and they never get modified.

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • Hello SkyeFire and panic mode,

    user frames are set as nullframes in lines 36 and 37 and they never get modified.

    They are modified by the functions in lines 76 and 80, where it receives the FRAME data types from the Ethernet connection.

    Maybe that isn't working for some reason. This is an example of the data I'm sending as base and tool frames:

    <TCP>{X -13.0, Y -69.0, Z 38.0, A 0.0, B 0.0, C 90.0}</TCP>
    <Base>{X 0.0, Y -404.0, Z 12.0, A 0.0, B 0.0, C 0.0}</Base>

    Is there something wrong with this?

  • I think I've figured out why it doesn't work, the robot is not receiving the base and tool frames through the Ethernet interface so the flags 18 and 19 never get set and the $TOOL and $BASE are never modified.

    I still have to understand why this fails but it helps to know that the $TOOL and $BASE assignments are correct.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now

Advertising from our partners