Import from a s5 project file, L-force | plc designer – Lenze PLC Designer PLC Designer (R2-x) User Manual

Page 561

Advertising
background image

L-force | PLC Designer

Siemens Import



DMS 3.2 EN 02/2011 TD29

559

Your PLC may have more hierarchies. For example, non-bits have several interlocking
levels ("%MW10.0.0" as WORD). You can either make changes to the addresses to
make them compatible with your PLC or you can try to leave them out entirely.
Proceed very cautiously! In the original Siemens program, it is quite common that
word access and bit or byte access is made in the same memory location. When
imported into »PLC Designer«, accesses of this type will only be correctly compiled for
data blocks. In this case, »PLC Designer« creates WORD variables for the words in the
DBs . Then when WORD accesses word x in DB y there are no problems. Attempts to
access the left or right byte in word x, a double word or a bit will then be compiled
into more complex expressions. This cannot be done with memory locations, inputs or
outputs since this can't be done with a standard access method (e.g., word access). If
you are working with %MX33.3 and with %MB33 or %MW32 or %MD30 you must go
to the effort of converting them manually. The IEC program generated by the PLC
Designer import will definitely not work correctly.

Open a cross reference list containing all inputs, outputs and memory locations to find
out which accesses are important. Remove the mixed accesses manually.

15.3

Import from a S5 Project File

POUs can read from Siemens S5 program files (*.s5d). The code that it uses is MC5
Code that can be run by S5 SPS. In general, MC5 Code corresponds with the STEP5
Instruction List (without symbol names) with which the programmer is familiar. The
S5D also contains the line comments from the STEP5 Instruction List. Since an S5D file

contains only absolute addresses with no symbol names, »PLC Designer« searches for
the symbol names among the current PLC Designer project variables. If none are
found, the absolute address is left unchanged. Therefore, if you feel the symbol name

is useful, import the SEQ file before the S5 file.

You first select the S5D file in a standard Windows dialog box. Another box pops up
which contains the list of POUs from which you can select. It is best to select all of

them. You can also select to leave the POUs in the STEP5 IL language or to convert
them to IL, LD or FBD.

Symbol names will be used in place of absolute names as much as possible. If »PLC
Designer« finds the instruction "U M12.0" during the import, it will search for a global
variable set at memory location M12.0. The first declaration that fits this description
will be taken and the instruction will be imported as "U-Name" instead of "U M12.0"
(the name of the identifier for the memory location is M12.0).

At times additional variables may be needed during an import or code conversion.
These additional variables will be declared globally. For example, R_TRIG instances are

needed to reproduce edge-triggered inputs (e.g., in a S5 counter).

Advertising