RobotStudio event

Changing robtarget during program execution

I am trying to avoid robtarget configuration errors (50080) during program execution using multiple work objects with a similar position.

For instance, I have multiple work objects radially oriented around the robot in different axis 1 configurations (-1,0,1, etc.).  In each one of these work objects I want to have the TCP touch the origin with no rotation; so I define a single robtarget to use in the different workobjects (p1).

Such as:
[code]CONST robtarget p1:=[[0,0,0],[1,0,0,0],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
.
.
.
MoveL p1, vmax, z10, tGripperWObj:=WorkObject1;
MoveL p1, vmax, z10, tGripperWObj:=WorkObject2;
MoveL p1, vmax, z10, tGripperWObj:=WorkObject3;[/code]

Will doing multiple moves like above result in 50080 errors?  Or is there a more efficient way to avoid configuration errors when using the same position in multiple locations?

Could I change the robtarget configuration component on the fly?  Such as:

[code]p1.conf.cf1:=*

!// * being -1,0,1 et cetera[/code]


Comments


  • I figured out my answer.

    If there is a move which is offset from a work object position, or any position for that matter, and goes past the +/- 45 degrees for a particular configuration the following instruction can be used:
    [code]!// when trying to change a robtarget on the fly it must be declared as persistent
    PERS robtarget p1:=[[x,y,z],[q1,q2,q3,q4],[cf1,cf4,cf6,cfx],[eax_a,eax_b,eax_c,eax_d,eax_e,eax_f]]
    ...
    p1.robconf:=[1,0,1,0];
    !// robconf represents the [cf1,cf4,cf6,cfx] of the robtarget [/code]
    During program execution I had one offset position which went past the +/- 45 degrees of the configuration for axis 4.  Because I knew what position failed during execution I could put logic in place which could change the robconf datatype to avoid the error.  The error could also be avoided by using MoveJ offs() instead, however, if the situation arises where this isn't possible, changing the robconf is the next best thing.

    There is one caveat though, on the teach pendant the instruction shows as: [code]p1.robconf:=*;[/code] And to my knowledge cannot be modified from the teach pendant.



    USLuser12012-05-24 13:34:54
  • Jorge
    Jorge ✭✭

    I think you can do it

    P1.RobConf.Cf1 := 1;

    Or
    (...)
    CONST MyConfData := [1,0,1,0];
    (...)
    P1.RobConf := MyConfData;

    Beware, the P1 Robtarget must be declared as Var o Pers, Const doesn't allow assignment;

    /Jorge




    Jorge Turiel

  • Jorge
    Jorge ✭✭

    [QUOTE=USLuser1

    During program execution I had one offset position which went past the +/- 45 degrees of the configuration for axis 4.  Because I knew what position failed during execution I could put logic in place which could change the robconf datatype to avoid the error.  The error could also be avoided by using MoveJ offs() instead, however, if the situation arises where this isn't possible, changing the robconf is the next best thing.


    [/QUOTE]

    Other Option, and a little bit dangueros, is use ConfL instrucciA3n in your program to disable the configuration of the axis. See you Rapid manual, for more info.

    /jorge
    Jorge Turiel


  • [QUOTE=Jorge]

    Other Option, and a little bit dangueros, is use ConfL instrucciA3n in your program to disable the configuration of the axis. See you Rapid manual, for more info.

    /jorge
    [/QUOTE]

    I did try using 'ConfLOff;' to allow the robot to find the next closest configuration, but during program execution the axis did not behave as intended.  Re-defining the 'robconf' data during program execution allows the configuration to be accurately controlled.