0% found this document useful (0 votes)
586 views24 pages

S5 To S7 Conversion Tips V1

A compilation of Tips and Tricks for conversion of SIMATIC S5 software (STEP5 ) to SIMATIC S7 ( STEP7 )

Uploaded by

Naveen Nagar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
586 views24 pages

S5 To S7 Conversion Tips V1

A compilation of Tips and Tricks for conversion of SIMATIC S5 software (STEP5 ) to SIMATIC S7 ( STEP7 )

Uploaded by

Naveen Nagar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

S5 TO S7

CONVERSION
A Compilation of Tips, Tricks &
FAQs
Version - V1.0

Compiled By

MNC Automation Pvt. Ltd.


www.mncautmation.com

1. INDEX
Contents

Page

1.

Index

2.

Introduction

3.

Binary Commands

4.

Arithmetic Operations

5.

Counters

6.

Timers

10

7.

Linking Operations

11

8.

String Data

13

9.

Conversion of Blocks

14

10.

Analog Values

18

11.

Bit Byte Indirect Addressing

21

12.

PID Control Parameters

23

2.

INTRODUCTION

SIMATIC S5 has been a workhorse for the Industrial Automation for Decades. Even though it was
phased out more than 10 years ago, it is still popular among users.
There are still many SIMATIC-S5 systems running in various industries and are gradually being
converted to SIMATIC S7. Siemens has provided us with a Manual on S5 to S7 conversion tool,
which is installed as a part of the STEP7 Installation. This Manual can be downloaded from the
following link :

http://support.automation.siemens.com/WW/view/en/45531547

However there are many more Tips, Tricks and FAQs scattered around the Support Portal which are
quite useful for anyone who has to convert a SIMATIC-S5 system to a SIMATIC-S7 system.
This is a compilation of many of these FAQs in one document to serve as a comprehensive guide for
the programmers.
This is the First version of the Document intended for free circulation among programmers.
We intend to keep updating the document from time to time. Suggestions and advise for the same is
welcome.

Release Data :
1

Version - V1.0

Initial Release

3.

BINARY COMMANDS

The table below gives a list of STEP5 commands and the equivalent commands that you must use in
STEP7 when programming an S7-300/400. This table is designed to act as a link to your STEP5 know-how
when creating a STEP7 Program

Operand area in STEP5

Operand area in STEP7

Flag

Bit memory

Digital inputs

Digital inputs

Digital outputs

Digital output

Data bit of a data word

DBX

An operand on a memory

from a data block

area that is controlled via


the DB1 tab.
DIX

An operand on a memory
area that is controlled via
the DB2 tab.

Position

IN

Input parameter

IN_OUT

Through parameter

OUT

Output parameter

Temporary variable

STEP5
Operation

STEP7
Permissible
operand

Operation

Permissible
operand
I,Q,F,L,DBX,DIX,IN,

Query at "1"

I,Q,F,D

Query at "0"

QN

I,Q,F,D

QN

F 1.0

F 1.0

F 1.1

F 1.1

F 1.2

NOT

QN

F 1.2

Change state of signal flow

I,Q,F,D

IN_OUT
I,Q,F,L,DBX,DIX,IN,
IN_OUT

F 1.2
I,Q,F,L,DBX,DIX,IN,
IN_OUT

DE query direct from physical input to


"1"
DE query direct from physical input to
"0"
Assign bit

Assign bit directly to physical address

Set and reset

PY1

PIB 1

IB1

IB 1

I 1.0

I 1.0

PY1

PIB 1

IB1

IB 1

QN

I 1.0

QN

I 1.0

I,Q,F,D

Q 1.0

Q 1.0

QB 1

QB 1

T PY 1

TQB 1

F 1.0

F 1.0

I,Q,F,L,DBX,DIX,OUT
IN_OUT,stat,temp

R
I,Q,F,D

I,Q,F,L,DBX,DIX,OUT,
IN_OUT

Direct set and reset on the physical


channel address of the module
Leading edge
(example: F 1.1 is one cycle long "1")

Q 1.0

Q 1.0

Q 1.0

Q 1.0

QB 1

QB 1

PY 1

PQB 1

Q
Q
=
Q
R
QN
S

