# UR5 force mode for contour following

**URL:** <https://forum.universal-robots.com/t/ur5-force-mode-for-contour-following/21541>\
**Category:** Technical Questions\
**Created:** [May 25, 2022, 3:08pm UTC](https://forum.universal-robots.com/t/ur5-force-mode-for-contour-following/21541 "2022-05-25T15:08:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon72330917](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@anon72330917](https://forum.universal-robots.com/u/anon72330917)\
**Post date:** [May 25, 2022, 3:08pm UTC](https://forum.universal-robots.com/t/ur5-force-mode-for-contour-following/21541/1 "2022-05-25T15:08:56Z")

</div>

Hi! I have a UR5 robot arm, and I want to program it to follow a contour in x-y plane while applying a constant force in z direction. To elaborate, I want the robot arm to apply a force in z direction NOT more than 2 N, while it is moving in predefined direction in x- and y-axis? I am trying to use the force mode, but I am unable to get the behavior I want. Could some please help me program this behavior? Also, is maintaing a force less than 2 N in the z-direction a realistic value, or do I need to have a higher value than 2 N? If yes, the how much?

---

<div class="post-metadata">

**Author:** ![MikeM](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/mikem/32/3114_2.png) [@MikeM](https://forum.universal-robots.com/u/MikeM)\
**Post date:** [May 25, 2022, 8:04pm UTC](https://forum.universal-robots.com/t/ur5-force-mode-for-contour-following/21541/2 "2022-05-25T20:04:05Z")

</div>

Welcome to the URcommunity Radhen,

In the Force Node command you check boxes to allow compliance in rx/ry directions, I would set speed and torque values very low to start and work your way up until it suits your needs. Also you can select Features or Simple/Frame/Point/Motion to change robot forcemode() behavior. Press the ‘Test’ button and you can use Freedrive button to get a feel of how the robot will react to different forces.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/7/78fb598236221862e6d831127eefb7d7d08c22fd.png)

I’ve noticed this as well, the lower the force sometimes the robot can give itself a false reading and wander off the part. This can happen during sudden changes of direction or drastic changes of tool orientation (90 degree turns). Not sure how drastic of a contour you are working with just things to be aware of. Also I would zero the force-torque sensor right before entering forcemode() and before you make contact with the surface to ensure you are getting proper readings from the sensor. I use around 5N on most projects where i quickly need to move using forcemode()

**Note: there is some variance in the actual force/torque values, I believe UR10’s are +/-10N and UR3’s are +/-5N (I forgot the Torque values, but they are noted somewhere in UR’s documentation)**

Anyways, other URcommunity members may have a better solution or be able to help more but hope that helps and best of luck!
