Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 17603092, Entry date: 06/07/2010

How do you convert the values of the modules if you change from S5 to S7 analog modules?

  • Entry
  • Associated product(s)

If you have replaced the S5 analog modules with S7 analog modules, you can no longer use any standard blocks, except for the R64 block, because they can only be interconnected directly with the inputs and outputs of the analog modules. However, since the modules have different resolutions, the standard blocks would run the risk of providing false results.

However, if you have not used any standard interface in the S5 program, you can supplement the existing program by converting the analog values.

The S5 modules work by default with a resolution of 2048 units - however, the S7 modules have a normal resolution of 27648 units (S7 format).
You must take this change in resolution into consideration in the the S5 program so as not to falsify the result of the evaluation.

The diagram below clearly shows the interrelationships.

Fig. 1: Overview diagram of values transferred between the groups

Definition of tags:
a = Output value of S5 analog input module
b = Output value of S5 processing
c = Output value after analog output module
d = Output value of S7 analog input module
e = Converted value for output to S7 analog output module
X = Units (resolution) of S5 analog module
Y = Units (resolution) of S7 analog module

If you use an S5 standard interface with a resolution of 2048 units, the following conversion factor applies:

Formula 1: Conversion of output values from the S7 input module

The values determined in the S5 controller must also be converted for the analog output. The output modules of the S5 series have a default resolution of 1024 units. In this context, therefore, the conversion formula is:

Formula 2: Conversion of output values of old S5 program

Some S5 interfaces do not work with 2048/1024 units, for example when using the R64 block. This block uses a resolution of 16384 units. In general, the following two formulas apply for converting analog value:

Formula 3: General formula for converting output values from the S7 input module

Formula 4: General formula for converting the old S5 program

When using a 4-20 mA interface, you cannot change the format because S7 modules do not cause a shift of 512 units.

A special example shows the conversion clearly.

You replace an S5 analog input module AE460 with an ET 200S. Furthermore, you replace the S5 analog output module with an S7 module. In the S5 program you use the evaluation with the R64 block. To be able to continue using the calculation with the existing program, before processing the analog value in the S5 controller, you have to convert the new input signal.

Now you can no longer connect the analog values directly with the input of the R64 block. The value from the analog module has to be converted with a factor (this factor cannot be set with the COM REG parameter) and has to be preset on the block as R64 analog format. Once the output values have been calculated by the R64 block, you must once again convert the R64 analog format values with a factor and then output them to the S7 analog output module.

As described above, the R64 block works with a resolution of 16384 units (analog format). Therefore you have to recalculate the conversion factor. The combination of formulas 3 and 4 applies.

Formula 5: Conversion for output values of the S7 module when using the R64 block

Formula 6: Conversion for output values of the S5 controller

More information on format configuration is available in Entry ID: 96392.