Also checkout the new CB3 forum
Popup messages send via Script from a PC.
The UR script manual mention this syntax.
But as “ (apostrophe) is a protected character in Python – then it is neseccary to insert in \ from of “ in order to actually send the “ when using Python.
Python program running on PC.
# Echo client program
import socket
import time
HOST = “192.168.0.9″ # The remote host
PORT = 30002 # The same port as used by the server
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
s.send (“set_digital_out(2,True)” + “\n”)
time.sleep (1)
s.send (“popup(\”Messages\”, title=\”The Headline in the Blue box\”, blocking=True)” + “\n”)
time.sleep (1)
s.send (“set_digital_out(2,False)” + “\n”)
time.sleep (1)
data = s.recv(1024)
print “Good bye!”
Provides this result on the Robot.
# Echo client program
import socket
import time
HOST = “192.168.0.9″ # The remote host
PORT = 30002 # The same port as used by the server
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
s.send (“set_digital_out(2,True)” + “\n”)
time.sleep (1)
s.send (“popup(\”Messages\”, title=\”The Headline in the Blue box\”, warning=True, error=False)” + “\n”)
time.sleep (1)
s.send (“set_digital_out(2,False)” + “\n”)
time.sleep (1)
data = s.recv(1024)
print “Good bye!”
Provides this result on the Robot.
# Echo client program
import socket
import time
HOST = “192.168.0.9″ # The remote host
PORT = 30002 # The same port as used by the server
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
s.send (“set_digital_out(2,True)” + “\n”)
time.sleep (1)
s.send (“popup(\”Messages\”, title=\”The Headline in the Blue box\”, warning=False, error=True)” + “\n”)
time.sleep (1)
s.send (“set_digital_out(2,False)” + “\n”)
time.sleep (1)
data = s.recv(1024)
print “Good bye!”
Provides this result on the Robot.
Disclaimer: While the Zacobria Pte. Ltd. believes that information and guidance provided is correct, parties must rely upon their skill and judgement when making use of them. Zacobria Pte. Ltd. assumes no liability for loss or damage caused by error or omission, whether such an error or omission is the result of negligence or any other cause. Where reference is made to legislation it is not to be considered as legal advice. Any and all such liability is disclaimed.
If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
Author:
By Zacobria Lars Skovsgaard
Accredited 2015-2018 Universal Robots support Centre and Forum.
Is it possible to get a pop message when a program i paused? like pressing pause button?
Hi Rune
Thanks for the question.
Maybe consider this article for Popup from an external device.
http://www.zacobria.com/universal-robots-zacobria-forum-hints-tips-how-to/script-popup-messages/
Author:
By Zacobria Lars Skovsgaard
Accredited Universal Robots support Centre and Forum.
Also check out the CB3 forum
Tweet
Follow @zacobria
Hello again.
I was wondering if there is a way to concatenate strings and floats without using a separate RPC or URCap. I want to create a popup telling the user how many times a part of the program ran, like
popup(“The robot moved ” + runsCount + ” pieces of material”,”Title”,False,False)
Hello Kristian
Thanks for the question.
I am not aware of such function.
Author:
By Zacobria Lars Skovsgaard
Accredited Universal Robots support Centre and Forum.
Also check out the CB3 forum
Tweet
Follow @zacobria
Hello there.
Is it possible to close a popup, just like the “Continue”-button on the touchpad would, but with an external digital input? Like, does the popup count as a “pause”, so an external digital input configured to “Start” the program would also close the popup?
Hello Kristian
Thanks for the question.
I am not aware of a possibility to close a popup with an I/O signal, but it is possible by sending a command to the dash board server on port 29999. More informations about the dash board server at this link.
https://www.universal-robots.com/how-tos-and-faqs/how-to/ur-how-tos/dashboard-server-port-29999-15690/
Author:
By Zacobria Lars Skovsgaard
Accredited Universal Robots support Centre and Forum.
Also check out the CB3 forum
Tweet
Follow @zacobria
HI!
Is it possible to close a textbox automatically after 3 seconds?
Thanks!
Hi Erwin
Thanks for the question.
Maybe consider to use the Dashboard server at port 29999 that has a close Popup – more informations at this link
https://www.universal-robots.com/how-tos-and-faqs/how-to/ur-how-tos/dashboard-server-port-29999-15690/
Author:
By Zacobria Lars Skovsgaard
Accredited Universal Robots support Centre and Forum.
Also check out the CB3 forum
Tweet
Follow @zacobria
Hello,
We want to send a message to the Variables Tab without moving the robot, sometimes it works and sometimes not. Below I copied the short program. Could you please advise why the Polyscope behaves like that?, thanks.
Program
Robot Program
to_test_tab≔100
varmsg(“test”,to_test_tab)
Halt
Hello,
We want to send a message to the Variables Tab without moving the robot, sometime it works, sometimes not. Below you can see a screenshot of my program. Could you please advise why it behaves that way?, thanks.
Program
Robot Program
to_test_tab≔100
varmsg(“test”,to_test_tab)
Halt
Hi Osiris
Thanks for the question.
Maybe consider to make the program do some more thing e.g. move the robot or insert a wait statement – maybe such a small program without robot action is too fast.
Author:
By Zacobria Lars Skovsgaard
Accredited Universal Robots support Centre and Forum.
Also check out the CB3 forum
Tweet
Follow @zacobria
Hi,
I’m running two programs in parallel,
1. Read full state message from 30001
2. Send a small program:
textmsg(“starting”)
textmsg(“ending”)
via port 30003.
I can see the “ending” on the screen, but I never get “ROBOT_MESSAGE” package in the first program.
(I get cartezian info, robot_mode_data and other packages)
Why is that?
Thanks.
Hi tali
Thanks for the question.
If you only run the first program to read from port 30001 – do you then get the message ?
Author:
By Zacobria Lars Skovsgaard
Accredited Universal Robots support Centre and Forum.
Also check out the CB3 forum
Tweet
Follow @zacobria
Hi,
Although I fixed my mistake, I still don’t see all the debug messages I sent.
I sent the program:
$ 1 “messaging starting”
textmsg(“starting)
$ 2 “messaging ending”
textmsg(“ending”)
In polyscope I see
Program textmsg started
ending
Program textmsg stopped
In my program I sometimes get the same, sometimes only “ending”
If I remove the textmsgs from the program, , then I get the label messages.
Is there a way to use the lables or the textmsgs in order to debug a program? It seems that only part of the debug messages are sent by the controller.
Found my mistake, I was trying to read it from state message
Hi Lars,
Thanks for your valuable suggestions,here in the below program i am getting the following error in this line Receive_Data = socket_read_ascii_float(6) and the error is function did not find a solution.
Init Variable
Robot Program
Move_To_Pos = Move_To_Pos
Receive_Data = Receive_Data
Point = Point
socket_open(“192.169.100.101″, 30000)
socket_send _string(“UR10″)
wait:2.0
Receive_Data = socket_read_ascii_float(6)
wait:3.0
Loop 6 times
Move_To_Pos[Point] = Receive_Data[Point]
Point = Point+1
movej(Move_To_Pos)
Thanks in Advance
Regards
GANESH P
Hi Ganesh
There are two things that come to my mind.
1.
Are the format of the data you are sending from the host as six floats ?
2.
I assume you are trying to send cartisian cordinates as data for the robot to move. If the current position and the data for the next position involves a move the robot cannot do or if the data is an invalid pose then the robot cannot move. You can verify if the data is valid by inserting them to the pose editor in the GUI and see if the robot can move there. Also if the positions are far away from each other then you can considder to have more positions in between.
Author:
By Zacobria Lars Skovsgaard
Authorised Universal-Robots Support Forum.
Thank you for the response. Using the assignment works the only problem is a user can still cancel the program operation if they are not paying attention but I guess that is just something that will have to be dealt with if it happens.
Thanks,
Jake
I was wondering if there is a way to create a third button on the popup to do a task other than continue or stop program?
Thanks
Hi Jake
Thanks for your question.
You might consider to use the ”Assignment” of variable and choose ”Operator” input and then make the logic in your program react to the user input.
Regards
Lars