1. Home
    1. Dashboard
    2. Search
  2. Forum
    1. Unresolved Threads
    2. Members
      1. Recent Activities
      2. Users Online
      3. Team Members
      4. Search Members
      5. Trophys
  3. Articles
  4. Blog
  5. Videos
  6. Jobs
  7. Shop
    1. Orders
  • Login or register
  • Search
Everywhere
  • Everywhere
  • Articles
  • Pages
  • Forum
  • Blog Articles
  • Products
  • More Options
  1. Robotforum - Support and discussion community for industrial robots and cobots
  2. Members
  3. almusaib

Posts by almusaib

  • Where to Access "Routine Depth" shown in PRGSTATE.DG

    • almusaib
    • October 9, 2023 at 4:07 AM

    I found another method to achieve the final goal by checking if an argument is given when a program is called. This way if the program is run directly, no argument will be provided (routine depth=0). However, if the program is called from another program then an arbitrary argument can be provided to indicate a subcall (routine depth > 0).

    Here is the argument checker program in Karel.

    Code
    PROGRAM argexists
    %NOBUSYLAMP
    %COMMENT = 'args checker'
    
    %NOLOCKGROUP
    %NOPAUSE = COMMAND + TPENABLE + ERROR
    
    %include display.klt
    %include registers.klt
    
    CONST
        ARG_FALG_NO = 74
        ARG_DOES_NOT_EXIST = 17042
    
    VAR
        str_value     : STRING[16]    
        real_value    : REAL    
        param_no      : INTEGER
        data_type     : INTEGER
        int_value     : INTEGER
        status        : INTEGER
    
    %include strings.klh
    %include registers.klh
    
    BEGIN
        -- check if arg exists in a program call
        param_no = 1
        data_type = 0
        int_value = 0
        real_value = 0.0
        str_value = ''
        status = 0
    
        GET_TPE_PRM(param_no, data_type, int_value, real_value, str_value, status)
        -- WRITE TPDISPLAY(str_parse('status: ' + i_to_s(status), MAX_DISPLAY_LENGTH), CR)
        
        IF status = ARG_DOES_NOT_EXIST THEN
            registers__set_io(io_flag, ARG_FALG_NO, FALSE)
        ELSE
            IF status = 0 THEN
                registers__set_io(io_flag, ARG_FALG_NO, TRUE)
            ENDIF
        ENDIF
    END argexists
    Display More

    This can be used as follows:

    Code
    /PROG TST
    /ATTR
    COMMENT = "XXX Rev A";
    TCD:  STACK_SIZE    = 0,
          TASK_PRIORITY    = 50,
          TIME_SLICE    = 0,
          BUSY_LAMP_OFF    = 0,
          ABORT_REQUEST    = 0,
          PAUSE_REQUEST    = 0;
    DEFAULT_GROUP = *,*,*,*,*;
    /APPL
    /MN
     : ! check call depth ;
     : CALL ARGEXISTS(AR[1]) ;
     : IF (!F[74:arg_exists]) THEN ;
     : R[64:tsk_label]=999 ;
     : ENDIF ;
     : JMP LBL[R[64]] ;
    Display More
  • Where to Access "Routine Depth" shown in PRGSTATE.DG

    • almusaib
    • October 8, 2023 at 8:16 PM

    Hi all,

    Where can I find or access the "Routine Depth" of a program on a current task that is shown in "robot_IP/MD/PRGSTATE.DG" from KAREL, TP, or system variable?

    This will help me to know if the current program that the robot is executing is the main program or is called from another program.

    Any help is much appreciated.

  • Dynamic/COORD Frame is not updating with a CNT motion.

    • almusaib
    • August 14, 2023 at 9:35 PM

    Here are videos explaining the issue:

    With Dynamic Frame Fine motion option:

    ScG7M.gif


    With Dynamic Frame CNT motion option:

    ScG7s.gif

  • Dynamic/COORD Frame is not updating with a CNT motion.

    • almusaib
    • August 13, 2023 at 5:08 PM

    Hi all,

    I have a fanuc workcell with two groups a robot (follower) and a rotary table (leader). I have noticed an issue with the dynamic frame that is not updating when moving through multiple points with a CNT motion option. However, It is working fine with the FINE motion. This is happing in both RoboGuide and the actual controller (using both LPOS, and POS screen). If anyone has any ideas or suggestions to try, I would really appreciate it.

    Thank you

Advertising from our partners

IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Advertise in Robotics
Advertise in Robotics
  1. Privacy Policy
  2. Legal Notice
Powered by WoltLab Suite™
As a registered Member:
* You will see no Google advertising
* You can translate posts into your local language
* You can ask questions or help the community with your knowledge
* You can thank the authors for their help
* You can receive notifications of replies or new topics on request
* We do not sell your data - we promise

JOIN OUR GREAT ROBOTICS COMMUNITY.
Don’t have an account yet? Register yourself now and be a part of our community!
Register Yourself Lost Password
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on Google Play
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on the App Store
Download