Discussion

Left ArrowBack to discussions page
SebastienSebastien Posts: 198 Handy
Hi pros,
I was wondering if there was a simple way to add limits to values operators can enter in operator variables? So far what I am doing is having an if loop right after the operator variable assignment. But I was wondering if there is something that could be more neat!

Comments

  • louis_bergeronlouis_bergeron Posts: 11 Handy
    Sebastien,

    I'll suggest you program your loop in a script file as a new function.  Placing this script file in the beginning of your UR program will allow you to use your own function everywhere in a neat way.  As an example, I've programmed a new min/max prompt function in a script file.  Then I simply use this new function anywhere I need it in the program.



      


    This new operator prompt function is made for an integer but you can do the same for a floating point variable.  By changing the function request_integer_from_primary_client with request_float_from_primary_client.

    Is it something like this you're looking for?

  • matthewd92matthewd92 Posts: 403Founding Pro, Tactile Sensor Beta Testers Handy
    @louis_bergeron This is a great idea, will have to keep this in my back pocket. 
Sign In or Register to comment.
Left ArrowBack to discussions page