I 1.0
F 1.0
F 1.1
F 1.1
F 1.0
I 1.0
F 1.0

Q
FP
=

I 1.0
F 1.0
F 1.1

I,Q,F,D
Trailing edge
(example: F2.1 is one cycle long "1"

Q
Q
=
Q
R
Q
S

I 2.0
F 2.0
F 2.1
F 2.1
F 2.0
I 2.0
F 2.0
I,Q,F,D

F,DIX
Q
FN
=

I 2.0
F 2.0
F 2.1

F,DIX

4.

ARITHMETIC OPERATIONS
Table 01 - Operands in STEP 5 and STEP 7.

Operands in STEP 5

Operands in STEP 7

Markers (MB,MW,MD)

Markers (MB,MW,MD)

Input (IB,IW,ID)

Input (IB,IW,ID)

Output (QB,QW,QD)

Output (QB,QW,QD)

DW

Data word from a data block

DBW

Data word from a global data block

DIW

Data word from an instance data block

IN

Input parameter of an FC or FB

IN_OUT

In-out parameter of an FC or FB

OUT

Output parameter of an FC or FB

Temporary variable, local data

DIX

Data bit

Table 02 - Comparison operations in STEP 5 and their STEP 7 equivalents in the STL programming
language.

Function description

Operations in STL

Load content of addressed byte, word or double word in ACCU 1.

STEP 5

STEP 7

<Operand> <Operand>
Transfer content of ACCU 1 into target address (byte, word or double
word).

<Operand> <Operand>

Compare two fixed point numbers (16 bit) for "equal to". If ACCU 2 is equal

!=F

==I

><F

<>I

>F

>I

<F

<I

to ACCU 1, RLO=1.
Compare two fixed point numbers (16 bit) for "not equal to". If ACCU 2 is
not equal to ACCU 1, RLO=1.
Compare two fixed point numbers (16 bit) for "greater than". If ACCU 2 is
greater than ACCU 1, RLO=1.
Compare two fixed point numbers (16 bit) for "less than". If ACCU 2 is less
than ACCU 1, RLO=1.

Compare two fixed point numbers (16 bit) for "greater than or equal to". If

>=F

>=I

<=F

<=I

!=G

==R

><G

<>R

>G

>R

<G

<R

>=G

>=R

<=G

<=R

!D

==D

><D

<>D

>D

>D

<D

<D

>=D

>=D

<=D

<=D

ACCU 2 is greater than or equal to ACCU 1, RLO=1.


Compare two fixed point numbers (16 bit) for "less than or equal to". If
ACCU 2 is less than or equal to ACCU 1, RLO=1.
Compare two floating point numbers (32 bit) for "equal to". If ACCU 2 is
equal to ACCU 1, RLO=1.
Compare two floating point numbers (32 bit) for "not equal to". If ACCU 2
is not equal to ACCU 1, RLO=1.
Compare two floating point numbers (32 bit) for "greater than". If ACCU 2
is greater than ACCU 1, RLO=1.
Compare two floating point numbers (32 bit) for "less than". If ACCU 2 is
less than ACCU 1, RLO=1.
Compare two floating point numbers (32 bit) for "greater than or equal to".
If ACCU 2 is greater than or equal to ACCU 1, RLO=1.
Compare two floating point numbers (32 bit) for "less than or equal to". If
ACCU 2 is less than or equal to ACCU 1, RLO=1.
Compare two fixed point double words (32 bit) for "equal to". If ACCU 2 is
equal to ACCU 1, RLO=1.
Compare two fixed point double words (32 bit) for "not equal to". If ACCU 2
is not equal to ACCU 1, RLO=1.
Compare two fixed point double words (32 bit) for "greater than". If ACCU
2 is greater than ACCU 1, RLO=1.
Compare two fixed point double words (32 bit) for "less than". If ACCU 2 is
less than ACCU 1, RLO=1.
Compare two fixed point double words (32 bit) for "greater than or equal
to". If ACCU 2 is greater than or equal to ACCU 1, RLO=1.
Compare two fixed point double words (32 bit) for "less than or equal to". If
ACCU 2 is less than or equal to ACCU 1, RLO=1.

Table 03 - Operations for calling blocks, closing blocks and jumping to jump labels in STEP 5 and the
equivalents in STEP 7. The jump statements in STEP 7 can be cross-network and the distance between
jump source and jump destination can be greater than 128 statements in STEP 7.

Function description

Operations in STL
STEP 5

STEP 7

Absolute block call.

SPA <Operand>

CALL <Operand>

Conditional block call (RLO=1).

U <Operand>

U <Operand>

SPB <Operand>

SPBNB <jump label>


CALL <Operand>

Absolute block termination.

BEA

BEA

Conditional block termination

BEB

BEB

BE

BE

SPB =M001

SPB M001

(max. 128 statements in one

(cross-network, no

network).

limits)

(RLO=1).
Block termination (completion of a
block)
Jump to jump label.

Define jump label (max. 4 characters). M001: NOP 0

M001: NOP 0

Table 04 - Arithmetic operations in STEP 5 and the equivalents in STEP 7.

Function description

Operations in STL
STEP 5

STEP 7

Add two fixed point numbers (16 Bit): ACCU 2 + ACCU 1

+F

+I

Subtract two fixed point numbers (16 Bit): ACCU 2 - ACCU 1

-F

-I

Multiply two fixed point numbers (16 Bit): ACCU 2 * ACCU 1

xF

*I

Divide two fixed point numbers (16 Bit): ACCU 2 / ACCU 1

:F

/I

Add two floating point numbers (32 Bit): ACCU 2 + ACCU 1

+G

+R

Subtract two floating point numbers (32 Bit): ACCU 2 - ACCU 1

-G

-R

Multiply two floating point numbers (32 Bit): ACCU 2 * ACCU 1

xG

*R

Divide two floating point numbers (32 Bit): ACCU 2 / ACCU 1

:G

/R

Add two fixed point numbers (32 Bit): ACCU 2 + ACCU 1

+D

+D

Subtract two fixed point numbers (32 Bit): ACCU 2 - ACCU 1

-D

-D

Multiply two fixed point numbers (32 Bit): ACCU 2 * ACCU 1

xD

*D

Divide two fixed point numbers (32 Bit): ACCU 2 / ACCU 1

:D

/D

5.

COUNTERS

The following table lists the command sequences for counters under STEP 5 and their equivalents in
STEP7

STEP5

STEP7

Operation

Operand

Operation

Operation

Pure up

I 2.2

I 2.2

counter

CU

C6

CU

C6

I 2.5

I 2.5

C6

C6

Up counter,

I2.2

I2.2

down counter

CU

C6

CU

C6

I 2.3

I 2.3

CD

C6

CD

C6

I 2.4

I 2.4

KC 4

C# 4

C6

C6

I 2.5

I 2.5

C6

C6

Preset

I 2.7

I 2.7

counter to

KC 6

C# 6

value

C6

C6

and counter
delete

Query

(KC =

(C=

1 to 999)

1 to 999 )

C6

C6

counter bit
(is "1" if counter is

(is "1" if counter

not equal to zero)

is not equal to
zero)

Load current

C6

counter value

C6

(S5: binary,

FW 30

MW 30

LD

C6

LC

C6

FW32

MW32

S7: integer)
Load current
counter value
(BCD)

6.

TIMERS

The S5TIME data type is stored in binary-coded decimal format (BCD). When you are working with
the S5TIME data type, you define a time value in the range from 0 to 999 and a time base.
The time base indicates the interval with which a time decrements the time value by "1" until the time
value "0" is reached.
Binary structure of the S5TIME data type

15

14

13

12

11

10

a3

a3

a3

a3

a2

a2

a2

a2

a1

a1

a1

a1

X = Irrelevant: these bits are ignored when the time is started.


B = Time base (see table below)
a1-a3 = Time value in the binary-coded decimal format (BCD)
Time base for data of the S5TIME data type

Time base

Binary code

Possible range

10 ms

00

10 ms - 9 s 990 ms

100 ms

01

100 ms - 1 min 39 s 990 ms

1s

10

1 s - 16 min 39 s

10 s

11

10 s - 2 hr 46 min 30 s

10

7.

LINKING OPERATIONS

The following table lists the operands in STEP 5 and their STEP 7 equivalents.

Operand area in STEP5

Operand area in STEP7

FW

Flag word word

MW

Bit memory word

IW

Input word

IW

Input word

QW

Output word

QW

Output word

DW

Data word from a

DB_

Data from the

data block

global data block


(DBW,DBD)
DI_

Data word from an


instance data
block (DIW,DID)

IN

Input parameter of
an FC or FB

IN_OUT

Through
parameter of an
FC or FB

OUT

Output parameter
of an FC or FB

Temporary
variable, local
data

DIX

Static variable of
an FB

11

The following table lists the linking operations in STEP 5 and their STEP 7 equivalents.

STEP 5

STEP 7

Operation

Operand

Operation

Operand

Link words

IN1

IN10

with AND,

IN1

IN20

OR and

AW OW

EXCLUSIVE
OR

AW

XOW
T

OUT

OUT

IN1

IN10

IN1

IN20

OW

OW

OUT

OUT

IN1

IN10

IN1

IN20

XOW
T

XOW
OUT

OUT

IN1,IN1=

IN10,IN20=

IW,QW,FW,DW,KF,KM,KH

IW,QW,MW,DW,IN,
IN_OUT,constant

OUT=
QW,FW,DW

OUT=
QW,MW,DDW,DIW,OUT,
IN_OUT

Link double-

Not

IN30

words

possible

IN40

12

with AND,

AD

OR and

OUT

IN30

IN40

EXCLUSIVE
OR

OD
T

OUT

IN30

IN40

XOD
T

OUT
IN30,IN40=
ID,QD,MD,DBD,DID,
IN,IN_OUT,constant

OUT=
QW,MW,DDD,DID,OUT,
IN_OUT

8.

CONVERSION OF STRINGS

The converter that is part of the Basic Package, converts the data formats of the STEP5 program
correctly. The word-oriented DB in STEP5 is converted into a byte-oriented DB in STEP7. String data
types (STEP5 type 'KC' or 'C') are stored differently in STEP7. The first two bytes contain a length
code. A converted program block doesn't take this code into account and accesses incorrectly, i.e.
offset by 2 bytes.
In the S5, with absolute addressing, the data is accessed in a DB. When converting to S/ this cannot
be converted automatically. Therefore, after conversion, you must adjust the appropriate program
settings manually in S7.

13

9.

CONVERSION OF BLOCKS

STEP 7 includes a S5/S7 converter which can be used to convert S5 to S7 programs as complete as
possible. This converter has certain particularities:

Converting special commands for CPUs of the SIMATIC S5 135U and SIMATIC S5 155U
series is not possible.
This applies to access to the area system data of the CPU (e.g.: L BS 0..255 / T BS 0..255).

The modules in the library "S5-S7 Converting Blocks" (visible in the SIMATIC Manager
with File > Open > Libraries in "Standard Library") are intended only for conversions of
existing S5 programs to S7 programs. They cannot be used in newly created S7 programs.
This STEP 7 library offers the following standard solutions:

Functions of floating point arithmetic:

Name

Explanation

Number

GP_ADD

Add floating point numbers

FC 63

GP_DIV

Divide floating point numbers

FC 66

GP_FPGP

Change fixed point number to floating point number

FC 61

GP_GPFP

Change floating point number to fixed point number

FC 62

GP_MUL

Multiply floating point number

FC 65

GP_SUB

Subtract floating point numbers

FC 64

GP_VGL

Compare floating point numbers

FC 67

RAD_GP

Extract root of floating point numbers

FC 68

Signal functions:

Name

Explanation

Number

MLD_ED

Message of first value with double flashing light,

FC 76

bitwise, A
MLD_EDK

Message of first value with double flashing light,

FC 80

bitwise, A+M

MLD_EDW

Message of first value with double flashing light,

FC 72

wordwise, A
MLD_EDWK

Message of first value with double flashing light,

14

FC 78

wordwise, A+M
MLD_EZ

Message of first value with single flashing light,

FC 75

bitwise, A
MLD_EZK

Message of first value with single flashing light,

FC 79

bitwise, A+M
MLD_EZW

Message of first value with single flashing light,

FC 71

wordwise, A
MLD_EZWK

Message of first value with single flashing light,

FC 77

wordwise, A+M
MLD_SAM

Collected message, bitwise

FC 74

MLD_SAMW

Collected message, wordwise (sound alert)

FC 73

MLD_TG

Clock generator

FC 69

MLD_TGZ

Clock generator (timing element)

FC 70

Integrated functions:

Name

Explanation

Number

COD_B4

Change BCD number to 16 bit dual number

FC 81

COD_16

Change 16 bit dual number to BCD number

FC 82

MUL_16

Multiply 16 bit dual numbers

FC 83

DIV_16

Divide 16 bit dual numbers

FC 84

Calculating functions:

Name

Explanation

Number

ADD_32

Add 32 bit dual numbers

FC 85

DIV_32

Divide 32 bit dual numbers

FC 88

MUL_32

Multiply 32 bit dual numbers

FC 87

RAD_16

Extract roots of 16 bit dual numbers

FC 89

SUB_32

Subtract 32 bit dual numbers

FC 86

Name

Explanation

Number

REG_FIFO

Buffer memory (FIFO)

FC 92

Registry functions:

15

REG_LIFO

Stack register (LIFO)

FC 93

REG_SCHB

Bi-directional shift register, bitwise

FC 90

REG_SCHW

Bi-directional shift register, wordwise

FC 91

Copying data areas:

Name

Explanation

Number

DB_COPY1

Copy data block, direct assignment of parameters

FC 94

DB_COPY2

Copy data block, indirect assignment of

FC 95

parameterization
Special functions:

Name

Explanation

Number

LADEN

Load scratchpad memory

FC 97

RETTEN

Save scratchpad memory

FC 96

COD_B8

Change BCD number to 32 bit dual number

FC 98

COD_32

Change 32 bit dual number to BCD number

FC 99

Values Read and Write:

Name

Explanation

Number

AE_460_1

Read analog value

FC 100

AE_460_2

Read analog value

FC 101

AE_463_1

Read analog value

FC 102

AE_463_2

Read analog value

FC 103

AE_464_1

Read analog value

FC 104

AE_464_2

Read analog value

FC 105

AE_466_1

Read analog value

FC 106

AE_466_2

Read analog value

FC 107

PER_ET1

Read and Write for extended periphery (direct

FC 110

assignment of parameters)
PER_ET2

Read and Write for extended periphery (indirect

FC 111

assignment of parameters)
RLG_AA1

Output analog value

FC 108

16

RLG_AA2

Output analog value

FC 109

Note:
When using the standard functions FC100-FC111, the peripherial addresses are to be observed (see also
online help for these blocks). The refreshment of the process image depends on the S7 CPU. If you assign
a partly peripherial address (between 1 and 8) to the address, these addresses are not taken into account
in the cyclic refreshment of the process image.
Mathematical functions:

Name

Explanation

Number

A2_H_A1

AKKU 2 to the power of AKKU 1

FC 125

ARCCOS

Arc cosine (x)

FC 117

ARCCOT

Arc cotangens (x)

FC 119

ARCSIN

Arc sine (x)

FC 116

ARCTAN

Arc tangent (x)

FC 118

B_LOG_X

General logarithm Iog (x) to basis b

FC 122

COSINUS

Cosine (x)

FC 113

COTANG

Cotangent (x)

FC 115

E_H_N

e to the power of n

FC 123

LG_X

Decade logarithm Iog (x)

FC 121

LN_X

Natural logarithm ln (x)

FC 120

SINUS

Sine (x)

FC 112

TANGENS

Tangent (x)

FC 114

ZEHN_H_N

10 to the power of n

FC 124

17

10. ANALOG VALUES


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

18

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


Note
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.
Example

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

19

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

20

11. BIT BYTE INDIRECT ADDRESSING


When calculating the address in STEP 5, bits 12 to 15 are used for the interim results. But these bits are
not needed for indirect addressing in STEP 5. Unlike DO instructions (e.g. "B MW") in STEP 5, in STEP 7
addressing is via double-words, because of the extended address area. With the instruction in STEP 7, an
area (E, A, M), an access range (bit, byte, word and double-word) and an address are specified. The
address contains the byte number.
The structure of the address register must be observed when an address is preset via the Accu:

RRR: area identifier

B...B: byte address

XXX: bit address

Fig. 01
If the program is now converted to STEP 7, then when bits 12 to 15 are used by STEP 7 the system
changes the addresses.
Fig. 01 shows an example of a bit pattern "W#16#221". After conversion, the address "33.2" is calculated.

Fig. 02

21

Fig. 02 shows the same program, but with the bit pattern"W#16#1221". The leading "1" is not evaluated by
STEP 5. After conversion, however, the address "35.2" is calculated by STEP 7. The reason for this is that
the leading "1" at the bit point is placed by the system in the byte address with value 2.

Fig. 03
Remedy:
If you can't ensure that bits 12 to 15 are not used, then change the two move commands as follows.

SLW 5 to SLW 12.

SRW 5 to SRW 12.

After conversion, however, the correct address "33.2" is calculated in STEP 7.

Fig. 04

22

12. PID CONTROL PARAMETERS


When converting a control block from S5 to S7, you need to be aware not all parameters available in the S5, can
be converted to S7.
The parameters in the S5 and the S7 are not identical. In the following two tables parameters are explained.
Parameters S5

Meaning

TI

Time constant

TD

Derivative time

KP

Proportional coefficient

TV

Derivative time

TN

Reset time

TA

Sample time

T1

D component lag

Table 1: Control parameters S5


Parameters S7

Meaning

TI

Integral action time (reset time)

Gain

Gain (amplification factor)

TD

Derivative time

TM_LAG

D component lag

Table 2: Control parameters S7


In the following table, you will find conversion of control parameters from S5 to S7. The conversion factors (1000,
1/1000) for KP; R and TI within OB 251 of the S5 are not included.
Control parameters
Controlling

Controlling

Conversion

S5

S7

S5 -> S7

KP x R

Gain

Gain = KP x R

Remarks

depends on the controller in the S 5


typically R=1

TI = TA :

TI = TN

TN

TI(S7) = TA :

TI and TN are used in the S 5

TI(S5)

TD = TV :

TD (S7) =

TD(S7) =

TA

TV

TD(S5) x TA

T1

TM_LAG

TM_LAG = 1

TD and TA are used in the S5

rarely existing in the S5 (configured to TV : 5)

23

Table 3: Conversion of control parameters


After converting an S5 program with a block call an error message is issued when compiling the STL
source created with reference to the order of the interconnected parameters:
Error message: "Wrong order of parameters for "Symbol" can lead to permutations/shifts ..."
In S5 the parameters are sorted in the order in which they are used in the program. In S7 the parameters
are sorted according to type in the order IN, OUT, IN_OUT. The converter adopts the actual parameters of
block calls from the S5 without any changes. Therefore the order of parameters in the STL source is not
correct.
Remedy:
If converted files from the S5 program contain block calls in which the order of the actual parameters does
not match the order in the declaration, you can easily correct this by resorting using Cut and Paste. You
must make sure that the actual parameters are sorted in the same way as the declarations of the blocks
called. Then the STL source can be compiled without any errors.
The SFC20 block described in the manual "STEP 7 Standard and System Functions" copies the contents
in the reverse order to that of the corresponding block with S5.
If a program is converted from S5 to S7, then watch out for the following:
If the source area and the target area overlap, the block cannot be simply replaced when converting to S7.
The conversion with NOT R... and NOT S... (negation of the VKE) results in having the same value of the
VKE (connection result) after the operation as before the operation. One of the two following "S/Rcommands" is executed in any case, so that the result will always be correct. The SET command, however,
changes the VKE and should not be used for this issue.
Converting S5 data to STEP 7 is not possible if the data is on write-protected media (e.g. on a writeprotected floppy disk). In this case copy the S5 data into a writable directory and then convert this project
copied into the directory with the S5/S7 converter.
For printing out converted S5 programs it is recommended to choose the "DIN A4 landscape" format. If you
use the "DIN A4 portrait" format, depending on the printer driver used, characters from the end of the line
might be printed at the beginning of the next line. By choosing the landscape format your program printouts
will be more legible.

24

You might also like