Modbus addresses for Universal Robots

I’m branching out in my skill set a bit by connecting to a Universal Robot using Modbus TCP. I’m connecting to it, no problem. I’m able to get addresses into the addressing section of Ignition, no problem. What I don’t know for sure is what addresses return what values. I’m getting something back on some of them so I know I’m headed in the right direction.

Question: Has anyone here integrated a Universal Robots UR5 arm into their work and if so can you provide some clearer insight into the addressing scheme Universal has listed on their website?

universal-robots.com/how-to … ver-16377/

Much appreciated,
Jeff

It looks fairly straightforward - what are you having problems with?

One thing I see immediately is you’ll want to turn the “one-based addressing” setting on the driver to false.

From there, you should be able to create a tag with an OPC Item Path like “[device_name]HRUS4” and “[device_name]HR5” to get the value of analog input 1 and the domain e (according to the document you linked).

HRUS vs HR just tells the driver to read the value as unsigned (US=unsigned short) rather than signed, which is the default. The document you linked states that all values are unsigned.

whenever I am figuring out the settings for a modbus device I always set up 3 consecutive addresses.

So for a bit I would set up 00000, 00001, 00002 (or for unity type processors %M0, %M1, and %M2).

Set up ignition to look at these three tags (I.e. [DeviceName_in_Gateway]C1 for 00001). In your PLC set all the coils to 0 and then toggle just 00001, observe which tag in ignition goes high. If C0 or C2 is toggled then you need to enable or disable zero based addressing.

Next repeat this for an integer set up three addresses again, 40000, 40001, 40002 and create three tags in ignition (i.e. [DeviceName_in_Gateway]HR1 for 40001). Modify the value in the PLC and make sure it shows up correctly in ignition.

Repeat this one more time for a real (it will also use a 4x register, but reals, DINTS, and UDINTs all use 2 consecutive registers so make sure you space your addressing appropriately). Reals use the prefix HF instead of HR. For more info on the modbus datatype prefixes check out this page, it’s pretty straight forward after you try it out a couple times. If these show up as crazy values instead of what you enter into the PLC try toggling the value of the “Reverse Word Order” in the device’s advanced settings in the gateway (It’s right above the option to enable/disable zero-based addressing).

After you’ve confirmed that each data type is being displayed correctly at the right address you’re set!

Sorry I can’t be more specific with “check this uncheck that”, but modbus standards are more like… guidelines, they can vary widely between brands.