# Setting payload on a setnode

**URL:** <https://forum.universal-robots.com/t/setting-payload-on-a-setnode/3213>\
**Category:** URCaps SDK\
**Created:** [November 29, 2018, 3:09pm UTC](https://forum.universal-robots.com/t/setting-payload-on-a-setnode/3213 "2018-11-29T15:09:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon82484413](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@anon82484413](https://forum.universal-robots.com/u/anon82484413)\
**Post date:** [November 29, 2018, 3:09pm UTC](https://forum.universal-robots.com/t/setting-payload-on-a-setnode/3213/1 "2018-11-29T15:09:14Z")

</div>

Is it possible to also set the weight on a setnode?

![Udklip](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/2/2e14d847fd1d14ab7fa7a42de5adb4bc2b8b05ee.png)

I can find the functions for setting the different kind of outputs, but nothing about the weight.

---

<div class="post-metadata">

**Author:** ![m.birkholz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/m.birkholz/32/7084_2.png) [@m.birkholz](https://forum.universal-robots.com/u/m.birkholz)\
**Post date:** [November 30, 2018, 7:35am UTC](https://forum.universal-robots.com/t/setting-payload-on-a-setnode/3213/2 "2018-11-30T07:35:45Z")

</div>

If i’m understanding you correctly you need a function to setup the TCP payload through the API ?

if so, you can combine [URCap Sample: Send Script with button push URCap](https://forum.universal-robots.com/t/sample-send-script-with-button-push-urcap/1203)  
with sending a script command set\_tcp\_payload on a button press

or

use the ScriptWriter function set\_payload() on Program generation. 🙂

---

<div class="post-metadata">

**Author:** ![anon82484413](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@anon82484413](https://forum.universal-robots.com/u/anon82484413)\
**Post date:** [November 30, 2018, 8:42am UTC](https://forum.universal-robots.com/t/setting-payload-on-a-setnode/3213/3 "2018-11-30T08:42:32Z")

</div>

I can’t do that, doing it by script is too late.

There is a waypoint before this, and another after. Setting the digital output, makes the gripper close, and before lifting it up, I need to set the payload because of a big difference.

Doing it by script would have to wait after the last waypoint, and before getting there, the robot would have stopped with an error.

---

<div class="post-metadata">

**Author:** ![m.birkholz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/m.birkholz/32/7084_2.png) [@m.birkholz](https://forum.universal-robots.com/u/m.birkholz)\
**Post date:** [November 30, 2018, 9:07am UTC](https://forum.universal-robots.com/t/setting-payload-on-a-setnode/3213/4 "2018-11-30T09:07:13Z")

</div>

you need to wait for a signal “gripper closed” if your gripper supports sth. like this (voltage measurement??).  
If that is not possible you need to use two Set nodes (one with dout, other with no action/set payload) with a proper wait cycle between.

---

<div class="post-metadata">

**Author:** ![anon82484413](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@anon82484413](https://forum.universal-robots.com/u/anon82484413)\
**Post date:** [November 30, 2018, 10:05am UTC](https://forum.universal-robots.com/t/setting-payload-on-a-setnode/3213/5 "2018-11-30T10:05:55Z")

</div>

The problem is not waiting for the gripper to close, the problem is I can’t find a way to set payload on a setnode with the SDK.

---

<div class="post-metadata">

**Author:** ![roman.reiner](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/roman.reiner/32/1294_2.png) [@roman.reiner](https://forum.universal-robots.com/u/roman.reiner)\
**Post date:** [November 30, 2018, 9:44pm UTC](https://forum.universal-robots.com/t/setting-payload-on-a-setnode/3213/6 "2018-11-30T21:44:53Z")

</div>

if you set payload with a set node and check “no action”. When the node is executed it sets payload only.

---

<div class="post-metadata">

**Author:** ![anon82484413](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@anon82484413](https://forum.universal-robots.com/u/anon82484413)\
**Post date:** [December 3, 2018, 6:31am UTC](https://forum.universal-robots.com/t/setting-payload-on-a-setnode/3213/7 "2018-12-03T06:31:08Z")

</div>

Yes, but that isn’t where the problem is. The problem is I can’t find a way to use the SDK to set the payload in the node.

---

<div class="post-metadata">

**Author:** ![m.birkholz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/m.birkholz/32/7084_2.png) [@m.birkholz](https://forum.universal-robots.com/u/m.birkholz)\
**Post date:** [December 3, 2018, 7:16am UTC](https://forum.universal-robots.com/t/setting-payload-on-a-setnode/3213/8 "2018-12-03T07:16:48Z")

</div>

there is no function in the sdk to do this. you can either implement set\_payload inside a custom urcap like i described above or do sth. like using a thread defined inside a installationNode that watches for gripper closed signal and sets the payload
