06-19-2015 02:43 PM
I have a UR5 robot connected to a PC via ethernet. I am currently trying to have the robot and PC send strings back and forth via the TCP/IP functions in LabVIEW. Using the code below I have been able to recieve strings from my robot sent to my pc, but have been unable to send strings from my to my robot. I am able to send and recieve strings in both directions via the program Sockettest. Does anyone have a lot of TCP/IP knowledge and know how to send strings from my PC to my robot? Alternatively does anyone know how I could connect Sockettest to my LabVIEW code?
06-22-2015 05:46 PM
Actually you can use LabVIEW example in Help>>Find Examples>> Search Tab>>Simple TCP
You would see something like this.
07-14-2015 12:37 PM
Hi robotathon,
I have a UR5 robot like yours, but I'm not able to recieve string from the robot. I'm sending script commands to the robbot using the port 30002 but I can not recieve info from the robot.
Do you find the way to communicate with the UR5? (back and forward), coud you share information?
07-14-2015 01:15 PM
Loop 2 Times
Socket_Test:=socket_open("local IP adress of computer here",port number here)
Wait 0.1
Recieve_Data=socket_read_ascii_float(6)
wait 0.1
tcp_base:=get_forward_kin()
socket_send_string(tcp_base)
socket_send_byte(13)
socket_send_byte(10)
socket_close()
###NOTES
1. The recieve part of the script must be looped or the connection will be timed out and no data will be sent
2. My code is spefically for send and recieving robot position, if you are just sending scripts you won't need "get_forward_kin()", and "socket_read_ascii_float(6)" will probably be replaced by "socket_read_string()"
3. socket_send_byte() functions as a carriage return
4. No data sent from the robot will appear in LabVIEW until the "socket_close()" command is run so you may need to open and close the connection multiple times in the same program
Pictures of my applicable LabVIEW are attatched, let me know if you have any more questions
03-09-2016 10:35 PM
Hi robotathon
I studied your work and figured out your problem. Please see attached pictures.
12-09-2016 09:39 PM
Hello, can you give me the vi? I'am trying to connect my pc to UR5. Thank you!
12-12-2016 12:37 AM - edited 12-12-2016 12:37 AM
Hi seraph1989,
Can you please share the .vi for the above program, we are trying to control an universal robot via labview.
thanks in advance
05-20-2017 09:56 PM
I have a problem with the communication PC-UR5, can you help me pelase, my email is: amu_alex@hotmail.com
thank you so much.
I hope to help me.
Do you have any tutorial??
05-29-2017 03:32 PM
Hi, a faster and easy way to control the UR5 with TCP/IP connection:
1.- sending function scripts, just like the you can find in the manual "The URScript Programming Language" (https://www.universal-robots.com/download/).
This is a faster and easy communication, but one way communication. So the “one way” commands cannot read something back, so reading of inputs or getting the result of a “get_inverse_kin” command will not return the result with this method
05-29-2017 07:58 PM - edited 05-29-2017 07:59 PM
Hi, I am trying to make a small Ui for dashboard server on port 2999.
When I send a command String, robot behaves as expected but, I don't get any reply.
I have a Parellel loop running which is reading incoming data, but I am not getting any data from the robot,
Things tried
1.Data comes Inc socket test application
2. Looped twice for read data
3. Closed connection after read vi
Any suggestion to read robotmode