# Solution for Reduced speed on ABB IRB1200 with IRC5 Compact controller and SafeMove

**URL:** <https://tech-community.robotics.abb.com/t/solution-for-reduced-speed-on-abb-irb1200-with-irc5-compact-controller-and-safemove/9564>\
**Category:** RobotStudio\
**Created:** [June 10, 2020, 9:02am UTC](https://tech-community.robotics.abb.com/t/solution-for-reduced-speed-on-abb-irb1200-with-irc5-compact-controller-and-safemove/9564 "2020-06-10T09:02:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jurerejcairnamics](https://avatars.discourse-cdn.com/v4/letter/j/8e7dd6/32.png) [@jurerejcairnamics](https://tech-community.robotics.abb.com/u/jurerejcairnamics)\
**Post date:** [June 10, 2020, 9:02am UTC](https://tech-community.robotics.abb.com/t/solution-for-reduced-speed-on-abb-irb1200-with-irc5-compact-controller-and-safemove/9564/1 "2020-06-10T09:02:51Z")

</div>

Our robot cell would have:

· ABB robot IRB1200 5kg 0.9 m,  
· IRC5 Compact controller,  
· Leuze Lidar RSL430 with 2 active protection fields (total stop zone and reduced speed zone),  
· Sick safety PLC CPU0 with CIP Safety module and 2 safety IO modules,  
· SafeMove2 Pro.

With Leuze lidar we would have supervision of two zones, larger one for detecting persons and reducing robot speed. Smaller one for robot total stop if person is inside the safety zone.

In RobotStudio we tested an approach which is working but from safety perspective we do not gain anything as two signals are needed and one must be delayed. The delay is a problematic as person can enter the reduced speed safety zone and the robot is not at appropriate speed jet.

**Our current solution.**

For test purposes we have two clickable inputs (Figure 1), to simulate a delay:

- CIP\_ReducedSpeed,
- CIP\_ReducedSpeed\_Delayed.

 ![image.png](https://europe1.discourse-cdn.com/flex005/uploads/robotics1/original/1X/bf1b7e4f08144303bd6869b17aa6e88f1ee6f054.png)

**_Figure 1:_** _Two inputs_

The sequence of clicking is always the same:

1. click on CIP\_ReducedSpeed
2. click on CIP\_ReducedSpeed\_Delayed

To reduced overall robot speed, we are using interrupt approach with **SpeedRefresh** function. RAPID code is attached below, but main part is copied from [library.e.ABB.com](http://library.e.ABB.com) (6904 ROP White Paper SafeMove.pdf).

MODULE Module1

CONST robtarget Target\_50:=[[400.000015391,-150.000004967,600.000018581],[0.00000005,0,1,-0.000000019],[-1,0,-1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];

CONST robtarget Target\_10:=[[303.403900146,150,300],[0,0,1,0],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];

CONST robtarget Target\_20:=[[304.492218018,-150,300],[0,0,1,0],[-1,0,-1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];

CONST robtarget Target\_30:=[[597.118713379,-150,300],[0,0,1,0],[-1,0,-1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];

CONST robtarget Target\_40:=[[591.680725098,150,300],[0,0,1,0],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];

!\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
!\* Interrupt Variables \*  
!\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
!Interrupt for slow speed  
VAR intnum irSpeedSlow;  
!Interrupt for full programmed speed  
VAR intnum irSpeedFast;

PROC Path\_10()  
MoveJ Target\_50,v500,fine,OrodjeTCP\WObj:=wobj0;  
MoveJ Target\_10,v500,fine,OrodjeTCP\WObj:=wobj0;  
MoveL Target\_20,v1000,fine,OrodjeTCP\WObj:=wobj0;  
MoveL Target\_30,v1000,fine,OrodjeTCP\WObj:=wobj0;  
MoveL Target\_40,v1000,fine,OrodjeTCP\WObj:=wobj0;  
MoveJ Target\_50,v500,fine,OrodjeTCP\WObj:=wobj0;  
ENDPROC

PROC main()  
init;  
Path\_10;  
ENDPROC

PROC init()  
!Interupt init  
IDelete irSpeedSlow;  
CONNECT irSpeedSlow WITH tSlowSpeed;  
ISignalDI CIP\_ReducedSpeed,low,irSpeedSlow;

IDelete irSpeedFast;  
CONNECT irSpeedFast WITH tFastSpeed;  
ISignalDI CIP\_ReducedSpeed,high,irSpeedFast;

! Set initial speed in regard to current state of the input  
IF TestDI (CIP\_ReducedSpeed) THEN  
SpeedRefresh 100;  
ELSE  
SpeedRefresh 15;  
ENDIF  
ENDPROC

!\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
!\* Trap tSlowSpeed \*  
!\* \*  
!\* Interrupt changes speed of all movements to 15% \*  
!\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
TRAP tSlowSpeed  
SpeedRefresh 15;  
ENDTRAP

!\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
!\* Trap tFastSpeed \*  
!\* \*  
!\* Interrupt changes speed to full override \*  
!\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
TRAP tFastSpeed  
SpeedRefresh 100;  
ENDTRAP  
ENDMODULE

As we can see that signal **CIP\_ReducedSpeed** is linked to the interrupts (high/low state). The highest speed of the robot is set to 1000 mm/s in RAPID program and it can be reduced This approach is based on RAPID code which by itself is not safe and for this reason we integrated also SafeMove Pro functionalities, function **_Tool Speed Supervision_** (global). The maximal speed is set to 250 mm/s.

If we link signal **CIP\_ReducedSpeed** to the **_Tool Speed Supervision_** activation input signal, we have a problem as SafeMove stops the robot when speed goes from high to low as speed is not discrete as signal is. For this reason, we added **CIP\_ReducedSpeed\_Delay** signal. Both are combined in SafeMove (Safe IO Configuration – Pre Logic) with OR function to new signal named **ActivationSignal** , figure 2.

 ![|708x193.png](https://europe1.discourse-cdn.com/flex005/uploads/robotics1/original/2X/b/b561a754a3d3fff8220fb7fd0f9630049f8318c5.png)

**_Figure 2:_** _OR function_

This new signal **ActivationSignal** is an activation input for Tool Speed Supervision function as shown in Figure 3.

 ![image.png](https://europe1.discourse-cdn.com/flex005/uploads/robotics1/original/2X/1/1c6cd7655d682f1392b18206cb153215f6758312.png)

**_Figure 3:_** _Tool Speed Supervision function setting (SafeMove Pro)_

This approach is working, but delay that must be integrated (we did not manage to delay signal in SafeMove: Delay operator exists) is not making safety zone smaller as we would like.

**Is there a different approach which would solve the reduced speed inside the robot controller or inside the SafeMove module?**

---

<div class="post-metadata">

**Author:** ![DavidLanham](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/davidlanham/32/219_2.png) [@DavidLanham](https://tech-community.robotics.abb.com/u/DavidLanham)\
**Post date:** [June 11, 2020, 2:22pm UTC](https://tech-community.robotics.abb.com/t/solution-for-reduced-speed-on-abb-irb1200-with-irc5-compact-controller-and-safemove/9564/2 "2020-06-11T14:22:46Z")

</div>

There is a lot of good information here and I am very curious if you find a better way to do this? Because I have had the same issue in the past and I am curious if there is a better way. Please post back anything you find. Thank you!
