Converting s5 to iec 61131-3, L-force | plc designer – Lenze PLC Designer PLC Designer (R2-x) User Manual

Page 555

Advertising
background image

L-force | PLC Designer

Siemens Import



DMS 3.2 EN 02/2011 TD29

553

You first select the SEQ file in a standard Windows dialog box. Then perform the
import, when this is done the global variable list will be compiled. Errors may arise
during this process when STEP5/7 identifiers are converted into IEC61131-3
compatible identifiers. For example, both STEP5 identifiers "A!" and "A?" would be
converted into the IEC identifier "A_". At this point the following message would
appear, "Multiple declarations with the same identifier A_". Change one of the
variables.

Under absolutely no other circumstances should you make any changes to the global
variable list. If you identify addresses that are valid in a Siemens PLC but are invalid in
your Controller: Leave them alone for now, even if you get a thousand error messages
while compiling. The addresses are needed exactly as they are in order to import the
POUs.

If the project into which you are importing already contains a declaration for a global
variable x with its address (e.g., "%MX4.0"), you may find that the SEQ import contains
a variable defined with the same address. This is allowed in IEC 61131-3 but is
generally not in the best interest of the user. No error message will appear, but your
program may not function as it should since the address will be used in different POUs
with no contextual reference. To avoid this problem, it is best to import into an empty
project or into a project in which no absolute addresses have been used up to this
point.

STEP5/7 Program Organization Units can be imported, once the SEQ import has been
performed. You can also add the inputs and outputs that will be used in the PLC
Configuration. These are not required for the STEP5/7 import but the addresses will be
checked and may show up as errors when you rebuild the project.

15.2

Converting S5 to IEC 61131-3

If you select an IEC language as your target language for a STEP5 import, you must be

aware that portions of your project cannot be converted into IEC 61131-3. If part of a
S5 POU contains code that cannot be converted into IEC 61131-3, an error message
will be generated and the critical portion of the original STEP5 IL code will be inserted
as a comment in the IEC POU. You must then replace or rewrite this code. System
commands that only function in a specific S5 CPU cannot be converted into IEC. The

"STEP5 Core Command List" can be converted into IEC code with a click of a button

despite the fact that STEP5 is enormously different in the way it is conceived.

The core command list that can be converted to IEC 61131-3 contains all commands

that can be converted to LD or FBD in a STEP5 programming system and also all
commands that are allowed in a STEP5-PB (Program Block). In addition, of the STEP5
commands allowed only in IL or in FB's (function blocks), the commands that can be
converted to IEC are primarily those that are available in every S5 CPU (e.g., absolute
and conditional jumps, shift commands, etc.)

Advertising