IEC Developer Version 6 Compiler Error F1002
IEC Developer Version 6 Compiler Error F1002
- UK Branch
Document issue: Ver April 2005
Produced by : - CTC
Travellers Lane, Hatfield, Herts, AL10 8XB, UK
Author: Barry Weller
There is a new error recognised by the compiler in version 6.n (V6) of IEC developer. The
Error relates to a check between the data type and the IEC address. The compiler now checks
the Data type entered into the Global Variable List with the IEC data address and the
Mitsubishi data address to make sure they are the same.
If they are not the same the following error is generated by the complier: -
Fig.1
This message highlights an error in the Global Variable List (GVL) related to a mismatch
between the IEC address and the data ‘TYPE’ assigned to it.
Fig.2
– Examples:
➱ % I X 10 X A
➱ % Q X 16 Y 10
➱ % M W 0.0 D0
➱ % M D 0.0 D 0 [D 1] 32 bit
➱ % M X 4.0 CS 0 (C0 Contact)
As can be seen in the above example the IEC address is of data type ‘Double Integer’
however the TYPE is only assigned to an ‘Integer’.
If this project is now compiled under the IEC compiling rules user by version 6.n, the error
illustrated in Fig.1 is produced.
Fig.3
When the IEC address is changed the code will now compile in V6n. However when the
complied code is verified with the code downloaded to the PLC from Version 5.n (V5.n) there
is likely to be a difference with some of the functions used in the PLC code.
This is due to the compiler in version 5 using the device type of the address to distinguish a 16
or 32-bit function or function block.
The compiler always uses the device type of the destination in an assignment of a 16 or 32-bit
function, i.e. MOV or DMOV. This means that some of the functions in the V5.n PLC code
may be compiled as a DMOV but in V6.n be compiled as a MOV.
Example:
Fig.4
To carry out an ‘Off Line’ verify operation open the project from V5.n in V6.n and compile in
V6.n.
From the ‘Project’ pull down menu, select ‘Other’ and then ‘Verify…’
Fig. 5
Browse for the project from IEC Developer V5, and press ‘Select’.
Fig. 6
Fig. 7
If there are any differences in the code then ‘not identical’ is shown. By selecting ‘Show’, the
differences will be shown.
Fig.8
In version 6 the global variable assignment is always a 16-bit INT and therefore only uses a
16-bit function or function block.
Although there are differences, due to the code only using the first half of the 32-bit function,
the operation of the code will not change.
The only difference is the designation of the assigned data type in the Global Variable List.
This Error was been caused by entering the wrong IEC address into the Global Variable List
when the project was first created in IEC V5.n.