Universal Robots Forum

How to read holdings registers with modbus TCP / IP communication

I need to read holdings and inputs registers once the program is started using URScript commands.

We are designing a URCap which acts as a modbus client and connects with a PLCNext AXC F 2152 as a server. We have to read the holdings and input registers once the program has started. I am trying to use URScript commands, it adds a signal with modbus_add_signal and I get the value with modbus_get_signal_status. if I add only one or two signal it works, the problem appears when I add more than one or two signals.

this is my code:

the error:
fallo comand script

I await your reply, thanks for help.