Universal Robots Forum

Load and execute program from input value

Is it possible to load a program by reading an analog input value?

Not directly that I’ve seen, but you may be able to run a program that reads that analog value and calls a sub program (or Assignment to select Sequence Case) based on the input.

In this example I use Operator for input but you can also use an expression.

Thanks for the response. I was thinking separate the programs would be a tidier way to do it, but this seems to be a decent method as well.

Just be aware that you cannot call subprograms from within subprograms. This means if the program you are switching to HAS subprograms in it, it will not work when called as a subprogram.