Professional Documents
Culture Documents
1009en Ladder Converter GB
1009en Ladder Converter GB
Conversion Utility
Customer Information Sheet
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
1/57
1 Table of Content
1
History ...............................................................................................................................................3
3.1
3.2
Requirements....................................................................................................................................7
4.1
4.2
4.3
5.1
5.1.1
5.1.2
5.2
5.2.1
5.2.2
5.3
5.3.1
5.3.2
6.1
6.1.1
5.2.3
6.2
6.2.1
6.2.2
6.2.3
6.3
6.4
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
2/57
2 History
Date
16.09.2003
26.04.2004
Version
V0.0
V1.0 E
Author
Th. Lantermann
Chris Evans
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Description
First version
English Version
Date:
Date:
Page:
17.09.2003
26.04.2004
3/57
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
4/57
Section 5.2.2
GX Developer
Ladder Program
Name List
Section 5.2.3.2
Section 5.2.3.1
Excel 2000
MX Change
Section 6
GX IEC Developer
Melsec IL to Ladder Converter
GX IEC Developer
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
5/57
Section 5.1
DOS MEDOC
Ladder Program
Name List
Section 6
GX IEC Developer
Melsec IL to Ladder Converter
GX IEC Developer
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
6/57
4 Requirements
4.1 For DOS MEDOC programs
The requirement is simply a print file (*.TMP) of the name list and program, no additional
tools are required.
If this is not available then a version of DOS MEDOC must be used to generate this print file.
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
7/57
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
8/57
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
9/57
In the menu Header select the option Print without header and in the menu Listings select
only Name and Instr.
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
10/57
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
11/57
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
12/57
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
13/57
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
14/57
Highlight the box containing MELSEC (move the mouse pointer above this square and press
the left-hand mouse button). This is important!
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
15/57
Now open the menu Tools and select Import MEDOC Network.
In the Windows dialog select the created print file and press Open.
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
16/57
From the dialog choose whether to import the MEDOC program or the MEDOC symbolic
names, or both.
The import of the program and the symbolic names is now finished. GVL, HEADER and
MELSEC IL PROGRAM have been imported. The comments of the program are now
available, too.
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
17/57
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
18/57
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
19/57
Select Project - Export file and then Export to TEXT.CSV format file.
Under Export file type select Text File and press Finish. If the project is a PLC type that
uses several programs, e.g. System Q, please do the export and import routine, program-byprogram.
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
20/57
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
21/57
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
22/57
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
23/57
Highlight the box containing MELSEC (move the mouse pointer above this square and press
the left-hand mouse button). This is important!
Now open the menu Tools and select Import GX Developer Network.
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
24/57
Now jump to section 5.2.3 for the import of the name list or to section 6, to change the project
to IEC Ladder.
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
25/57
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
26/57
Now select the address under which the server is installed. In this case use local address.
NOTE:
For more detailed information read the MX Change manual or use the program help.
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
27/57
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
28/57
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
29/57
The Super Project Manager displays all information exported from GX Developer.
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
30/57
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
31/57
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
32/57
After having logged in a new node is seen in the Super project manager.
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
33/57
Click with the right-hand mouse button to access the menu option Group Copy and Rename
Tags. Here, all variables can be copied from one node to another.
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
34/57
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
35/57
Select Common comment and CSV File. If the project is a PLC type that uses several
programs, e.g. System Q, please do the export and import routine, program-by-program.
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
36/57
Now start Microsoft EXCEL 2000 or later and open the EXCEL sheet
Converter_for_GX_Developer.XLS. This sheet is needed to add a macro to the EXCEL
project, which is used to generate the ASC import file for the import into GX IEC Developer.
Select Enable Macros.
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
37/57
Press the keys CTRL A and the macro ASC Converter is started. Press Create ASC and the
file C:\MMP.ASC will be generated.
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
38/57
This file MMP.ASC on the C: drive, can now be imported to the GX IEC Developer project.
Open GX IEC Developer project and select Project Other Import.
Now the name list from GX Developer has been imported into GX IEC Developer.
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
39/57
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
40/57
This information is stored in the folder Project Name. (Here the project name is Test and so
the path is: Test/Resource/POU/ Body/LABELTBL.wcf).
The file name is always the same (LABELTBL.wcf).
Open this file in Microsoft Notepad or another text editor and mark all entries following
CONFIGURATION Project Name (here Test) and in front of END-CONFIGURATION.
Copy this marked string into the clipboard (CTRL C).
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
41/57
Using another text editor than Microsoft Notepad makes this easier.
Now open the Global Variable list in the GX IEC Developer project and mark the first line in
the GVL.
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
42/57
Copy the content of the clipboard into the GVL (CTRL V).
The name list from GX Developer has now been copied into GX IEC Developer.
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
43/57
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
44/57
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
45/57
Each LOAD (definition see section 6.1.1.1) implements a new network, if it is not combined
with the previous element-chain by ANB or ORB.
MPS, MPP and MPR constructs will be converted to a graphical ladder correspondence like
in GX Developer. An OR/ORI Instruction following an MPP or MRD is not convertible since
this would result in crossing lines! The following example shows the MELSEC IL code
containing MPS, MPP and MPR instructions and the corresponding IEC Ladder result:
This behaviour can be changed by setting the option Behaviour of MPS, MPP & MRD to
Use MLIB functions MPS_E, MPP_E & MRD_E. In this case, all MPS, MPP and MRD
instructions are represented by their corresponding MLIB-function.
All functions will be converted to the corresponding manufacturer library functions for the
used PLC type. If a function is invalid or not listed in the MLIB, it will be handled as an illegal
instruction.
NOTE:
Dedicated instructions are supported.
Dedicated Instructions for A-Series PLC using LEDA, LEDB, LEDC, LEDR, SUB and DXNR,
will be converted to the corresponding IEC Ladder instruction.
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
46/57
In case of illegal instructions, a comment will be inserted, which contains the illegal
Instructions, as original MELSEC IL code. Furthermore, an invalid FB (FB-name
INVALID_CODE) will be inserted to generate a compiler error at the invalid section when
compiling the converted program.
The instruction NOP will be ignored. In case of an END instruction followed by program code,
the user will be asked if the listed instructions have to be ignored or converted. For the last
case, END will be ignored.
The arrangement of elements is the same as in the guided editor mode.
Interrupt labels are added as an additional task with the interrupt label as Event.
For all occurrences of the same interrupt label, an additional POU is added to that Task.
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
47/57
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
48/57
Valid
successors
LOAD
JUMP
Action / description
invoked by LOAD, JUMP and LABEL
attach LOAD instruction to the power rail
attach JUMP instruction to the power rail
LOAD
CONTACT
COIL
FUNCTION
LOAD
CJUMP
CONTACT
CONTACT
COIL
FUNCTION
LOAD
CJUMP
COIL
LOAD
CJUMP
LABEL
FEND
CONTACT
COIL
FUNCTION
LOAD
CJUMP
LABEL
FEND
COIL
FUNCTION
CJUMP
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
49/57
Current
instruction
Valid
successors
COIL
LOAD
CJUMP
LABEL
FEND
JUMP
LOAD
LABEL
FEND
RETURN
LOAD
LABEL
FEND
LABEL
LOAD
JUMP
FEND
LABEL
CONNECTION
Action / description
attach COIL to the input of the current CJUMP
add LOAD to new network
attach CJUMP to the input of the current CJUMP
create new network with symbolic label
all following instructions must be assigned to a label
occupies a single line in a single network
add LOAD to new network
create new network with symbolic label
all following instructions must be assigned to a label
occupies a single line in a single network
add LOAD to new network
create new network with symbolic label
all following instructions must be assigned to a label
create new network with symbolic label
attach LOAD instruction to the power rail
attach JUMP instruction to the power rail
all following instructions must be assigned to a label
see instruction LABEL
ANB: connect current network in a row with the
previous
ORB: connect current network parallel to the previous
same as LOAD
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
50/57
Select the in the exported GX IEC Developer project used PLC series and PLC type in the
dropdown menus PLC Series and PLC Type.
Under Active Manufacturer library select the valid path of the required MLIB. In the
dropdown menu all manufacturer libraries on your computer are listed.
The ASCII file exported from GX IEC Developer is the input file for the conversion and has to
be entered in the edit field MELSEC IL Input File. The desired path can be searched by
using the browse button to open the browser dialog.
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
51/57
The path and file name for the output file after the conversion can be entered in the edit field
Ladder Output File. The desired path can be searched by using the browse button to open
the browser dialog.
By pressing the button Options the following options dialog can be opened.
In this dialog several options for the conversion process can be set.
The right default column for placement of the last element in the row can be set by the option
Right default border. If more space is needed this setting will be ignored.
When the option Automatically create new POU is activated, the converter will split the
single Ladder POUs automatically after the set number of networks.
The placement of functions and function blocks can be set by the option Placement of
Functions and Function Blocks:
Parallel: consecutively called functions in MIL are placed parallel in Ladder editor
Serial: consecutively called functions in MIL are placed in a row in Ladder editor
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
52/57
Under the option Behaviour of MPS, MPP & MRD the user can decide how MPS, MPP and
MRD instructions will be treated during conversion:
Create graphical representation: MPS, MPP and MRD instructions are placed as their
graphical representation as in GX Developer.
Use MLIB functions MPS_E, MPP_E & MRD_E: MPS, MPP and MRD instructions are
placed as their counterpart function MPS_E, MPP_E and MRD_E to get a maximum code
compatibility.
When the option Replace all direct addresses with global variable names is activated, the
MELSEC IL to IEC Ladder Conversion Utility scans the GVL for all global variables. If a
global variable matches the device type (or compatible) and address, during conversion the
address will be replaced by its global variable.
By activating the option Automatically create new & global variable..., the MELSEC IL to
IEC Ladder Conversion Utility automatically creates global variables for data types that are
unusable with direct addresses in the Ladder Editor.
If an input variable of a function with e.g. data type DINT and the assigned address D0 is
found, a new global variable VAR_D0 will be created as replacement of D0.
The option Automatically create new POU and Task for interrupt label lets the MELSEC
IL to IEC Ladder Conversion Utility create a new POU and a corresponding Task for each
interrupt label subprogram.
When the option Use multiple line variable names is activated, the MELSEC IL to IEC
Ladder Conversion Utility adds a flag to all elements that allows the full display of a multiple
line variable name.
By pressing OK the user accepts the changes made in the options settings.
Otherwise press Cancel to discard all changes made.
To start the conversion, press the button Convert in the main dialog box.
There is no message shown during the conversion process.
Only the new ASCII file is written to the set output path and file name.
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
53/57
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
54/57
6.3 Limitations
In the following section details some limitations concerning the use of the MELSEC IL to IEC
Ladder Conversion Utility.
The MELSEC IL to IEC Ladder Conversion Utility can only be used in connection with a
version GX IEC Developer 6.00 or later.
Converting GX Developer programs with labels
Import of GX Developer system Q label programs is not possible because GX Developer
does not supports export functionality for this program type.
The only possible way is to upload the project from the PLC without comments and variable
names. The global variables can be copied with Excel (see section 5.2).
MPS followed by OR/ORI
An OR/ORI Instruction following an MPP or MRD instruction is not convertible since this
would result in crossing lines.
Labels
Jumps to Labels within other POUs than the current will be supported by GX IEC Developer
6.10 and later and only for direct labels.
Index registers
The MELSEC IL to IEC Ladder Conversion Utility generates a symbolic variable in the GVL
for devices that are assigned to functions or function blocks for a 32Bit input/output variable.
Devices with index registers like D0Z0 in the GVL will be supported by GX IEC Developer
6.10 and later. For previous versions, the GX IEC Developer compiler will generate an error.
Unconvertible functions
For conversion it is necessary that the MELSEC IL function has an equivalent function for
IEC Ladder in the Manufacturer Library. Therefore, even if the code is compilable in MELSEC
IL, it might be, that the function is added as unconvertible code to the LADDER POU
because it is not supported in the IEC Ladder editor.
In this case the user should check if the same functionality can be achieved by using one or
more different functions or by creating a MELSEC-IL Function Block containing the
unconvertible function. This Function Block can then be used to replace the unconvertible
function in LADDER.
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
55/57
Error F1028 Access to system address denied, indicates that the original project is using
devices, reserved by default for System Variables in GX IEC Developer.
To rectify this, simply access Extras Options System Variables and reallocate the
System Variables to an area not used by the project.
A list of devices used can be seen in the original project in either GX Developer or
DOS MEDOC.
Parameter Errors
Some conflicts may occur because the new project created in GX IEC Developer contains
default settings for PLC Parameters and the original project may have contained specific
parameters set by the user.
The compiler will generate various errors associated with this issue, an example is shown
below.
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
56/57
Error Fo137 Illegal device used or symbol not valid, indicates that the original project is
using devices outside of the default device range in PLC Parameters.
This can be rectified, simply by modifying the new project parameters, in line with original
project.
Naming Conventions
Both GX Developer and DOS MEDOC will allow naming conventions, which contravene IEC
programming rules.
Generally, if the name begins with a digit, then this will not be allowed by the compiler.
Error C5043 Invalid name relates in this example to the identifier 0_5_SEC_PULSE which
can simply be renamed, ie HALF_SEC_PULSE.
Written by:
Thomas Lantermann
Last Changed by: Chris Evans MEU-UK
Customer Technology Centre
Date:
Date:
Page:
17.09.2003
26.04.2004
57/57