according to Modbus Server Article the UR has 128 GP Modbus Registers which can be used for communication.
Currently, we have a application using Profinet (on PLC Master Side and other Slaves) and Modbus (for UR Slave only, because there is still no option to access Fieldbus GPIO Registers with the Java API).
My Aim is to Access Single Bits with the script function read_port_bit and write_port_bit. The Doc says it is possible to use the Coil Nr - which in the case of the first General Purpose Register is Adress 2048. When i use this Adress like below:
in other words: read_port_bit or write_port_bit does not work with bit (coil) adresses higher than 255 (Getting Modbus Error with Status Message “2”) - although there are more than 1024x16 Bits to read…
we had this problem with the Fieldbus GPIOs here as well for a couple of times. Things could be much easier if the Java API has direct access to the Fieldbus GPIOs.
I think it as something unavoidable that the value of GPIOs cannot be obtained by java api.
So I had created the urcap for reading and writing GPIOs and published on github repository.
i like your solution but having to send robot programs over the real time interface is not a solution for real real-time applications. Its latency is just too high!
Also, RTDE has less priority than polyscope (messages will not be sent when polyscope has a high performance load).
Therefore a native GPIO Java Interface should be best
I recently got Modbus I/O working myself so let me see if my issues help you.
I am doing Modbus UR <=> Mits PLC
The Modbus Server link you posted is exactly that, It is only vaild for the UR to be the Server (master) and was not accessible to write to from my PLC Master.
In my application, I was able to setup the UR as both a Slave and Server. I use my PLC to read status data from the locations listed on that Server Article (above) and setup the UR as a slave with individual Inputs/ Outputs / Registers
what also confuses me is the naming of slave = server and client = master according to the UR doc, which differs from your explaination.
What i want to do is read the UR‘s input registers from the URCap API (localhost adress) which are changed by the plc. That means i have to read Registers 128 - 255. but how do i access Single Coils with a Name if i can‘t setup a Adress higher than 255 for both registers and bits? When i use a higher adress it says my modbus device is disconnected
Yeah the Server/Master/Slave… confused me too. After about 5 days of messing with it this is what worked. Both my PLC & UR see all the inputs & outputs as single bits, and registers work too
The way i set it up, the inputs are all accessible directly in jobs and should show up to the URCap just like a standard Input signal does.