Setting payload on a setnode

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

Udklip

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

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
with sending a script command set_tcp_payload on a button press

or

use the ScriptWriter function set_payload() on Program generation. :slight_smile:

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.

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.

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.

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

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.

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