Hi I am very new to Ignition and I am trying to set up communication between a Universal Robots UR5e and Ignition, Ignition would be used to create the user interface, before this I need to be able to pass data between the cobot and Ignition.
I reached out to UR and they suggested using Modbus, is this the best way?
I guess I need to setup registers on the cobot which ignition can read and write to, is this the way to go?
This is the communication system I am trying to implement. Steps 4, 7, 12 are variables from Ignition to cobot and (1) can Ignition load and start a program using modbus?
The connection from Ignition has been successful
Since I am using the robot as server and the (2) connection is successful, there is no setup required on the cobot end, like "Modbus Client IO setup" on the cobot under Installations>Fieldbus>Modbus?
Matrix_Engineering Thanks for the docx with adresses; (3)so if I need to pass variables like diameter (float), should I use "General purpose 16 bit registers" 128 - 255 and does that mean I can pass atmost 128 variables (255 - 128)?
(4)And how should I configure the address in Ignition to read 128 and the Modbus Type is it "Holding register(UInt16)":
There is a program setup on the cobot which has "write_output_integer_register(0, 300)" hoping this writes to general purpose register 128 (register 128 is referred as 0 in URscript)
and on Ignition tried reading/subscribing to the corresponding tag:
@mnizamudeen You will not be able to load a specific program through Modbus. There are some ways around this using case a statement in the main robot program that looks at a modbus register and calls the apropriate program. But Ur robot has the dashboard server which takes simple tcp commands. Dashboard Server e-Series, port 29999 - 42728
I can setup a variable in the program and populate the variable over modbus to start the program but dashboard server seems like a better option, but how do I pass the dashboard server commands using Ignition.
@mnizamudeen The easiest way to test the dashboard server is create a tcp device in ignition. Set it to packet based.
click advanced properties and check the writable option it's false by default. Put a newline character for the writeback message Delimiter.
The link I sent above has the list of commands. Just write your message to the writable tag for the tcp device.
I have set up modbus communication, but the value readout on the tag within ignition designer is '0'. The value for the same variable on the teach pendant is increasing, but the value is not being read by the tag.
Show the address map for the robot and show the OPC path configuration for your tag that is not reading anything. Also, are there any errors/warnings in your gateway log?
You are missing the leading unit Id and you also have the tag defined as a float, but are only reading a single modbus register. Try [UR3 ModBus]1.HRF225.
With that change I am still getting '0' unfortunately. If it helps, I'm converting a program variable value to modbus using the write_port_register(225,Downtime_Output) thread script.
Try adjusting the Ignition side register to [UR3 ModBus]1.HRF224 or [UR3 ModBus]1.HRF226. you might be off by one register, though I would expect you to be getting a bogus value if you were off by one. Also, ensure 0-Based Addressing is enabled in the Ignition configuration for your device.
Are you able to successfully read any of the robot status registers?
Wait I'm blind, you are missing ns=1;s= from your OPC path configuration on your tag. Try ns=1;s=[UR3 ModBus]1.HRF225. I'm surprised it didn't give you a configuration error.