Best Of
Best Practice for Top Level of robot program
In my past robot projects on other platforms, especially if working with PLC control, I create a main loop, and a command processor within that loop. A handshaking protocol is created for each application, but often looks nearly identical. A command is given by the PLC in the form of a number on the robot side, and an 'execute' bit triggers the initiation of the command.
At that point, the robot is often starting a process of many steps, but to simplify control and recovery, the PLC is usually commanding discrete steps individually. This is more efficient when both 'picks' and 'places' can be from different sources and to different destinations.
Other processes may require the robot to complete the entire cycle from one given command, and this can be more complicated for the robot program to recover and continue after an interruption.
With RAPID, I find that I have more options in how I can approach this.
What are the best ways to handle this kind of control in RAPID?
My experience is leading me toward this solution:
* A main loop command processor that waits for a PLC command.
(The PLC has the knowledge of what is currently in the robot cell. The command contains this information, in my case.)
* Once the command is given, the robot has the task of fully completing it, or recovering from an interruption, and completing it, unless and until a cancel is given.
* So, in a multi-step process, the process State must be tracked, and if an interruption occurs, the robot must resume from the last known state and successfully complete the original task before finally handshaking with the PLC to indicate that it is complete.
Q: What is or are some best practices for cleanly handling this state tracking, and then resuming at the correct state after an interruption, in RAPID?
(I have experience with a simpler robot system that is a good deal more primitive than RAPID, and with Structured Text in a PLC that is closer to full-on real-time, multi-tasking Object Oriented Programming. Since RAPID falls into the middle between these two, I'd like to make sure I am making the best use of RAPID's capabilities.
I DO have the Multi-tasking option on my robot, but I know it isn't nearly as powerful as having a PLC.)
My current approach would be to always restart at the top of Main, and start at a 'command' processor, waiting for a PLC command. Then, if a command task was already in progress, skip that and go to a State processor, which would redirect the pointer to the next sub-task that had not yet been completed. For example, it might start up and go back to pick or 're-pick' the third thing in a process, and finish the final step, before signalling to the PLC that it's current command is complete.
My current state tracking is to create constants for each state, and then update the state at each point that I need to. If resuming from the top, the 'state processor' looks at the state variable to know what was last fully completed, and then jumps to the thing that it needs to do next.
Thanks,
At that point, the robot is often starting a process of many steps, but to simplify control and recovery, the PLC is usually commanding discrete steps individually. This is more efficient when both 'picks' and 'places' can be from different sources and to different destinations.
Other processes may require the robot to complete the entire cycle from one given command, and this can be more complicated for the robot program to recover and continue after an interruption.
With RAPID, I find that I have more options in how I can approach this.
What are the best ways to handle this kind of control in RAPID?
My experience is leading me toward this solution:
* A main loop command processor that waits for a PLC command.
(The PLC has the knowledge of what is currently in the robot cell. The command contains this information, in my case.)
* Once the command is given, the robot has the task of fully completing it, or recovering from an interruption, and completing it, unless and until a cancel is given.
* So, in a multi-step process, the process State must be tracked, and if an interruption occurs, the robot must resume from the last known state and successfully complete the original task before finally handshaking with the PLC to indicate that it is complete.
Q: What is or are some best practices for cleanly handling this state tracking, and then resuming at the correct state after an interruption, in RAPID?
(I have experience with a simpler robot system that is a good deal more primitive than RAPID, and with Structured Text in a PLC that is closer to full-on real-time, multi-tasking Object Oriented Programming. Since RAPID falls into the middle between these two, I'd like to make sure I am making the best use of RAPID's capabilities.
I DO have the Multi-tasking option on my robot, but I know it isn't nearly as powerful as having a PLC.)
My current approach would be to always restart at the top of Main, and start at a 'command' processor, waiting for a PLC command. Then, if a command task was already in progress, skip that and go to a State processor, which would redirect the pointer to the next sub-task that had not yet been completed. For example, it might start up and go back to pick or 're-pick' the third thing in a process, and finish the final step, before signalling to the PLC that it's current command is complete.
My current state tracking is to create constants for each state, and then update the state at each point that I need to. If resuming from the top, the 'state processor' looks at the state variable to know what was last fully completed, and then jumps to the thing that it needs to do next.
Thanks,
Re: How to run buttons in auto mode??
Hello Jerry,
I think you must be using RunRoutine Button control. By default this control would work only in Manual Mode. If the button is required to run in Auto then there is a property in the control called "AllowInAuto". Set this to TRUE and redeploy your application on FlexPendant.
Thanks
Abhishek
Re: How can I call a userfunction onClick with a button?
Hi Yvok,
I have now also created a new project and it does indeed work now. Is there a way to convert the old project to a new project so that the userfunctions now work?

1
Re: Pack&Go file not letting me make changes to the RAPID code?
Have you tried to use 'Apply - Apply changes' or 'Apply - Apply all' button under 'RAPID' ribbon?
I think there is only a 'save' button to save the entire RS project, but not a 'save' button for saving RAPID change. I will have a popped up window to select a location when using 'Ctrl+S', yet to save RAPID I use 'Ctrl+Shift+S', which is the hot key for 'Apply all'.
I think there is only a 'save' button to save the entire RS project, but not a 'save' button for saving RAPID change. I will have a popped up window to select a location when using 'Ctrl+S', yet to save RAPID I use 'Ctrl+Shift+S', which is the hot key for 'Apply all'.
Omnicore V250XT A_AutoStop Situation
Hello everyone.
I recently purchased 3 new identical robots 6700 swVersion="3.02.03" RW_Version="7.18.00", Controller=V250XT;
I have a problem related to Safety.
I use Siemens Failsafe PLC as master (Profinet/Profisafe) and the robot is a device.
For the safety part, considering that I use Profisafe and not Hardwire, I chose to connect the X14 signals exactly according to the manual to bypass that part.
I mention that in the SafeMove part, the robot was synchronized, the configuration validated and locked, because I use safemove pro and I have many safety zones and only I have exclusive access to modify that part.
For the safety part, considering that I use Profisafe and not Hardwire, I chose to connect the X14 signals exactly according to the manual to bypass that part.
I mention that in the SafeMove part, the robot was synchronized, the configuration validated and locked, because I use safemove pro and I have many safety zones and only I have exclusive access to modify that part.
There are a few signals that are default in SafeMove without the possibility of deleting them, which I can only change the category (0 or 1) stop:
1. A_AutoStop
2.ES_ExternalEmergencyStop
3.G_GeneralStop
4.TPU_EmergencyStop
My problem is related to A_AutoStop. The straps are made correctly, I read all the documentation, I even asked the local ABB technical support (What's more, I sent a backup and they replied that the configuration was done correctly) and no one can help me to make that signal true.
Is there something else to configure?
In the documentation there is a reference that specifies that you can choose what the AS/GS inputs do but nothing concrete.
Thank you very much!
The last solution given by the local technician from ABB was to update RW to 7.18.1, but I refuse to believe that this is the problem, considering that there are 3 new robots. I don't think that this is necessary.
I think it is a stupid thing like the bridge with the cut pins for A_AutoStop was on IRC 5 (for ABB to demonstrate that the new robots have not been used in auto mode before).
I think it is a stupid thing like the bridge with the cut pins for A_AutoStop was on IRC 5 (for ABB to demonstrate that the new robots have not been used in auto mode before).
I mention that I have a bunch of ABB robots installed on the active but IRC 5 and even one S4C+, but I have already lost a day with this problem and I don't know how to solve it.
Thank you very much!
use EGM to command joint positions while getting wrench from FCGetForce
RW 7.8
ABB Gofa
I want to control joint states using EGM using a client pc. At the same
time I want to use EGM's /DataToSensor function to send eef wrench's
(obtained using FCGetForce) to the EGM client.
This is the code I'm trying to run:
PROC run_egm_joint_server()
FCDeact;
FCCalib load_mount_plate;
! Register an EGM id.
EGMGetId egm_id;
egmSt1:=EGMGetState(egm_id);
TPWrite "EGM state: "\Num:=egmSt1;
! setup
IF egmSt1 >= EGM_STATE_RUNNING then
EGMStop egm_id, EGM_STOP_HOLD;
ENDIF
! MoveAbsJ start_j, v50, fine, tool0;
MoveJ start_p, v30, fine, tool_mount_plate; ! tool_shadow
IF egmSt1 <= EGM_STATE_CONNECTED THEN
! Setup the EGM communication. -> UC uses UDPUC
EGMSetupUC ROB_1, egm_id, "default", "ROB_1", \Joint;
EGMStreamStart egm_id;
ENDIF
! Prepare for an EGM communication session.
EGMActJoint egm_id
\DataToSensor:=wrench
\J1:=egm_condition
\J2:=egm_condition
\J3:=egm_condition
\J4:=egm_condition
\J5:=egm_condition
\J6:=egm_condition
\MaxSpeedDeviation:=20.0; ! degrees/s
WHILE egmSt1 >= EGM_STATE_CONNECTED DO
IF NOT egmSt1 = EGM_STATE_RUNNING THEN
! Start the EGM communication session.
EGMRunJoint egm_id, EGM_STOP_HOLD, \NoWaitCond, \J1 \J2 \J3 \J4 \J5 \J6;
ENDIF
! force mode stuff
IF NOT FCIsForceMode() THEN
FCAct tool_mount_plate; !Activates Force Control – This activates Force Feedback in EGM
ENDIF
myForceVector := FCGetForce();
fill_wrench(myForceVector);
! wait to complete egm movement
! EGMWaitCond egm_id;
! check for connection
egmSt1:=EGMGetState(egm_id);
WaitTime 0.004;
ENDWHILE
IF egmSt1 >= EGM_STATE_CONNECTED THEN
TPWrite "Reset EGM instance egm_id";
EGMStop egm_id, EGM_STOP_HOLD;
EGMStreamStop egm_id;
EGMReset egm_id;
ENDIF
FCDeact;
ERROR
IF ERRNO = ERR_UDPUC_COMM THEN
TPWrite "Communication timedout";
TRYNEXT;
ENDIF
ENDPROCI can successfully get the real-time wrench, but no EGM joint states that I write to 'output' and send to the Gofa arm get executed.
How to correctly setup AppStudio "Project with a Web Server"?
I am trying to work out how to properly configure my controller so it can communicate with a local network web server. I have setup and configured my IP for the robot in RS which is on the same local network as my web server app but it says "Request Page Cannot Be Found - The URL may be misspelled or the page you are looking for is no longer available."
Is there a limitation on the port the webserver can be on? Does it need to be http and not https?
Any help or a guide/example would be beneficial.
Ken
Is there a limitation on the port the webserver can be on? Does it need to be http and not https?
Any help or a guide/example would be beneficial.
Ken

1
Re: CTM and Robotstudio Connection
I too have a same problem .can someone give me a possible solution for this issue.....?
CTM and Robotstudio Connection
Hi all, Thank you everyone at first.
I'm new to ABB Robot programming as well as conveyor tracking applications. In my intern's place, I have to work with CTM-01(conveyor tracking module) and IRB 360. Following the manual of CTM, I'm trying to connect robotstudio to the CTM. The IRC5 controller is not connected to robotstudio for the moment(Since the manual explained so). I'm connecting CTM's LAN Port to Robotstudio with the IP address 192.168.126.246 set in my PC. When I open robotstudio and go to conveyor tracking and click on add conveyor, it shows nothing. What could be the possible problem? Without connecting it and setting up a network I'm not able to progress further. Can someone give me some possible troubleshooting to work further.
I'm new to ABB Robot programming as well as conveyor tracking applications. In my intern's place, I have to work with CTM-01(conveyor tracking module) and IRB 360. Following the manual of CTM, I'm trying to connect robotstudio to the CTM. The IRC5 controller is not connected to robotstudio for the moment(Since the manual explained so). I'm connecting CTM's LAN Port to Robotstudio with the IP address 192.168.126.246 set in my PC. When I open robotstudio and go to conveyor tracking and click on add conveyor, it shows nothing. What could be the possible problem? Without connecting it and setting up a network I'm not able to progress further. Can someone give me some possible troubleshooting to work further.
1
Re: [Wish] Tab closing features
I just found out that yes, it will work for configuration and IO windows.