Universal Robots Forum

Available user inputs for Popup dialog in urscript

Summary

For simple urscript programs it would be very convenient to have more flexible user input options via Popup dialog windows. Right now it’s only able to block execution and select either Stop or Continue. Possibility to have at least 2 choices like Stop, A or B, and numeric inputs like “N times” would allow for very fast and flexible development of programs.

What is it?

We have some processes where we would like the user to be able to skip or redo some steps at some specific breakpoints in the program, and select if not skipping how many times to execute something. We know we could use Digital Inputs or more complex types of hardware inputs but it would be much more simple to have this directly on the Teach Pendant.

Currently the Popup dialog is the only way to have some sort of user interaction with the control flow of the program, but it only can work as a simple pause by blocking until pressing Continue. It would be very convenient if the popup dialog was able to return some information if it was also possible to declare more input choices besides Stop and Continue. Even something just as simple as Stop, Option A, Option B, or Stop, N times, Skip (with numeric input and selectable range ie 1-5 times).

Why is it needed?

This would save a lot of time to be able to do this directly on screen so that operators can pick what they need to do, skip tasks if unnecessary and set a number of times for a process to run. I know it might be possible to do this from URCaps but being able to integrate this directly from a post-processor to export urscripts is much more simple.

This is actually already possible! its just that for whatever reason the script commands required are not listed in the script manual. You’ll be able to see that the assignment program node has a few selectable options, for example you can select a boolean popup, integer popup etc. By adding these regular program nodes to a program, saving it, then checking the script file, you can actually find out the script commaneds for these improved popups. More information can be found here:

EDIT: its the assignment program node, not the popup program node

Ah wow that’s awesome! Yeah that script manual needs an update then :wink: Thanks a lot! will be trying out right now.

Hello hi11, Sam,

It is not needed to use script code to achieve such functionality. The request from primary client function is being represented by assignment node with source as operator. It is standard Polyscope GUI functionality.

Please note: for any popup type (popup node, popup script, assignment by operator) you can set HTML formatting, to present message in clear form (as on above picture).

Hope it explains, that this functionality can be also achieved with simple built-in Polyscope program node.

Hi Kaha,

The problem here is that I have some process-specific software generating a complete urscript file. The URP program on Polyscope is a simple script node importing this file, and during the machining operations there are some optional calibrations steps as well as optional selectable or skippable steps by the user. All is generated by the post-processor so I can’t have these Polyscope nodes come before or after the script node. What Sam described is exactly what I need: ability to block program execution while asking for user input for true/false or integer value, returning back to program execution and either skipping program blocks or using the integer value to adjust things, all embedded in a standalone urscript file.

So I am aware that this is doable from Polyscope nodes, but it’s also very handy to be able to do that directly from script.

Hello @hi11,

I’m glad to hear it is what you were looking for. It was just about to point out the proposed solution is just how ‘assignment from operator’ looks in the script level :wink: .