JELowe (Customer) asked a question.

Productivity Custom Protocol Ethernet CPoE/CPE, Setting up Dashboard for UR Communication

P2-622 PLC

UR20 5.14 and UR5e/10e 5.15

Trying to read/write dashboard commands to universal robots. Using a PC, Socket Test 3.0, it works well.

 

UR: IP Address, Port 29999 are set correctly and verified with the socket test tool and PC

 

Created a 1D Array of ASCII for various commands

CPE Instruction

  • Receive Incoming Messages
  • Send Outgoing Messages: Selected, not actively setting
  • String: Sending the selected ASCII from the 1D Array
  • In Progress: will toggle
  • Complete: will register message has sent

 

UR does not recognize the messages and cannot figure out how to receive the replies, if any. The problem is on the PLC side and configuring the CPE/CPoE.


  • ADC_TechnologyGroup_06 (AutomationDirect)

    Good morning,

     

    I am not experienced with Universal Robots (UR20, UR5, etc.) and cannot say this for certain, but a lot of devices that are receiving ASCII type commands are also expecting some type of termination character, e.g. CR/LF, etc. A lot of test tools on PC's like PuTTY automatically have that control character when the user presses the Enter key to send a command, and I suspect that Socket Test likely does the same (I cannot install this software on my work PC currently so I cannot verify this is true).

     

    If your devices also require a non-printable control character like CR/LF (0x0D0A in hex) to terminate a message, then take a look at Productivity Help Topic P201 on the Copy Character (CPC) instruction which has an example of how to pack those control characters into String data types.

     

    The code shown in the image below is an example that allows users to put control characters into String tags and shows the command being received properly in PuTTY on the PC.

     

    P1-550 testing CPE to PuTTy image 1 

     

    Expand Post
  • Adisharr (Customer)

    The UR controller will need a termination character. Just a gripe - I don't know why Productivity doesn't make it easy to embed one w/o having to use a separate instruction. Definitely room for improvement there. DoMore makes this super simple.

  • ADC_TechnologyGroup_06 (AutomationDirect)

    @adisharr thank you for sharing this information! I will forward the constructive criticism to the Productivity Engineering team as that's a good point and a common enough problem that it trips people up as seen in forum posts here.

    • Durallymax (Customer)

      Yeah having to brute force my way through adding CR/LF at one point was a bit twisted when other platforms (including CLICK) are much simpler.

  • JELowe (Customer)

    Thank you for the replies, still trying to test and achieve communication with the UR Robot. I'll keep you all posted with findings.

  • JELowe (Customer)

    Update.

     

    CPoE: Hardware configuration

    Target IP: UR IP Address

    Use TCP - CPU as the Master

    -TCP Port: 29999

    -Enable: Tag Name for Boolean

     

    Ladder Logic:

    1. Enable: Tag true
    2. Custom Protocol Ethernet
      1. Select CPoE device, above
      2. Receive Incoming Messages
      3. String

     

    Using this combination I'm able to read from the UR Dashboard successfully. Writing commands is not functioning yet. Will continue to investigate. Might have to create a second CPoE using "Use TCP - CPU as a Slave." The UDP port has yielded no success.

    Expand Post
  • RoboDom (Customer)

    I had this exact problem yesterday. The solution is to add a newline/LF operator (\n) to the end of your CPE message string. However, you can't just add "\n" to the string as that's just the abstract representation of the operator.

     

    My CPoE setup is the same as yours (IP address of UR, port 29999, Use TCP - CPU as Master).

     

    You'll want to use the following in order (this example is for the "Play" command):

    • a CPD coil (source: 0x0A, destination: LF Int Array(1))
    • a CPC coil (copy type: integer array to string, source: LF Int Array, destination: LF String)
    • a PKS coil (source: "play", length: 4, source: LF String, length: 1, destination: URCommand.Play)

    I used a UDS made up of strings for each of the different commands, and a PKS coil for each command.

     

    To send each command, use a CPE coil (device: UR_CPoE, type: send outgoing messages, bytes to send: 5 (number of characters in your command "play" plus one for the LF operator), string: URCommand.Play).

     

    To read the response from the UR, use a CPE coil (device: UR_CPoE, type: receive incoming messages, string: UR_Response_String).

     

    Some of the names above are tags I created, and I actually have a generic "UR_Command_String" tag for the outgoing CPE coil. I copy whichever URCommand tag I want to send to UR_Command_String and then just have one outgoing CPE coil regardless of which command I'm sending. I've attached pictures of my rungs for further reference.

    Screenshot 2024-11-07 140347Screenshot 2024-11-07 141914Screenshot 2024-11-07 142020Hope this helps!

    Expand Post
    • ADC_TechnologyGroup_06 (AutomationDirect)

      @RoboDom thank you for the input. I had suspected as much, but being unfamiliar with UR robots wasn't 100% certain until you and others mentioned there's definitely a need for a control character. Thanks for the example!

      • RoboDom (Customer)

        It was this post that got me to the solution, as I wasn't previously familiar with converting control characters into ASCII. I knew the UR Dashboard Server needed the "\n" termination character, and your initial example above made the pieces all come together. Thanks!