# Creating a simple URCap showing the force value

**URL:** <https://forum.universal-robots.com/t/creating-a-simple-urcap-showing-the-force-value/6965>\
**Category:** Java\
**Created:** [April 15, 2020, 7:17am UTC](https://forum.universal-robots.com/t/creating-a-simple-urcap-showing-the-force-value/6965 "2020-04-15T07:17:57Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon53543594](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@anon53543594](https://forum.universal-robots.com/u/anon53543594)\
**Post date:** [April 15, 2020, 7:17am UTC](https://forum.universal-robots.com/t/creating-a-simple-urcap-showing-the-force-value/6965/1 "2020-04-15T07:17:57Z")

</div>

Hi everyone,

I just wanted to ask if you have ever done an URCap that is showing the force value from the force sensor present in eSeries. If you did it, I would have some questions, maybe you have some example code to share 🙂

Regards

---

<div class="post-metadata">

**Author:** ![mbush](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/mbush/32/76_2.png) [@mbush](https://forum.universal-robots.com/u/mbush)\
**Post date:** [April 15, 2020, 7:46pm UTC](https://forum.universal-robots.com/t/creating-a-simple-urcap-showing-the-force-value/6965/2 "2020-04-15T19:46:51Z")

</div>

What are you trying to display? There are two native functions in URScript that will display the forces, `get_tcp_force()` returns a list of the 6 forces as `[Fx, Fy, Fz, Tx, Ty, Tz]` or `force()` which returns the normal force using `norm(get_tcp_force())`

---

<div class="post-metadata">

**Author:** ![anon53543594](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@anon53543594](https://forum.universal-robots.com/u/anon53543594)\
**Post date:** [April 16, 2020, 6:36am UTC](https://forum.universal-robots.com/t/creating-a-simple-urcap-showing-the-force-value/6965/3 "2020-04-16T06:36:13Z")

</div>

Yes, exactly. The second one, and I would like to display it on URCap.

---

<div class="post-metadata">

**Author:** ![mbush](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/mbush/32/76_2.png) [@mbush](https://forum.universal-robots.com/u/mbush)\
**Post date:** [April 16, 2020, 1:22pm UTC](https://forum.universal-robots.com/t/creating-a-simple-urcap-showing-the-force-value/6965/4 "2020-04-16T13:22:47Z")

</div>

Where on a URCAp are you trying to display it?

---

<div class="post-metadata">

**Author:** ![anon53543594](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@anon53543594](https://forum.universal-robots.com/u/anon53543594)\
**Post date:** [April 17, 2020, 6:47am UTC](https://forum.universal-robots.com/t/creating-a-simple-urcap-showing-the-force-value/6965/5 "2020-04-17T06:47:38Z")

</div>

In the toolbar node.

---

<div class="post-metadata">

**Author:** ![anon53543594](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@anon53543594](https://forum.universal-robots.com/u/anon53543594)\
**Post date:** [April 23, 2020, 8:04am UTC](https://forum.universal-robots.com/t/creating-a-simple-urcap-showing-the-force-value/6965/6 "2020-04-23T08:04:05Z")

</div>

Any hints or example’s code?

---

<div class="post-metadata">

**Author:** ![anon64998320](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@anon64998320](https://forum.universal-robots.com/u/anon64998320)\
**Post date:** [April 23, 2020, 8:41am UTC](https://forum.universal-robots.com/t/creating-a-simple-urcap-showing-the-force-value/6965/7 "2020-04-23T08:41:54Z")

</div>

You can get some hints by going through the URCaps SDK specific swing/html examples from the “URCapsStarterPackage”. The “URCapsStarterPackage” can be downloaded from the following website link and used as a virtual machine.

- URCapsStarterPackage =\> [https://plus.universal-robots.com/download-center/urcaps-starter-package/](https://plus.universal-robots.com/download-center/urcaps-starter-package/)

Assuming you have the “URCapsStarterPackage” running as a virtual machine on your host machine. When you go to the home folder of the “URCapsStarterPackage”, you will find a child folder ‘sdk’. There you will find the URCaps SDK specific swing/html examples. For more details, please refer to the following Figures 1 and 2.

 ![Path_to_swing_or_html_folders_which_contains_respective_examples_of_URCaps_SDK](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/0/0cdc28f66332fca2e7fb6a47ef9c99276d718ab9.jpeg)  
Figure 1: Path to the swing and html folders which contain respective examples of URCaps SDK

 ![Path_to_swing_examples_of_URCaps_SDK](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/2/29b81f4582b129f1e995cc23c4b81e2808f101f8.jpeg)  
Figure 2: Path to the swing examples of URCaps SDK

---

<div class="post-metadata">

**Author:** ![fujikit](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/fujikit/32/6042_2.png) [@fujikit](https://forum.universal-robots.com/u/fujikit)\
**Post date:** [April 23, 2020, 9:25am UTC](https://forum.universal-robots.com/t/creating-a-simple-urcap-showing-the-force-value/6965/8 "2020-04-23T09:25:57Z")

</div>

You can get the values by using “actual\_TCP\_force” of RTDE.
