RobotStudio event

CalcJointT without axis configuration?


Hello,

I'm wondering if anyone has an idea for how to use CalcJointT, but with an input RobTarget that doesn't have a solved axis-config? (During the program execution we switch off the axis config using ConfL\Off and ConfJ\Off). 

The reason for this is that I would like to do a reach-ability check for a toolpath before starting the actual motion. This requires iterating through several thousand robtargets, using CalcJointT to raise an error if the target is unreachable. 

I guess it is possible to iterate through all of the potential configurations until CalcJointT doesn't return an error, but since this requires several hundred iterations for each target (of which there are thousands in a single toolpath), it's not realistic to compute this every time we run the program due to time constraints. 

!*********************************************************************************************************************
! check whether a specific target is able to be reached - returns error and updates counter if unreachable
!*********************************************************************************************************************

PROC check_target_reachable( robtarget target, PERS tooldata used_tool, PERS wobjdata wobj)
     
    check_j_target := CalcJointT(target, used_tool\WObj:= wobj); 
    
    ERROR
        incr nr_of_unreachable_targets; 
        TEST ERRNO
        CASE ERR_ROBLIMIT:
            TPWrite "Target within envelope, but one or more axis is out of range";
            iterate_config target; 
        CASE ERR_OUTSIDE_REACH:
            TPWrite "The position is outside the robot's working range.";
        CASE ERR_WOBJ_MOVING: 
            TPWrite "The mechanical unit isn't standing still at execution";
        DEFAULT: 
            TPWrite "Unreachable Target - unspecified reason";
        ENDTEST
        TPWrite "Error Target {" + NumToStr(nr_of_unreachable_targets,0) + "} : " + NumToStr(target.trans.x,2) +", " + NumToStr(target.trans.y,2) + ", "+ NumToStr(target.trans.z,2);
    TRYNEXT;
ENDPROC  

Comments