Home Integration

Discussion

Left ArrowBack to discussions page
cobottiukkocobottiukko Posts: 17 Handy
Hi Pros,

I would like to learn how to communicate between UR robot and production machine via serial communication. The production machine has RS-232 serial communication. Since the UR has not built-in RS-232 I think we should add some converter in between controllers. Which is the easiest way to establish the communication? 

I have to say I am not that familiar with serial communication but I have seen youtube video where the connection is established. Still I don't quite understand how we can communicate between machines. In video they are sending message "g r0X24". Obviously they are asking something from the machine but where they have gotten r0x24 line? Are those some registers which has to be asked from machine builder or so? 

I would be glad if someone has straight answers or solutions but I am here to learn so if someone could follow me for the websites where information can be found. Thanks.

Comments

  • bcastetsbcastets Vacuum Beta tester Posts: 695 Expert
    If this is modbus RTU you could use a Modbus RTU to Modbus TCP converter like this one:
    https://www.anybus.com/products/gateway-index/specific-gateways/anybus-gateways/anybus-modbus-rtu-to-tcp-gateway

    Then you could map the modbus register of your devise on the robot.
    You can find more information about modbus regsiter mapping in UR manual.



    You should have information about serial communication of you devise in its manual. If the devise use modbus RTU you should have information about modbus registers.


  • bcastetsbcastets Vacuum Beta tester Posts: 695 Expert
    The video is quite well detailed. They are using a RS232/Ethernet converter and directly send serial command over ethernet using UR script. It looks like a good option.


  • matthewd92matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,267 Handy
    @cobottiukko the commands that are being sent over the serial communication come from the equipment manufacturer.  For instance, we communicate with a stepper drive package from Automation Direct over RS485 ad some of the commands that we send are like "FL 2000" which means feed to a length of 2000 steps or "SK" which means kill any previous steps that were sent immediately.  Without the serial communication information from the OEM that built the drive it would be very hard to know what commands need to be sent.

    What kind of equipment are you attempting to control with the robot?  Do you know who made it?

    As an example, here is an excerpt from a Copley Controls (equipment maker in the video you attached) manual for sending serial commands to a Copley Encoder 



    From what I could find on the commands they were sending in the video you had a "g" for GET and a "s" for SET so you would GET a value of a parameter from the motor controller, "g r0x24" and then you could decide to set the value of the parameter to "0" by sending "s r0x24 0" and then you would verify that the set command was executed by querying the value of the parameter again by calling "g 0x24"



  • cobottiukkocobottiukko Posts: 17 Handy
    Without the serial communication information from the OEM that built the drive it would be very hard to know what commands need to be sent.
    -------
    From what I could find on the commands they were sending in the video you had a "g" for GET and a "s" for SET so you would GET a value of a parameter from the motor controller, "g r0x24" and then you could decide to set the value of the parameter to "0" by sending "s r0x24 0" and then you would verify that the set command was executed by querying the value of the parameter again by calling "g 0x24"
    ----



    Thank you bcastets and Matthew! I knew I could rely on this forum. This was exactly what I was looking for! Now I get the idea how things works with serial communication.
Sign In or Register to comment.
Left ArrowBack to discussions page