RobotStudio event

CalcJointT & String Values

Does Anyone know how to use the "CalcJointT" where the rob target and tool data are listed in a string value? Ermm

VAR jointtarget jointpos;
VAR string pMyTopoint;
VAR string tMyTool;

jointpos := CalcJointT(pMyTopoint, tMyTool);


Comments




  • Something like this might work:
    MODULE

    Testa

    PERS robtarget pTempPers:=[[0,0,0],[1,0,0,0],[0,0,0,0],[9E9,9E9,9E9,9E9,9E9,9E9]];

    PERS tooldata tTempPers:=[FALSE,[[0,0,0],[1,0,0,0]],[0,[0,0,0],[1,0,0,0],0,0,0]];

    PROC Testar()

    VAR robtarget pTemp;

    VAR tooldata tTemp;

    VAR jointtarget jointpos;

    VAR string pMyTopoint;

    VAR string tMyTool;

    !Get value by supplying the name through a string value

    GetDataVal tMyTool, tTemp;

    GetDataVal pMyTopoint, pTemp;

       

    !CalcJointT needs persistent data

    tTempPers := tTemp;

    pTempPers := pTemp;

    jointpos := CalcJointT(pTempPers,tTempPers);

    ENDPROC


    ENDMODULE

    AlexK2013-01-08 16:19:06
    Best regards
    Alexander Källberg