You are on page 1of 13

Release 10/2010

Changeover from a Previous Version to V2.x

OPEN MODBUS / TCP


Redundant Communication via CP443-1 in H-Systems
Version 2.x 2XV9 450-1MB11

1 General information for the Changeover to V2.0

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.

Redundant Communication via CP443-1 in H-Systems 2XV9450-1MB11


Procedure for the changeover to V2.0 “S7 is Client“

2 Procedure for the changeover to V2.0 “S7 is Client“

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.

2.2 Changes in OB100

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.

Redundant Communication via CP443-1 in H-Systems 2XV9450-1MB11


Procedure for the changeover to V2.0 “S7 is Client“

2. The parameter TIMER_NR_x, SO_TIMER, SO_TIME, END_x, WRITE_PROTECT_x,


SERVER_CLIENT, CHECK_x, FREE_CODE_x, and CODE_x are not longer used.
The data areas 5 to 8 are omitted too.

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.

Redundant Communication via CP443-1 in H-Systems 2XV9450-1MB11


Procedure for the changeover to V2.0 “S7 is Client“

4. Allocate the remaining new initialization parameters: check_conn_cycle, use_all_conn and


single_write according to your requirements.
The parameter use_all_conn must be set to FALSE when the block should react as the one of V1.x
regarding the connection handling (only one connection is used for data transmission).

2.3 Changes in OB1

1. Parameterize MONITOR by multiplying the value of MODB4H with 100. Insert the resulting value in
the format TIME at MB_REDCL.

Redundant Communication via CP443-1 in H-Systems 2XV9450-1MB11


Procedure for the changeover to V2.0 “S7 is Client“

2. The parameters INPUT_HOLDING, CP1_ACTIVE and C_B_ACTIVE are not longer available.

Redundant Communication via CP443-1 in H-Systems 2XV9450-1MB11


Procedure for the changeover to V2.0 “S7 is Client“

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.

Redundant Communication via CP443-1 in H-Systems 2XV9450-1MB11


Procedure for the changeover to V2.0 “S7 is Client“

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.

2.4 Further Changes

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.

Redundant Communication via CP443-1 in H-Systems 2XV9450-1MB11


Procedure for the changeover to V2.0 „S7 is Server“

3 Procedure for the changeover to V2.0 “S7 is Server“

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.

3.2 Changes in OB100

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.

Redundant Communication via CP443-1 in H-Systems 2XV9450-1MB11


Procedure for the changeover to V2.0 „S7 is Server“

2. The parameter TIMER_NR_x, SO_TIMER, SO_TIME, END_x, WRITE_PROTECT_x,


SERVER_CLIENT, CHECK_x, FREE_CODE_x, and CODE_x are not longer used.
The data areas 5 to 8 are omitted too.

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.

Redundant Communication via CP443-1 in H-Systems 2XV9450-1MB11


Procedure for the changeover to V2.0 „S7 is Server“

4. Allocate the new initialization parameter check_conn_cycle according to your requirements.

3.3 Changes in OB1

1. Parameterize MONITOR by multiplying the value of MODB4H with 100. Insert the resulting value in
the format TIME at MB_REDSV.

Redundant Communication via CP443-1 in H-Systems 2XV9450-1MB11


Procedure for the changeover to V2.0 „S7 is Server“

2. The parameters INPUT_HOLDING, CP1_ACTIVE and C_B_ACTIVE are not longer available.

Redundant Communication via CP443-1 in H-Systems 2XV9450-1MB11


Procedure for the changeover to V2.0 „S7 is Server“

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.

Redundant Communication via CP443-1 in H-Systems 2XV9450-1MB11


Procedure for the changeover to V2.0 „S7 is Server“

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.4 Further Changes

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.

Redundant Communication via CP443-1 in H-Systems 2XV9450-1MB11

You might also like