Forum Migration Notice
Update (2026-01-21): The user forums are now in read-only mode pending the data migration.

Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.

We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.

Position validation

I have a need to calculate potential positions offline and then validate them once I get online.

What is the best way to check if a given Cartesian position is reachable once connected to a live robot?


zev

Comments

  • Hi,
     

    I have made following RAPID function for that

     

     FUNC bool IsReachable(robtarget pReach, PERS tooldata ToolReach, PERS wobjdata WobjReach)
      VAR bool bReachable;
      VAR jointtarget jntReach;
      
      bReachable := TRUE;
      
      jntReach := CalcJointT(pReach, ToolReachWobj:=WobjReach);
      
      RETURN bReachable;
      
     ERROR
      IF ERRNO = ERR_ROBLIMIT THEN
       bReachable := FALSE;
       TRYNEXT;
      ENDIF
     ENDFUNC

    Regards,

    Mika
  • Thank you for the code.

    zev
  • hey,

    I am trying to use  the similar code
    but my program goes to the error routine but it does return to the end of the procedure,
    but i have specified TRYNEXT;

    Any suggestions