You are on page 1of 6

Issued by: Mitsubishi Electric Europe B.V.

- UK Branch
Document issue: Ver April 2005
Produced by : - CTC
Travellers Lane, Hatfield, Herts, AL10 8XB, UK
Author: Barry Weller

Databank - Technical Bulletin


IEC Developer version 6.n compiler error F1002

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.

Title: IEC Developer version 6.n complier error F1002 Page 1 of 6


Keywords: IEC Developer
F1002
Addressing
Issued by: Mitsubishi Electric Europe B.V. - UK Branch
Document issue: Ver April 2005
Produced by : - CTC
Travellers Lane, Hatfield, Herts, AL10 8XB, UK
Author: Barry Weller

Databank - Technical Bulletin


Example:
In the screen shot below the IEC address %MD0.182, which is the data type of Double
integer, has been addressed as an INT.

Fig.2

IEC-Address %MW0.180 is for a stranded 16-Bit integer.


IEC-Address %MD0.184 is for a 32-Bit double integer.

IEC 61131-3 Element Addressing:

– IEC addressing is structured as follows:


➱ % A direct PLC device address follows
➱ I, Q, M For Input, Output, Memory (Internal Relays, Data
register)
➱ X, W, D For Bit, Word, Dword, Integer, Dinteger
➱ Counter Direct address

– 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.

Title: IEC Developer version 6.n complier error F1002 Page 2 of 6


Keywords: IEC Developer
F1002
Addressing
Issued by: Mitsubishi Electric Europe B.V. - UK Branch
Document issue: Ver April 2005
Produced by : - CTC
Travellers Lane, Hatfield, Herts, AL10 8XB, UK
Author: Barry Weller

Databank - Technical Bulletin


To remove this error, change the IEC address to the correct data type, in this case the correct
address is %MW0.182.

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:

The example below shows a difference related to a move instruction.

Fig.4

Compiled in V6.n Compiled in V5.n

Title: IEC Developer version 6.n complier error F1002 Page 3 of 6


Keywords: IEC Developer
F1002
Addressing
Issued by: Mitsubishi Electric Europe B.V. - UK Branch
Document issue: Ver April 2005
Produced by : - CTC
Travellers Lane, Hatfield, Herts, AL10 8XB, UK
Author: Barry Weller

Databank - Technical Bulletin


These differences can be found by carrying out an ‘Off line’ or ‘On Line’ verify operation.

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

Title: IEC Developer version 6.n complier error F1002 Page 4 of 6


Keywords: IEC Developer
F1002
Addressing
Issued by: Mitsubishi Electric Europe B.V. - UK Branch
Document issue: Ver April 2005
Produced by : - CTC
Travellers Lane, Hatfield, Herts, AL10 8XB, UK
Author: Barry Weller

Databank - Technical Bulletin


The two programs will now be verified. The results are shown as below.

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

Title: IEC Developer version 6.n complier error F1002 Page 5 of 6


Keywords: IEC Developer
F1002
Addressing
Issued by: Mitsubishi Electric Europe B.V. - UK Branch
Document issue: Ver April 2005
Produced by : - CTC
Travellers Lane, Hatfield, Herts, AL10 8XB, UK
Author: Barry Weller

Databank - Technical Bulletin


This means in V5.n devices D182 and D183 are used as the destination. At all other places
16-bit instructions are used. While D183 is not used by any other global variable or as a direct
address, the logic of the project is still correct. D183 is written to, but it is not used else where
in the project.

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.

Title: IEC Developer version 6.n complier error F1002 Page 6 of 6


Keywords: IEC Developer
F1002
Addressing

You might also like