Professional Documents
Culture Documents
If you have already used a previous version of “ModbusTCP CP Redundant and want to changeover it
to the new version, some changes in the S7 program are required. An update via “File” -> “Check
and Update Accesses” is not possible due to the change of the interface of the function block.
With version 2.0 there are separate blocks for “S7 is Client“ and for “S7 is Server“.
The use of small and capital letters for the parameter names of the new block shows only the distinction
between initialization parameters (small letters) and runtime parameters (capital letters).
You can find the latest information regarding V2.0 here: www.siemens.com/s7modbus.
2.1 Preparation
Copy the new Modbus blocks FB909 and FB908 as well as FC10, FC11 and DB3 from the library into
your user project. Whether you have already used these block numbers in your project, you may rewire
the FBs and FCs or rename the DBs.
Open the blocks which the previous Modbus block was called in (OB100 and cyclic OB).
Call the new block FB909 MB_REDCL with a new instance DB subsequent to the previous call of
MODB4H. The block FB908 is called internally and is not called in the user program.
1. Assign the following parameters of MODB4H to the new block: id_0_a, id_1_a, id_0_b, id_1_b,
laddr_cp0 und laddr_cp1. Please note, that the parameter ID was changed from the data type INT
to WORD.
3. The data areas 1 to 5 were used for Holding Registers and the areas 6 to 8 for Input Registers with
the block MODB4H. This segmentation was changed. The block MB_REDCL supports 4 data
areas. Each area can be configured for different data types with the parameter data_type_x.
Parameterize the block MB_REDCL with the parameters data_type_x, db_x and start_x according
to your requirements
The meaning of the new parameters is specified in the manual, section 5.4.
The last Modbus address in the DB (MODB4H: end_x) is defined by the length of db_x. It is
calculated by the FB automatically.
1. Parameterize MONITOR by multiplying the value of MODB4H with 100. Insert the resulting value in
the format TIME at MB_REDCL.
2. The parameters INPUT_HOLDING, CP1_ACTIVE and C_B_ACTIVE are not longer available.
3. Transfer the following parameters of MODB4H to the new block: ENQ (from ENQ_ENR),
START_ADDRESS, LENGTH, WRITE_READ, UNIT, DONE (from DONE_NDR) and ERROR.
4. Fill in the new parameters REG_KEY, DATA_TYPE, LICENSED, BUSY and STATUS_x according
to your requirements.
It is not necessary to connect the parameter IDENT_CODE.
The selection of the Modbus data areas (previous: Holding Register and Input Register; with V2.x:
Coils and Inputs additionally) is not longer parameterized with the input INPUT_HOLDING but with
the input DATA_TYPE. Adapt your program regarding these parameters in the cyclic OB
accordingly.
5. The outputs BUSY, DONE, ERROR and STATUS_x are displayed dynamically and are only
available for one PLC cycle. They must be copied to different variables when they should be
displayed in a variable table or when they are used for further program actions.
Adapt your program accordingly.
1. Insert the programming error OB121 into your program, if not already included. This block is
needed for the licensing; see also manual, section 4 “licensing”.
2. Delete the previous Modbus call or comment it out. Transfer the program to the PLC and execute a
Re-start of the PLC.
3.1 Preparation
Copy the new Modbus blocks FB909 and FB908 as well as FC10, FC11 and DB3 from the library into
your user project. Whether you have already used these block numbers in your project, you may rewire
the FBs and FCs or rename the DBs.
Open the blocks which the previous Modbus block was called in (OB100 and cyclic OB).
Call the new block FB907 MB_REDSV with a new instance DB subsequent to the previous call of
MODB4H. The block FB908 is called internally and is not called in the user program.
1. Assign the following parameters of MODB4H to the new block: id_0_a, id_1_a, id_0_b, id_1_b,
laddr_cp0 und laddr_cp1. Please note, that the parameter ID was changed from the data type INT
to WORD.
3. The data areas 1 to 5 were used for Holding Registers and the areas 6 to 8 for Input Registers with
the block MODB4H. This segmentation was changed. The block MB_REDCL supports 4 data
areas. Each area can be configured for different data types with the parameter data_type_x.
Parameterize the block MB_REDSV with the parameters data_type_x, db_x and start_x according
to your requirements
The meaning of the new parameters is specified in the manual, section 6.4.
The last Modbus address in the DB (MODB4H: end_x) is defined by the length of db_x. It is
calculated by the FB automatically.
1. Parameterize MONITOR by multiplying the value of MODB4H with 100. Insert the resulting value in
the format TIME at MB_REDSV.
2. The parameters INPUT_HOLDING, CP1_ACTIVE and C_B_ACTIVE are not longer available.
3. Transfer the parameter ENQ_ENR of MODB4H to the input ENR of the new block.
The parameters START_ADDRESS, LENGTH, WRITE_READ and UNIT are not longer available
as output. These values can be selected from the IDV if necessary. You can find further information
regarding this matter in the manual section 6.2.
4. Fill in the new parameters REG_KEY, LICENSED and BUSY according to your requirements.
It is not necessary to connect the parameter IDENT_CODE.
5. The outputs NDR_x, ERROR_x und STATUS_x are available for each of the 4 configurable
connections. Connect these new parameters for the configured connections.
6. The outputs BUSY, NDR_x, ERROR_x und STATUS_x are displayed dynamically and are only
available for one PLC cycle. They must be copied to different variables when they should be
displayed in a variable table or when they are used for further program actions.
Adapt your program accordingly.
3. Insert the programming error OB121 into your program, if not already included. This block is
needed for the licensing; see also manual, section 4 “licensing”.
4. Delete the previous Modbus call or comment it out. Transfer the program to the PLC and execute a
Re-start of the PLC.