# SoftMove issues

**URL:** <https://tech-community.robotics.abb.com/t/softmove-issues/8737>\
**Category:** RAPID Programming\
**Created:** [March 14, 2019, 2:59pm UTC](https://tech-community.robotics.abb.com/t/softmove-issues/8737 "2019-03-14T14:59:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![YoDoug](https://avatars.discourse-cdn.com/v4/letter/y/e0b2c6/32.png) [@YoDoug](https://tech-community.robotics.abb.com/u/YoDoug)\
**Post date:** [March 14, 2019, 2:59pm UTC](https://tech-community.robotics.abb.com/t/softmove-issues/8737/1 "2019-03-14T14:59:12Z")

</div>

Hello all,

We have two IRB4600 with SoftMove option for machine tool tending. We use Softmove to push against the part trays when picking up parts for loading. The trays are 60 inch by 30 inch, with three trays in the work zone. The robot goes from almost all the way extended to very close to the base when picking up. The problem I am having is the reduce stiffness value in the TCP Z axis needs to vary depending on where the robot is picking from. If I set it too light when the robot is extended it does not push against the tray. If I set it too heavy when the robot is in close it overloads/alarms the robot. I see there is a Force\_offset\_tune function to figure out the force needed to move at a point. The result is in Nm. The stifness value to push against the tray is a percentage. Is there some sort of function to map the values or some other trick to get the right force at varying points?

 ![image.jpg](https://europe1.discourse-cdn.com/flex005/uploads/robotics1/original/2X/b/b30bb116a049f6a24cb984db693f6c652995d449.jpeg)

Code sample of what we are doing now. Note; I have three different values for the Fload variable depending on where the robot is, but it is not really working that well. I am looking for something more dynamic.

! Move to p1+offset  
MoveL offs(Point1,xoff,yoff,200+Spindle1off),v1000,fine,grip6\WObj:=trayNum;

! feed onto part  
MoveL offs(Point1,xoff,yoff,10+Spindle1off),V100,fine,grip6\WObj:=trayNum;

CSSAct CSS\_Z\StiffnessNonSoftDir:=95\Stiffness:=FLoad\AllowMove;

MoveL offs(Point1,xoff,yoff,Fpos+Spindle1off),V100,fine,grip6\WObj:=trayNum;

waitTime 1;  
CloseGripper;  
CSSDeactMoveL offs(Point1,xoff,yoff,200+Spindle1off),V100,grip6\WObj:=trayNum;  
PartCheck;

TIA

---

<div class="post-metadata">

**Author:** ![lemster68](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/lemster68/32/1945_2.png) [@lemster68](https://tech-community.robotics.abb.com/u/lemster68)\
**Post date:** [March 14, 2019, 4:52pm UTC](https://tech-community.robotics.abb.com/t/softmove-issues/8737/2 "2019-03-14T16:52:04Z")

</div>

Let’s say that you pick figure the least force to pick - at the nearest part. Then figure the most force to pick - at the farthest part. Use the distance function to determine the distance from the nearest part to the part you are picking. Make a formula to set the percentage of force based on the percentage of distance you are between the nearest and farthest part. I hope that I make it clear what I am trying to describe.

---

<div class="post-metadata">

**Author:** ![YoDoug](https://avatars.discourse-cdn.com/v4/letter/y/e0b2c6/32.png) [@YoDoug](https://tech-community.robotics.abb.com/u/YoDoug)\
**Post date:** [March 14, 2019, 7:28pm UTC](https://tech-community.robotics.abb.com/t/softmove-issues/8737/3 "2019-03-14T19:28:45Z")

</div>

I am exploring your idea. In my Rapid code the only point for picking up parts is the corner of the tray. The actual part position is called with offs to that corner point to from a calculation. I would need to be able to capture the current location of the TCP to a point to use the Distance function. Is there a way to capture the current position?

---

<div class="post-metadata">

**Author:** ![veritas](https://avatars.discourse-cdn.com/v4/letter/v/71c47a/32.png) [@veritas](https://tech-community.robotics.abb.com/u/veritas)\
**Post date:** [March 15, 2019, 8:30am UTC](https://tech-community.robotics.abb.com/t/softmove-issues/8737/4 "2019-03-15T08:30:14Z")

</div>

> [@YoDoug](#):
>
> I am exploring your idea. In my Rapid code the only point for picking up parts is the corner of the tray. The actual part position is called with offs to that corner point to from a calculation. I would need to be able to capture the current location of the TCP to a point to use the Distance function. Is there a way to capture the current position?

You can use CrobT.

pCurrentPosition:=CRobT(\Tool:=grip6\Wobj:=trayNum);

---

<div class="post-metadata">

**Author:** ![YoDoug](https://avatars.discourse-cdn.com/v4/letter/y/e0b2c6/32.png) [@YoDoug](https://tech-community.robotics.abb.com/u/YoDoug)\
**Post date:** [March 15, 2019, 5:05pm UTC](https://tech-community.robotics.abb.com/t/softmove-issues/8737/5 "2019-03-15T17:05:26Z")

</div>

I worked out my formula for mapping the force according to the distance this morning. I should be able to get into the robot cell later today to test. Thanks for the help.

---

<div class="post-metadata">

**Author:** ![lemster68](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/lemster68/32/1945_2.png) [@lemster68](https://tech-community.robotics.abb.com/u/lemster68)\
**Post date:** [March 15, 2019, 5:31pm UTC](https://tech-community.robotics.abb.com/t/softmove-issues/8737/6 "2019-03-15T17:31:00Z")

</div>

Good luck,let us know if it works. 🙂

---

<div class="post-metadata">

**Author:** ![YoDoug](https://avatars.discourse-cdn.com/v4/letter/y/e0b2c6/32.png) [@YoDoug](https://tech-community.robotics.abb.com/u/YoDoug)\
**Post date:** [March 28, 2019, 1:23pm UTC](https://tech-community.robotics.abb.com/t/softmove-issues/8737/7 "2019-03-28T13:23:11Z")

</div>

I finally got some time to test this morning. So far it appears to be working great. Here is what I ended up using to calculate the variable force by position.

PROC ForceCalc()

posPick := CPos(\Tool:=grip6 \WObj:=wobj0);  
posBase := [0,0,300];  
dist := Distance(posBase, posPick);  
Dmin := 635;  
Dmax := 2540;  
Fmax := 40;  
Fmin := 5;  
FLoad := (dist - Dmin)\*((Fmax - Fmin)/(Dmax - Dmin));

ENDPROC

Thanks again for the help!

---

<div class="post-metadata">

**Author:** ![lemster68](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/lemster68/32/1945_2.png) [@lemster68](https://tech-community.robotics.abb.com/u/lemster68)\
**Post date:** [March 28, 2019, 1:37pm UTC](https://tech-community.robotics.abb.com/t/softmove-issues/8737/8 "2019-03-28T13:37:53Z")

</div>

You could also write that as a function to return the FLoad value. Good job.
