Home Programming


Left ArrowBack to discussions page
KasemKasem Posts: 8 Apprentice
Hello , I'm Kasem ,Mechatronics Engineer

I have some questions about controlling UR3e robot controller from a Beckhoff CX PLC , over Ethernet IP communication , if someone has done it or know how to do it , could you please help me
what i want to do is 
1- I want to send joint variables  (Position and speed ,...) (which are samples from a trajectory generated by ROS and sent to the PLC ) from a Beckhoff PLC over Ethernet IP or Profinet or MODBUS TCP (Whichever is faster and more reliable )  connection to the UR3e robot controllers
2- command the robot to continuously follow the sent target joint positions 

thank you 


  • matthewd92matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,267 Handy
    How fast are you wanting to send the control signals?  If you are able to send every cycle (2ms for e-series, 8ms for cb series) you could use Ethernet-IP or Profinet to write the joint values to 6 float registers. Then you could use a servoj command in the program and use those 6 float variables to create a joint position list. 

    Personally I prefer Profinet but either of the PLC field is protocols work but I’d avoid modbus due to speed of transmission and latency. 
  • KasemKasem Posts: 8 Apprentice
    Hello Mr Matthew , Thank you for your reply 
    I think i'm more inclined to use Ethernet IP , but based on the UR ROS Modern driver , the way it works by opening Ethernet socket  and making UR as a client and the PC as the server to ask for the joints position and running a URScript on UR that reads these position and as you said using servoj command 
    when i contacted UR , they told me about using an Ethernet Socket too , but the issue is that i need the PLC  to be the Client and open two sockets , one for each UR controller , as i have two robots that need to be controlled from the PLC , and i need the PLC to send and receive data from each UR  based on its opened socket and IP address 
    Beckhoff has a TCP library that creates sockets and other blocks that can make the PLC either a server and listens to an opened socket and then receive or send data , and other blocks to make it a client , so it opens the socket and then based on the returned handle and from the open socket with a certain IP AND Port , it can send and receive data to the server 

    the reason i want to make the PLC client (Master )and the URs  Servers (Slaves ) , is that i want the PLC to be in control to send the joint variables and commands and then receive feedback from the URs based on the over all logic 

    all the search i have done ,found that UR is always client , like in this example by UR 

    so i wonder how to make the UR as servers ?
    and the script that i need to develop to run on UR , i want to make it to execute the recieved joint positions ,and read inputs and outputs ,safety status to make it available for the PLC to read it , if you please could guide me  how to do this 
    i read in this link that Profinet is faster ,more deterministic and reliable than Ethernet IP https://us.profinet.com/profinet-vs-ethernetip/
    Is there much difference in the implementation of both protocols for the same applications on UR ?

    Sorry for the long post , but i hope i made it clear 

  • paulesppaulesp Posts: 2 Recruit
    edited September 2020
    Hi , can you resolved your problem , i need some help to Connect the ur3 robot with twincat
  • matthewd92matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,267 Handy
    @Kasem we have two cells comprised of two robots each that are controlled by a Siemens S7-1200 PLC using Profinet. The robots have basic programs on them and the PLC is monitoring both robots in real-time to determine which robot can operate in the shared space depending on the state of the cell and the position of the robots. 

    The PLC is also controlling all IO even when the robot commands an IO to open or close its the PLC that is taking the action. We are using Profinet expansion blocks from Turck (TBEN 16DXP I believe is the part number) so that all the distributed IO has short cables and nothing is wired to the robots. This allows either robot to control the outputs and receive the same input signals if needed. 

    I have found Profinet to be faster in testing with various systems as well as I prefer the Siemens TIA programming environment over the Allen Bradley Studio 5000, we have both and Siemens seems to be much easier to learn and configure the cell you are building. 

    I would avoid trying to do anything over standard socket communications, especially since you will be using a PLC. If you were using a PC as the controller I would recommend RTDE or XMLRPC or a combination of the two for the control logic. You want something that is fast and deterministic when doing control and that is not depending on making a call and waiting for an answer which XMLRPC or standard socket communication would rely on
Sign In or Register to comment.
Left ArrowBack to discussions page