Hi all,
I have to program a brand new IRB4600 robot (latest robotware installed).
There are two parts types to work with.
Each part need a specific gripper.
The program structure is mostly the same. Not 100% the same.
PLC decides which part the robot must start processing.
This means the robot will have to pick the right gripper and execute the right program.
How would you structure the program?
OPTION 1 - ONE PROGRAM THAT CALL SPECIAL ROUTINES WITH DIFFERENT POINTS NAMES
Main routine checks what the PLC wants to execute and then calls the routine procPartA or procPartB.
procPartA will use points named pPrePickPosA, pPickPosA, pPostPickPosA and procPartB will use points named pPrePickPosB, pPickPosB, pPostPickPosB.
All the points will be stored in the main module.
OPTION 2 - ONE PROGRAM THAT CALL SPECIAL ROUTINES WITH SAME POINTS NAMES
Main routine checks what the PLC wants to execute and then calls the routine procPartA or procPartB.
procPartA will use points named pPrePickPos, pPickPos, pPostPickPos and procPartB will use points named pPrePickPos, pPickPos, pPostPickPos.
procPartA will be written in its own module (moduleA) as well as procPartB which will be stored into the module (moduleB).
All the points will be stored in the respective modules and will have the same names as the points will be global only for each module.
OPTION 3 - THE MAIN PROGRAM LOADS A SPECIAL PROGRAM EVERY TIME
Main routine checks what the PLC wants to execute and in case the module is not loaded it unloads the currently loaded one and loads the desired one at runtime.
This allows me to load a module with the right points and the right code every time.
OPTION 4 -
In all options global variables and functions are available from the main module.
What would you recommend me?
Thank you in advance!