It appears that Holding Registers are writable only from Modbus. These are then mapped to Codesys PLC variables. Is this mapping one-way only?
For values updatable by PLC code I have used Input Registers.
Is this by design?
i.e. Scada (client) --> Modbus --> Holding Registers --> PLC (server)
and Scada (client) <-- Modbus <-- Input Registers <-- PLC (server)
Can Holding Registers be cleared in the PLC by PLC code? E.g. to clear a recieved command word after execution of local code.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, Indeed. The problem was that the register items were still of type %IWx, i.e. read only registers.
Only after deleting the mapped variables and fiddeling with the number of registers setting in the 'General' tab, did the type change to %QWx, for writable registers. The user-program can now clear the received registers after processing. @i-campbell, Thanx.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It appears that Holding Registers are writable only from Modbus. These are then mapped to Codesys PLC variables. Is this mapping one-way only?
For values updatable by PLC code I have used Input Registers.
Is this by design?
i.e. Scada (client) --> Modbus --> Holding Registers --> PLC (server)
and Scada (client) <-- Modbus <-- Input Registers <-- PLC (server)
Can Holding Registers be cleared in the PLC by PLC code? E.g. to clear a recieved command word after execution of local code.
There is a checkbox on the General Tab next to holding registers named "Writeable", which makes them writeable by the PLC.
https://help.codesys.com/webapp/_mod_edt_slave_device_com;product=core_modbus_configuration_editor;version=3.5.17.0
That has been tried, but I will try again.
Yes, Indeed. The problem was that the register items were still of type %IWx, i.e. read only registers.
Only after deleting the mapped variables and fiddeling with the number of registers setting in the 'General' tab, did the type change to %QWx, for writable registers. The user-program can now clear the received registers after processing.
@i-campbell, Thanx.