
The Modbus slave will define the function codes to be used by virtue of the fact that specific data is held in specific Modbus registers. Gould-Modbus Summary of the GOULD-MODBUS Protocol It will save considerable time and frustration to have a good idea upfront of the mapping of Modbus data to S7 data. The following FCs can be used to carry out data exchange register-by-register: FC 03 Read holding registers, FC 04 Read input registers, FC 06 Preset single register, FC 16 Preset multiple registers.

The following FCs can be used to carry out data exchange bit-by-bit: FC 01 Read coil (output) status, FC 02 Read input status, FC 05 Force single coil, FC 15 Force multiple coils.
