# Depalletize skip X amount of box

**URL:** <https://forum.universal-robots.com/t/depalletize-skip-x-amount-of-box/39280>\
**Category:** URScript\
**Created:** [March 27, 2025, 10:44am UTC](https://forum.universal-robots.com/t/depalletize-skip-x-amount-of-box/39280 "2025-03-27T10:44:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![moly59871](https://avatars.discourse-cdn.com/v4/letter/m/ad7895/32.png) [@moly59871](https://forum.universal-robots.com/u/moly59871)\
**Post date:** [March 27, 2025, 10:44am UTC](https://forum.universal-robots.com/t/depalletize-skip-x-amount-of-box/39280/1 "2025-03-27T10:44:20Z")

</div>

hello  
Im working in URscript to make a depalletizing program, the base program works but id like to have a popup or something else where i can tell the robot to skip x amount of boxes if necessary.  
is this at all possible or do I need to restart the whole sequence?  
thanks in advance.

---

<div class="post-metadata">

**Author:** ![eric.feldmann](https://avatars.discourse-cdn.com/v4/letter/e/94ad74/32.png) [@eric.feldmann](https://forum.universal-robots.com/u/eric.feldmann)\
**Post date:** [March 27, 2025, 2:24pm UTC](https://forum.universal-robots.com/t/depalletize-skip-x-amount-of-box/39280/2 "2025-03-27T14:24:40Z")

</div>

Sure it’s possible. Depends on how you’re implementing your depalletizing, but basically wrap all your moves that handle the box depalletizing in an If statement that says something like “if skipBoxCount \<= 0” So you only perform the actual moves if you don’t have any skipBoxCount. Ask the operator for the number of boxes to skip, and put an “else” statement on the if that decreases that count by 1.

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

Presumably you’re using the built-in palletizing node, so this will be inside a larger looping structure. We are essentially telling that node “do nothing” for a few times. It should still be performing the shifting of the Feature and such, but skipping any actions taking place.

---

<div class="post-metadata">

**Author:** ![moly59871](https://avatars.discourse-cdn.com/v4/letter/m/ad7895/32.png) [@moly59871](https://forum.universal-robots.com/u/moly59871)\
**Post date:** [March 27, 2025, 2:48pm UTC](https://forum.universal-robots.com/t/depalletize-skip-x-amount-of-box/39280/3 "2025-03-27T14:48:03Z")

</div>

I’m using URScript and would prefer not to hardcode it, as the operator should be able to input it themselves without needing a programmer or coding knowledge. could it be done in a popup or something similar?

---

<div class="post-metadata">

**Author:** ![eric.feldmann](https://avatars.discourse-cdn.com/v4/letter/e/94ad74/32.png) [@eric.feldmann](https://forum.universal-robots.com/u/eric.feldmann)\
**Post date:** [March 27, 2025, 4:18pm UTC](https://forum.universal-robots.com/t/depalletize-skip-x-amount-of-box/39280/4 "2025-03-27T16:18:15Z")

</div>

Yes. Use the Assignment node and switch the input to “Operator.” This displays a popup with an input field for them to type. If you’re using pure URScript, I would still advise you use Polyscope, save the program, then open its script to see what it generates so you know what you need to type.

Doing this you’ll see this is the script:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/d/da4cbb766b79afd0da83a863590ae8bafb2f4ef6.png)

global skipBoxCount=request\_integer\_from\_primary\_client(“Skip any boxes?”)

---

<div class="post-metadata">

**Author:** ![moly59871](https://avatars.discourse-cdn.com/v4/letter/m/ad7895/32.png) [@moly59871](https://forum.universal-robots.com/u/moly59871)\
**Post date:** [March 28, 2025, 7:07am UTC](https://forum.universal-robots.com/t/depalletize-skip-x-amount-of-box/39280/5 "2025-03-28T07:07:07Z")

</div>

thanks ill try it out 😃

---

<div class="post-metadata">

**Author:** ![moly59871](https://avatars.discourse-cdn.com/v4/letter/m/ad7895/32.png) [@moly59871](https://forum.universal-robots.com/u/moly59871)\
**Post date:** [March 28, 2025, 9:39am UTC](https://forum.universal-robots.com/t/depalletize-skip-x-amount-of-box/39280/6 "2025-03-28T09:39:07Z")

</div>

thank you very much, it works exactly as intended. I couldnt find it anywhere in the script manual or anywhere else

---

<div class="post-metadata">

**Author:** ![eric.feldmann](https://avatars.discourse-cdn.com/v4/letter/e/94ad74/32.png) [@eric.feldmann](https://forum.universal-robots.com/u/eric.feldmann)\
**Post date:** [March 28, 2025, 12:15pm UTC](https://forum.universal-robots.com/t/depalletize-skip-x-amount-of-box/39280/7 "2025-03-28T12:15:38Z")

</div>

It’s possible you have an older version of the script manual. [https://s3-eu-west-1.amazonaws.com/ur-support-site/234367/script\_directory\_PolyScope5.pdf](https://s3-eu-west-1.amazonaws.com/ur-support-site/234367/script_directory_PolyScope5.pdf)

I double checked this one and the command is in there. I believe at one point they were undocumented. Or it’s just hard to find unless you already know what you’re looking for haha. Glad it worked for you.
