Simatic S7-1200 Simatic S7-200 To Simatic S7-1200 Software Conversion Tool V11
Simatic S7-1200 Simatic S7-200 To Simatic S7-1200 Software Conversion Tool V11
Simatic S7-1200 Simatic S7-200 To Simatic S7-1200 Software Conversion Tool V11
Manual
11/2011
Legal information
Legal information
Warning notice system
This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent
damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert
symbol, notices referring only to property damage have no safety alert symbol. These notices shown below are
graded according to the degree of danger.
DANGER
indicates that death or severe personal injury will result if proper precautions are not taken.
WARNING
indicates that death or severe personal injury may result if proper precautions are not taken.
CAUTION
with a safety alert symbol, indicates that minor personal injury can result if proper precautions are not taken.
CAUTION
without a safety alert symbol, indicates that property damage can result if proper precautions are not taken.
NOTICE
indicates that an unintended result or situation can occur if the relevant information is not taken into account.
If more than one degree of danger is present, the warning notice representing the highest degree of danger will
be used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to
property damage.
Qualified Personnel
The product/system described in this documentation may be operated only by personnel qualified for the specific
task in accordance with the relevant documentation, in particular its warning notices and safety instructions.
Qualified personnel are those who, based on their training and experience, are capable of identifying risks and
avoiding potential hazards when working with these products/systems.
Proper use of Siemens products
Note the following:
WARNING
Siemens products may only be used for the applications described in the catalog and in the relevant technical
documentation. If products and components from other manufacturers are used, these must be recommended
or approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and
maintenance are required to ensure that the products operate safely and without any problems. The permissible
ambient conditions must be complied with. The information in the relevant documentation must be observed.
Trademarks
All names identified by ® are registered trademarks of Siemens AG. The remaining trademarks in this publication
may be trademarks whose use by third parties for their own purposes could violate the rights of the owner.
Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and software
described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the
information in this publication is reviewed regularly and any necessary corrections are included in subsequent
editions.
Note
Due to internal problems, the SIMATIC S7-200 to SIMATIC S7-1200 software conversion
tool V11 will not create a valid STEP 7 project using a STEP 7 V11 version before
STEP 7 (Basic or Professional) V11 SP2, (or a later release). If you violate this restriction,
then a project will be created that appears correct but will contain internal inconsistencies
that cannot be resolved.
Hardware recommendation: It is very helpful to use two monitors and open the Micro/Win
and Step 7 projects on separate monitors. This makes it easier to compare and correct the
program elements that are not converted.
The STEP 7-Micro/WIN program that you want to convert must have these properties:
● The program must have been created using SIMATIC programming mode. IEC
programming mode is not supported.
● The program must have been saved in LAD (ladder editor) format.
● The program must compile with no errors.
● All user-defined password block protection must have been removed from the
STEP 7-Micro/WIN program. Remove the password protection from the main routine,
subroutines, interrupt routines, and all data pages in the data block. Any program block
that is password protected will not be converted.
Note
If a STEP 7-Micro/Win wizard has generated and protected program blocks, then the
block protection cannot be removed and these program blocks are not converted.
Task Reference
1 Determine the S7-200 hardware configuration and settings STEP 7-Micro/WIN system block and S7-200
for modules (for example, voltage range for analog inputs). system hardware
2 Determine which program variables must be retentive. Your automation system analysis and the STEP
Since the default setting in Micro/Win was to make almost 7- Micro/WIN system block
everything retentive, the Micro/WIN project is not much
help in determining how to stay under the S7-1200 limit of
2 Kbytes of retentive memory.
3 Determine which S7-1200 units and HMI will be used. Your automation system analysis
4 Open the Micro/Win project with STEP 7-Micro/WIN V4.0 STEP 7-Micro/WIN
SP6 or later, unlock all subroutines and data block pages Note: Save a copy of the original Micro/WIN
that you want to convert. Any user library subroutines with program before making any change with the
duplicate names will not convert. Rename any subroutine Micro/WIN program editor. Refer to the copy to
or interrupt with a duplicate name before doing the find the original memory assignments and
conversion. Recompile and save the Micro/WIN project. program logic.
5 Know the common V memory problems you can fix before Section 2.2.1
conversion (Page 8)
If you make changes to prevent V memory conversion
problems, then re-compile and save the Micro/WIN project.
6 Run the conversion tool to create a S7-1200 program with S7-200 to SIMATIC S7-1200 software
an unspecific CPU (Page 10) conversion tool
7 Rebuild all blocks and links between blocks (Page 12). STEP 7 program block compiler
Note: Do not rename any tags until after you get the project
to compile without errors. Otherwise, any changes will only
take effect in the blocks that are opened in the program
editor. For example, you want to change the tag "SM0_0"
that the converter created to "Always_On". When the
project compiles without errors, the system automatically
updates the modified tag names in all the blocks for you.
8 Know the common V memory problems you can fix after Section 2.2.2
conversion (Page 9)
9 Configure the unspecific CPU (Page 13) STEP 7 device configuration
Task Reference
10 Compare the original program (for the S7-200) STEP 7-Micro/WIN and STEP 7
with the converted program (for the S7-1200)
Program blocks (Page 15)
Data block (Page 23)
Symbols/tags (Page 16)
11 Complete the converted S7-1200 program and verify STEP 7
correct run-time operation (Page 18)
2.2 Know the cause and fix for V memory conversion problems
Note
Possible loss of initialization values in the conversion of overlapped V memory definitions
Overlapping addresses typically occur when smaller memory definitions like bits are given
symbol names and are initialized in the Data block editor using a larger memory size (like a
DWORD) to initialize all the bits at once. In cases of overlapping definitions, the smaller data
sizes are retained and larger data sizes are discarded. This minimizes the loss of symbolic
definitions from the original program. Due to the discarding of the larger data sizes, those
initialization data values are discarded along with the data declaration itself.
4. Click the "..." button to the right of the "Source path" field and browse to the location of
the STEP 7-Micro/WIN *.mwp project file. If necessary, you can change the "Target path"
field by browsing to a new location. You can also change the "Destination project" target
name to be different, if desired. You may also change the STEP 7 project author and add
comment text.
5. Start the import process by clicking the "Convert" button. When you click the "Convert"
button the field entries are verified before the conversion starts.
6. Complete the import process by clicking the "OK" button on the "Import completed" box.
7. Complete the conversion process by clicking the "OK" button on the "Conversion
Successful" box.
WARNING
Due to functional differences between the S7-200 and S7-1200, your user program may
not have been completely converted
An incomplete or improper conversion of your user program may cause unexpected
machine or process operation which could cause death, serious injury, or property
damage.
You must review and check the converted program to ensure proper and safe operation
in your application.
Note
The converter tool does not configure the S7-1200 CPU and I/O modules.
Do not rename any tags until after you get the project to compile without errors. Otherwise,
the changes will only take effect in the blocks that are opened in the program editor. For
example, you want to change the tag "SM0_0" that the converter created to "Always_On".
When the project compiles without errors, the system automatically updates the modified tag
names in all the blocks for you.
● Use the STEP 7 Device configuration to either detect the configuration of the connected
S7-1200 system or specify the system components from the Hardware catalog. All S7-
200 programs are initially converted to the unspecified S7-1200 CPU type.
● S7-200 system Block CPU parameters and CPU status and control functions that are
programmed by SM memory addresses are not converted. You must set up the
corresponding S7-1200 CPU properties using STEP 7 Device configuration settings. CPU
options that your S7-1200 program will use must be properly configured, before your
program can access or operate those CPU options.
● It is also helpful to enable the System and Clock memory bits to replace the commonly
used SMB0 bits in your project. Use an M byte above MB32 so as to not conflict with the
M memory usage in the S7-200 project.
● If you are an OEM, then change the Startup mode from "Warm restart – Operating mode
before POWER OFF" to "Warm restart – RUN". Otherwise, if the CPU goes to stop
because of a program update from a memory cartridge or an error, you will have to
provide software to put the CPU back into Run mode.
2.6 Compare the program blocks in the original program and the
converted program
The purpose of the comparison is to identify the subroutines, interrupt routines, and data
block data that were converted.
● Open the original program in STEP 7-Micro/WIN and open the converted program in
STEP 7, at the same time. Compare the POU (Program Organizational Unit) block
structure of original S7-200 program with the converted STEP 7 program.
● Use the STEP 7-Micro/WIN Instruction tree and open the "Program Block" and "Data
Block" branches.
● Use the STEP 7 Project tree and open the "Project blocks" branch.
The subroutines, interrupt routines, and V memory data groups (data block tabs) created by
STEP 7-Micro/WIN wizards and library usage are protected and are not converted. Also
user-protected POUs or V memory tabs are not converted.
If S7-200 code blocks are not converted, then you must create substitute program logic in
the S7-1200 program. Unconverted code blocks and data block tabs (data groups) can
create undefined symbolic references in POU blocks that were successfully converted.
Undefined symbolic references must be resolved in the STEP 7 program.
For information about specific program logic instructions, see S7-200 LAD instruction
conversion (Page 29).
For more information about how the program structure is converted, see Program structure
conversion (Page 19).
Note
STEP 7-Micro/WIN wizard and library (*.mwl file) program code is not converted
This includes subroutines, interrupt routines, V memory data, and symbol definitions. You
must create substitute program logic and program symbols.
Global symbols
● STEP 7-Micro/Win global symbols are defined in the Symbol table.
● The converted STEP 7 global symbols (I, Q, and M memory only) are located in the PLC
Tag table or in data block DB1 (converted S7-200 V memory symbols).
Local symbols
● STEP 7-Micro/Win local symbols are defined in the Local variable tables of the main
routine, subroutines, and interrupt routines.
● The converted STEP 7 local symbols are defined in the Block interface table of the
corresponding OBs (Organizational blocks) and FCs (Functions).
Note
Do not rename any tags until after you get the project to compile without errors.
Otherwise, any changes will only take effect in the blocks that are opened in the program
editor. For example, you want to change the tag "SM0_0" that the converter created to
"Always_On". When the project compiles without errors, the system automatically
updates the modified tag names in all the blocks for you.
STEP 7-Micro/WIN program Converts to this STEP 7 PLC tag STEP 7 programming issues
symbolic reference
I, Q, or M memory symbol PLC Tag table I, Q, and M memory tags The I/O base addresses can be modified
AIW and AQW (Analog I/O symbols) PLC Tag table I and Q memory tags by PLC Device configuration and can
make the converted S7-200 address
HC symbol name PLC Tag table I memory tag incorrect.
(High-speed counter)
SM and S memory symbols Undefined program parameter Make a Tag table entry (I, Q, M, or
The S7-1200 does not have SM or S constant):
memory. Define the parameter name in In the program editor, right-click on
substitute program logic. the parameter name and select
In the program editor, a red squiggle "Define tag".
underline indicates an undefined Make a data block reference:
parameter name.
Change the undefined symbol name
to a data block address.
Ex. DB1.SymV0_1
V memory symbol The V memory symbol name becomes A discarded S7-200 V memory symbol
a DB1 data block element name, or the creates an undefined parameter in
S7-200 V memory symbol is discarded converted program logic. You must
because it overlapped the address of assign a new symbol name and DB1
another V memory symbol. address.
T (timer memory) and Timer and counter symbol names In S7-1200 LAD programs, The Q
C (counter memory become the DB names of the data output of counter and timer boxes
blocks associated with the converted replaces the function of the S7-200
timer and counter instructions.
counter and timer bit addresses.
Timer and counter bits/current values
can also be accessed as data
elements within the associated DB.
L memory symbol L memory symbol
(Local variable table) (Block interface table)
Note
STEP 7-Micro/WIN wizard and library symbols
The symbols used in subroutines, interrupt routines, and V memory data groups (data block
tabs) created by STEP 7-Micro/WIN wizards or library usage are not converted. Also,
symbols used in user-protected POUs or V memory tabs are not converted.
Unconverted code blocks and data block tabs (data groups) can create undefined symbols in
POU blocks that were successfully converted. You must define these symbols to use
symbolic addressing in substitute program logic.
2.8 Complete the STEP 7 Basic program and verify the run-time
operation
1. Complete all program parameters and program logic.
2. Some S7-1200 CPU I/O channel assignments may use a different I/O channel number
compared to the I/O channel numbers used in the S7-200 program. Reassign and rewire
the terminal block connections as needed.
3. Compile and download the user program to the S7-1200 CPU
4. Debug and verify the run-time operation the S7-1200 program.
Note
Monitoring program variables with STEP 7
STEP-7 Micro/WIN status charts are not converted. You must create the corresponding
STEP 7 watch tables to monitor run-time data values.
WARNING
Due to functional differences between the S7-200 and S7-1200, your user program may not
have been completely converted
An incomplete or improper conversion of your user program may cause unexpected
machine or process operation which could cause death, serious injury, or property damage.
You must review and check the converted program to ensure proper and safe operation in
your application.
See also:
Common V memory problems you can fix before conversion (Page 8)
Common V memory problems you can fix after conversion (Page 9)
Data description S7-200 data block format Converted S7-1200 DB1 format
Decimal value 255 255
Binary value 2#1010 2#1010
Hexadecimal value 1 16#FFFF w#16#FFFF
Floating Point 7.77 7.77
ASCII characters 1, 2, or 4 bytes
Byte size 'a' 'a'
Word size 'ab' 'ab'
Dword size 'abcd' 'abcd'
Multiple ASCII 3, 5, or more bytes ‘abcde’
characters 2 ‘abcde’
String 3 "abcde" ‘abcde’
1 Size descriptor ("w") depends upon data type
2 Converted to S7-1200 string format
3 The S7-1200 string storage format requires one byte more than the S7-200 string storage format.
The extra byte is used to store the maximum string length.
3.6 Wizards
Note
STEP 7-Micro/WIN wizard generated program code is not converted
This includes subroutines, interrupt routines, V memory data, and symbol definitions. You
must create substitute program logic.
3.7 Libraries
Note
STEP 7-Micro/WIN program code generated by *.mwl files (compiled libraries) is not
converted.
This includes subroutines, interrupt routines, V memory data, and symbol definitions. You
must create substitute program logic.
The STEP 7-Micro/WIN *.mwp program file is converted. The *.mwp file is the program
source file for regular user programs and for user-created libraries. You must use STEP 7
library commands to create a STEP 7 global or project library from a converted STEP 7-
Micro/WIN library source program.
4.2 Timers
4.3 Counters
4.4 Compare
* For string comparisons (==S and <>S), only S7-200 literal string (ex. "123456") input parameters are converted. Due to
differences between the S7-200 and S7-1200 string storage format, S7-200 string direct address and indirect address
parameters are not converted.
* The S7-200 increment/decrement instructions can have a separate IN and OUT address. The S7-1200
increment/decrement instructions have one IN/OUT parameter and must use a single address. If the S7-200
increment/decrement instruction uses a single IN and OUT address, then the instruction and parameters are converted.
If the S7-200 increment/decrement instruction uses separate IN and OUT addresses, then the instruction is converted
but not the parameters.
4.7 Move
4.8 Convert
* Only S7-200 literal string (ex. "123456") input parameters are converted. Due to differences between the S7-200 and S7-
1200 string storage format, S7-200 string direct address and indirect address parameters are not converted.
4.13 String
* Only S7-200 literal string ("abcdef") input parameters are converted. S7-200 string direct address and indirect address
parameters are not converted, due to differences between the S7-200 and S7-1200 string storage format.
4.14 Communication
4.15 Interrupts
4.16 Table