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.
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.
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.
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?
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:
global skipBoxCount=request_integer_from_primary_client(“Skip any boxes?”)
thanks ill try it out
thank you very much, it works exactly as intended. I couldnt find it anywhere in the script manual or anywhere else
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
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.