IMPORTANT - Speaking about Modbus Slave implemented in REXYGEN:
There should be no need for having input and output flags for the same item (same name).
If you want to observe it's state (i.e. changes made by writing from Master), you can add to your REXYGEN project input flags ("From" function block).
Output flags ("GoTo" function block) within Modbus Slave context are valid only for registers meant to be READ ONLY for Master.
If you want to store some initial values within Modbus Slave, use "Init Values" box in Item configuration dialog.
If you can share a test Modbus mapping table suitable for you project I can prepare Modbus Slave implementation example for you.
Hope it helps.