How to activate tool


I have multiple tools (tooldata) in my project. I wonder how can I activate specific tool? If I use move command with appropriate tool, then this tool will be current tool (checked that with CTool). But for example when I restart the controller, it boot up with incorrect tooldata, so the world zones don't work properly (they using incorrect TCP). Thanks


  • lemster68lemster68 United States ✭✭✭
    Lee Justice
  • PetrBPetrB Czech
    Thanks. Now when I change the tool with SetsysData, while robot is not moving, world zone keep using old tool data and doesn't reflect new TCP set with SetsysData. I have to move with robot to get the world zone to use new tool data.

    This is what I'm trying to achieve. When IRC5 is restarted, I have world zone over the work piece, so robot knows it can move straight to home without breaking anything. It's very important to have correct tool set up (I'm using DI from PLC to detect tool attached), because if robot uses flange TCP instead of tool TCP, while tool is attached, for World zone detection, it will damage the tool.

  • lemster68lemster68 United States ✭✭✭
    The key is to get motors on, not necessarily moving.  After reboot, watch the signal status when you turn the motor on without moving.  You should see it change state.  Also, is your world zone stationary?
    Lee Justice
  • PetrBPetrB Czech
    edited August 2020
    I found out, that controller remembers last used tool and after restart, it evaluate world zones based on this last tool. So I have to make sure, that all motion commands are using correct tool.
  • lemster68lemster68 United States ✭✭✭
    How about a start event routine?
    Lee Justice
  • PetrBPetrB Czech
    Yes, my world zone is stationary. No change with switching motors on and off.

    I tried to switch actual tool (SetsysData) then check it with CTool(), but it doesn't affect evaluation of World zones. World zones basically don't care about actual tool, set with SetsysData. They only use tool which was used for last Move or when in manual, tool used for jogging, set on pendant.

    It's same with event routine. I set up Power on routine, with SetsysData, but it behave the same as I described before.

  • PetrBPetrB Czech
    edited August 2020
    With  tool t_Connecting_Flange WZ [0,0,34.5] indication should be TRUE(DO_224), when I change tool to t_Sonotrode_8x8_185 [-398,0,109], WZ indication should be FALSE (DO_224).  As you can see, I switch the tool, but status of DO is not changing, only after I jog the robot with tool t_Sonotrode_8x8_185.

  • graemepaulingraemepaulin New Zealand ✭✭✭
    You could store the current robot position (relative to the correct tool) and then move to this same position (using the correct tool).
    Not elegant but should work? 
  • PetrBPetrB Czech
    Yep, that could work.
  • DenisFRDenisFR FRANCE ✭✭✭
    edited August 2020
    How do you use your output?
    If they are needed only to check at a moment where is your robot, you can check it with code directly with:

    IF rtCurrentPos.trans.z>100 THEN

  • PetrBPetrB Czech
    edited August 2020
    Thanks, I can do that too. I could even program my own World zone detection with using coordinates from CRobT with right tool data.

    PERS robtarget rtCurrentPos;

        PROC WorldZone()
            rtCurrentPos:=CRobT(\Tool:=t_tool1 \WObj:=wobj_World);
            IF rtCurrentPos.trans.x>0 AND rtCurrentPos.trans.x<1200 AND
               rtCurrentPos.trans.y>-1000 AND rtCurrentPos.trans.y<100 AND
               rtCurrentPos.trans.z>965 AND rtCurrentPos.trans.z<2065 THEN
                SetDO DO_275_WZ1,1;
                SetDO DO_275_WZ1,0;

  • Just wanted to add on to this thread what I've found to work in the past on my startup routine. I've found if I set the tool I'm looking for, grab the current position, do a zero move then add a small delay the world zones will update.

    I really came here to try and find a better way to pull this off but figured I'd share whats worked for me.

    PERS tooldata CurToolValue;
    VAR robtarget pCurrent;
    VAR num ToolChangeDelay:=.25;
    PROC main ()

      CurToolValue := CTool();

      IF CurToolValue <> tool0 THEN
         SetSysData tool0;
         pCurrent:=CrobT(\Tool:=tool0 \WObj:=wobj0);
         MoveJ pCurrent, v100, z10, tool0;
         WaitTime ToolChangeDelay;
Sign In or Register to comment.