can I do multitasking with R-j3iB mate

  • I have a LR MATE 200iB with a R-j3iB MATE controller. Can I do a multi-tasking program? I need to run a simple xyz pneumatic actuator pick and place to get parts to where the robot can grab them. I want this to be independent, so when the robot grabs the part the pick and place will grab another part while the robot is doing its moves and operations. Thanks for the help. I was reading about semaphore, but we must not have that option. Just the basic tool handling.

  • bg logic is a utility that lets you run some programs in the background. there are restrictions to what commands you can use, no call statements no timers no jump lables and such. create your program, then navigate to the bg logic screen. MENU-SETUP-BG LOGIC. choose a program, then enable it. keep in mind that the program runs as fast as the robot can manage, so some signals change state far to fast for every application. check the above sticky for example logic.

  • hmm without the bg option, you can still make your own. you might have to open up your max tasks. go into controlled start and bump up $SCR.$MAXNUMTASK. create a program in an offline editor with the following header. (not able to modified from within the TP editor) and create a program similar to the one at the bottom. make a run statement somewhere at the start of your program to start it up.
    be sure to put a small wait statement somewhere in it, or it will lock up the robot. be very careful with jump statements, and dont use any calls.



    /PROG PROGRAM_NAME Macro
    /ATTR
    OWNER = MNEDITOR;
    COMMENT = "Comment";
    PROG_SIZE = 1429;
    CREATE = DATE 13-07-25 TIME 11:40:18;
    MODIFIED = DATE 13-07-25 TIME 11:40:18;
    FILE_NAME = ;
    VERSION = 0;
    LINE_COUNT = 46;
    MEMORY_SIZE = 1745;
    PROTECT = READ_WRITE;
    TCD: STACK_SIZE = 0,
    TASK_PRIORITY = 50,
    TIME_SLICE = 0,
    BUSY_LAMP_OFF = 0,
    ABORT_REQUEST = 0,
    PAUSE_REQUEST = 0;

    DEFAULT_GROUP = *,*,*,*,*;
    CONTROL_CODE = 00000000 00000000;
    /APPL


    AUTO_SINGULARITY_HEADER;
    ENABLE_SINGULARITY_AVOIDANCE : TRUE;
    /MN



    :F[1:BG Running]=ON;
    :R[200:100 to stop BG]=(0);
    :LBL[1:Start];
    :WAIT 0.01sec;
    : ;
    :!Put your logic here;
    : ;
    :IF R[200:100 to stop BG]=(100),JMP LBL[1];
    :F[1:BG Running]=OFF;
    :END;


    /POS
    /END






    P.S. the "above sticky" refers to the permanent post at the top of the forum about BG Logic. got some useful code there.

    Edited once, last by DuhbCakes ().

Advertising from our partners