How to do Multi-Robot Code Output in Device
Scheduler Programs
Scheduler program output is controlled by the Output scheduler program parameter in the processor's Controller Settings menu. If set to When Needed, a scheduler program will be output when the Robotmaster session contains multiple active robots.
ABB Scheduler Programs
A scheduler program is generated for each robot in the session, and posted programs are divided into separate folders for each robot.
RootDirectory
ββββROB1 (Task folder)
β main_ROB1.MOD (Scheduler file for robot 1)
β PROG_1_R1.MOD (Posted robot program 1 for robot 1)
β PROG_2_R1.MOD (Posted robot program 2 for robot 1)
ββββROB2 (Task folder)
β main_ROB2.MOD (Scheduler file for robot 2)
β PROG_1_R2.MOD (Posted robot program 1 for robot 2)
ββββPROG_2_R2.MOD (Posted robot program 2 for robot 2) The scheduler programs use the controller's MultiTasking feature to run multiple robot programs simultaneously. It also uses WaitSyncTask instructions to communicate between tasks and ensure robot programs execute in the same order as the Robotmaster scheduler:
Individual robot program output is not changed.
Related Articles:
FANUC Scheduler Programs
The scheduler program uses the RUN command to execute multiple robot programs simultaneously. It also uses robot flags to make sure necessary robot programs complete before continuing. These are output so the posted robot programs run in the order they appear in the Robotmaster scheduler:
: F[2:TASK DONE]=(OFF) ;
: F[3:TASK DONE]=(OFF) ;
: F[4:TASK DONE]=(OFF) ;
: RUN R2R3R4_SIM_1_M20IA_2 ;
: RUN R2R3R4_SIM_1_M20IA_3 ;
: RUN R2R3R4_SIM_1_M20IA_4 ;
: WAIT (F[2:TASK DONE]) ;
: WAIT (F[3:TASK DONE]) ;
: WAIT (F[4:TASK DONE]) ;
: WAIT 0.01 (sec) ;
: F[1:TASK DONE]=(OFF) ;
: F[2:TASK DONE]=(OFF) ;
: F[3:TASK DONE]=(OFF) ;
: F[4:TASK DONE]=(OFF) ;
: RUN R1R2R3R4_SIM_M20IA_1 ;
: RUN R1R2R3R4_SIM_M20IA_2 ;
: RUN R1R2R3R4_SIM_M20IA_3 ;
: RUN R1R2R3R4_SIM_M20IA_4 ;
: WAIT (F[1:TASK DONE]) ;
: WAIT (F[2:TASK DONE]) ;
: WAIT (F[3:TASK DONE]) ;
: WAIT (F[4:TASK DONE]) ;
: WAIT 0.01 (sec) ;
: F[1:TASK DONE]=(OFF) ;
: RUN R1_SEQ_1 ;
: WAIT (F[1:TASK DONE]) ;
: WAIT 0.01 (sec) ;Additionally, another time-based WAIT instruction is output between sets of robot program calls. This buffer is used to ensure all robots have completed their previous program before their next program is called. The time delay of the buffer can be customized with the Scheduler buffer time parameter in the processor's Controller Settings menu.
NOTE
The robot's
TASK DONEflag is also set at the very end of each robot program to signal that the robot has finished its task:F[#:TASK DONE]=(OFF) ;
Besides this, individual robot program output is not changed.
Related Articles:
KUKA Scheduler Programs
The scheduler program uses the REMOTE START inline form instruction to execute multiple robot programs simultaneously. It also uses the REMOTE WAIT inline form instruction to make sure necessary robot programs complete before continuing. These are output so the posted robot programs run in the order they appear in the Robotmaster scheduler:
DEF SCHEDULER_KUKA_MULTIROBOT_4ROB_4PROG()
REMOTE START KRB ROB_2R2R3R4_SIM_1_KR150-2_2
REMOTE START KRC ROB_3R2R3R4_SIM_1_KR150-2_3
REMOTE START KRD ROB_4R2R3R4_SIM_1_KR150-2_4
REMOTE WAIT KRB
REMOTE WAIT KRC
REMOTE WAIT KRD
REMOTE START KRB ROB_2R2R3R4_SIM_2_KR150-2_2
REMOTE START KRC ROB_3R2R3R4_SIM_2_KR150-2_3
REMOTE START KRD ROB_4R2R3R4_SIM_2_KR150-2_4
REMOTE WAIT KRB
REMOTE WAIT KRC
REMOTE WAIT KRD
REMOTE START KRA ROB_1R1R2R3R4_SIM_KR150-2_1
REMOTE START KRB ROB_2R1R2R3R4_SIM_KR150-2_2
REMOTE START KRC ROB_3R1R2R3R4_SIM_KR150-2_3
REMOTE START KRD ROB_4R1R2R3R4_SIM_KR150-2_4
REMOTE WAIT KRA
REMOTE WAIT KRB
REMOTE WAIT KRC
REMOTE WAIT KRD
ENDIndividual robot program output is unchanged except for the target template in the header being the coop wait template.
&PARAM TEMPLATE = C:\KRC\Roboter\Template\coop_wait
NOTE
The inline form
REMOTEinstructions assume a Coop Wait template is installed on each controller as per the specification from Kuka's Roboteam documentation.The formatting of the Coop Wait template declaration in program headers has not be validated and my be incorrect.
Related Articles:
MOTOMAN Scheduler Programs
The scheduler program uses the PSTART instruction to execute multiple robot programs simultaneously in different subtasks. It also uses the PWAIT instruction to make sure necessary robot programs complete before continuing. These are output so the posted robot programs run in the order they appear in the Robotmaster scheduler:
/JOB
//NAME MASTER
//POS
///NPOS 0,0,0,0,0,0
//INST
///DATE 0001/01/01 00:00
///COMM BY-ROBOTMASTER
///ATTR SC,RW
NOP
PSTART JOB:R2R3R4_SIM_1_EA1400N_R2 SUB1
PSTART JOB:R2R3R4_SIM_1_EA1400N_R3 SUB2
PSTART JOB:R2R3R4_SIM_1_EA1400N_R4 SUB3
PWAIT SUB3
PWAIT SUB2
PWAIT SUB1
PSTART JOB:R2R3R4_SIM_2_EA1400N_R2 SUB1
PSTART JOB:R2R3R4_SIM_2_EA1400N_R3 SUB2
PSTART JOB:R2R3R4_SIM_2_EA1400N_R4 SUB3
PWAIT SUB3
PWAIT SUB2
PWAIT SUB1
PSTART JOB:R1R2R3R4_SIM_EA1400N_R1 SUB1
PSTART JOB:R1R2R3R4_SIM_EA1400N_R2 SUB2
PSTART JOB:R1R2R3R4_SIM_EA1400N_R3 SUB3
PSTART JOB:R1R2R3R4_SIM_EA1400N_R4 SUB4
PWAIT SUB4
PWAIT SUB3
PWAIT SUB2
PWAIT SUB1
PSTART JOB:R1_SEQ_1 SUB1
PWAIT SUB1
PSTART JOB:R1_SEQ_2 SUB1
PWAIT SUB1
ENDIndividual robot program output is not changed.