Discussion

Left ArrowBack to discussions page
Pierre_DenisPierre_Denis Posts: 4 Apprentice

Hi,

I'm training with URScript but I can't use the popup function.

I've write : popup("Positionner robot (1)",title="Popup",warning=False,error=False)

But everytime the programme try to do this line, I got an error message that said that there a communication problem and that the communication with the controller is lost. Then the UR shuts down and I must re-initialise the arm.


Tanks for your answer.


PS : Sorry for my bad English.

Tagged:

Best Answer

  • matthewd92matthewd92 Posts: 521Founding Pro, Tactile Sensor Beta Testers Handy
    Accepted Answer
    I write them like this popup("text I want", "title", False, False)

    you can also just write popup("text I want") if you don't care about it not blocking execution of the program. 

    If you you care about blocking then you have to write popup("text I want","title", False,False,True). The last one is the blocking command. You can also use the word blocking 

    I write them into pretty much every program without issue. 

Comments

  • Pierre_DenisPierre_Denis Posts: 4 Apprentice

    Tanks for your answer. It works perfectly.

    But I still have a strange activity with my script.

    I use the popup fonction twice in the same script, and I don't know why, but I can write the first popup like you (juste popup("message")) but for the second one I must add all the parameters, if not I have the same error as before.

    For now my working script looks like:

    # some code

    popup("message")

    # some more code

    popup("message","title",False,False,False)

    # end of code

    If I don't write even one "False" I got the error.

    If you know from where it can come from, it would be great. But if not it doesn't really matter.

    Again thanks for your answer.

  • matthewd92matthewd92 Posts: 521Founding Pro, Tactile Sensor Beta Testers Handy
    Not sure, I'll try to test in the simulator when I get a moment. 
  • Pierre_DenisPierre_Denis Posts: 4 Apprentice

    Alright, my script doesn't work any more and I don't know why.

    It was working a bit earlier, so I go for lunch without changing anything in my code.

    When I come back to try it again it wasn't working any more. I'v try both syntaxes (just the message or with all parameters) but it did not change anything

  • matthewd92matthewd92 Posts: 521Founding Pro, Tactile Sensor Beta Testers Handy
    Can you post up the code please. 
  • Pierre_DenisPierre_Denis Posts: 4 Apprentice

    I've find the problem!

    It was caused be timing in the program, the error talks about using waiting or sync(). So I tried to use sleep(1) to see what was appening and I saw that the popups didn't stop the program like I was wanted. So I put the blocking command in popups to "True" (like you said) and now it works perfectly. I've restart the UR to be sure and the script still works.

    If you want I've attach my code.

    Thanks for everything.

  • matthewd92matthewd92 Posts: 521Founding Pro, Tactile Sensor Beta Testers Handy
    Glad you were able to find the issue
Sign In or Register to comment.
Left ArrowBack to discussions page