# Working without sub task in UR-Caps

**URL:** <https://forum.universal-robots.com/t/working-without-sub-task-in-ur-caps/1346>\
**Category:** URCap Development\
**Created:** [November 17, 2017, 9:57pm UTC](https://forum.universal-robots.com/t/working-without-sub-task-in-ur-caps/1346 "2017-11-17T21:57:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![michael.brucksch](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@michael.brucksch](https://forum.universal-robots.com/u/michael.brucksch)\
**Post date:** [November 17, 2017, 9:57pm UTC](https://forum.universal-robots.com/t/working-without-sub-task-in-ur-caps/1346/1 "2017-11-17T21:57:47Z")

</div>

Hi, I have a little problem with this two UR-Caps Plugins that I write. The Gripper is connected to the tool output. The gripper need two bits. One bit for open and the second bit for closing the gripper. For opening the gripper, I have to reset the closing bit, then waiting 200ms. After this time, I have to setting the bit for opening I have to wait 500ms. For closing the gripper, the same, only the bits are changed.

The two UR-Cap works. But when I’m using the Cap, it makes a yellow sub task in the program tree. I have to write a sync or a comment in this sub task.

Can somebody help me by this problem? What make I wrong?

[Greifer.zip](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex020/uploads/universal_robots/original/1X/2a2d6e9b86e6481f70e69674fdb769b731f0f61a.zip) (20.6 KB)

---

<div class="post-metadata">

**Author:** ![jbm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/jbm/32/614_2.png) [@jbm](https://forum.universal-robots.com/u/jbm)\
**Post date:** [November 18, 2017, 5:26am UTC](https://forum.universal-robots.com/t/working-without-sub-task-in-ur-caps/1346/2 "2017-11-18T05:26:29Z")

</div>

Just from your description, it sounds as if you have an statement under your program node?  
If this is the case, then it is due to the program node (in the ProgramNodeService) is set to allow children `isChildrenAllowed()`.  
In your case, for the gripper command, I would assume the command should not contain children, but just be a leaf node. In this case, you should set that method to return false, so no children are allowed.

---

<div class="post-metadata">

**Author:** ![michael.brucksch](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@michael.brucksch](https://forum.universal-robots.com/u/michael.brucksch)\
**Post date:** [November 19, 2017, 3:25pm UTC](https://forum.universal-robots.com/t/working-without-sub-task-in-ur-caps/1346/3 "2017-11-19T15:25:42Z")

</div>

Thanks jbm,

i think this is my problem. i try it on monday.

---

<div class="post-metadata">

**Author:** ![michael.brucksch](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@michael.brucksch](https://forum.universal-robots.com/u/michael.brucksch)\
**Post date:** [December 5, 2017, 9:02pm UTC](https://forum.universal-robots.com/t/working-without-sub-task-in-ur-caps/1346/4 "2017-12-05T21:02:32Z")

</div>

I try it. It works. This was the Problem.

Thanks jbm.
