L-force | plc designer – Lenze PLC Designer PLC Designer (R2-x) User Manual

Page 558

Advertising
background image

L-force | PLC Designer

Siemens Import

556

DMS 3.2 EN 02/2011 TD29



If you examine the commands that cannot be converted you will see that they are
generally special commands that are only available on certain CPUs. The standard
commands that cannot be converted to IEC are: loading BCD coded timer or counter
values (LC T, LC C), timer types SV and SS, and resetting timers.

Data Blocks

STEP5 data blocks are converted into POUs (Program Organization Units) that have a
header but no code. This is convenient if the data blocks are used as normal variable
ranges but inconvenient if attempts have been made to manually implement

concepts like instance data blocks in the STEP5 program.

Other Problems when Importing from STEP5

The STEP5 import can be improved manually in the following ways.

• Time values in word variables

In STEP5 a time value is allowed in every word address be it in the memory

location area or in a data block. This is not allowed in IEC 61131-3, TIME variables
or constants are not compatible with WORD addresses. This can result in the
creation of erroneous command sequences when importing from STEP5. This will
not happen if you open a data block and select the time format (KT) for the
address in question. In other words, this error only occurs when the STEP5 program
is worth the effort of improving it. When it does occur, you will see the message
"Incompatible Types: Cannot convert WORD to TIME." or "Incompatible Types:
Cannot convert TIME to WORD." You must then modify the declaration for the
WORD variable (if available) and turn it into a TIME variable.

• Failure to Access Data Blocks

There are no data blocks in IEC 61131-3 and it is impossible completely to recreate

them in IEC. In STEP5 they are used as normal variable ranges (almost like a
memory location ranges), and also in the form of arrays (B DW), pointers (B

MW100 A DB 0) or unions (byte, word or double word access in DBs ). STEP5
conversion can only convert DB access if it is somewhat structured. When
attempting to access DBs you must know which DB is open (A DB). You must be
aware of this when the A DB operation is closer to the beginning in the same POU

or when the DB number is included with the POU as a formal parameter. If A DB is
not found in front of the first DB access, the POU cannot be converted. The

warning "No open data block (insert an A DB)" notifies you that this is the case. In
the converted POU, you will see access to an undefined variable named
"ErrorDW0" (for example) that will cause an error message to be generated when
the newly converted POU is compiled. You can then replace the variables with
access to the correct DB (e.g., replace "ErrorDW0" with "DB10.DW0"). The other
option is to discard the converted POU and insert an A DB at the beginning of the

POU in STEP5.

Advertising