0% found this document useful (0 votes)
457 views364 pages

Reference Mitsubishi PDF

Uploaded by

Sajeev Nerurkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
457 views364 pages

Reference Mitsubishi PDF

Uploaded by

Sajeev Nerurkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 364

MELSEC MEDOC plus

IEC Programming and


Documentation System
Reference Manual
About this Manual
The texts and illustrations in this manual are provided exclusively as a guide to the IEC
programming and documentation system MELSEC MEDOC plus. Separate manuals
are available for MITSUBISHI ELECTRIC’s various series of MELSEC programmable logic
controllers.
The MELSEC MEDOC plus software is supplied under a legal License Agreement and
may only be used and copied subject to the terms of this License Agreement.
All rights reserved. Without the prior explicit consent in writing from MITSUBISHI
ELECTRIC no part of this manual may be reproduced, stored in a retrieval system of
any kind, or transmitted, in any form, or by any means, electronic, mechanical,
photocopying, recording or otherwise, or translated into another language.
MITSUBISHI ELECTRIC reserves the right to make changes to the technical
specifications and information in this handbook at any time and without prior notice.
The IEC 1131.1 standard cited in this manual is available from the publishers
Beuth Verlag in Berlin (Germany).

4th edition
Copyright 01/1998

MITSUBISHI ELECTRIC EUROPE B.V.


Factory Automation
Gothaer Strasse 8
D - 40880 Ratingen Germany
Phone: (+2102) 486-0
Fax: (+2102) 486-717

Printed in Germany
Article number: 43597-D (Reference Manual)
Contents – I

CHAPT. 1: Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 – 1
1.1 This Manual ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 – 1
1.2 The Beginner’s Manual... . . . . . . . . . . . . . . . . . . . . . . . . . .1–1
1.3 If you are not yet familiar with Windows... . . . . . . . . . . . . . . . . . . 1 – 1
1.4 If you are not yet completely familiar
with the IEC 1131.3 standard ... . . . . . . . . . . . . . . . . . . . . . . . . 1 – 1
1.5 If you are already acquainted with IEC 1131.3
and want to get to work right away ... . . . . . . . . . . . . . . . . . . . . 1 – 2
1.6 If you need more information
on programmable logic controllers ... . . . . . . . . . . . . . . . . . . . . 1 – 2
1.7 If you need help on programming instructions
when you are developing your programs ... . . . . . . . . . . . . . . . . . 1 – 2
1.8 If you get stuck ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 – 2
1.9 Typographic Conventions and Visual Cues . . . . . . . . . . . . . . . . . . 1 – 3

CHAPT. 2: Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 – 1
2.1 Hardware requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 – 1
2.1.1 Minimum hardware configuration . . . . . . . . . . . . . . . . . . . 2–1
2.1.2 Recommended enhancements . . . . . . . . . . . . . . . . . . . . 2–1
2.1.3 Software Requirements . . . . . . . . . . . . . . . . . . . . . . . . 2–1
2.1.4 Copyright . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–1
2.1.5 Filling out the registration card . . . . . . . . . . . . . . . . . . . . 2–2
2.2 Installing MELSEC MEDOC plus . . . . . . . . . . . . . . . . . . . . . . . 2 – 2
2.3 Starting MELSEC MEDOC plus . . . . . . . . . . . . . . . . . . . . . . . . 2 – 3
2.4 Quitting MELSEC MEDOC plus . . . . . . . . . . . . . . . . . . . . . . . . 2 – 3
2.5 Bringing MMplus into the Foreground . . . . . . . . . . . . . . . . . . . . 2 – 3
2.6 Novell and 32-bit file access . . . . . . . . . . . . . . . . . . . . . . . . . 2 – 3
2.7 The MMP.INI Program Initialisation File . . . . . . . . . . . . . . . . . . . . 2 – 4
2.7.1 Format of the MMP.INI File . . . . . . . . . . . . . . . . . . . . . . 2 – 4
2.7.2 Editing MMP.INI Entries . . . . . . . . . . . . . . . . . . . . . . . . 2 – 8

Reference Manual MELSEC MEDOC plus


II – Contents

2.8 Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 – 9
2.8.1 Page Documentation . . . . . . . . . . . . . . . . . . . . . . . . 2–9
2.8.2 Zoom Header/Body . . . . . . . . . . . . . . . . . . . . . . . . . 2 – 10
2.8.3 Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 – 11
2.8.4 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 – 12
2.8.5 Graphic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 – 13
2.8.6 Cross Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 – 14
2.8.7 Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 – 15
2.8.8 Monitor Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 – 16
2.9 Connecting the programmable logic controller (PLC) to the computer . . . . 2 – 17
2.9.1 Connecting FX series controllers . . . . . . . . . . . . . . . . . . . 2 – 18
2.9.2 Connecting FX0/FX0N/FX0S/FX2N series controllers . . . . . . . . 2 – 19
2.9.3 Connecting A/Q series controllers . . . . . . . . . . . . . . . . . . 2 – 20
2.10 Connecting a printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 – 24

CHAPT. 3: The User Interface . . . . . . . . . . . . . . . . . . . . . . . . 3 – 1


3.1 The Title Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 – 2
3.2 The Menu Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–2
3.2.1 Menu Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . 3 – 2
3.2.2 Selecting menu commands . . . . . . . . . . . . . . . . . . . . . 3 – 3
3.3 The Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 – 3
3.4 The Project Navigator Window and the Objects it Contains . . . . . . . . . 3 – 4
3.4.1 Objects in the Project Navigator window . . . . . . . . . . . . . . . 3 – 4
3.4.2 How objects are displayed in the Project Navigator window . . . . . 3 – 4
3.4.3 Editing objects . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 – 7
3.5 The Status Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 – 7
3.6 Working with Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 – 9
3.6.1 Object windows . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 – 9
3.6.2 Changing window display size . . . . . . . . . . . . . . . . . . . . 3 – 11
3.6.3 Dialog boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 – 12
3.7 Customising the Screen Display . . . . . . . . . . . . . . . . . . . . . . 3 – 13
3.8 Mouse and keyboard operation . . . . . . . . . . . . . . . . . . . . . . 3 – 17
3.9 General editing functions . . . . . . . . . . . . . . . . . . . . . . . . . . 3 – 17

MELSEC MEDOC plus Reference Manual


Contents – III

3.10 Working in tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 – 21


3.10.1 Editing in tables . . . . . . . . . . . . . . . . . . . . . . . . . . 3 – 22
3.10.2 Automatic copying of the contents of the
preceding line into the new line (Autoincrement) . . . . . . . . . . 3 – 24
3.10.3 Selecting data types in the declaration table . . . . . . . . . . . . 3 – 25
3.10.4 Automatic default data types in the declaration table . . . . . . . . 3 – 26
3.11 Working in the editors (Body) . . . . . . . . . . . . . . . . . . . . . . . 3 – 27
3.11.1 Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 – 27
3.12 The text editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 – 32
3.12.1 Edit functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 – 33
3.13 The graphical editors . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 – 34
3.13.1 Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 – 35
3.13.2 Context menu . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 – 36
3.13.3 Right mouse button or F2 . . . . . . . . . . . . . . . . . . . . . 3 – 37
3.13.4 Program Elements . . . . . . . . . . . . . . . . . . . . . . . . . 3 – 38
3.13.5 AutoConnect . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 – 41
3.13.6 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 – 47
3.13.7 Jump and Return Instructions . . . . . . . . . . . . . . . . . . . . 3 – 51
3.13.8 Graphic macros . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 – 53
3.14 Selecting Programming Instructions . . . . . . . . . . . . . . . . . . . . 3 – 54
3.15 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 – 56
3.15.1 Selecting existing variables and declaring new variables . . . . . . 3 – 56
3.15.2 How to automatically write global variables . . . . . . . . . . . . 3 – 60
3.15.3 Deleting unused variables . . . . . . . . . . . . . . . . . . . . . . 3 – 61

CHAPT. 4: Projects and Objects . . . . . . . . . . . . . . . . . . . . . .4–1


4.1 Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 – 1
4.1.1 The automatically-generated project files . . . . . . . . . . . . . . . 4 – 1
4.1.2 Files with standard extensions . . . . . . . . . . . . . . . . . . . . 4 – 2
4.2 What are the components of a project? . . . . . . . . . . . . . . . . . . . 4 – 2
4.3 The Project Navigator and Objects . . . . . . . . . . . . . . . . . . . . .4–3
4.3.1 Library Pool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–3
4.3.2 PLC Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–3
4.3.3 Task Pool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–4
4.3.4 DUT Pool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–4
4.3.5 Global Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–4
4.3.6 POU Pool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–5

Reference Manual MELSEC MEDOC plus


IV – Contents

4.4 The Program Organisation Unit (POU) . . . . . . . . . . . . . . . . . . . . 4 – 6


4.5 Preparation Before You Start Programming . . . . . . . . . . . . . . . . . 4 – 6
4.6 Library Concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 – 7
4.7 Working with Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 – 11
4.7.1 The Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 – 13
4.8 Working with Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 – 20
4.9 Protecting Your Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 – 27
4.10 Printing Out Project Data . . . . . . . . . . . . . . . . . . . . . . . . . 4 – 29
4.11 Cross Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 – 32

CHAPT. 5: PLC Parameters . . . . . . . . . . . . . . . . . . . . . . . . . 5 – 1


5.1 Memory Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 – 2
5.1.1 Memory Parameters (MELSEC A/FX) . . . . . . . . . . . . . . . . . 5 – 2
5.1.2 Memory Parameters (MELSEC Q) . . . . . . . . . . . . . . . . . . 5 – 3
5.2 Latch Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 – 4
5.2.1 Latch Ranges (MELSEC A) . . . . . . . . . . . . . . . . . . . . . . 5 – 4
5.3 Device Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 – 5
5.3.1 Device Settings (MELSEC Q) . . . . . . . . . . . . . . . . . . . . . 5 – 5
5.4 Timer / Counter Configuration . . . . . . . . . . . . . . . . . . . . . . . 5 – 8
5.4.1 Timer-/Counter Configuration (MELSEC A) . . . . . . . . . . . . . . 5 – 8
5.5 I/O Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 – 9
5.5.1 I/O Configuration (MELSEC A) . . . . . . . . . . . . . . . . . . . . 5 – 9
5.5.2 I/O Configuration (MELSEC A2C) . . . . . . . . . . . . . . . . . . 5 – 10
5.5.3 I/O Configuration (MELSEC Q) . . . . . . . . . . . . . . . . . . . . 5 – 11
5.6 Default Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 – 12
5.7 Link Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 – 12
5.8 PLC Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 – 13
5.8.1 PLC Setup (MELSEC A) . . . . . . . . . . . . . . . . . . . . . . . . 5 – 13
5.8.2 PLC Setup (MELSEC Q) . . . . . . . . . . . . . . . . . . . . . . . . 5 – 14
5.9 Special Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 – 17
5.9.1 Special Parameters (MELSEC A) . . . . . . . . . . . . . . . . . . . 5 – 17

MELSEC MEDOC plus Reference Manual


Contents – V

5.10 System Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 – 18


5.10.1 System Variables (MELSEC A/FX) . . . . . . . . . . . . . . . . . . 5 – 18
5.10.2 System Variables (MELSEC Q) . . . . . . . . . . . . . . . . . . . . 5 – 19
5.11 MELSECNET/MINI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 – 21
5.11.1 MELSECNET/MINI (MELSEC A/Q) . . . . . . . . . . . . . . . . . . 5 – 21
5.12 CPU Type Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 – 22

CHAPT. 6: Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 – 1
6.1 The Structure of MELSEC MEDOC plus Programs . . . . . . . . . . . . . .6–1
6.2 Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–2
6.2.1 Event-triggered Tasks . . . . . . . . . . . . . . . . . . . . . . . . .6–2
6.2.2 Event-triggered tasks with Timer/Output Control
(MC-MCR execution) . . . . . . . . . . . . . . . . . . . . . . . . .6–3
6.2.3 Interval-triggered Tasks . . . . . . . . . . . . . . . . . . . . . . . .6–5
6.2.4 Priority-controlled Tasks . . . . . . . . . . . . . . . . . . . . . . .6–5
6.3 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 – 6
6.3.1 Global and Local Variables . . . . . . . . . . . . . . . . . . . . . .6–6
6.3.2 Variable declarations . . . . . . . . . . . . . . . . . . . . . . . . .6–6
6.3.3 Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6–7
6.3.4 Identifiers and Absolute Addresses . . . . . . . . . . . . . . . . . .6–7
6.3.5 Initial Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 – 11
6.3.6 Comment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 – 11
6.3.7 Autoextern option . . . . . . . . . . . . . . . . . . . . . . . . . 6 – 12
6.3.8 Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 – 12
6.4 Programming Languages . . . . . . . . . . . . . . . . . . . . . . . . . 6 – 14
6.4.1 Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 – 14
6.4.2 Text Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 – 15
6.4.3 Graphical Editors . . . . . . . . . . . . . . . . . . . . . . . . . . 6 – 16
6.4.4 Sequential Function Chart (SFC) . . . . . . . . . . . . . . . . . . 6 – 17
6.5 Programming in Sequential Function Chart Language . . . . . . . . . . . 6 – 20
6.5.1 Sequential Function Chart language Program Structure . . . . . . 6 – 20
6.5.2 Sequence rules and examples . . . . . . . . . . . . . . . . . . . 6 – 21
6.5.3 Editing elements in the SFC language . . . . . . . . . . . . . . . 6 – 25
6.5.4 Zoom functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 – 25
6.5.5 Assigning Actions to Steps . . . . . . . . . . . . . . . . . . . . . 6 – 26
6.5.6 Assigning Transition Conditions . . . . . . . . . . . . . . . . . . 6 – 27
6.5.7 Comments in Sequential Function Chart Language . . . . . . . . . 6 – 28
6.5.8 Sequence errors . . . . . . . . . . . . . . . . . . . . . . . . . . 6 – 29

Reference Manual MELSEC MEDOC plus


VI – Contents

6.6 Programming Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 6 – 30


6.6.1 Using timers in functions . . . . . . . . . . . . . . . . . . . . . 6 – 30
6.6.2 Declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 – 31
6.6.3 Calling functions in the text editor . . . . . . . . . . . . . . . . . 6 – 32
6.6.4 Calling functions in the graphical editors . . . . . . . . . . . . . . 6 – 33
6.7 Programming Function Blocks . . . . . . . . . . . . . . . . . . . . . . 6 – 34
6.7.1 Using timers in function blocks . . . . . . . . . . . . . . . . . . 6 – 34
6.7.2 Declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 – 34
6.7.3 Instantiation . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 – 36
6.7.4 Calling function blocks in the text editor . . . . . . . . . . . . . . 6 – 36
6.7.5 Calling function blocks in the graphical editors . . . . . . . . . . 6 – 38
6.7.6 Multiple use of a single instance . . . . . . . . . . . . . . . . . . 6 – 39
6.7.7 Execution of Function Blocks . . . . . . . . . . . . . . . . . . . . 6 – 40
6.7.8 Global Function Blocks . . . . . . . . . . . . . . . . . . . . . . . 6 – 44
6.8 Programming Data Unit Types . . . . . . . . . . . . . . . . . . . . . . . . 6 – 45
6.8.1 Declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 – 45
6.8.2 Use of the DUT as global variable . . . . . . . . . . . . . . . . . 6 – 46
6.8.3 Use of the DUT as local variable . . . . . . . . . . . . . . . . . . 6 – 49
6.9 Programming Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 – 50
6.9.1 Declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 – 50
6.9.2 Calling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 – 51
6.10 Programming Timers and Counters . . . . . . . . . . . . . . . . . . . . . 6 – 52
6.10.1 TIMER and COUNTER Functions . . . . . . . . . . . . . . . . . . . 6 – 52
6.10.2 TIMER and COUNTER Function Blocks . . . . . . . . . . . . . . . . 6 – 55
6.11 The EN input and ENO output . . . . . . . . . . . . . . . . . . . . . . . 6 – 59
6.11.1 Execution with and without EN and ENO . . . . . . . . . . . . . 6 – 60

CHAPT. 7: Compiling and Downloading Programs . . . . . . . . . . . . 7 – 1


7.1 Error Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 – 1
7.2 Compiling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–2
7.3 Downloading Projects to the CPU . . . . . . . . . . . . . . . . . . . . . . 7 – 4
7.3.1 Communications port setup . . . . . . . . . . . . . . . . . . . . . 7–4
7.3.2 Download parameters . . . . . . . . . . . . . . . . . . . . . . . . 7 – 11
7.3.3 The QnA’s File Structure . . . . . . . . . . . . . . . . . . . . . . . 7 – 13
7.3.4 Downloading the Project . . . . . . . . . . . . . . . . . . . . . . 7 – 15
7.3.5 Comparing the programs in the PLC CPU and MM+ . . . . . . . . . 7 – 15
7.3.6 Online Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 – 16

MELSEC MEDOC plus Reference Manual


Contents – VII

7.4 Exporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 – 17
7.4.1 Exporting an MM+ project into an ASCII file . . . . . . . . . . . . 7 – 17
7.4.2 Export to EPROM . . . . . . . . . . . . . . . . . . . . . . . . . . 7 – 17
7.5 Importing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 – 18
7.5.1 Importing MM+ ASCII files . . . . . . . . . . . . . . . . . . . . . 7 – 18
7.5.2 Importing MELSEC MEDOC print files . . . . . . . . . . . . . . . 7 – 20
7.5.3 Symbolic Upload . . . . . . . . . . . . . . . . . . . . . . . . . . 7 – 22
7.5.4 MELSEC Upload . . . . . . . . . . . . . . . . . . . . . . . . . . 7 – 23
7.5.5 Absolute Label . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 – 24

CHAPT. 8: Diagnostics Functions and Online Operation . . . . . . . . .8–1


8.1 Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–1
8.1.1 Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 1
8.1.2 Step Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 1
8.1.3 The Freeze Function . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 2
8.2 PLC System Error Check . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 3
8.2.1 System errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–3
8.2.2 User-defined errors . . . . . . . . . . . . . . . . . . . . . . . . . . 8–3
8.2.3 Hardware Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . 8–4
8.2.4 Scan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–5
8.3 The Device Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 5
8.3.1 The worksheet . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–6
8.3.2 Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8–7
8.3.3 The pop-up menu . . . . . . . . . . . . . . . . . . . . . . . . . . .8–7
8.3.4 Editing tables in Microsoft Excel . . . . . . . . . . . . . . . . . . 8 – 12
8.4 The Monitor Function . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 13
8.4.1 Monitor Mode Options . . . . . . . . . . . . . . . . . . . . . . . 8 – 13
8.4.2 The Online Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 14
8.4.3 The Program Monitor . . . . . . . . . . . . . . . . . . . . . . . 8 – 14
8.4.4 The Entry Data Monitor (EDM) and the Header Monitor . . . . . . 8 – 16
8.5 Status Latch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 23
8.6 Sampling Trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 25
8.6.1 A Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 25
8.6.2 FX Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 31

Reference Manual MELSEC MEDOC plus


VIII – Contents

APPENDIX

CHAPT. A: Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A – 1

CHAPT. B: Keyboard Commands . . . . . . . . . . . . . . . . . . . . . . B – 1


B.1 MM+ Menu Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B – 1
B.2 Project Navigator Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . B–2
B.3 Object Window Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . B – 3
B.4 Dialog Box Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B–4
B.5 Table Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B–5
B.6 Device Editor Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B–7
B.7 Instruction List Editor Keys . . . . . . . . . . . . . . . . . . . . . . . . . B – 9
B.8 Graphical Editor Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . B – 11
B.9 Sequential Function Chart Editor Keys . . . . . . . . . . . . . . . . . . . B – 13
B.10 Keys for Checking and Downloading Programs . . . . . . . . . . . . . . . B – 15
B.11 Online Help System Keys . . . . . . . . . . . . . . . . . . . . . . . . . . B – 16

CHAPT. C: Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C – 1
C.1 General Tool Icons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C – 1
C.2 Instruction List Editor Tool Icons . . . . . . . . . . . . . . . . . . . . . . C–2
C.3 Ladder Diagram and Function Block Diagram Editor Tool Icons . . . . . . . C – 3
C.4 Sequential Function Chart Editor Tool Icons . . . . . . . . . . . . . . . . C–4
C.5 Project Navigator Window Tool Icons . . . . . . . . . . . . . . . . . . . . C – 5
C.6 Online (Monitor Mode) Tool Icons . . . . . . . . . . . . . . . . . . . . . C – 6

CHAPT. D: Temporary Files . . . . . . . . . . . . . . . . . . . . . . . . . D – 1


D.1 Temporary Files Created when Projects are Compiled . . . . . . . . . . . . D – 1
D.2 Temporary files Created During Downloads . . . . . . . . . . . . . . . . D–2

MELSEC MEDOC plus Reference Manual


Contents – IX

CHAPT. E: Programming Instructions . . . . . . . . . . . . . . . . . . . . E – 1


E.1 IEC Programming Instructions . . . . . . . . . . . . . . . . . . . . . . . . E – 4

CHAPT. F: Menu structure . . . . . . . . . . . . . . . . . . . . . . . . .F–1

CHAPT. G: Compliance List . . . . . . . . . . . . . . . . . . . . . . . . G – 1

INDEX

Reference Manual MELSEC MEDOC plus


Introduction 1 – 1

1 Introduction

1.1 This Manual ...


... isn’t designed to be read from cover to cover. It is organised so that it can be used
as a reference work in which you can find detailed explanations of all the menus and
menu commands in MELSEC MEDOC plus when you need them. However, the
Reference Manual is not based directly on the menu structure of MELSEC MEDOC
plus, but rather on the central elements of IEC Standard 1131.3 such as Projects,
Objects, Variables, Program Organisation Units and Programming Languages. The
menus and all menu commands and options are listed in the appendix of this manual.

1.2 The Beginner’s Manual...


... is the ideal aid for getting acquainted with the basic terms and concepts of the
new IEC 1131.3 standard. This manual teaches you how to use MELSEC MEDOC plus in
easy steps, with a sample program that provides a practical illustration of the most
important operations.

1.3 If you are not yet familiar with Windows...


... please at least read the Windows Fundamentals section in the Windows User’s
Guide or work through the exercises of the online Windows tutorial (accessible in the
Program Manager). This will give you the information and skills you need for using the
elements of Windows that are the same in all application programs.

1.4 If you are not yet completely familiar


with the IEC 1131.3 standard ...
... please read the chapter on the IEC 1131.3 standard in the Beginner’s Manual. This
chapter explains the basic principles of this industry standard, together with the most
important new terms you need to know. A glossary of all the terms used is provided
at the end of this Reference Manual.

Reference Manual MELSEC MEDOC plus


1 – 2 Introduction

1.5 If you are already acquainted with IEC 1131.3


and want to get to work right away ...
... you will find the basic instructions you need to be able to produce immediate
results in the ‘Getting Started’ chapter in the Beginner’s Manual. This chapter tells
you how to perform all the basic MELSEC MEDOC plus operations, from creating new
projects to downloading your finished programs to the PLC (controller).

1.6 If you need more information


on programmable logic controllers ...
... please refer to the documentation provided with the hardware components of your
system.

1.7 If you need help on programming instructions


when you are developing your programs ...
... use the MELSEC MEDOC plus online help system. This provides direct access to
brief explanations of all programming instructions, together with their syntax,
parameters and operands. A list of all IEC and MELSEC programming instructions is
also provided in the appendix of this manual. More detailed descriptions and sample
programs can be found in the programming manuals of the individual PLCs.

1.8 If you get stuck ...


... in what looks like an insoluble problem or if you have questions about MELSEC
MEDOC plus or the connected PLC configuration, please first refer to the manuals.
Use the detailed index provided in this Reference Manual. Answers to many of your
questions can also be found in MELSEC MEDOC plus‘s context-sensitive online help
system, which can always be accessed by pressing l. Please also make use of the
Search command in the Help menu.
If you fail to find an answer to your particular question in any of these places you can
also obtain help from your local MITSUBISHI ELECTRIC representative. Alternatively,
you can call us directly at the MITSUBISHI ELECTRIC European headquarters in
Ratingen, Germany. The addresses and phone numbers are listed on the rear of all PLC
manuals.

MELSEC MEDOC plus Reference Manual


Introduction 1 – 3

1.9 Typographic Conventions and Visual Cues


In the rest of this manual MELSEC MEDOC plus will normally be referred to with the
abbreviation MM+.
References to specific keys and key combinations are always identified with the key
symbols, e.g. e, j or b.
Menu names, submenus, menu commands and the options in dialog boxes are
identified by the use of bold type, e.g. the menu command New in the Project
menu, or the options CPU-Port and Computer Link (AJ71C24) in the Transfer
Setup dialog box.

These symbols are used to identify special instructions


for mouse and keyboard users.

Examples: This symbol identifies examples.

Note: This symbol draws your attention to particularly important hints and
information.

WARNING: Always pay particular attention to the warnings identified with this
symbol, as they refer to serious dangers such as the possibility that you may lose
data or damage the hardware system if you do not follow the instructions.

Reference Manual MELSEC MEDOC plus


1 – 4 Introduction

MELSEC MEDOC plus Reference Manual


Installation 2 – 1

2 Installation

2.1 Hardware requirements

2.1.1 Minimum hardware configuration


80386DX processor or above
4 MB RAM
Hard disk with at least 20 MB free
3,5" high density floppy disk drive
VGA-compatible graphics adapter
Mouse
1 RS232 serial port for communication with the PLC system
1 printer port
Printer
14"/35 cm diag. VGA monitor

2.1.2 Recommended enhancements


Pentium
8 MB RAM
1024 x 768 x 256 (width x height x colour depth)
Small Fonts
17"/43 cm diag. VGA monitor

2.1.3 Software Requirements


MS-DOS operating system version 3.3 or above
Microsoft Windows version 3.1*/Microsoft Windows 95 (16 bit)

2.1.4 Copyright
IMPORTANT NOTICE: This software is protected by copyright. By opening the
distribution disks package you automatically accept the terms and conditions
of the License Agreement. You are only permitted to make one single copy of
the original distribution disks for your own backup and archiving purposes.

Reference Manual MELSEC MEDOC plus


2 – 2 Installation

2.1.5 Filling out the registration card


You are only entitled to full technical support from MITSUBISHI ELECTRIC if you fill out
and return the enclosed registration card – don’t forget to include your serial number!
You will then also receive information on updates and new versions of MELSEC
MEDOC plus.

2.2 Installing MELSEC MEDOC plus


During this procedure the installation program will create a directory on your hard
disk, into which all the MM+ files will be copied.

Installing MM+ on your hard disk


a Before you begin, make backup copies of the MM+ distribution disks.
Write-protect the disks to make sure they cannot get erased accidentally. Install the
program from the backup copies and store the original disks in a safe place.
b Make sure that the correct Microsoft Windows version is properly installed on your
computer. For information on using Windows please refer to the Windows User’s
Guide.
c Start MS Windows.
d Insert Installation Disk 1 in the floppy disk drive.
e Open the Windows File Manager.
f Select and open the floppy disk drive in which you have inserted the installation
disk.
g Double-click on the file INSTALL.EXE.
This starts the MM+ installation program.
h Follow the instructions that appear on the screen.
i When the installation procedure is finished the program will create a new program
group containing the MM+ program icon.
For further details on the necessary Windows procedures please refer to your
Windows documentation.

MELSEC MEDOC plus Reference Manual


Installation 2 – 3

2.3 Starting MELSEC MEDOC plus


a Double-click on the MM+ program icon. This starts MELSEC MEDOC plus and
displays the start-up screen.
b Confirm with the e key.

2.4 Quitting MELSEC MEDOC plus


You can quit MM+ directly at any point in the program by pressing the key
combination ao.

Or:

Double-click on the Quit command in the Project menu.

2.5 Bringing MMplus into the Foreground


When MELSEC MEDOC plus is active on the screen at the same time as one or more
other applications you can bring MM+ into the foreground by double-clicking on its
icon in the Program Manager.

2.6 Novell and 32-bit file access


Executing MM+ on a computer connected to a Novell network can lead to problems if
32-bit file access is enabled.

Deactivating 32-bit file access:


a Open the Control Panel in the Windows Main program group.
b Activate the 386 Enhanced option.
c Select Virtual Memory.
d Select Change >>.
e Deactivate Use 32-bit file access.
f Select OK.
g Confirm with Yes.
h Select Reboot computer (close all open applications save all open files first!).

Reference Manual MELSEC MEDOC plus


2 – 4 Installation

2.7 The MMP.INI Program Initialisation File


The MMP.INI initialisation file contains important parameters required by the Windows
application MELSEC MEDOC plus. The Install program creates this file automatically
and stores it in your Windows directory. A copy of the MMP.INI file will remain in the
actual MM+ directory (➞ page 2-8).

2.7.1 Format of the MMP.INI File


MMP.INI is arranged in several sections that all have the same basic format. The
following list shows the standard and some sample settings:

Contents of the MMP.INI File


Explanation
(Standard and sample entries)
[PROJECTS] PROJECT
Project0=C:\MMP_PROJ\SILO1 List of the last four projects opened in MM+
Project1=C:\MMP_PROJ\TEST3 These projects are also displayed at the bottom of the
Project2=C:\MMP_PROJ\EXAMPLE Project menu.
Project3=C:\MMP_PROJ\SILO2 DO NOT EDIT!
[OPTIONS] OPTIONS
in the EXTRAS menu
StepZoom=1
FBZoom=1 Detailed information see page 2-9
MacroGraphics=5
AutomaticIOpin=TRUE
AutoExtern=TRUE
PinOverWrite=TRUE
IncremNewDecl=TRUE
CommentCopy=TRUE
ChkDeclareExternal=TRUE
ChkErrors=25
ChkWarnings=100
LRUProjects=4
ArrayElementsToShow=10
CanEditPou=FALSE
MinDiskSpace=20
DefaultStringLength=20
ErrorLogFile=C:\MMP\error.log
InitNetworkHeight=3
CreateTmpVarForPLS=TRUE
CreateTmpVarForPLF=TRUE
CreateTmpVarForALT=TRUE
OnlinePollrate=100
MonitorStringLen=16
AutomaticIOPinENO=TRUE
LRUVarsel=3

MELSEC MEDOC plus Reference Manual


Installation 2 – 5

Contents of the MMP.INI File


Explanation
(Standard and sample entries)
[LADDER] LADDER DIAGRAM
HLineLength=4 Horizontal length in Ladder diagram
Length in grid elements
Default setting: 4
VLineLength=3 Vertical height in Ladder diagram
Height in grid elements
Default setting: 3
[RC_GROUP] STATUS BAR
1=1,53,Clock, , Status bar configuration settings
2=2,180,Path, , DO NOT EDIT!
3=3,73,Security Level, ,
4=4,150,Editor Info, ,
5=5,40,Online, ,
6=6,28,System Resources, ,
7=7,88,Free Memory, ,
8=8,250,Messages, ,
9=20,55,CpuType, ,
10=21,110,ConnStatus,
Not Connected,
11=22,70,ErrorStatus,
Not Connected,
[WORK_GROUP] STATUS BAR
LEFT=20,2, Field size of the status bar entries
RIGHT=1,3, DO NOT EDIT!
[DEFAULT_GROUP] STATUS BAR
LEFT=2,3, Field size of the status bar entries
RIGHT=1, DO NOT EDIT!
[LIBRARIES] USER LIBRARIES
ManufacturerHelpPath= Directory for the library help files
C:\MMP\HELP
ManufacturerLibPath= Directory for the library files
C:\MMP\USER_LIB
Manufacturer0=Standard_Lib, Specification of the libraries
SLIB.lib,FUNCTION.HLP Max. 50 libraries are allowed.
Input order:
Manufacturer1=Manufacturer_Lib, ManufacturerX=library name, library file, help file
MLIB.lib,FUNCTION.LIB (help file not necessary)
DO NOT EDIT!
[Ccodegen] CODE-GENERATOR
TabDump=TRUE When TabDump=TRUE the following files are
generated in the project directory when MM+ is
started with the /debug option:
- PRECGEN.TAB
- POSTCMPR.TAB
- POSTCGEN.TAB

Reference Manual MELSEC MEDOC plus


2 – 6 Installation

Contents of the MMP.INI File


Explanation
(Standard and sample entries)
[PRINT] PRINTOUT
PrintFrame=1 =0: Printout options are enabled
=1: Printout options are disabled
OemBitmap=C:\MMP\PRNLOGO1.BMP Directory and file of bitmap
Bitmap is shown in the upper left corner in the page
header
PrBitmap=C:\MMP\PRNLOGO2.BMP Directory and file of bitmap
Bitmap is shown in the upper right corner in the page
header
Text1=Company XXX Text in footer
Text2=Department XXX 3 text lines are shown in the page footer
Text3=Application XXX
PrintRaster=10 Size of printout
Default setting:10
depends on printer
ScDoc=1 ScDoc
ScDoc=1: Activates the interface to the documentation
software SCDoc.
[CrossReference] CROSS REFERENCE
GenerateSCT=TRUE Automatic link of the SCT files to the SCX file
GenerateSCX=TRUE when creating the cross reference data base
=TRUE: Function enabled
=FALSE: Function not enabled
[PARAM] PARAMETER
COMPORT=0 Selection of the COM port of Personal Computer
COMPORT=0 Selection of COM1
COMPORT=1 Selection of COM2
The selection of the COM port will not be saved
together with the project. The COM port can be
selected in the MMP.INI.
[PATH] DIRECTORIES
CNF=c:\SC\TYP_CNF CNF Configuration files for all PLC types
TYP=c:\SC\TYP_CNF (special format)
EXE=c:\SC\MAK TYP Configuration files for all PLC types
PPR=c:\SC\PPR (standard format)
EXE MM+ program files
PPR Project templates for all PLC types
DO NOT EDIT!
[WIZARD] WIZARD
MELSEC=FALSE Automatic POU and Task creation
MELSEC=TRUE
When you create a new project the Wizard is displayed
on the screen with a prompt asking if you wish to
create a POU and a task automatically.
MELSEC=FALSE
This setting disables the Wizard.

MELSEC MEDOC plus Reference Manual


Installation 2 – 7

Contents of the MMP.INI File


Explanation
(Standard and sample entries)
[REG] MM+ REGISTRATION

NAME: xxxxx Name/Company: information entered when you install


COMPANY: xxxxx MM+
DISTRIBUTOR: xxxxx Distributor/Serial: Distributor name and encoded serial
SERIAL: xxxxx number
DO NOT EDIT!
[DEVICE_SETTING] DEVICE EDITOR
USE_COLORS=1 Colors
Context menu - Options - Use Colors
=1: Use of different colors in display mode enabled
=0: Use of different colors in display mode disabled
SAFETY_INQUIRY=1 Safety inquiry
Context menu - Options - Additional Safety Inquiry
=1: Additional safety inquiry prompt is displayed
=0: Additional safety inquiry prompt is not displayed
[EDM] ENTRY DATA MONITOR
FIELD0=Name Configuration of Entry Data Monitor table
FIELD1=Type
FIELD2=Address (IEC)
FIELD3=Value (dec)
FIELD4=Value (bin)
[SFC] SEQUENCES
GenerateSfcStartupCode=TRUE Automatic generation of startup code
LD M9039
OUT M9101
The special relay M9101 starts the execution of the SFC
processing.
1) The section [SFC]or the entry
GenerateSfcStartupCode does not exist or any
of them is spelled incorrectly:
➜ The startup code will be generated automatically.
2) The section [SFC]and the entry
GenerateSfcStartupCode exist and the value is
set to eiher TRUE, YES or 1:
➜ The statup code will be generated automatically.
3) The section [SFC]and the entry
GenerateSfcStartupCode exist and the value is
set to any other value:
➜ The startup code will not be generated.

Usually the entry should be set to TRUE, to generate a


proper SFC processing.

Reference Manual MELSEC MEDOC plus


2 – 8 Installation

2.7.2 Editing MMP.INI Entries


WARNING: Most MMP.INI parameters should not be edited by the user! Please
observe the DO NOT EDIT! warnings in the table above.

How to make changes in the user-editable sections


a Create a backup copy of the file MMP.INI in another directory or on a floppy disk.
If the changes you make don’t work or result in unexpected problems when you
run MM+ you can then restore the original file in the Windows directory from the
backup copy.
Important: When you install MM+ the MMP.INI file is copied into your Windows
directory. Although there is also a copy of MMP.INI in the MM+ directory, the
program only uses the copy of MMP.INI in the Windows directory. Before making
any editing changes it is thus always advisable to make a backup of the version of
MMP.INI stored in the Windows directory, as it is always possible that the file has
already been changed in some way and is no longer identical with the copy stored
in the MM+ directory.
b Load MMP.INI into a standard text editor such as the Windows Notepad utility.
Do not use an editor or word processor that inserts formatting codes in the text
file, as the system would then no longer be able to read the file.
c Make the necessary editing changes.
d Save the edited file.
e Close the MM+ program and restart it.
Changes made to the MMP.INI file do not take effect until you restart the MM+
program.

MELSEC MEDOC plus Reference Manual


Installation 2 – 9

2.8 Options
The options are configured in the Extras - Options menu.

2.8.1 Page Documentation

e Active Page Frame Activates the printout settings.


You can only edit the settings for the print raster, header and footer when this
option is enabled.
e Print Raster The printer raster value.
The value for this setting depends on the printer model you are using.
Standard setting: 10
e Header The printout header
Logo Left: Path and filename of the bitmap graphic to be printed on the left in the
header.
Logo Right: Path and filename of the bitmap graphic to be printed on the right in
the header.
e Footer The printout footer
Text 1/2/3: Three lines of text to be included in the printout footer.

Reference Manual MELSEC MEDOC plus


2 – 10 Installation

2.8.2 Zoom Header/Body

Navigator Zoom
e Expand Double-clicking on entries in the POU Pool displays/hides lower levels in
the hierarchy.
e Open Header/Body Double-clicking on entries in the POU Pool opens the
corresponding header and body.

FBD/LD Zoom
e Open Header Double-clicking on a function block in a graphical editor opens the
corresponding header.
e Open Body/Header Double-clicking on a function block in a graphical editor
opens the corresponding header and body.

Step Zoom Into


e Step Action Association Double-clicking on a step opens the Action Association
dialog box (association of an action to a step).
e First Action If Any If actions are already associated with the step double-clicking
on the step displays the PLC program of the first action in the list.
e Comment Double-clicking on a step displays the Comment dialog box (for
entering comment texts).

MELSEC MEDOC plus Reference Manual


Installation 2 – 11

2.8.3 Editing

Declaration Editor
e Auto Extern The declaration table of the global variables has a column called
Auto Extern. All global variables identified as Auto Extern are automatically copied
to the headers of all existing and newly-created POUs.
e Copy Comment and Type Fields See Incremental New Declarations.
e Incremental New Declarations When this option is enabled the contents of the
previous lines are copied automatically when new lines are inserted in the
declaration tables. The designators and addresses are automatically incremented by
1. If you also want the system to copy the contents of the type and comment
fields you must also enable the Copy Comment and Type Fields check box.

FBD/LD
e Declare New Identifiers When you overwrite a dummy variable in a graphical
editor with a variable identifier name that has not yet been declared the Variable
Selection (Mode NewVar) dialog box will be displayed automatically so that you
can enter the declaration for the new variable.
e Pin Overwrite When you create a connection to an empty variable connection in
a graphical editor the empty variable will be overwritten.
e Automatic Input/Output Box The system will automatically create the input and
output variables when you insert a function block in a graphical editor.
e Automatic ENO BoxThe system will automatically create the ENO output variable
when you insert a function block in a graphical editor. If the ENO output variable
is not needed this option has to be disabled.

Reference Manual MELSEC MEDOC plus


2 – 12 Installation

Online Toolbar
Enables the display of the additional toolbar for online operations when the program
is in online mode (➞ page 8-14 and Appendix C).

Varsel Default Libraries


When the Variable Selection dialog box is activated the focus in the Libraries list will
be on the library specified here.

2.8.4 General

Error Log File


Path and filename for the error log file.

Stop Check By
e Errors Stop the check operation when the number of errors found exceeds the
maximum limit specified here.
Range: 0 - 2,000
e Warnings Stop the check operation when the number of warnings exceeds the
maximum limit specified here.
Range: 0 - 2,000

Default String Length (characters)


You can set the default length of the STRING data type to any value up to a maximum
of 50 characters.

MELSEC MEDOC plus Reference Manual


Installation 2 – 13

Minimum Disk Space (Mbytes)


MM+ displays a warning message when the amount of free space available on the
current drive falls below the value specified here.

Last Recent Used Files (number)


The last projects opened are always displayed at the bottom of the Project menu. You
can set the number of projects to be displayed to a maximum of 9.

Array Elements To Show


The Entry Data Monitor can display the individual elements of an array, but this can be
impossible if the array is too large. This option enables you to set the number of array
elements to display to a maximum of 50 (➞ page 8-22 ).
You can also change this value in the prompt dialog that is displayed when you open
an array in the Entry Data Monitor.

2.8.5 Graphic

e Initial Network Height The initial height of a network.


Range: 3 - 100 grid points
Default: 3
e Horizontal Grid Length of Line Segment Horizontal length of line segments in
the ladder diagram editor, in grid points.
Range: 0 - 100 grid points
Default: 4

Reference Manual MELSEC MEDOC plus


2 – 14 Installation

e Vertical Grid Height of Line Segment Vertical length of line segments in the
ladder diagram editor, in grid points.
Range: 0 - 100 grid points
Default: 3
e Number of Graphic Macros Number of additional graphic macros available.
Graphic macros 1 through 5 are always available.
Range: 5 - 25

2.8.6 Cross Reference

Cross Reference Options


Used to define the options for generation of the cross reference database.

e Generate *.SCT files while checking a project Activates generation of the SCT
files during project checks.
e Automatically link the *.SCT files to the *.scx file Activates automatic linking
of the SCT files to the SCX file.

MELSEC MEDOC plus Reference Manual


Installation 2 – 15

2.8.7 Compiler

Create temporary variables for instruction PLS_M / PLF_M / ALT_M


System variables are required for internal processing when the output variables of the
instructions PLS_M, PLF_M and ALT_M are used to activate additional instructions. If
you use many instructions of this kind the maximum limit for number of system
variables (system labels) that you can use can be reached very quickly.
If this happens you should disable the option Create temporary variables for
instruction PLS_M / PLF_M / ALT_M. Your PLC program must then be modified
accordingly.
Default: Enabled

Output writes directly to the


device (no system variable
required)

Output activates the MOV


instruction
(uses 1 system variable)

Reference Manual MELSEC MEDOC plus


2 – 16 Installation

2.8.8 Monitor Mode

e Displayed String Length Displaying long strings significantly reduces


performance in monitoring mode. It is thus advisable to limit the number of
characters to be displayed.
e Poll rate Interval at which the monitor polls the CPU, expressed in ms.

MELSEC MEDOC plus Reference Manual


Installation 2 – 17

2.9 Connecting the programmable logic controller (PLC) to the


computer
In the Project Navigator click on PLC_Parameter and in the dialog box on the button
CPU Type. You get a list containing all CPU types which are supported by MM+.
This manual does not include instructions for installing your controller hardware. Each
controller system is supplied with documentation including comprehensive installation
instructions.
There are a number of different options for connecting the PLC to your personal
computer:
Via the CPU interface
Via the computer link modules
Via the A7BDE interface card (MELSCNET and MELSECNET10)
Via an Ethernet module

The MAC transparent mode enables data transmission by modem between the
personal computer and the PLC. More information see page 7-9.

The options for selecting the connection type and setting the corresponding
parameters can be found in the Online menu under Transfer Setup - Ports
(➞ Chapter 7).

Reference Manual MELSEC MEDOC plus


2 – 18 Installation

2.9.1 Connecting FX series controllers


The controllers of the FX series can only be connected to the computer via the CPU
interface.

a) Connection via the CPU interface with the SC-09 interface converter
Connect the 9-pin D-shell connector to the computer. If your computer port has a
25-pin connector you will also need a 9/25-pin adapter. Connect the 25-pin D-shell
connector to the FX controller.

MELSEC
MEDOC
plus
MELSEC FX
SC-09
SC-09

b) Connection via the CPU interface with the FX-232AW serial interface
You will need two additional cables for connecting the FX-232AW module:
FX-422CAB for connecting the FX controller to the FX-232AW
F2-232CAB or FX-232CAB for connecting the FX-232AW to the personal computer

If your computer port has a 9-pin connector you will also need a 25/9-pin adapter as
both of these cables (F2-232CAB, FX-232CAB) are fitted with 25-pin D-shell connectors
at the PC end.

MELSEC
MEDOC
plus
F2-232CAB FX-232AW MELSEC FX
FX-232CAB

FX-422CAB

MELSEC MEDOC plus Reference Manual


Installation 2 – 19

2.9.2 Connecting FX0/FX0N/FX0S/FX2N series controllers


The controllers of the FX0/FX0N series can only be connected to the computer via the
CPU interface.

a) Connection via the CPU interface with the SC09 interface converter
Connect the 9-pin D-shell connector to the computer. If your computer port has a
25-pin connector you will also need a 9/25-pin adapter. Connect the 8-pin min-DIN
connector to the FX0/FX0N controller. This connector is delivered together with the
SC-09.

MELSEC
MEDOC
plus
MELSEC FX0/FX0N
SC-09
FX0S/FX2N

b) Connection via the CPU interface with the FX-232AW serial interface
You need three additional cables for connecting the systems with the FX-232AW
module:
The FX-422CAB and the FX-20PCADP cables for connecting the FX0/FX0N
controller to the FX-232AW
The F2-232CAB or FX-232CAB cable for connecting the FX-232AW to the personal
computer

If your computer port has a 9-pin connector you will also need a 25/9-pin adapter, as
both these cables (F2-232CAB, FX-232CAB) have 25-pin D-shell connectors at the
computer end.

MELSEC
MEDOC
plus
MELSEC FX0/FX0N
F2-232CAB FX-232AW FX0S/FX2N
FX-232CAB FX-422CAB FX-20PCADP

Reference Manual MELSEC MEDOC plus


2 – 20 Installation

2.9.3 Connecting A/Q series controllers


The A series controllers can be connected to the computer via either the CPU
interface, computer link module, the A7BDE interface card or the Ethernet module.

a) Connection via the CPU interface with the SC-09 interface converter
Connect the 9-pin D-shell connector of the SC-09 to the computer. If your computer’s
port has a 25-pin connector you will also need a 25/9-pin adapter. Connect the 25-pin
D-shell connector to the computer’s parallel port.

MELSEC
MEDOC
plus A/QCPU

SC-09

SC-09

b) Connection via the computer link module


The following ‘computer link’ modules are available: AJ71C24-S[], AJ71UC24 und
A1SJ71C24-R[]. The computer link module is installed in the base unit (module rack). It
is connected to the computer with a standard RS232 ‘null modem’ cable. Check the
pin assignments of the cable before using it (see below). The communications
parameters you set in Online - Transfer Setup - Ports (➞ Chapter 7) must match the
DIP switch settings on the computer link modules.

MELSEC
MEDOC
plus ACPU AJ71C**

RS232

Note: See the computer link module manuals for full details on their settings.

MELSEC MEDOC plus Reference Manual


Installation 2 – 21

Pin assignments of the RS232 null modem cable


You will need a standard RS232 ‘null modem’ cable for connecting the computer to
the controller via one of the computer link modules. The pin assignments of the 9-pin
and 25-pin connectors for this cable are as follows:
25 25 9 25 9 9

1 1
2 3 3 3 2 3
3 2 2 2 3 2
7 7 5 7 5 5
6 6 6 6 6 6
8 8 1 8 1 1
20 20 4 20 4 4
4 4 7 4 7 7
5 5 8 5 8 8

DIP switch settings


The communications parameters you set in Online - Transfer Setup - Ports
(➞ Chapter 7) must match the DIP switch settings on the computer link modules.
Note: Please see the computer link module manual for details on the DIP switch
settings.

Reference Manual MELSEC MEDOC plus


2 – 22 Installation

c) Connection via the A7BDE interface card


The interface card is installed in the Personal Computer. The A7BDE is an AT Bus
compatible interface card for an IBM compatible Personal Computer. This interface
card is used to integrate the Personal Computer in the networks MELSECNET,
MELSECNET/II and MELSECNET/10. The following cable types are available:
Cable type Specifications
SI 200/250 µm
Optical
GI 50/125 µm
Coaxial BNC Adapter for coaxial cable 75 Ω RG59/U

The following interface cards are available:


Interface cards Network Specifications
A7BDE-J71AR21 Coaxial
MELSECNET and
A7BDE-J71AP21 MELSECNET/II Optical SI 200/250 µm
A7BDE-J71AP21-S3 Optical GI 50/125 µm
A7BDE-J71BR11 Coaxial Bus 75 Ω RG59/U
MELSECNET/10
A7BDE-J71LP21 Optical double loop SI 185/230 µm
RS422 port for direct connection to
A7BDE-RS4
MELSEC A series’ PLC programming port

MELSEC
MEDOC
plus ACPU AJ71AP21
MELSECNET
MELSECNET/II
Optical Cable
A7BDE-J71AP21

Note: See A7BDE manuals for full details on installation and settings.

The communications parameters are set in Online - Transfer Setup - Ports


(➞ Chapter 7)

MELSEC MEDOC plus Reference Manual


Installation 2 – 23

d) Connection via the Ethernet module


MELSEC MEDOC plus enables a MELSEC A series’ PLC to be programmed via the
Ethernet. The Ethernet module is installed in the base unit. The connection between
the Personal Computer and the Ethernet module is realized via the coaxial cable
10BASE5 (Ethernet) or 10BASE2 (Cheapernet).
The following Ethernet modules can be used:
AJ71E71-S3
A1SJ71E71-B2-S3
A1SJ71E71-B5-S3

MELSEC
MEDOC
plus ACPU AJ71E71

Ethernet

Cheapernet

Note: See Ethernet manuals for full details on Ethernet mdoule settings.

Please note that the Ethernet modules will only work together properly with
MELSEC MEDOC plus if its version “E” (or higher) is used.
You find the version number directly on the Ethernet modules.

The communications parameters you set in Online - Transfer Setup - Ports


(➞ Chapter 7) must match the DIP switch settings on the Ethernet module.

Reference Manual MELSEC MEDOC plus


2 – 24 Installation

2.10 Connecting a printer


Install your printer, following the manufacturer’s instructions.
The Windows User’s Guide contains detailed instructions on installing printers, printer
drivers, additional fonts, the print options and using the Windows Print Manager.
In MM+, you can access the printer setup options by selecting Printer Setup in the
Project menu.

MELSEC MEDOC plus Reference Manual


The User Interface 3–1

3 The User Interface

The illustration below shows the screen after loading a project. In this example, the
PLC configuration, a header and a body have all been opened in separate windows.

2
3
4

N M L K J

A Application title bar F Declaration table K Minimise button


B Menu bar G Object window L Status bar
C Toolbar H Vertical scrollbar M Horizontal scrollbar
D Dialog box I Editor (Body) N Project Navigator window
E Button J Maximise button

Reference Manual MELSEC MEDOC plus


3 – 2 The User Interface

3.1 The Title Bar


The title bar contains the name of the application, in this case MELSEC MEDOC plus.

3.2 The Menu Bar


When you start MM+ only the Project menu is displayed. The complete menu bar
with all the MM+ menus is not displayed until you open or create a project. When you
select one of the menu titles a drop-down list is displayed showing the menu
commands and options. The menu structure and the available options are
context-sensitive, changing depending on what you are currently doing in the
program. Options displayed in light grey are not currently available for selection.
Note: A reference to the complete menu structure is provided at the end of this
Reference Manual.

3.2.1 Menu Conventions

B
A
C
F

A Press the key corresponding to the underlined letter in the menu name.
B Menu commands followed by a triangle symbol branch to a submenu with
additional command options, which is displayed as a pop-up menu box.
C Depending on what you are doing, not all menu commands are available at all
points in MM+. Menu commands displayed in light grey are currently unavailable.
D Menu commands followed by three periods open dialog boxes in which additional
entries and selections must be made.
E In some cases, key combinations can be used to activate commands directly,
without opening the corresponding menu. When available, these key combinations
are shown after the command in the menu.
F A check mark in front of a menu option shows that this option is currently
activated. To deactivate an activated option, simply select it again. The check mark
disappears, indicating that the option is now inactive.

MELSEC MEDOC plus Reference Manual


The User Interface 3–3

3.2.2 Selecting menu commands


Using the mouse
a Point to the menu with the mouse pointer, click with the left mouse button and
then click on the desired command in the drop-down list that appears.
Or:
Click on the appropriate tool icon in the toolbar.
Using the keyboard
a Press a or u to activate the menu bar.
b Move the highlight to the desired menu with the cursor keys x and z, then
select by pressing e.
Or:
Press the key corresponding to the underlined letter in the menu name (e.g. L for
the Online menu).
c Move the highlight to the desired menu option in the drop-down list with the
cursor keys w and y, then press e to select.
Or:
Some menu commands can be selected directly, irrespective of which menu is
currently open, by pressing a key or key combination. These key combinations are
shown after the menu commands in the drop-down menus (e.g. ao for Quit
in the Project menu).
Note: All the available key combinations for menu commands are listed in the
Appendix to this manual.

3.3 The Toolbar


The toolbar enables you to select the most important menu commands directly by
clicking on the corresponding icons. The toolbar is context-sensitive, i.e. different tool
icons are displayed depending on what you are currently doing in MM+. Tool icons
can only be selected with the mouse.
When you start MM+, only the icon for opening a project is displayed. You can switch
the toolbar display on or off with the Toolbar option in the View menu.
Note: A complete list of the available tools is provided at the end of this manual.

Reference Manual MELSEC MEDOC plus


3 – 4 The User Interface

3.4 The Project Navigator Window and the Objects it Contains


The Project Navigator window is the ‘control centre’ of MM+. It contains all the
objects belonging to the project you are working on. All operations on objects are
executed through this window.
The Project Navigator window is not displayed until you open a project. Closing the
window automatically closes the project it contains.

3.4.1 Objects in the Project Navigator window


The following standard objects are automatically generated in the Project Navigator
window for every newly-created project:
The Library_Pool
The PLC Parameters
The Task_Pool
The DUT_Pool
Global Variables
The POU_Pool

Note: For a detailed description of these objects please refer to Chapter 4.

3.4.2 How objects are displayed in the Project Navigator window


The entries in the Project Navigator window are arranged hierarchically. The first level
is the project. The entries for the standard objects are located on the second level,
from which you can branch to lower levels where they exist.
The symbol a before an entry in the Project Navigator window shows that the entry
has additional lower levels (e.g. a POU_Pool).
The symbol d before an entry in the Project Navigator window indicates that its
subordinate levels can be ‘collapsed’ so that they are no longer visible (e.g. d
POU_Pool). This does not apply for the entry that contains the project name, however.

MELSEC MEDOC plus Reference Manual


The User Interface 3–5

How to display hidden Navigator hierarchy levels


a Double-click on the entry whose hidden levels you wish to display.
Or:
Select the entry and select the Expand command in the Tools menu.
Or:
Press the key combination b+.
Or:
Select the entry and click on the Expand tool icon in the toolbar:
Tool for expanding collapsed Navigator hierarchy levels

This expands the next level of the hierarchy in the Project Navigator window. These
levels can, in turn, also contain hidden lower levels.
Some of the lower levels in the Project Navigator
window are expanded.

Reference Manual MELSEC MEDOC plus


3 – 6 The User Interface

How to hide displayed Navigator hierarchy levels


a Double-click on the entry whose lower levels you wish to hide.
Or:
Select the entry and select Collapse in the Tools menu.
Or:
Press the key combination b-.
Or:
Select the entry and click on the Collapse tool in the toolbar:
Tool for collapsing expanded Navigator hierarchy levels

The selected level is collapsed and hidden from view.

Note: There are two possible responses when you double-click on a POU name,
depending on the settings in the MMP.INI file and in the menu Extras - Options -
Zoom Header/Body - Navigator Zoom (➞ Chapter 2).
- Show/hide header and body in the Project Navigator window
- Open Header and body

How to display additional object information in the Navigator


a Select the Extended Information command in the View menu.
Useful additional information is then displayed after each entry in the Project
Navigator window.
Information when ‘Extended Information’ is not active:
Tasks: Priority, Event
POUs: Program class
Body: Programming language

Additional information when ‘Extended Information’ is active:


All entries: Creation date and time
Task_Pool, DUT_Pool, POU_Pool: Number of entries
DUT, Global_Vars, Header: Number of variable entries
POU: Programming language of the program body

Note: In the Sequential Function Chart editor you can activate and deactivate
additional comments for steps with the menu View - Extended Information
(➞ page 6-28).

MELSEC MEDOC plus Reference Manual


The User Interface 3–7

3.4.3 Editing objects


The objects at the lowest level of each branch can be opened for editing. These levels
are not marked with triangle symbols (e.g. PLC_Parameter, Header, Body). Opening
them displays either a dialog box (e.g. PLC_Parameter) or an object window (e.g.
Header).
Most operations, such as opening, copying and deleting, can be performed directly in
the Project Navigator window with key combinations. The corresponding menu
commands are in the Object menu. For details on working with objects, see
chapter4.
Note: All key combinations used for working with objects and the Project Navigator
are listed and explained in the Appendix.

3.5 The Status Bar


The status bar contains information on the current status of your project. You can
enable or disable its display and the information it contains is also configurable. The
command for switching the status bar display on and off is in the View menu.

How to configure the Status Bar


a Double-click in the status bar.
Or:
Select Configure Status bar in the View menu.
The following dialog box is displayed:

Reference Manual MELSEC MEDOC plus


3 – 8 The User Interface

Options e CpuType: Display the PLC CPU for which the project is configured
e Editor Info: Display the POU name and the number of variable entries in the
header
e Free Memory: Display the amount of free memory (in bytes)
e Online: Display online status
e Conn Status: Display active connection to the PLC system
! PLC Status must be ON for this option !
e Error Status: Display error/no error PLC operation status
! PLC Status must be ON for this option !
e Path: Display path on which the current project is stored
e Security Level: Display current security level
e Clock: Display time
e System Resources: Display free Windows system resources (in %)
e Messages: Display description of the tool beneath the mouse pointer

How to add status bar items


a Select the item to be displayed in the Possible Status Field box on the left.
b Click on the Add button of the Lef t Status Field list box to display the item on
the left of the Status bar and the Add button of the Right Status Field list box to
display it on the right of the status bar.
c Repeat steps a and b for each additional item to be displayed in the status bar.

How to delete status bar items


a Select the item to be cleared from the status bar in the left or right Status Field list
box.
b Click on the Delete button under the list box.
c Repeat steps a and b for each item to be cleared from the status bar.
Note: You can restore default status bar display settings at any time by clicking on
the Defaults button.

MELSEC MEDOC plus Reference Manual


The User Interface 3–9

3.6 Working with Windows


This section only contains a short explanation of the various operations performed
with screen windows. For detailed instructions and definitions of the terms used,
please refer to the Windows User’s Guide. The procedures used with windows in
Windows applications programs are standardised and are not specific to MELSEC
MEDOC plus.
The following window types are used in MELSEC MEDOC plus:
The Project Navigator window
Object Windows
Dialog Boxes

Note: Although it is possible to display several different windows on the screen


simultaneously, only one window can be active for editing at any one time. The
currently active window is identified by a colored title bar.
Please note that you can only open one project, i.e. one Project Navigator window, at
any one time. Opening more than one project at a time is not possible.

3.6.1 Object windows

How to open windows


a In the Project Navigator window, double-click on the name of the object whose
window you wish to open.
Or:
Select the object in the Project Navigator window by moving the highlight with the
cursor keys w and y, and then press e or select the Open command in the
Object menu.
The program opens the object window and displays it to the right of the Project
Navigator window. You can open several object windows at the same time.
Note: When the object window of a body (header) is open you can open its header
(body) with the Open Header (Open Body) command in the Object menu.

Reference Manual MELSEC MEDOC plus


3 – 10 The User Interface

How to select an open window


a Click anywhere in the window.
Or:
Select the desired window with the key combination b|.
Or:
Choose the window to be selected from the list of open windows shown in the
Window menu.
The title bar of a selected window is highlighted in color.

How to close a window


a Double-click on the control menu box of the window you wish to close.
Or:
Select the Close command in the window’s control menu.
Or:
Select the window and press bo to activate its control menu Close command.
Or:
Select the window and select the Close command in the Object menu.
The program will ask you if you want to save any editing changes before closing
the object window.
Note: You can close all opened windows at the same time with the Close All
command in the Window menu.

How to arrange windows side by side (tiling)


a Select the Tile command in the Window menu.
Or:
Click on the Tile tool in the toolbar:
Tile tool for arranging windows on the screen without overlaps

The Project Navigator window is displayed on the left of the screen. The object
windows are arranged vertically. The size of the object windows depends on how
many windows are currently open.

MELSEC MEDOC plus Reference Manual


The User Interface 3 – 11

How to arrange windows with overlaps


a Select the Cascade command in the Window menu.
Or:
Click on the Cascade tool in the toolbar:
Cascade tool for arranging windows on the screen with overlaps

The Project Navigator window and all open object windows are overlapped across the
screen so that all the title bars are visible, starting at the top left corner.

3.6.2 Changing window display size


Window R Icon
Click on the Minimise button in the object window (D in the upper left corner of the
window title bar), or select Minimise in the window’s control menu.
You can move and position the icons anywhere on the screen. The Arrange Icons
command in the Window menu arranges all the icons in a row at the lower edge of
the screen.
The object window icons

Reference Manual MELSEC MEDOC plus


3 – 12 The User Interface

Icon R Window
Click on the icon you wish to open and then select Restore, or simply double-click on
the icon.
Window R Full-size window
Click on the Maximise icon (C in the upper left corner of the window title bar), or
select the Maximise command in the control menu.
Full-size window R Previous window size
Click on the Restore button (the button with both up and down arrows in the upper
left corner of the window title bar), or select the Restore command in the control
menu.
Icon R Full-size window
Click on the icon and select the Maximise command.
Full-size window R Icon
Select the command in the control menu.
Note: You can find a list of all the key combinations for working with windows in
the Appendix.

3.6.3 Dialog boxes


Dialog boxes are displayed whenever additional user input is required, for example
when you select the menu commands that are followed by three periods
(e.g. Open ... in the Project menu). In addition to asking you to make entries, dialog
boxes can also contain important information and warnings.
The
PLC_Parameter
dialog box

MELSEC MEDOC plus Reference Manual


The User Interface 3 – 13

How to select an open dialog box


a Click anywhere within the dialog box.
Or:
Select the desired box with the key combination aq.
The title bar of a selected dialog box is displayed with color shading.

How to close dialog boxes


If you want to discard the entries or changes you have made in the box,
double-click on the control menu button of the dialog box.
Or:
Select the Close command from the dialog box’s control menu.
Or:
Click on the Cancel button.
Or:
Press the ^ key.
If you want to accept the entries in the dialog box, click on the OK button.
Or:
Select the OK button and press the e key.

Note: You can find a list of all the key combinations for working with windows in
the Appendix.

3.7 Customising the Screen Display


The View menu contains all the commands for customising the display for your
personal needs.
Toolbar, Status Bar, Horizontal Scrollbar and Grid
You can switch these display elements on and off with the corresponding options in
the View menu, or with the check boxes in the dialog box that is displayed when you
select the Environment option.

Reference Manual MELSEC MEDOC plus


3 – 14 The User Interface

The toolbar, status bar, horizontal scrollbar


and the grid can be activated or
deactivated with the check boxes
in the Environment dialog box.

Grid display is enabled.

The check mark ✓ in front of the menu command in the menu View identifies
options that are currently enabled. When you deactivate an option the check mark is
no longer displayed.

How to set the screen zoom factor


a Select the Zoom... command in the View menu.
b Select one of the four standard zoom factors: 50%, 75%, 100%, 150%.
In addition to these four standard zoom factors you can also enter your own screen
display magnification by changing the display grid size setting.
a Select the Environment... command in the View menu.
b Enter a value between 4 and 128 in the Size of Grid field.
The standard zoom factors correspond to the following grid settings:
Zoom factor: 50% Grid size: 8
Zoom factor: 75% Grid size: 12
Zoom factor: 100% Grid size: 16
Zoom factor: 150% Grid size: 24

How to select the screen font


a Select the Font command in the View menu.
b Choose the font and style you wish to use for the screen display.
All MM+ texts will be displayed in the selected font. You can use all the fonts
installed in your Windows configuration.
Note: The screen font setting is stored together with the project.

MELSEC MEDOC plus Reference Manual


The User Interface 3 – 15

How to set the display colors


a Select the Colors command in the View menu.
b Select the screen element whose color you wish to change:
Background Active Breakpoint
Selection Monitoring
Text Errors
Selected Text Shade left top
Read Only Text Shade right bottom
Locked Text Grid
Foreground Browsed Item
Enabled Breakpoint

The Color dialog box is displayed.


c Click on the color you want in the palette of basic colors.
The current color of the selected element is shown in the two-line palette below
the basic colors palette.
Note: You can also define your own custom colors. For details please refer to the
Windows User’s Guide.
The colors settings are stored with the project.

How to save the current Workspace


a Select the Save Workspace command in the View menu.
Note: This command only saves the size, arrangement and display of the opened
windows − with the exception of the Project Navigator window − in the current
workspace, ignoring the font and color settings. The workspace is saved with the
project in the file WORKSPACE.SYS.

Reference Manual MELSEC MEDOC plus


3 – 16 The User Interface

How to load a previously saved Workspace


a Select the Load Workspace command in the View menu.
This command automatically loads the settings stored with the Save Workspace
command by loading the data from the WORKSPACE.SYS file.

How to load the system defaults


a Select the System Defaults command in the View menu.
When you create a new project the following system defaults are always selected
automatically:
Toolbar display enabled
Status bar display enabled
Horizontal scrollbar display enabled
Grid display enabled
Zoom factor: 100 %
Grid size: 16
Extended information display in Project Navigator enabled
Background: light grey
Selection: dark grey
Text: black
Selected Text: white
Read Only Text: dark grey
Locked Text: dark grey
Foreground: light grey
Enabled Breakpoint: yellow
Active Breakpoint: green
Monitoring: blue
Errors: red
Shade left top: white
Shade right bottom: dark grey
Grid: black

MELSEC MEDOC plus Reference Manual


The User Interface 3 – 17

3.8 Mouse and keyboard operation


All operations in MELSEC MEDOC plus can be performed both with the mouse and
the keyboard. In most cases, a single click with the left mouse button corresponds to
the k key, and a double-click corresponds to the e key.

The instructions below are primarily for working with the mouse, but special keyboard
key combinations are also included. All the key combinations for working with tables
and the editors are listed in the Appendix of this manual.
Note: For full details on using the mouse in Windows please refer to Windows
Fundamentals section in the Windows User’s Guide.

3.9 General editing functions


Most of the commands in the Edit menu are identical in all Windows application
programs.
Note: You can find detailed explanations of these commands in your Windows
User’s Guide.

How to cut, copy and delete data


a Select the element you wish to edit (see following pages):
Cell contents in a Declaration Table: Enable the editing mode in the cell and select
the cell text.
Lines in a Declaration Table: Select one or more lines.
Entire networks in the editors: Select the network bar to the left of the network
you wish to edit.
Ranges (instruction, operand, lines) in the Instruction List: Select the range to be
edited.
Program elements in the graphical editors: Select the elements to be edited.
Program elements in the Sequential Function Chart Language: Select the
elements to be edited. When you select a Step its corresponding Transition is
automatically selected as well.

Reference Manual MELSEC MEDOC plus


3 – 18 The User Interface

b Select the editing command you wish to execute in the Edit menu.
Or:
Press the corresponding key combination:
Cut bX
Copy bC
Delete c
IMPORTANT: Deletions are performed directly, without prompting for
confirmation. If you inadvertently delete something you can restore the deleted data
by selecting the Undo command in the Edit menu. However, please note that this
only works if you execute Undo directly after performing the deletion!

How to paste data


a Select the position at which you wish to insert an element:
Cell contents in a Declaration Table: Activate editing mode in the cell in which you
wish to insert the text from the clipboard.
Lines in a Declaration Table: Select a cell in the line before which you wish to
insert the lines from the clipboard, or select the lines you wish to overwrite with
the data from the clipboard.
Entire networks in the editors: Select the network bar of the network before
which you wish to insert the network stored in the clipboard.
Ranges (instruction, operand, lines) in the Instruction List: Position the cursor at
the point at which you wish to insert the text from the clipboard.
Sequential Function Chart elements: Select the point in the sequence before
which you wish to insert the data from the clipboard.

b Select Paste in the Edit menu.


Or:
Press the corresponding key combination:
Paste bV
c Elements in the graphical editors: When you select the Paste command the mouse
pointer changes to a plus sign symbol. Position the pointer at the location at which
you wish to insert the elements from the clipboard.

MELSEC MEDOC plus Reference Manual


The User Interface 3 – 19

How to undo editing operations


a Select Undo or Redo in the Edit menu.
Or:
Press the corresponding key combination:
Undo a BACKSPACE
Redo b BACKSPACE
Undo undoes the effects of the last editing operation.
Redo undoes the effects of the last Undo operation.

Global Search and Replace


The Search and Replace functions can now be used globally to search the entire
project (Edit - Find/Replace menu).

Find in:
This option enables you to search and replace in
e the entire project (All objects)
e individual objects selected in the Project Navigator
e the current editor only

Find What / Replace With:


You can enter the following elements as find/replace arguments:
− Variable identifiers
− Data types
− Adresses
− Sequential function chart language step names
− Sequential function chart language transitions

Reference Manual MELSEC MEDOC plus


3 – 20 The User Interface

− POU names
Find options:
e Match whole word only Search the entire word only
e Match case Search and replace operation for text exactly as entered, with
upper/or lower case characters
e Search in comments Activating this option extends the search and replace
operation to comment texts
Important note: You can replace function blocks in the graphical editors but no
check is performed. Also, the replace procedure cannot be reversed; the only way to
restore the project to its original state is by not saving it and reloading the old
version from the disk.

MELSEC MEDOC plus Reference Manual


The User Interface 3 – 21

3.10 Working in tables


The following objects are managed and defined in tables:
Global Variables
Local Variables (Header)
Data Unit Types (structured data types)
Tasks

To open the table object window, double-click on the corresponding object in the
Project Navigator window. If the object window of a body is already open you can
open its header by selecting the Open Header command in the Object menu.
1 2 3

7 6

A Cell with the line number E Local Variables Table


B Table cell F Up arrow (dialog box)
C Global Variables Table G Down arrow (list box)
D Table Column Headings

You cannot change the number or the arrangement of the columns. When you
activate a new table only line 0 is shown, in which you can enter the first variable.
Note: You can also copy all the entries from the global variables list to the header of
a POU by using the clipboard. When you do this, the data fields are automatically
placed in the correct columns.

Reference Manual MELSEC MEDOC plus


3 – 22 The User Interface

3.10.1 Editing in tables

How to select a table cell


a Click on the cell you wish to select.
Or:
Select the cell with the cursor keys.
Selected cells are identified with an outline box.

How to select a table line


a Click on the cell containing the line number.
Or:
Select any cell in the line and press the key combination jó or jd.
The selected lines are highlighted in the display.

How to select multiple table lines


a Select the first line in the range to be selected:

Continuous range: Hold down the j key and click on the last line of the range
to be selected.
Or:
Hold down the j key and extend the selection to the lines above or below the
first selected line with the w or y keys.

Selecting groups of individual lines: Hold down the b key and click on the lines
you wish to select.
The selected lines are highlighted in the display.

How to activate editing mode


a Double-click on the cell in which you wish to edit.
Or:
Select the cell and press the k key.
Or:
Select a cell and type the text you wish to enter.

How to deactivate editing mode


a Click on another cell.
Or:
Press the e key.

MELSEC MEDOC plus Reference Manual


The User Interface 3 – 23

How to open a list box or dialog box


a Double-click on the arrow symbol on the right hand side of the cell.
b Select the appropriate entry from the list box or dialog box.
Or:
a Select a cell with an arrow symbol at its right hand side.
b Press the key combination ay.
c Select the appropriate entry with the w and y keys, then press e to transfer
the entry to the cell.
When editing mode is activated, the blinking text entry cursor appears in the cell and
the background color of the cell changes.
Note: All the key combinations for working with tables are listed in the Appendix.

How to change column widths


a Position the mouse pointer on the dividing line between the headings of the
columns.
The pointer changes to a double-headed arrow symbol.
b Hold down the left mouse button and move the shaded column divider line so
that the column has the desired width.

How to insert a new line


a Select New Declaration in the Edit menu.
b Select the position at which the new line is to be inserted.
Top Inserts a new line at the top of the table
Before Inserts a new line directly before the selected line/cell
After Inserts a new line directly after the selected line/cell
Bottom Inserts a new line at the end of the table
Or:
a Select any cell in the last line of the table.
b Press the key combination je.
The line numbering is automatically updated after the insertion operation.

Reference Manual MELSEC MEDOC plus


3 – 24 The User Interface

How to sort table entries


a Select Sort in the Tools menu.
b Select the sort key to be used for the alphabetical sort procedure:
Type Sort by data type
Class Sort by class
Identifier Sort by identifier
IMPORTANT: The table should not contain any empty lines.

3.10.2 Automatic copying of the contents of the preceding line into the new line
(Autoincrement)
When a new line is entered in a declaration table the contents of the preceding line
are automatically copied to the new fields. Identifiers and addresses are automatically
incremented by 1.

This function is only available when the Incremental New Declarations option in the
Extras - Options - Editing - Declaration Editor menu is enabled.
If you also wish to include the contents of the Type and Comment fields you must also
activate the Copy Comment and Type Fields option.

MELSEC MEDOC plus Reference Manual


The User Interface 3 – 25

3.10.3 Selecting data types in the declaration table

Libraries
e <ALL> All data types (incl. Libraries)
e <Project> All data types in the project
e Manufacturer_Lib Reserved for functions to be added later
e Standard_Lib Reserved for functions to be added later

Type Class
Data type class
e Simple Types Simple data types
e Data Unit Types Structured data types (DUT)
e Function Blocks Function blocks

Types
All existing data types, depends on the selections in the previous list fields.

Reference Manual MELSEC MEDOC plus


3 – 26 The User Interface

3.10.4 Automatic default data types in the declaration table


As soon as you enter an address the most likely data type for that address is
automatically displayed in the Type column.
Examples:
Entry: X1
Default type: BOOL
Entry: D1
Default type: INT

MELSEC MEDOC plus Reference Manual


The User Interface 3 – 27

3.11 Working in the editors (Body)


The body contains the actual code of the PLC program. To open the body’s object
window, double-click on the Body entry in the Project Navigator window. If the object
window of a header is already open you can open its body with the Open Body
command in the Object window.

1 2

A Network bar B Editing area

3.11.1 Networks
In the Sequential Function Chart, Ladder Diagram and Function Block Diagram
languages, the PLC program is always divided into a number of logical program units
referred to as ‘networks’. These networks can be given network labels which can be
used as destinations for jump (goto) instructions.
IMPORTANT: In the graphical editors (Ladder Diagram and Function Block Diagram)
you can only program a maximum of one circuit in each network.

Reference Manual MELSEC MEDOC plus


3 – 28 The User Interface

How to enter a new network


a Select the New Network command in the Edit menu.
b Choose the position at which you wish to insert the network.
Top At the beginning of the program
Before Directly before the selected network
Af ter Directly after the selected network
Bottom At the end of the program
MELSEC Before Insert a MELSEC network directly before the selected network
(only possible in Instruction List)
Or:
a Use the following tools:
Tool Function Menu Command Keys
Insert a new network before the Edit - New Network - Before aB
selected network

Insert a new network after the Edit - New Network - After aA


selected network

Or:
a Insert new networks directly in the Network List.
Note: In MELSEC networks you can only use MELSEC programming instructions; you
cannot use the IEC instructions. Also, you can only insert MELSEC networks in
Instruction List programs (➞ Appendix E).

How to assign network labels


a Double-click on the network bar.
Or:
Activate selection mode, position the mouse pointer over the network bar with the
cursor keys, and then press the e key.
Options A dialog box is displayed in which you can enter the network label and title:
e Label: The label must be terminated with a colon (:) and must consist of a
maximum of 8 characters (including the colon). In MELSEC networks you can
also assign absolute labels. An absolute label is a specific pointer address, e.g.
P20 (➞ page 7-24).
e Title: This entry is optional. The title can have up to 20 characters.

MELSEC MEDOC plus Reference Manual


The User Interface 3 – 29

Note: Network labels and titles can also be entered directly in the Network List.
Network labels can be used as jump destinations in your PLC program, using the JMP
operator in the Instruction List language, and with the jump instruction in the Ladder
Diagram and Function Block Diagram languages.
Remember that every network label uses one system label and that the total number
of system labels is limited to a maximum of 256. Since system labels are also needed
for other elements in MM+ (➞ page 5-19), you should only define labels to networks
to which you actually intend to perform a jump.

How to make the network area larger/smaller


a In select mode, position the mouse pointer on the lower horizontal edge of the
network bar.
The pointer changes to a double-headed arrow symbol.
b Hold down the left mouse button and drag the dividing line up or down as
required.
Or:
Press the k key. Hold down the k key and drag the dividing line up or down
with the w and y cursor keys.
When you release the mouse button or the k key the network is displayed in the
new size.
Note: You do not normally have to change network size manually as it is adjusted
dynamically; when you enter program elements or text the network is automatically
enlarged as required.

Reference Manual MELSEC MEDOC plus


3 – 30 The User Interface

Managing networks
The Network List is a powerful tool that gives you a clear overview of each POU’s
networks, enabling you to manage them easily and efficiently.

The Network List

a Select the Network List command in the Tools menu.


A list of all the networks with their labels and titles is shown on the left of the
dialog box displayed. The dialog box contains the following buttons:
e Insert:
You will be prompted for the label and title of the new network. A new
network is then inserted in the Network List and the body directly before the
currently selected network.
e Append:
You will be prompted for the label and title of the new network. A new
network is then inserted in the Network List and the body as the last network.
e Edit:
Edit the label and title of the currently selected network.
e Cut:
Cuts the currently selected network, deleting it from the Network List and the
body and inserting it in the clipboard.
e Copy:
Copies the currently selected network to the clipboard.

MELSEC MEDOC plus Reference Manual


The User Interface 3 – 31

e Paste:
The network in the clipboard is inserted in the Network List and the body,
directly before the currently selected network.
e Delete:
Deletes the currently selected network without copying it to the clipboard. If
you accidentally delete a network you can recover it by clicking on the Undo
button. However, please note that Undo only works if you execute it
immediately after performing the Delete command!
e Undo:
Undoes the effects of the last command.
e Redo:
Undoes the effects of the last Undo command.
e Find:
Allows you to find specific network labels in your program. Please note that the
search is case-sensitive and wildcard characters (? and *) are not supported.
e Close:
Closes the dialog box, accepting any changes made.
Note: The standard Windows key combinations for Delete, Cut, Copy and Paste are
not supported in this dialog box! You can only perform these operations with the
buttons in the box. However, the key combinations are supported for editing labels
and titles.

Reference Manual MELSEC MEDOC plus


3 – 32 The User Interface

3.12 The text editors


Operation of both the text editors – IEC Instruction List and MELSEC Instruction List –
is similar to that of a normal word processor.
The Instruction List consists of a sequence of controller instructions. Each controller
instruction must begin on a new line, and consists of an operator (operator, function
or function block) and one or more operands/variables. The operator and the operand
must be separated by a tab stop.
1 2
IEC Instruction List

5 4

A Network bar D Column for operand(s)


B Editing Area E Operator column
C Comment F MELSEC network

Note: See the Chapter 6 for details on programming.


A detailed description on how to insert programming instructions and variables is
given at the end of this chapter.
All key combinations for working in Instruction List language are described in the
appendix.

MELSEC MEDOC plus Reference Manual


The User Interface 3 – 33

3.12.1 Edit functions

How to activate editing mode


There are three ways to activate editing mode:
By selecting the Tools - Edit Network command, or
By double-clicking in the editing area, or
By clicking on the Edit Network tool:

Edit Network tool

The entry cursor is then displayed in the editing area.

How to change the column width


a In select mode, position the mouse pointer on the vertical line between the
columns.
The pointer changes to a double-headed arrow.
b Hold down the left mouse button and drag the dividing line to the left or right as
required.
Or:
Hold down the k key and move the dividing line left or right with the x and z
cursor keys.
When you release the mouse button or the k key the dividing line is redisplayed in
the new position.

How to enter comments


a Position the cursor at the point where you wish to enter the comment.
You can insert comments anywhere in the Instruction List, i.e. in the third column
or in a new line.
b Comment text must always be enclosed by the characters (* and *).

How to insert a programming instruction and a variable


➞ page 3-54 and 3-56

Reference Manual MELSEC MEDOC plus


3 – 34 The User Interface

3.13 The graphical editors


Operation of the two graphical editors – Ladder Diagram and Function Block Diagram
– is comparable to working in a standard graphics program. The program elements
used for writing PLC programs are provided in the toolbar and the Tools menu.

3 4 5 6 G H

L K

A Ladder Diagram (LD) G Function


B Function Block Diagram (FBD) H Output variable
C Network bar I Output coil (Ladder Diagram only)
D Editing area J Comment
E Input variable (poll for K Input contact (poll for signal
signal status ‘1’) status ‘1’) (Ladder Diagram only)
F Input variable (poll for L Power bar (Ladder Diagram only)
signal status ‘0’)

Note: See the Chapter 6 for details on programming.


A detailed description on how to insert programming instructions and variables is
given at the end of this chapter.
All key combinations for working in graphical editors are described in the appendix.

MELSEC MEDOC plus Reference Manual


The User Interface 3 – 35

3.13.1 Options
In the menu Options - Extras you can specify options which make handling
operations in the graphic editors easier.

FBD/LD
e Declare New Identifiers When you overwrite a dummy variable in a graphical
editor with a variable identifier name that has not yet been declared the Variable
Selection (Mode NewVar) dialog box will be displayed automatically so that you
can enter the declaration for the new variable.
e Pin Overwrite When you create a connection to an empty variable connection in
a graphical editor the empty variable will be overwritten.
e Automatic Input/Output Box The system will automatically create the input and
output variables when you insert a function block in a graphical editor.
e Automatic ENO Box The system will automatically create the ENO output variable
when you insert a function block in a graphical editor. If the ENO output variable
is not needed this option has to be disabled.

Reference Manual MELSEC MEDOC plus


3 – 36 The User Interface

3.13.2 Context menu


When edit mode is active you can display the context menu by clicking the right
mouse button or pressing m.

e Line / Arrow (toggle function) Toggles between select mode and interconnect
mode.
e AutoConnect Makes positioning and moving graphical elements simpler. When
elements are moved the connection lines are redrawn automatically (➞ page 3-41 )
Mouse
Purpose
Pointer
Select Mode

Interconnect Mode

Select Mode + AutoConnect

Interconnect Mode + AutoConnect

MELSEC MEDOC plus Reference Manual


The User Interface 3 – 37

e VarInput Pin (FBD only) Insert input variable (same as Tools - Input Variable)
e Contact (LD only) Insert input contact (same as Tools - Contact)
e VarOutput Pin (FBD only) Insert output variable (same as Tools - Output
Variable)
e Coil (LD only) Insert output coil (same as Tools - Coil)
e FUN/FB Opens Function Block Selection dialog box for programming instruction
selection
e Last 5 function blocks list The last 5 function blocks inserted in the LD or FBD
editors can be reused directly by selecting them from the list at the bottom of the
context menu.

3.13.3 Right mouse button or F2


e Mouse pointer in editing mode / on block Activates context menu
e Mouse pointer on variable Opens the Variable Selection dialog box for
selection of a variable from the list.
e Mouse pointer on a jump instruction Opens the Label List dialog box for
selection of a network label from the list.

Reference Manual MELSEC MEDOC plus


3 – 38 The User Interface

3.13.4 Program Elements


Tool Program element Menu Command Key(s)
Lines (Interconnect Mode) Tools - Interconnect Mode bT

Input contact (Ladder Diagram Tools - Contact bN


only)

Output coil (Ladder Diagram only) Tools - Coil bL

Function block (programming Tools - Function block bF


instruction)

Input variable Tools - Input Variable bI

Output variable Tools - Output Variable bO

Jump instruction Tools - Jump bJ

Return instruction Tools - Return bR

Vertical space Tools - Open Row bW

Horizontal space Tools - Open Column bU

Comment text Tools - Comment

MELSEC MEDOC plus Reference Manual


The User Interface 3 – 39

How to insert new program elements


Icons are provided in the toolbar for all the available program elements.
a Click on the tool for the element you wish to insert.
Or:
Select the menu command from the Tools menu, or press the corresponding key
combination.
The mouse pointer then changes to the symbol for the selected program element.
b Position the tip of the pointer at the point where you want to insert the element
and press the left mouse button or the e key.

How to select program elements


a Click on the program element.
Or:
Position the pointer over the program element with the cursor keys and then press
the k key.
Selected program elements are highlighted in a different color.

How to select more than one program element


Selecting elements out of sequence: Hold down the j key and click on all the
program elements you wish to select.
Selecting elements in sequence: Position the mouse pointer outside the area to be
selected, hold down the left mouse button and drag the dotted rectangle around
the elements you wish to select.

Or:
Selecting elements out of sequence: While holding down the j key, select the
elements one after another by positioning the mouse pointer over them with the
cursor keys and pressing k.
Selecting elements in sequence: Position the pointer outside the area to be
marked. While holding down the k key, use the cursor keys to drag the dotted
rectangle around the program elements you wish to select.

Selected program elements are highlighted in a different color.


Note: You can only select multiple program elements within the same network.

Reference Manual MELSEC MEDOC plus


3 – 40 The User Interface

How to increase and decrease editing area spacing


The Tools - Open Row/Open Column commands are used to increase and decrease
the horizontal and vertical spacing in the editing area.
a Select the menu command or the corresponding tool in the toolbar.
The pointer changes to a horizontal or vertical double-headed arrow.
b Position the pointer at the location where you wish to increase/decrease spacing.
c Increase spacing: Click with the mouse button or press the k key.
Decrease spacing: Hold down the j key while clicking or pressing the k key.

How to enter comments


You can enter comments at any point in the editing area.
a Select Comment in the Tools menu or the corresponding tool in the toolbar.
The pointer changes to a comment text symbol.
b Move the pointer to the position where you wish to insert the comment.
c Hold down the left mouse button and drag to create a comment field.
Or:
Hold down the k key and create a comment field with the cursor keys x and
y.
When you release the mouse button or the k key the blinking editing cursor
appears in the newly-created comment field.
d Enter your comment text.

How to insert a programming instruction


➞ page 3-54

MELSEC MEDOC plus Reference Manual


The User Interface 3 – 41

3.13.5 AutoConnect
The AutoConnect function can be activated in the Tools menu or the context menu .
The AutoConnect mode makes moving and connecting graphical elements much
easier. When you move the elements the connecting lines are stretched and rerouted
automatically, so that you do not need to edit the lines by hand. To connect elements
in the AutoConnect mode you simply click on the start and end points and the lines
are drawn automatically.
The mouse pointer has the following forms in AutoConnect mode:
Mouse
Purpose
Pointer
Select Mode + AutoConnect

Interconnect Mode + AutoConnect

Reference Manual MELSEC MEDOC plus


3 – 42 The User Interface

Moving elements (rubber banding)


a Activate both select mode and AutoConnect.
b Click on the element you wish to move and drag it to the new position, holding
the left mouse button down.
c Release the mouse button when you reach the position at which you wish to place
the element.

The lower block MOV_M and its


associated connecting lines are
selected.

The block is dragged to its new


position. Temporary diagonal
connection lines are displayed
while you are repositioning the
block.

The block has been moved to its


new position and the connecting
lines have been redrawn
automatically. The variables have
also been moved automatically,
thus retaining their positions
relative to the function block.

If there is an anchor point on the connection line the lines will only be modified up to
the position of the first anchor point. The lines on the other side of the anchor point
and the anchor point itself all remain unchanged (➞ page 3-45 ).
An error message will be displayed if you try to move an element to a position that
MM+ cannot calculate. You can then abort the move operation.
The Undo function is available as well.

MELSEC MEDOC plus Reference Manual


The User Interface 3 – 43

Inserting connection lines (autorouting)


a Activate both Interconnect mode and AutoConnect.
b Click on the position for the starting point. Possible starting points are indicated by
black dots.
This activates the connecting line, which follows the mouse pointer as you move it.

c Position the mouse pointer at the end point.

d Click on the end point.


The connecting line is drawn automatically.

Reference Manual MELSEC MEDOC plus


3 – 44 The User Interface

Recalculate Line
The menu command Recalculate Line in the Tools menu helps to recalculate lines
which have already been drawn.
In the normal Interconnect Mode (AutoConnect is disabled) a connection with several
lines has been created.

a Activate the Interconnect Mode and AutoConnect.


b Click on the connection.
All lines of the connection will be marked.
c Activate the command Recalculate Line in the Tools menu.
The connection is recalculated.

MELSEC MEDOC plus Reference Manual


The User Interface 3 – 45

Possible starting and end points


Try moving the connecting line over the various elements in the editing window. As
you do so black dots are displayed to indicate possible connection points. The
connecting line is drawn to the black dot under the tip of the pencil symbol when you
click the mouse button.
Examples of possible connection points:
− Variable connections (without variables) on function blocks
− Between variables and variable connections (without variables) on function blocks
− Ends of lines
− Positions on lines

The positions of the connection points are dictated by the grid raster.
If you click on a position where no black connection dots are displayed the operation
will be aborted automatically, thus preventing the inadvertent creation of connection
lines without connected ends.

Anchor points
Double-clicking on a potential connection point creates an anchor point. Anchor
points are indicated by small black squares.
When you move elements in the editing window the positions of the anchor points
remain unchanged.

Anchor point

Reference Manual MELSEC MEDOC plus


3 – 46 The User Interface

Overwriting unassigned variable pins


If the starting or end point of a new line is an unassigned variable connection (pin)
the connection is overwritten automatically when the line is inserted. You can activate
or deactivate this function with the Extras - Options - Editing - Pin Overwrite
option.

Restrictions for connecting lines


Do not try to insert connecting lines between variable pins for which different
variable types have been declared. This will result in an error message when you
perform a check on the POU.

Do not try to draw connecting lines through function blocks.

MELSEC MEDOC plus Reference Manual


The User Interface 3 – 47

3.13.6 Variables

How to configure input signals


a Double-click on an input contact or on the connection of the input variable in a
function block.
Or:
Position the pointer with the cursor keys and press the e key.
A dialog box is displayed with the following options:
Normal Poll for signal status ‘1’
Negation Poll for signal status ‘0’
b Make the appropriate selection in the dialog box.

1 A Negated input variable

B Normal input variable


2
C Normal input contact

D Negated input contact


3 4

How to configure output signals


a Double-click on an output coil or on the connection of the output variable in a
function block.
Or:
Position the pointer with the cursor keys and press the e key.
A dialog box is displayed with the following options:
Normal Poll for signal status ‘1’
Negation Poll for signal status ‘0’
Set Set (output coil only)
Reset Reset (output coil only)
b Make the appropriate selection in the dialog box.
A Normal output coil
1 2
B Negated output coil

3 4 C Set output coil

D Reset output coil

E Normal output variable


5 6 F Negated output variable

Reference Manual MELSEC MEDOC plus


3 – 48 The User Interface

How to assign input and output variables to programming instructions


a Select Tools - Input Variable/Output Variable or the corresponding tool in the
toolbar.
The pointer changes to an input variable or output variable symbol.
b Position the tip of the pointer over the connection of the function block.
c Click on this position.
Or:
Press the k key.

The variable is inserted. You must now assign the variable name.
Note: Most programming instructions have a specific number of input variables.
However, in some cases (e.g. ADD_E) the number of input variables can be
increased. With these instructions the Number of Pins field is activated in the
programming instruction dialog box. Enter the required number (max. 28) in this
field. Note that the EN input is not included in the total. For example, if you enter 5
connections for the ADD_E function the resulting Block will have 5 real connections
for the addition operation and one EN input.

1 ADD_E function with

A one EN input
2
B and 5 addition connections

How to insert a variable


➞ page 3-56

MELSEC MEDOC plus Reference Manual


The User Interface 3 – 49

Adding and removing input variables


Select a function block for which the number of input variables can be changed.
There are variety of different ways to add/remove input variable pins:
Increment Pins / Decrement Pins options in the Edit menu
+ and - keys in the numeric keypad
Toolbar icons:

Increment

Decrement

Position the mouse pointer on the lower border of the function block. When the
pointer changes to a double arrow press the left button and drag down
(increment) or up (decrement).

Incrementing
If the Automatic Input/Output Box option in Extras - Options - Editing is activated
empty dummy variables are automatically inserted when you increment the number of
variable pins.

Decrementing
The input variables will be deleted if they are still empty, i.e. if no variable has yet
been assigned to them.
However, if variables have already been assigned to them they will not be deleted.

Reference Manual MELSEC MEDOC plus


3 – 50 The User Interface

How to insert input and output variables in the graphical editors automatically
a Activate the Automatic Input/Output Box option in Extras - Options - Editing.
When this option is activated the input and output variables are automatically
inserted when you add a function block in the graphical editors. The dummy
identifier ? (question mark) is inserted in the variable name field.

Deleting variables
a Select the variable’s connecting line.
b Press c.
Or:
a Select the question mark dummy or the variable name.
b Press c.
c Press the | key.

Note: You don’t need to delete the variables at the connecting pins before inserting
lines in AutoConnect mode. They are overwritten automatically.

Stepping through variables in a network


Pressing | and j| steps through all the variables in the current network
forwards or backwards, selecting them one after another.

MELSEC MEDOC plus Reference Manual


The User Interface 3 – 51

3.13.7 Jump and Return Instructions

How to configure jump instructions (label and signal)


A jump instruction executes a branch to a specified network, using the network label
as the destination.
a Click on the dummy label Label by the jump instruction symbol.
Or:
Position the pointer over the dummy label and press the k key.
b Enter the jump destination name.
c Double-click on the jump instruction symbol.
Or:
Position the pointer over the jump instruction symbol and press the e key.
A dialog box is displayed with the following options:
Normal Poll for signal status ‘1’
Negation Poll for signal status ‘0’
d Make the appropriate selection in the dialog box.
Note: The jump instruction corresponds to the JMP operator in the Instruction List

Operator (IL) Program element (LD/FBD)


JMP Normal jump (poll for signal status ‘1’)
JMPN Negated jump (poll for signal status ‘0’)
JMPC Normal jump with input condition
JMPCN Negated jump with input condition

Reference Manual MELSEC MEDOC plus


3 – 52 The User Interface

How to configure return instructions (signals)


The return instruction returns control from a function block to the program from
which the function block instance was called.
a Double-click on the return instruction symbol.
Or:
Position the pointer over the return instruction symbol and press the e key.
A dialog box is displayed with the following options:
Normal Poll for signal status ‘1’
Negation Poll for signal status ‘0’
b Make the appropriate selection in the dialog box.
Note: The return instruction corresponds to the RET operator in Instruction List
language (IL).

Operator (IL) Program element (LD/FBD)


RET Normal return instruction (Poll for signal status ‘1’)
RETN Negated return instruction (Poll for signal status ‘0’)
RETC Normal return instruction with input condition
RETCN Negated return instruction with input condition

MELSEC MEDOC plus Reference Manual


The User Interface 3 – 53

3.13.8 Graphic macros

Setting the number of graphic macros


You can create and store up to 25 graphic macros.
e Number of Graphic macros in Extras - Options - Graphic
Enter the number of graphic macros you wish to use.

How to create graphic macros


a Select the area in the editing area that you wish to store as a graphic macro.
The selected area is highlighted.
b Select the Copy command in the Edit menu.
The selected area is copied to the clipboard.
c Select Define Graphic Macros in the Tools menu.
The Configure Custom Tools dialog box appears on the screen.
d Select the name under which you wish to store the macro.
If a macro is already stored under the selected name its contents are shown in the
Contents box.
e Click on the Paste button.
The contents of the clipboard are pasted into the Contents box.
f Click on the Close button to confirm your entries and close the dialog box.
Creating graphic macros

Selecting graphic macros


e Tools - Custom The names of the first five graphic macros are displayed in the
menu and they can also be selected by pressing a together with the
corresponding number key.
e Tools - More Custom Enables you to select all available graphic macros.

Reference Manual MELSEC MEDOC plus


3 – 54 The User Interface

3.14 Selecting Programming Instructions


Graphical editors:
Menu: Tools - Function Block
Toolbar icon
FUN/FB context menu (right mouse key)

Text editors:
Menu: Tools - List Operators/Operands
m key
Right mouse key

The Function Block Selection dialog box is displayed. It remains open, active and
visible until it is explicitly closed. It is also closed automatically when you close the
current body or activate another window on the screen.

MELSEC MEDOC plus Reference Manual


The User Interface 3 – 55

Libraries
e <ALL> All programming instructions available for the PLC currently selected.
e <Project> Functions and function blocks created by the user (depends on the
selection in the Operator_Type field)
e Manufacturer_Lib All programming instructions in the manufacturer library
e Standard_Lib All programming instructions in the standard library

Last recently used


All recently-used programming instructions

Operator Type
e All Types IEC operators, functions and function blocks
e Operators IEC operators
e Functions Functions
e Function Blocks Function blocks

Number of Pins
This field is activated when the instruction allows you to change the number of input
contacts (input pins).

Operators
All available programming instructions (depends on the selections in the previous
fields). If you enter the first letters of an instruction manually the highlight
automatically jumps to the first instruction beginning with that letter or letter
combination.

APPLY button
e Graphical editors When you move the mouse pointer over the editing window it
changes to a pointer with a function block symbol. Simply click at the position
where you wish to insert the instruction.
e Text editors Enters the selected programming instruction in the editor window.

Getting help on specific programming instructions


Select the instruction in the Operators list field and then press the Help button.

Reference Manual MELSEC MEDOC plus


3 – 56 The User Interface

3.15 Variables

3.15.1 Selecting existing variables and declaring new variables


Before you open the Variable Selection dialog box:
e Graphical editors: Highlight the variable/instance dummy name
e Text editors: Place the cursor in the variables column
e Sequential function chart language: Highlight a transition definition

Then:
e In the Task Information dialog box: Event (F2 key only)
e In both graphical and text editors:
- Tools - List Operators/Operands menu
- m key
- Right mouse button

The Variable Selection dialog box is then displayed. This dialog remains open and
visible on the screen and does not need to be closed when you perform other editing
actions in the program body.

MELSEC MEDOC plus Reference Manual


The User Interface 3 – 57

Libraries
e <ALL> All of the project’s variables
e <Header> All local variables in the header of the currently open POU
e <Global Vars> All global variables
e Manufacturer_Lib Reserved for functions to be added later
e Standard_Lib Reserved for functions to be added later

Type
Depends on the selections in the Libraries and Type Class list fields:
e Simple Types Simple data types: ANY, ANY_BIT ...
e Data Unit Types Structured data types (DUT)
e Function Blocks Function blocks
Default settings:
- Graphic editor: Data type of formal parameter, contact/coil: BOOL
- Transition in SFC: BOOL

Type Class
e Simple Types Simple data types
e Data Unit Types Structured data types (DUT)
e Function Blocks Function blocks
Selecting a function block variable

Type Class: Function Blocks


Type: The created function block “FB”
Variables: Doubleclick on the function block instance
“FB_INST”
The function block variables are displayed:
“...IN1"
...

Reference Manual MELSEC MEDOC plus


3 – 58 The User Interface

Variables
Depends on the selections in the preceding list fields: All existing variables
When you enter the first letters of the variable name the highlight will automatically
jump to the first variable with this letter or letter combination.

APPLY button
Enters the selected variable into the selected variable dummy name in the editor
(same effect as double-clicking).

NEW ON button
Selecting this button expands the dialog box, displaying an additional area for the
declaration of new variables. The dialog box title changes to Variable Selection
(Mode NewVar).

This dialog box also appears:


− When you select the Tools - New Variable menu option (ALT + N).
− When you overwrite a dummy variable name in a graphical editor with the name
of a variable that has not yet been declared. This automatic function can be
activated/deactivated with the option Extras - Options - Editing - Declare New
Identifiers.

Dummy variable name

MELSEC MEDOC plus Reference Manual


The User Interface 3 – 59

The expanded dialog box fields enable you to declare new variables of the type
defined by the selections in the Library, Type and Type Class fields. The entries are
the same as those in the variable declaration tables.
You can also declare instances, in the same way as in the declaration tables.

DEFINE button
Selecting this button confirms and accepts all your entries for the new variable. The
button is inactive (greyed out) if your entries are incorrect or incomplete.
The new variable is automatically added to the corresponding declaration table.

NEW OFF button


Shrinks the dialog box back to its original size, hiding the new variable declaration
fields again.

IEC 1131-3
This field displays all the available IEC information for the selected variable.

TO HEADER button
Copies all selected global variables to the header of the current POU.

Reference Manual MELSEC MEDOC plus


3 – 60 The User Interface

3.15.2 How to automatically write global variables


... to one POU header
Select the variables in the Variable Selection window and clock on the To Header
button.

... to all POU headers


There are two ways to transfer global variables to all POU headers simultaneously:

Method 1: Extras menu - Declare Externals


a In the global variables list field select the variables you wish to write to the
headers of all existing POUs.
b Select the Declare Externals option in the Extras menu.
A prompt is displayed asking you to confirm that you really wish to perform the
operation.
If you confirm the selected global variables will then immediately be written to the
headers of all existing POUs.

Method 2: Activate the Autoextern function in the global variables list


The global variables list contains a column called Autoextern. Global variables
activated in the Autoextern column are automatically added to all existing and new
POUs (programs and function blocks only).

a Double-click in the empty field.


This activates the Autoextern function, immediately writing the global variable to
all PRG and FB headers.
This function is only available when the Autoextern option in the Extras - Options -
Editing - Declaration Editor menu is enabled.

MELSEC MEDOC plus Reference Manual


The User Interface 3 – 61

Difference between the two methods:


Declare Externals only writes the global variables to existing POU headers, not to the
headers of new POUs created later.
Variables for which Autoextern is activated are automatically and immediately written
to new POUs.

3.15.3 Deleting unused variables


You can delete all global variables that are not used in any POUs. However, please
note that this delete operation is only performed on the headers, the variables will still
be contained in the list of global variables. Variables used in the body are also not
deleted in the headers.
There are two ways to delete these unused variables:
Method 1: Extras menu - Delete Externals
a The Delete Externals dialog box is displayed in which you can specify whether
you wish to perform the deletion operation in all POUs and variables or just
selected POUs and/or specified variables.

Method 2: Disable the Autoextern function in the global variables list


a Open the global variables list and disable the entry in the Autoextern column.

Difference between the two methods:


Let us assume you have activated Autoextern for two variables in the global variables
list, which means that these variables are now included in all existing headers, even
though they are not used in all bodies.
Delete Externals deletes these two variables from the headers of the POUs that have
already been created. However, as soon as you create a new POU the variables will
automatically be written to the header because the Autoextern function is still active
for them.
When you disable Autoextern for the two variables in the global variables list the
variables are also removed from all existing headers. In addition to this, the variables
are no longer added to the headers of new POUs when they are created.

Reference Manual MELSEC MEDOC plus


3 – 62 The User Interface

MELSEC MEDOC plus Reference Manual


Projects and Objects 4–1

4 Projects and Objects

4.1 Projects
The project is the object at the top of the hierarchical structure used in MM+. In IEC
1131.3 terms, a project is comparable with a resource. In MELSEC MEDOC plus it
corresponds to one PLC system.
A project consists of considerably more than just one file. When you create a new
project, MM+ creates a separate subdirectory with the name of the project. All the
files used by the project are always stored in this directory.

4.1.1 The automatically-generated project files


*.PRO Project (all objects except libraries)
*.BAK Backup of the file *.PRO
*.SAV Extra backup copy of the file *.BAK generated when a restore is performed
(➞ page 4-15 )
PLCDOKU ASCII PLC configuration files when printing (PLC_Parameter)
WORKSPACE.SYS Workspace settings (View - Save Workspace)
CUSTOM.SYS Graphic Macros (Tools - Custom)
LRUBOXES.SYS All the programming instructions used in the project (Last
recently Used list box in the Function Block Selection dialog box in the
graphical editors)
SFC.OBJ Last program organisation unit created in the Sequential Function Chart
language (temporary file stored in a special format)
Note: During the compilation and data transfer processes MM+ generates a
number of temporary files that should not be edited or tampered with in any way.
See the Appendix for details.

Reference Manual MELSEC MEDOC plus


4 – 2 Projects and Objects

4.1.2 Files with standard extensions


*.ASC Import/Export File
*.EDM Entry Data Monitor Settings
*.SED Setup for Entry Data Monitor
*.PRN Print File
*.SLT Status Latch Definitions
*.SAM Sampling Trace Definitions
*.XLS Excel File for Device Editor
*.SUL User Library
*.SCT Files for the Cross Reference data base
*.SCX Automatic link of the SCT files to the SCX file when generating the
cross reference data base

4.2 What are the components of a project?


Projects consist of Objects. The following are all objects in MELSEC MEDOC plus:
The libraries in the Library_Pool
The PLC parameters
The tasks in the Task_Pool
The data unit types in the DUT_Pool
The global variables
The program organisation units in the POU_Pool, consisting of headers and bodies

These objects are displayed in the Project Navigator window, which is automatically
displayed when you open a project. The project name is displayed as the first entry in
this window.
The Project Navigator window is the ‘control centre’ or ‘starting point’ for all
operations performed on these objects. The relationships between the original objects
are reflected in the hierarchical structure of the Project Navigator tree.

MELSEC MEDOC plus Reference Manual


Projects and Objects 4–3

4.3 The Project Navigator and Objects


The Project Navigator window

4.3.1 Library Pool


The following libraries contain the programming instructions:
Standard Library
Manufacturer Library
User Library

For more information on the library concept see page 4-7.

4.3.2 PLC Parameters


In the dialog box PLC parameter you set and store the following PLC system
parameters:
Memory parameters
Latch operand range
Timers and Counters range
I/O configuration
Network link settings
PLC setup data
Special parameters
System variables
MiniNet settings
PLC CPU type selection

Note: See chapter 5 for details on configuring your system.

Reference Manual MELSEC MEDOC plus


4 – 4 Projects and Objects

4.3.3 Task Pool


Within a project, the task is the highest level in the hierarchy. The task contains the
executable program organisation units, which are the subprograms that go to make
up a project. Tasks can be either event-triggered or executed at preset intervals. Tasks
are also assigned priorities, which determine the execution hierarchy when tasks are
executed under the same conditions.

4.3.4 DUT Pool


Data unit types are structured data types consisting of collections of variables that can
be of different data types. Data unit types must be declared as global variables. In
POU headers global variables are referenced as VAR_EXTERNAL. Values can be
assigned to the individual elements (variables) of the data unit type in the body of the
POU (➞ Chapter 6).

4.3.5 Global Variables


Global variables have fixed hardware addresses (absolute addresses) which refer to a
specific memory location for the variable in the CPU or a physical input or output
point. Global variables are declared for the entire project and can be referenced as
VAR_EXTERNAL in the function block and program POUs. They make it possible to
exchange data between all the individual subprograms that make up the project
(➞ Chapter 6).

MELSEC MEDOC plus Reference Manual


Projects and Objects 4–5

4.3.6 POU Pool


All program organisation units (POUs) consist of a header and a body.
Header: The header contains the declarations of the Local Variables used in the
POU.
Body : The body contains the actual PLC program code of the POU.

The entries after the POU name specify the Class:


[PRG] : Program
[FB] : Function Block
[FUN:INT] : Function

The entry before the POU name specifies the compilation:


* : The asterisk indicates that this POU has not been compiled.

The entries after ‘Body’ specify the programming language in which the PLC program
in the body is written:
[IL] : Instruction List
[LD] : Ladder Diagram
[FBD] : Function Block Diagram
[SFC] : Sequential Function Chart
[MELSEC IL] : MELSEC Instruction List
Action_Pool (SFC only) : All the POU’s Actions

Reference Manual MELSEC MEDOC plus


4 – 6 Projects and Objects

4.4 The Program Organisation Unit (POU)


The ‘actual’ PLC program code is stored in the body of each POU. However, this no
longer consists of just one PLC program with its own subroutines. In MELSEC MEDOC
plus you use groups of subprograms – the program organisation units. These
self-contained subprograms are administrated by tasks; together, they make up the
complete PLC program.
A program organisation unit always consists of a header and a body. The header
contains the variables, which are only available within this POU. The body contains the
executable PLC program code.
Note: An introduction to the IEC 1131.3 standard and the basic principles of this new
programming concept is provided in the Beginner’s Manual in the chapter ‘The IEC
1131.3 Standard’. For tips on writing PLC sequential control programs in the various
programming languages (editors), please refer to Chapter 6 in this Reference Manual.

4.5 Preparation Before You Start Programming


Structured programming ...
To work really effectively with MELSEC MEDOC plus it is very important to analyse and
plan the task to be programmed in as much detail as possible before you actually
begin to write the code. Divide the entire machine process into small sub-processes,
and treat each sub-process as an independent unit. Implement each of these
sub-processes as a Program Organisation Unit.
... and program management
Develop a sequential structure showing how the individual sub-processes are to be
executed. The program organisation units are called via Tasks (triggered either by
events or at defined intervals).
Global Variables
Draw up a list of your Global Variables, i.e. the variables whose hardware addresses
must be known, and which must be available to all the components of the program
(e.g. inputs, outputs, operands for possible later visual display of the process or
operator guidance, analog inputs, etc). The global variables should be declared before
you start developing the program so that each sub-program can access them. Of
course, you can also add to the list in the course of program development, if
necessary.
Reusable subroutines
Program frequently-used processes as Functions or Function Blocks. The functions
and function blocks are stored in a library and can be used at any point in the project
where they are needed.

MELSEC MEDOC plus Reference Manual


Projects and Objects 4–7

Note: To be able to call a function block you must create an ‘instance’ of it, in a
process known as ‘instancing’ or ‘instantiation’ (➞ Chapter 6) .

Data Unit Types


Create Data Unit Types for parts of the process where the same constellations of
variables must be accessed again and again. The creation of data unit types
corresponds to the instantiation of function blocks (➞ Chapter 6).
Graphical or textual based programming
The best editor type to use for your project, graphical or textual, depends on the type
and scope of the programming task. As a rule of thumb, Ladder Diagram and
Function Block Diagram are best for most applications because of their simple entry
options and clear representation of the program. These graphical editors make
programming functions and function blocks particularly simple. The Instruction List
language allows more flexible programming, but it also requires knowledge of the
underlying syntax, for example for calling functions and function blocks or for
programming Arrays. The Sequential Function Chart language is a special case;
strictly speaking, it is not actually a programming language at all, but rather a
structuring tool. It makes it very easy to see and follow the program sequence.
Individual logical sections of the program (sub-processes) can be programmed as
macros (➞ Chapter 6).

4.6 Library Concept


A distinction is made between the following three types of library:
Standard Library
Manufacturer Library
User Library

Standard Library
The Standard Library is for information purposes only. It contains the following
elements:
DUT_Pool : Irrelevant for programming purposes
Global_Vars : Irrelevant for programming purposes
POU_Pool : The POU_Pool contains the standard IEC programming instructions
supported in MM+. You can view the variable declarations in the
header, but you cannot edit them.

Note: The SLIB.LIB contains the contents of the Standard Library in packed format.

Reference Manual MELSEC MEDOC plus


4 – 8 Projects and Objects

Manufacturer Library
The Manufacturer Library is also for information purposes only. It contains the
following elements:
DUT_Pool : Editable
Global_Vars : Editable
POU_Pool : The POU_Pool contains all the ‘Adapted’ MELSEC programming
instructions with nomenclature modified for the IEC editors (➞
‘Programming Instructions’ in the appendix). You can view the
variable declarations in the header but you cannot edit them.

Note: In contrast to the Standard Library, which cannot be changed, you can make
additions to all the pools and the global variables in the Manufacturer Library. For
example, you can create a permanent list of all the variables in the Manufacturer
Library that is then loaded automatically with every new project. The global variables
then do not have to be redefined; they are available for declaration in every POU.

Note: The file MLIB.LIB contains the contents of the Manufacturer Library in packed
format.

User Libraries
A user library gives you the possibility of creating functions and program segments
which can be used on a supra-project basis. The program segments are grouped in a
library and can be used in any project. Following updating, changes made to the
library can be applied to other projects.
A user library can contain all the objects that are also available in a project: Global
Variables List, Data Unit Types, Arrays and Program Organisation Units. You can assign
a password to protect the know-how in the library.
The name of the user library file has the file extension SUL.
Note: The SC.INI initialisation file contains the LIBRARIES section, where you can
make directory settings (➞ chapter 2).

MELSEC MEDOC plus Reference Manual


Projects and Objects 4–9

How to create a new user library


a Select the Install/Create User Library command in the Edit menu.
The following dialog window is displayed:

b Click on the Browse Lib. button. The Select Library Path dialog window appears.
c Choose the directory in which the library is to be stored.
d Enter a new name for the library.
e Confirm with OK.
The entries are transferred to the Install/Create User Library dialog window,
where they can also be changed.
f Confirm the library entries with OK.
The new library appears in the Navigator, along with the Standard Library and the
Manufacturer Library.

Reference Manual MELSEC MEDOC plus


4 – 10 Projects and Objects

The Install/Create User Library dialog window


e Library Path Directory in which the library file is to be created. This can be any
directory, although it is sensible to choose a central directory for the User Libraries.
e Library Name Descriptive name for the library, max. 16 characters.
e Help Path Directory and file name for the Help file. A separate Help file can be
created for each User Library.
e Browse LRU... A window is opened which displays the most recently used User
Libraries. You can select a library from this window.
e Browse Lib...A window is opened for you to select a directory and enter a library
file. A User Library is given the file extension SUL.
e Browse Help...A window is opened for you to select a directory and enter a Help
file. A Help file is given the file extension HLP.
e View Help The Help file is opened.

How to protect the User Library with a password


a Select the desired User Library in the Navigator.
b Select the User Library - Change Password command in the Edit menu.
This opens a dialog window containing the following items:
e Old Password When changing an existing password, the old password must
first be entered here. If you are assigning a password for the first time, you must
skip this field.
e New Password Entry of the new password.
e Confirmation Repeat entry of the new password.
Note: A protected User Library can only be opened and edited if the password is
known. As long as the User Library is closed and the password is not known, it is
impossible to make any unauthorised changes. Only the header of the POU can be
viewed, the body cannot be opened.

MELSEC MEDOC plus Reference Manual


Projects and Objects 4 – 11

Remove/Delete User Library


Remove: The Remove User Library command removes the User Library selected in the
Navigator from the project. The library must be open at the time. The file is not
deleted by this operation.
Delete: The Delete User Library command physically deletes the User Library selected
in the Navigator, along with the associated library file.
Update User Library
Every User Library can be used and modified in various projects. If, however, a change
is made in Project_1, this change is not available in Project_2 until the Update Libraries
command has been executed in the Edit menu.
Caution: It may, however, also be advisable not to update the library in a particular
project. Consequently, you should always take a look at the associated Help texts of
the libraries before performing an update!

4.7 Working with Projects


How to Create a New Project
a Select New in the Project menu. The dialog box PLC Parameter is displayed.
At this point,
CPU Type
Selection is the
only active
field.

b Select the CPU for which you are programming from the list box.
c Confirm your selection with OK.
The dialog box New Project is displayed.
d Select a directory for your project or type in the path in the Project Path field. If
you wish, you can also enter a directory that does not yet exist; MM+ will then
create it for you automatically.

Reference Manual MELSEC MEDOC plus


4 – 12 Projects and Objects

e Enter the name of the project at the end of the project path.
The project name can be a maximum of eight
characters long.

The project name does not need an extension as


it refers to a directory and not a file.

f Click on the Create button.


The program displays the Wizard dialog box.
g Click on the Standard or MELSEC button, as required.
The program will then create the project database on the disk.

The project creation process is documented in an information box (loading the


programming instructions from the libraries, opening the project).
When it generates a new project MM+ doesn’t create a single file but a subdirectory
with the project name. This subdirectory contains all the files that make up the
project. The two libraries – the Standard Library and the Manufacturer Library – are
always loaded with every new project that is created. When you begin, they are
displayed in the Project Navigator window with the various pools, which are still
‘empty’.

MELSEC MEDOC plus Reference Manual


Projects and Objects 4 – 13

4.7.1 The Wizard


The Wizard is a special tool. When the new project has been generated you will be
asked whether you wish to use the Wizard’s support.

MELSEC = MELSEC mode


Standard = IEC mode

MELSEC mode
If you click on the MELSEC button, MM+ automatically creates the following two
objects:
One program organisation unit, and
One task with this POU

When creating a project for an A3CPU you can activate the Option Use Sub.
MM+ creates then another two objects (one POU and one task) for the SUB
program.
IEC mode
If you click on the Standard button in the Wizard dialog box no objects are created.
Note: If you do not wish to use the Wizard’s support you can deactivate it by
editing the Wizard setting in the SC.INI file (➞ Chapter 2).

How to open an existing project


a Select Open in the Project menu, or click on the corresponding tool in the
Toolbar.
Tool for opening an existing project

The Open Project dialog box is displayed.


b Select the drive, the directory and the project name.

Reference Manual MELSEC MEDOC plus


4 – 14 Projects and Objects

c Click on the Open button.


Projects are easy to identify in the directory list – their path symbols are
displayed in yellow.
If the project was not stored properly because of a power failure or because
it was not closed correctly a ‘cracked’ yellow path symbol is displayed next to
the project name. Usually, such projects can be restored.

Note: Please note that you cannot open and edit more than one project at a time.

How to recover a project


MM+ has a facility for recovering projects that were not closed properly because of a
power failure or some other problem. These projects are identified by a ”cracked”
directory path symbol in the Open Project dialog box.
a Click on the ”cracked” directory symbol.
A dialog box is displayed with three options: Recover, Use Backup and Cancel.

Recover: This option restores all the project’s data so that nothing is lost. The
system restores the exact editing status of the project at the point the unplanned
termination happened.

Use Backup: Loads the status of the project as it was the last time you loaded it
for editing. All changes made between then and the unplanned termination are
lost. An additional backup copy of the project is generated and stored in the file
*.SAV.

Cancel: Cancels the procedure and closes the dialog box.


b Click on the appropriate button.
Note:
When you create a new project the files *.PRO and *.BAK are created automatically.
All editing changes and entries you make are stored in the PRO file. The BAK file
remains empty.

When you open an existing project that was closed correctly MM+ loads *.PRO and
creates *.BAK. Here too, all the entries and editing changes you make are stored in
the PRO file. The BAK file stores the status of the project at the point it was loaded.

MELSEC MEDOC plus Reference Manual


Projects and Objects 4 – 15

As you can imagine, when you select Recover, the system loads the PRO file in
which all the editing changes up to the termination point are stored.

By the same token, selecting Use Backup loads the BAK file. This means that if you
first created the project in the editing session in which the termination occurred the
BAK file will be empty!!! If you loaded an existing project in the last editing session
the BAK file contains the status of the project from the point when you began the
editing session. Whenever a *.BAK file is loaded an automatic additional backup
copy of the project is generated and stored in the file *.SAV.

How to open the SAV file


a Open the File Manager.
b Create a new directory.
c Copy the SAV file into this new directory.
d Rename the file *.SAV into *.PRO.
e Open this PRO file in MM+.

How to close a project


a Select Close in the Project menu.
Or:
Close the Project Navigator window with the Close command in its control menu
(key combination bm), or by double-clicking on the control menu button.
A prompt will be displayed asking you if you wish to save the project. If object
windows (e.g. headers or bodies) with unsaved editing changes are open a separate
prompt will be displayed for each window.

Reference Manual MELSEC MEDOC plus


4 – 16 Projects and Objects

How to Save a Project


a Saving your project with the current name: Select Save in the Project menu, or
click on the corresponding tool in the Toolbar.
Tool for saving the current project

Saving under a new project name: Select Save As in the Project menu. Select
the desired subdirectory and assign a new project name.
When you save the project the backup file is updated automatically.

How to delete a project


a In the Project menu open the Other submenu and select Delete.
The Delete Project dialog box is displayed.
b Select the drive, directory and project name.
MM+ projects are identified by a yellow path symbol next to the directory name.
c Click on the Delete button.
Note: You cannot delete a project while it is open!

How to rename a project


a In the Project menu open the Other submenu and select Rename.
The Rename Project dialog box is displayed.
b Select the drive, directory and project name.
MM+ projects are identified by a yellow path symbol next to the directory name.
c Enter the new project name in the New Project Name field.
The project name can have a maximum of 8 characters. You can also enter the
name of a directory that does not yet exist, and MM+ will create it for you
automatically.
d Click on the Rename button.
Note: You cannot rename a project while it is open.

MELSEC MEDOC plus Reference Manual


Projects and Objects 4 – 17

How to copy a project


a In the Project menu open the Other submenu and select Copy.
The Copy Project dialog box is displayed, with two list boxes.
b Select the drive, directory and name of the project to be copied in the left list box.
MM+ projects are identified by a yellow path symbol next to the directory name.
c Creating a copy with the same name: Simply select the target drive and directory
in the list box on the right.
Creating a copy with a new name: Select the target drive and directory in the right
hand list box, and then enter a new name at the end of the path. The new project
name can have a maximum of 8 characters. You can also enter the name of a
directory that does not yet exist; MM+ will then create it for you automatically.
Overwriting an existing project with a copy: Select an existing project in the right
hand list box.
d Click on the Copy button.
Note: You cannot copy or overwrite a project while it is open.
Please also have a look at the functions provided by the Import and Export
commands in the Project - Other menu (➞ Chapter 7).

Reference Manual MELSEC MEDOC plus


4 – 18 Projects and Objects

How to back up a project


The command Extras - Backup Project packs the project files and stores them to a
medium on the selected drive. External data media such as floppy disks are
supported. If the resulting project file is larger than the capacity of the disks it is
automatically split across the necessary number of disks.
a Select Backup Project in the Extras menu. The following dialog box is displayed.

b Select the format for the backup operation:


e Packed project database File format *.PCD: The complete database (already
compiled) and the libraries will be packed.
e Packed export format File format: *.PCE: The project data (without
compilation, without libraries) will be exported and packed. When restoring a
PCE file you have to compile the project again.
c Select the target drive and directory, then enter a name for the target file.
d Click on the OK button to pack the project and copy it to the selected drive.
e If the target drive is a floppy disk drive you will be prompted to insert the first disk.
If the packed file is too large to fit on the disk it will be automatically split across
the necessary number of disks. You will be prompted to change disks when
necessary.
Note: The Backup Project command can only be executed for the project currently
opened.
With the Export function in the Project - Other menu the project data are exported
into an ASCII file only, without being compiled or split across the necessary number
of disks.

MELSEC MEDOC plus Reference Manual


Projects and Objects 4 – 19

How to restore a project


The command Extras - Restore Project is used to restore a backed up project from a
packed file. After being unpacked the project is automatically opened.
a Select Restore Project in the Extras menu.
The following dialog box is displayed.

b Select the file format you wish to restore:


- Project Database: PCD
- Export Format: PCE
c In the upper line select the PCD or PCE file which you wish to unpack and open.
d In the lower line select the target drive and directory and enter a name for the
target project.
e Click on the OK button to unpack and open the project.
Note: The name for the target project is not a file, but a directory.

Reference Manual MELSEC MEDOC plus


4 – 20 Projects and Objects

4.8 Working with Objects


How to open objects
a Double-click on the object in the Project Navigator window.
Or:
Select the object in the Navigator and then click on Open in the Object menu.
The window or dialog box of the selected object will then be opened.
Note: There are two possible responses when you double-click on a POU name,
depending on the settings in the MMP.INI file and in the menu Extras - Options -
Zoom Header/Body - Navigator Zoom (➞ Chapter 2).
- Show/hide header and body in the Project Navigator window
- Open Header and body

How to close objects


a Close the object window.
b Before the operation is executed a prompt will be displayed asking you if you wish
to save any editing changes. Click on Yes if you wish to save the changes.
Note: The various different ways of closing windows are explained in Chapter 3.

How to create new objects


a In the Toolbar, select the tool for the object you wish to create.
Or:
Select New in the Object menu, then select the desired object type from the
pop-up list displayed (POU, DUT, Task or Action).
b Make the necessary entries in the dialog box. Enter the name of the object. In the
case of program organisation units you must also specify the POU’s class (Program,
Function Block or Function) and the programming language. In the case of actions
you must select the programming language.
The newly-created object is displayed in the Project Navigator window. You can now
open the object to edit it, if necessary.

MELSEC MEDOC plus Reference Manual


Projects and Objects 4 – 21

How to save objects


a Select the window of the object you wish to save.
b Select Save in the Object menu.
Or:
Press the following key combination:
Save bS

How to rename objects


a Select the object to be renamed in the Project Navigator window.
b Select Rename in the Object menu.
c Enter the new name in the dialog box.
The new name of the object will then be displayed in the Project Navigator window.
Note: You can only rename closed objects.

How to cut, copy and delete objects


a In the Project Navigator window, select the object that you wish to cut, copy or
delete.
b Select the appropriate command in the Edit menu.
Or:
Press the corresponding key combination:
Cut bX
Copy bC
Delete c
Note: The Cut operation deletes the data from its original position and stores it in
the clipboard.
The Copy operation copies the data to the clipboard without changing it in its
original location.
The Delete operation deletes the data from its present location without copying it to
the clipboard. This means that any data that was in the clipboard prior to the delete
operation remains unchanged.
Objects can only be deleted if the corresponding object windows are closed (e.g.
header and body in the case of POUs).

Reference Manual MELSEC MEDOC plus


4 – 22 Projects and Objects

How to paste objects


a Activate the Project Navigator window.
b Select Paste in the Edit menu.
Or:
Press the following key combination:
Paste bV
Note: Please note that the system does not prompt you for a new name before
inserting the data. Objects in the clipboard are inserted in the new location with
their original names. You must then rename the new objects manually with Edit -
Rename, and it may also be necessary to perform editing to eliminate double
variable declarations (in the case of POUs).
The Copy and Paste functions can also be used to copy and paste objects between
projects, not just within the current project.

How to copy objects from the current project to another project


a Select the object or objects to be copied in the Project Navigator window.
b Select Copy in the Edit menu.
Or:
Press the following key combination:
Copy bC
A copy of the data is now in the clipboard.
c Close the current project, then open the project into which you wish to copy the
objects.
d Activate the Project Navigator window.
e Select Paste in the Edit menu.
Or:
Press the following key combination:
Paste bV
The data from the clipboard are inserted in the Project Navigator window.
Note: You can also exchange objects between projects with the Import and Export
functions (Project - Other - Export/Import).

How to enter comments


a In the Project Navigator window, select the object for which you wish to enter a
comment.
Or:
Activate the object window.

MELSEC MEDOC plus Reference Manual


Projects and Objects 4 – 23

b Select Comment in the Object menu.


c Type your comment text in the left field.

How to copy, cut and paste comments


a Select the text to copy or cut.
You can use the standard Windows mouse operations and key combinations for
selecting text.
b Click on the Cut, Copy or Paste button.
Note: You can also use the standard Windows key combinations for these
operations:
Cut bX
Copy bC
Paste bV

How to view the object information


a In the Project Navigator window, select the object whose information you wish to
view.
Or:
Activate the corresponding object window.
b Select Information in the Object menu.
Or:
Press the key combination ae.
A dialog box is opened showing attributes of the selected object.

General Options
Name: Name of the selected object
Size: Size of the selected object in
bytes

Type: Type of the selected object

Last Change: Data and time of the last


editing change

Security Level: Current security level

Read Access: Read access for lower


security levels

Comment: Comment text

Reference Manual MELSEC MEDOC plus


4 – 24 Projects and Objects

Additional Options for Body Objects


Language: Programming language

ATTENTION: The system will allow you to change the programming language of a
POU, but if you do this you will lose all the code in the body! A message will be
diplayed.

Additional Options for Functions


Result Type: Result data type
(displayed when you change the
program class)
Use with EN/ENO: If you change the
program class to Function this field
allows you to specify whether the
function is to have a Boolean input and
output.

Type: Program class

Language: Programming language


used in the body

MELSEC MEDOC plus Reference Manual


Projects and Objects 4 – 25

Additional options for Function Blocks


Macrocode: Macrocode execution of
the function block (➞ page 6-40)

MC-MCR: MC-MCR execution of the


function block (➞ page 6-40)
Use with EN/ENO: If you change the
program class to FB (Function Block)
this field allows you to specify
whether the function block is to have
a Boolean input and output.

Type: Program class

Language: Programming language


used in the body

Additional Options for Task Objects


Note: Task attributes can only be set in this dialog box.
Event: Event-triggered
Interval: Interval-trigg ered

Priority: Priority level of the task


Timer/Output Control: MC-MCR
execution of the task (➞ page 6-3 )

Reference Manual MELSEC MEDOC plus


4 – 26 Projects and Objects

How to display an object’s Call Tree (subordinate objects)


a Select the object whose Call Tree you wish to display.
b In the Object menu, select Show and then select Call Tree from the submenu
displayed.
An information box is opened showing all the objects used in the selected object.
Task Call Tree: All associated POUs and all the global variables used in the POUs
POU, Body and Header Call Trees: All function block instances and all global
variables

How to display an object’s Reference List (superordinate objects)


a Select the object whose Reference List you wish to display.
b In the Object menu, select Show and then select Reference List from the
submenu displayed.
An information box is opened showing all the objects in which the selected object is
used.
Function Block Reference List: The headers in which the instances of the function
block were generated
POU Reference List: The associated task

MELSEC MEDOC plus Reference Manual


Projects and Objects 4 – 27

4.9 Protecting Your Data


MM+ has a seven-level data security system. You can assign a different password to
each level, and you can assign security levels to both the entire project and each
individual object within the project.
For example, if you assign a security level of 5 to the project you can edit all objects
with security levels 0 through five. Objects with security levels 6 and 7 are not
editable, but you can view their contents. The names of protected objects are
displayed in grey in the Project Navigator window. POUs that are both read and write
protected also do not allow you to branch into their headers and bodies in the Project
Navigator window.

How to assign security level passwords


a Select Change Passwords in the Project menu.
b Select the security level to which you wish to assign a password.
c Enter the current password in the Old Password field. If you have not yet entered
a password for this level, simply leave this field empty.
d Enter the new password in the New Password field.
As an additional security measure asterisks are
displayed on the screen instead of the
characters you enter.

e Confirm your entry by re-entering the same new password in the Reenter
Password field.
f Click on the Change button to enter the password.
A message will be displayed telling you whether the system has accepted the old and
new passwords.

Reference Manual MELSEC MEDOC plus


4 – 28 Projects and Objects

How to change the project’s security level


a Select Change Security Level in the Project menu.
b Select the desired security level.
c Enter the valid password for this security level in the Password field.
An error message will be displayed if you enter the password incorrectly.

How to assign read and write protection to objects


a Select the object to be protected in the Project Navigator window.
b Select Information in the Object menu.
Or:
Press the key combination ae.
The Object Information dialog box
is displayed.

c Click on the desired security level.


d Write protection: Click on a security level higher than the current level in order to
protect the object against unauthorised editing.
e Read protection: Deactivate the Allow Read Access For Lower Levels check box
to prevent read access to the object.

MELSEC MEDOC plus Reference Manual


Projects and Objects 4 – 29

Note: If the project has security level 5 and the object has already been assigned
security level 6 you cannot change the security level of the object in this dialog box.
Security levels that cannot be selected are displayed in light grey. To change the
security level of such objects you must first change the level of the project; for
instance, in this example, you would have to change the project security level to 6.
This is only possible if you know the password of this security level, of course.

4.10 Printing Out Project Data


How to configure the printer
a Select Printer Setup in the Project menu. This opens the Windows Print Setup
dialog box showing the current default printer and its parameters. The changes
and settings you can make in this dialog box depend on the printer connected to
your computer.
Note: For full details, consult the Windows User’s Guide and your printer manual.

How to print an opened object


a Open the window of the object to be printed.
b Select Printer Preview in the View menu to switch to print preview display mode.
A check mark is displayed in front of the menu command to show that the option
is active. The display in the object window then provides you with an approximate
idea of what the printout will look like when it is generated. Print preview mode
remains activated until you re-select the Printer Preview option in the View menu;
this also clears the check mark from the menu.
c Select Print in the Object menu.
Or:
Press the key combination bP.
The Print dialog box is displayed.
d Select the appropriate print options.
Selecting the Setup button opens the Print Setup dialog box, in which you can
set the parameters of the default printer or select another printer.
e Start the printout with the OK button.

Reference Manual MELSEC MEDOC plus


4 – 30 Projects and Objects

How to print more than one object


a Select Printout in the Project menu.
A dialog box is displayed
with three list boxes
showing all the tasks,
program organisation
units and data unit types
in the project.

Options b Select the objects and options you wish to print.


Objects: Tasks, Program Organisation Units, Data Unit Types
Options: Global Variables, PLC Parameter, Cross Reference, Table of Contents
Selection in the Navigator: All objects selected in the Project Navigator window are
automatically selected in the list boxes.

Selection via the buttons:


Buttons e All Tasks: Selects all the tasks in the list box.
e No Task: Deselects all the tasks in the list box.
e All POUs: Selects all the POUs in the list box.
e No POU: Deselects all the POUs in the list box.
e All Data Types: Selects all the data unit types in the list box.
e No Data Type: Deselects all the data unit types in the list box.
e Select All: Selects all objects and options (i.e. the entire project).
e Clear All: Deselects all objects and options.
Selecting individual objects: You can select and deselect all objects individually by
clicking with the mouse.

MELSEC MEDOC plus Reference Manual


Projects and Objects 4 – 31

Selecting individual options with the check boxes: Select the check boxes by
clicking with the mouse or pressing the k key.
c Select the Print button. Selecting Close exits the dialog box without saving your
selections.

The Print dialog box is displayed.


d Select the desired print options.

Selecting the Setup button opens the Print Setup dialog box, in which you can
set the parameters of the default printer or select another printer.
e Start the printout with the OK button.

Extended printout options


In the Extras - Options - Page Documentation menu you can set extended printout
options.

e Active Page Frame Activates the printout settings.


You can only edit the settings for the print raster, header and footer when this
option is enabled.
e Print Raster The printer raster value.
The value for this setting depends on the printer model you are using.
Standard setting: 10
e Header The printout header
Logo Left: Path and filename of the bitmap graphic to be printed on the left in the
header.
Logo Right: Path and filename of the bitmap graphic to be printed on the right in
the header.
e Footer The printout footer
Text 1/2/3: Three lines of text to be included in the printout footer.

Reference Manual MELSEC MEDOC plus


4 – 32 Projects and Objects

4.11 Cross Reference


The Cross Reference function generates a database listing all the project variables.
Relationships become clearer, it is easier to find certain variables, and unused variables
can be identified.

Default settings in the MMP.INI initialisation file


[CrossReference]
GenerateSCT=TRUE
TRUE: cross reference function enabled.
FALSE: cross reference function disabled.

Cross reference options


In the Extras - Options - Cross reference menu you can set the cross reference
options.

e Generate *.SCT files while checking a project Activates generation of the SCT
files during project checks.
e Automatically link the *.SCT files to the *.scx file Activates automatic linking
of the SCT files to the SCX file.

MELSEC MEDOC plus Reference Manual


Projects and Objects 4 – 33

To create a cross reference database


a Compile the entire project.
b In the Project menu choose the command Make Cross Reference.
The program now compiles all the details required for the cross reference
database. The procedure is documented in the status window Cross Reference
Linker. The time needed for this procedure depends on the project length.

c Choose Browse in the Project menu.


The Browser dialog box is presented, prompting you to enter the search criteria.

Reference Manual MELSEC MEDOC plus


4 – 34 Projects and Objects

Query
e Variable name
e Namespace Object name; e.g. Program Organisation Unit, Global Variable List
e Datatype e.g. BOOL, INT
e Scope Class; e.g. VAR, VAR_GLOBAL
e Address parameter Variable address
e Button: Search Start the search. The result of the search is presented in the
windows.
e hits number of matches found

Search result in window


All records that have been found are listed alphabetically.

Declares/References
Depending on the element that is marked in the left-hand window after a search,
further details are listed in the right-hand window and in the Variable Info List. You
can set further search filters for these details.

Filters
e Namespace Object name
e Access Tells you how the variable is accessed in the projects.

Search result in window


e Declaration Program organisation units in which the variable was declared.
e References Program organisation units in which the variable was inserted.

MELSEC MEDOC plus Reference Manual


Projects and Objects 4 – 35

Search result in the Variable Info List


e Name Name of variable
e Type Data type
e Scope Class; e.g. VAR, VAR_GLOBAL
e Access Access type; e.g. Read, Write, Read and Write
e Editor Programming language, network number in editor

Reference Manual MELSEC MEDOC plus


4 – 36 Projects and Objects

MELSEC MEDOC plus Reference Manual


PLC Parameters 5 – 1

5 PLC Parameters

The PLC_Parameter command in the Project Navigator provides options for


configuring your system or changing the PLC type you are programming for. Clicking
on the CPU type selection button activates the CPU selection list in the box on the
right, and the buttons on the left are greyed to indicate that they are temporarily
deactivted. Clicking on the CPU type button again deactivates the list box and
reactivates the other buttons.
The default settings produce trouble-free program performance for most applications.
If you are using a network you must configure it with PLC_Parameter before starting
work, however. If the configuration parameter settings lead to problems in your
project, MM+ will display an explanatory warning message.
Note: The PLC parameters are set automatically for the PLC type you select. Some of
the parameters explained below are not relevant for all PLC types, and they are thus
not displayed when some specific PLC types are selected.

Reference Manual MELSEC MEDOC plus


5 – 2 PLC Parameters

5.1 Memory Parameters

5.1.1 Memory Parameters (MELSEC A/FX)


This dialog box contains all the settings for the assignment and allocation of memory.
In addition, you can also enable or disable Status Latch and Sampling Trace.

e MAIN Sequence Allocation of MAIN program sequence memory


1 step = 2 bytes
The program checks the maximum value automatically. After compilation the
memory actually required is shown in parentheses after this entry.
e SUB Sequence Allocation of SUB program sequence memory
1 step = 2 bytes
The program checks the maximum value automatically. After compilation the
memory actually required is shown in parentheses after this entry.
e File Registers Allocation of memory for the file registers
The available memory depends on the type of memory cassette installed.
e Comment space Not used
This option is reserved for future enhancements.
e Main micro Allocation of memory for microcomputer programs
This option is only relevant for Sequential Function Chart programs for the PLC
CPUs of the AnA/N/U series. Approximately 4 kBytes of memory must be allocated
for these programs.

MELSEC MEDOC plus Reference Manual


PLC Parameters 5 – 3

e Sub micro Not used


This option is reserved for future enhancements.
e Status Latch Devices for Status Latch (only for AnN)
Data Memory: All devices without File registers
File register: File registers
Note: The Status Latch and Sampling Trace is only enabled for AnN controllers. In
all other controller series these parameters are edited directly with the Debug menu
functions.

e Used memory Total memory used by the current project.

5.1.2 Memory Parameters (MELSEC Q)


In addition to showing the program size parameters for the selected CPU this dialog
box is also used to define the number of file registers you wish to use.

Program Size
e Maximum Shows the maximum program size memory capacity in program steps.
e Used Shows the amount of memory used by the program in program steps. This
value is only displayed after the project has been compiled.
File Register
If you wish to use file registers in Q series CPUs you have to define the number you
wish to use here first.
e Amount Specify the number of file registers you wish to use (units: k points). The
Q CPU can handle a maximum of 1,024 addresses (i.e. 1MB). However, since a few
addresses are also used for making the file registers available you can only actually
use a maximum of 1,018 addresses.

Reference Manual MELSEC MEDOC plus


5 – 4 PLC Parameters

e Drive Specify the number of the drive corresponding to the external memory card
you wish to use for the file registers. Valid entries: Drive numbers 1-4.

Drive 1: RAM in the card in the first slot


Drive 2: ROM in the card in the first slot
Drive 3: RAM in the card in the second slot
Drive 4: ROM in the card in the second slot

5.2 Latch Ranges

5.2.1 Latch Ranges (MELSEC A)


This dialog box includes all the settings available for the division and allocation of the
retentive, battery-powered memory ranges. The data in these ranges is then stored in
the event of a power failure or a system reset. Please note that the settings you make
here have nothing to do with the Status Latch settings in the Debug menu!

The values for parameters followed by an H in


parentheses (H) must be entered in hexadecimal format.

e Latch Relays / Link Relays Device range for the memory-resident latch and link
relays. The parameter values must be entered in hexadecimal format.
e Timers Device range for the 10 ms and 100 ms timers
e Counters Counter device range
e Data/Link Registers Register device range
e Extended Timers Device range for extended timers
e Extended Counters Device range for extended counters

MELSEC MEDOC plus Reference Manual


PLC Parameters 5 – 5

5.3 Device Settings

5.3.1 Device Settings (MELSEC Q)


This dialog box is used to define the devices to be used in the project. You can also
specify whether the latch operation is to be performed or not for the non-volatile
device ranges with battery backup.

Reference Manual MELSEC MEDOC plus


5 – 6 PLC Parameters

The following table shows the correspondences between the devices in the A series
and the Q series:
MELSEC A Devices MELSEC Q Devices
Accumulators A0 and A1 Diagnostics link registers SD718 and SD719
Link registers B
Counters C
Data registers D0 - D8191
Special registers D9000 - D9255 Diagnostics link registers SD1000 - SD1255
Annunciators F
Hexadecimal constants H
Interrupt pointers I
Constants K
Latch relays L0 - L8191
Internal Relays M0 - M8191
Special relays M9000 - M9255 Diagnostics link relays SM1000 - SM1255
Nesting N
Pointers P
File registers R
Step relays S0 - S8191
Timers T (low-speed 100ms)
Timer T (high-speed 10ms)
Accumulator (retentative) timers T Accumulator timers ST
Index registers V, V1, V2, ..... Index registers Z7, Z8, Z9 ...
Link registers W
Input relays X
Output relays Y
Index registers Z, Z1, Z2, ... Index registers Z0, Z1, Z2, ...

MELSEC MEDOC plus Reference Manual


PLC Parameters 5 – 7

RAD
Input format (10 = decimal, 16 = hexadecimal)
Devices
Enter the number of devices you wish to use in your project in this column. The device
types with no entry fields have a fixed range which cannot be changed by the user:
− Input relays X = 8K
− Output relays Y = 8K
− Diagnostics link relays SB = 2K
− Step relays S = 8K
− Diagnostics link registers SW = 2K

e Maximum Input Limits


Maximum value for bit devices: 32K address points
Maximum number of all bit devices: 64K address points
Maximum total number of devices: 29K words
e Number of bits per word/Kword
1 word = 16 bits
1Kword = 1,024 words = 16,384 bits
e Number of bits per address
X, Y, M, L, B, F, SB, V, S : 1 address = 1 bit
D, W, SW: 1 address = 16 bits = 1 word
T, ST, C: 1 address = 18 bits = 1 word + 2 bits

Enable C/L Key


These fields are used to specify the device ranges for which the Latch Clear operation
can be performed.
Disable C/L Key
These fields are used to specify the device ranges for which the Latch Clear operation
cannot be performed.

Reference Manual MELSEC MEDOC plus


5 – 8 PLC Parameters

5.4 Timer / Counter Configuration

5.4.1 Timer-/Counter Configuration (MELSEC A)

e Start Address (Normal Timers) This field is used to set the device head numbers
(start addresses) for the timers. You can only enter values divisible by 8.
e Watchdog Timer Setting Time value in ms for the Watchdog Timer
e Interrupt Counter Head No Device head numbers for the counters connected
to the active interrupts.
e Start Address (Extended Timers) ! Only relevant for AnA/AnU CPUs !
This field is used to set the starting addresses of the extended timers. You can only
enter values divisible by 16.
e Range Settings ! Only relevant for AnA/AnU CPUs !
Number of extended timers and counters.
e Init Device Timer ! Only relevant for AnA/AnU CPUs !
Register type and head number (start address) of the setpoint value registers used
for the extended timers (➞ Chapter 6).
e Init Device Counter ! Only relevant for AnA/AnU CPUs !
Register type and head number (start address) of the setpoint value registers for
the extended counters (➞ Chapter 6).

MELSEC MEDOC plus Reference Manual


PLC Parameters 5 – 9

5.5 I/O Configuration

5.5.1 I/O Configuration (MELSEC A)


All the modules, their slot numbers and I/O address number ranges are entered in this
dialog box. A PLC system can consist of up to 8 base units with 8 slots each, thus
providing up to a maximum of 64 slot numbers.
Entering the configuration data is particularly important for:
AnA and AnU systems. With these systems certain commands for specific special
function modules can only be executed if the configuration has been explicitly
defined.
Systems for which address ranges different from the current configuration need to
be defined to reserve addresses for future expansions.

e I/O Slot Number of the base unit slot in which the module is installed
e I/O Type Module type: Input, Output or Special Function Module
e I/O Range Number of addresses allocated in the base unit
e Module Type List of the MITSUBISHI modules that can be used. Depends on the
settings made in I/O Type and I/O Range.

Reference Manual MELSEC MEDOC plus


5 – 10 PLC Parameters

5.5.2 I/O Configuration (MELSEC A2C)


The A2C is configured in MINI NET mode. You can install a maximum of 14 stations in
the A2C network. The station numbers to be allocated depend on the address
numbers of the modules used in the configuration.
e Last station number Enter the last station number actually used in this field. A
module with 16 addresses occupies 4 station numbers.
Online Mode
The Online Mode parameter defines the CPUs operating mode.
e Automatic return set After a communications error in the network operation is
resumed automatically as soon as the module is ready.
e Automatic return not set After a communications error in the network
communication remains interrupted until a reset has been executed.
e Stop communication during error Network communications are stopped when
an error occurs.
e Number The station number
e Station Starting address of the station. The calculation of the number must be
performed by the user. The first address is always station number 1. For example,
you must add 4 station numbers for each module occupying 16 addresses; the
starting address for module 2 would thus be 5.
Protocol
e Mini MINI NET protocol, normally used in most situations.
e Freerun If you are using the AJ35PTF RS232 module select the Freerun protocol
to transfer freely-defined protocols (texts).

MELSEC MEDOC plus Reference Manual


PLC Parameters 5 – 11

5.5.3 I/O Configuration (MELSEC Q)


This dialog box is used to enter all the modules and extension units installed in the
system.

I/O Config
e Slot List All slots (max. 64)
e Slot Selected slot
e Type Input module, output module, special function module or spare slot
e Items Number of addresses occupied by the slot
e 1stXY Starting address of the module in units of 16 addresses
e Type Name List of supported MITSUBISHI modules

Reference Manual MELSEC MEDOC plus


5 – 12 PLC Parameters

Base Settings
e Extension List 1 base unit and up to a maximum of 7 extension units
e Base Name Designation of the base unit
e Power Supply Designation of the power supply
e Extension Cable Designation of the extension cable

5.6 Default Configuration


Clicking on this button returns the PLC configuration back to the default values. Use
with caution, as any settings you may have made will then be lost!

5.7 Link Settings


The Link Settings define the hardware, communications addresses and paths in a
network. These settings as well as the Link Monitor are described in detail in the
Online Help for MELSEC MEDOC plus, where exhaustive explanations of every possible
dialog window can be found.

MELSEC MEDOC plus Reference Manual


PLC Parameters 5 – 13

5.8 PLC Setup

5.8.1 PLC Setup (MELSEC A)

e Control Input These fields are used for entering the inputs (X) used for
controlling the PLC’s operating mode.
Run The PLC is set to RUN mode as soon as this input is on.
Pause When this input is on the PLC is switched to PAUSE mode.
Relay M9040 must be set for this to be possible.
e Display Comment Enable or disable the comment display on the AnA and A3M
CPUs.
e Behaviour on System Error These option buttons set CPU response to the
following error situations:
– Fuse failure
– Calculation error
– I/O module error
– Special function module error
e Output Mode at Stop to Run Behaviour of the PLC CPU after a system stop and
restart of the process.
Previous State Resume process
Recalculate State Recalculate

Reference Manual MELSEC MEDOC plus


5 – 14 PLC Parameters

5.8.2 PLC Setup (MELSEC Q)

Error Check
Enables you to activate/deactivate the following error checking functions:
− Battery
− Fuse
− I/O modules

WDT Setting
Setting for the watchdog timer.
Range: 10 - 2,000ms in units of 10ms
# of Free Slots
Enter the number of addresses occupied by a free slot in this field.
Range: 0 - 64 in units of 16
Constant Scan
Enter the constant scan cycle period here.
Range: 5 - 2,000ms in units of 5ms

MELSEC MEDOC plus Reference Manual


PLC Parameters 5 – 15

Operation Mode at Error


These options enable you to specify whether the CPU is to pause or continue working
when the following error conditions are registered:
− Calculation error
− Extended Ins
− Fuse blown
− I/O unit compare error
− Special function unit access error
− IC card access error
− IC card operation error

System Interrupt
These fields enable you to specify the counters you wish to allocate to the system
interrupt signals. A total of 32 interrupts are available (I0 - I31).
e 1st Int Counter The first interrupt counter can be an address from the following
counter range:
C0 - [sum of all counters minus 48]

Example:
Assuming you have set 1K of addresses for the counters in the Device Settings
dialog box you have 1,024 counter addresses available (C0 - C1023).

A possible entry for the first interrupt counter would thus be:
C0 - 1024 minus 48, which gives you
C0 - C976
e I28 / I29 / I30 / I31 Const Interval You can set constant interrupt intervals for
interrupts I28 - I31.
Range: 5 - 1,000ms in units of 5ms

Allow Remote Reset


Used to enable or disable remote reset capability.

Reference Manual MELSEC MEDOC plus


5 – 16 PLC Parameters

Output at Stop -> Run


Specifies how the PLC CPU is to behave when the process is restarted again after a
system stop.
e Prior to Calc Restart at output status directly preceding the STOP condition
(resume)
e After one scan Output status one cycle following RUN (recalculate)

Timer Interval
Used to set the intervals for the high-speed and low-speed timers. The timers will then
act as high-speed or low-speed timers when they are activated by the appropriate
instructions in the PLC program.
Low-speed timer instructions: TIMER (IEC editor), OUT (MELSEC editor)
High-speed timer instructions: TIMER_H (IEC editor), OUT_H (MELSEC editor)
Low-speed timer range: 10 - 1,000ms in units of 10ms
High-speed timer range: 1 - 100ms in units of 1ms

Run Pause Contact


Enter the inputs to be used to control the operating mode of the PLC here.
Range: X0 - X1FFF (Q series)
The PLC will be switched to RUN or PAUSE mode as soon as the corresponding input is
set. When using the PAUSE contact the diagnostics link relay SM206 (Q series) must
also be set.

MELSEC MEDOC plus Reference Manual


PLC Parameters 5 – 17

5.9 Special Parameters

5.9.1 Special Parameters (MELSEC A)

e Input Control Defines the processing mode for the input values. The option to be
chosen depends on the PLC CPU in the system.
Direct Direct mode processing
Buffered Process I/O image processing (refresh mode)
e Output Control Defines the processing mode for the output values. The option
to be chosen depends on the PLC CPU in the system.
Direct Direct mode processing
Buffered Process I/O image processing (refresh mode)
Interrupt Counter Settings
The interrupt signals are allocated to counters. The counter addresses/device
numbers begin with C224 (Int 0). The end address is C252, which is assigned to
Int 31.
e All Assigns all interrupts to their corresponding counters.
e IModul Assigns all the interrupt addresses of special function modules AI61 and
A1SI61 to their corresponding counter device numbers (Int 0 – Int 15,
C224 – C239).
e ISlot Interrupts Int 16 – Int 23 are generated by special function modules.

Reference Manual MELSEC MEDOC plus


5 – 18 PLC Parameters

e Periodic Interrupts Int 29 – Int 31 are periodic interrupts that are generated by the
PLC CPU at millisecond intervals.
Int 29 40 ms (C250)
Int 30 20 ms (C251)
Int 31 10 ms (C252)
e None Disables all interrupt allocations.

5.10 System Variables

5.10.1 System Variables (MELSEC A/FX)


It is not normally necessary to change the settings of the system variables. If conflicts
or overlaps occur MM+ will output a message explaining the cause of the problem.

e Word Range These fields are used to enter the range used by the Code
Generator for temporary 16 and 32 bit variables. These variables are needed for
Function Blocks and the nodes of multiple output connections. You can specify
whether the temporary variables are to be stored in D, R or W registers.
e Bit Range The same applies for the Bit Range as for the Word Range, except that
the Bit Range is the range used for the temporary values for bit devices.
e System Timers The system timers are used for Task management.
Interval-triggered Tasks are handled by the System Timers.
e System Counters Range to be used for internal counters

MELSEC MEDOC plus Reference Manual


PLC Parameters 5 – 19

e System Labels Used for specifying the range to be used for the system labels.
The system labels (pointers) are system variables that MM+ needs for internal
management of the project. A maximum of 256 system labels are supported. One
system label is needed for each of the following elements:
- Every instance of a function block (➞ page 6-36, 6-41)
- Every user-defined function (➞ page 6-30)
- Every event-triggered task (➞ page 6-2)
- Every network label (➞ page 3-28)
- PLS_M, PLF_M, ALT_M with further instructions (➞ page 2-15)
e Step Flags The Step Flags are need for Step Ladder programming and are only
relevant for the FX series of controllers.
e Used Ranges button Displays a list of all devices and address ranges used for
system variables.

5.10.2 System Variables (MELSEC Q)


System variables (system labels) are used for internal processes. By default the upper
half of the address range specified in the Device Settings dialog box is reserved for
system variables.
Example:
Device settings: D = 12K
System variables: D = 6144 - 12287

Reference Manual MELSEC MEDOC plus


5 – 20 PLC Parameters

e Word Range The word range for temporary variables


Select the appropriate device type and enter the address range.
e Bit Range The bit range for temporary variables
e System Timers the range to be used for internal timers
Standard: Normal timers T
Acumlt: Accumulator timers ST

NB: Timers only function as accumulator timers when they are activated by the
appropriate instructions in the PLC program, e.g. OUT_ST.
e System Counters Range to be used for internal counters
e System Labels Used for specifying the range to be used for the system labels. The
system labels (pointers) are system variables that MM+ needs for internal
management of the project. A maximum of 256 system labels are supported. One
system label is needed for each of the following elements:
- Every instance of a function block (➞ page 6-36, 6-41)
- Every user-defined function (➞ page 6-30)
- Every event-triggered task (➞ page 6-2)
- Every network label (➞ page 3-28)
- PLS_M, ALT_M with further instructions (➞ page 2-15)
e Step Flags Range to be used for step flags
e Used Ranges button Displays a list of all devices and address ranges used for
system variables.

MELSEC MEDOC plus Reference Manual


PLC Parameters 5 – 21

5.11 MELSECNET/MINI

5.11.1 MELSECNET/MINI (MELSEC A/Q)


The settings for the MiniNet are made in the table. The line above the buttons
displays either a note on correct entry or an error message, depending on the cell
selected in the table.

e I/O no. Start address of the MiniNet module


e Type Selection of the network type: MiniNet or MiniNet-S3
e Station Total number of all remote I/O stations in the network
e Receive Definition of the operands for refreshing receive data. The following
operands are valid: X, M, L, S, B, T, C, D, W, R
e Send Definition of the operands for refreshing send data. The following operands
are valid: X, M, L, S, B, T, C, D, W, R
e Retry Number of attempts to re-establish communication with a remote I/O
station which has failed
e Response Priority for access to the buffer memory of the Master Module
e Data clr. Deletion or retention of the data of a failed station
e Detection Register with which the data refresh of the failed station is to be
performed

Reference Manual MELSEC MEDOC plus


5 – 22 PLC Parameters

e Error Code Register with which the error code refresh is to be performed
e At fault The status of data transmission in the event of a communication error.
The following entries are possible:
TEST Output of a test string
OFF Transmission of a 00 string to the remote I/O station
HOLD Sends data to the remote I/O station shortly before communication

5.12 CPU Type Selection


The CPU Type Selection button opens the list box for selection of the CPU type. To
change the CPU type, open the list box, select the new CPU type and confirm with
OK.
Note: When you change the CPU MM+ deletes the old libraries and regenerates the
Standard and Manufacturer libraries for the new PLC type. This process can take a
while as all the instructions for the new CPU must be integrated in the libraries.

MELSEC MEDOC plus Reference Manual


Programming 6 – 1

6 Programming

6.1 The Structure of MELSEC MEDOC plus Programs


Data Unit Types POUs Task 1

POU 1
Program POU 1
DUT 1 Program

POU 2
Function POU 3
DUT 2
Program

POU 3
Program POU 4
DUT 3
Program

POU 4
Program

Globale Variables POU 5


Function block Task 2

VAR_EXTERNAL POU 6 POU 6


Program Program

VAR_EXTERNAL POU 7 POU 7


Program Program

POU 8
VAR_EXTERNAL
Function

Reference Manual MELSEC MEDOC plus


6 – 2 Programming

6.2 Tasks
The Task Pool is the ‘control centre’ for the execution of your programs. You must
define at least one task for the project in the Task Pool. In turn, each task contains
one or more PRG (program) type POUs. Each POU can only be defined once in any
one task in the Task Pool. The tasks in the Task Pool are polled cyclically.
Note: You cannot directly manage either function blocks or their instances in tasks.
The execution of tasks is controlled by the following three parameters:
Event
Interval
Priority

All tasks are either event-triggered or interval-triggered.


Note: In order to address the SUB memory range with the A3 CPUs you must create
a special task called MELSEC_SUB.

6.2.1 Event-triggered Tasks


Events can have the following Boolean values:
TRUE/FALSE: Tasks with the event value TRUE are always executed. The TRUE or
FALSE parameter must be entered in UPPER CASE letters!
Interrupts: Interrupt-triggered execution control is only possible with input
modules that support this function. You can poll up to 32 different interrupts (I0 –
I31). The task will be executed when the interrupt polled is set. The interrupt
number (e.g.: I20) is entered after Event in the task attributes in the Task
Information dialog box.
Note: Remember that the EI instruction (Enable Interrupt) must be programmed
within the program POU when using interrupt-triggered tasks (only possible in
the MELSEC editor).
Interrupt-triggered tasks can contain only one POU. This POU must not be
programmed in SFC language.

MELSEC MEDOC plus Reference Manual


Programming 6 – 3

Relays: The task is executed when the corresponding relay is set (e.g.: M100).
I/Os: The task is executed if the status conditions of the corresponding inputs or
outputs are satisfied (e.g.: X0).
Note: Every event-triggered task is allocated one system label (➞ page 5-19).

6.2.2 Event-triggered tasks with Timer/Output Control (MC-MCR execution)


If you enter a Boolean device as an event you can then select the Timer / Output
Control option.

The following table explains how this option influences the processing of the task.

Reference Manual MELSEC MEDOC plus


6 – 4 Programming

Timer / Output Control not TTimer / Output Control


activated activated
Execution mode Normal execution MC-MCR execution
Task event X10 X100
Execution sequence LD X10 LD X100
POU execution MC N Internal relay
POU execution
MCR

LDI X10 LDI X100


CJ End of Task CJ End of Task
Behaviour when If X10 is set the POU associated If X100 is set execution of the
event is active with the task is executed. program sequence between the MC
and MCR instructions begins.

If X10 is not set the PLC program If X100 is not set the PLC program
branches to the end of the task. branches to the end of the task.
Behaviour when The program branches to the end of The statuses of the devices are reset:
event is not active the task but some of the device - Timer: Count value reset to 0,
statuses are preserved: contacts remain off
- Timers: continue to run - Retentative timers and counters:
- Retentative/accumulator timers count value and input contact
and counters: status preserved, output contact is
status preserved reset
- Devices in OUT instructions: - Devices in OUT instructions:
status preserved outputs are reset
- Devices in SET, RST, SFT
instructions: current status
preserved

MELSEC MEDOC plus Reference Manual


Programming 6 – 5

6.2.3 Interval-triggered Tasks


The intervals are entered in units of 10 ms. If a task is to be executed at fixed intervals
you must enter FALSE for the Event parameter in the Task Information dialog box.
Syntax: T#[Time]ms
[Time] This is the value for the interval duration.
An entry of T#10ms defines an interval duration of 10 ms.
IMPORTANT: You must consider the program cycle period when defining the
interval duration! Defining intervals shorter than the program cycle period can lead
to unpredictable results. When in doubt, always calculate the cycle period of the task
using the instruction execution times listed in the controller manual.

6.2.4 Priority-controlled Tasks


The task with the lowest priority value has priority and it will call its associated
programs first. You can assign priority values between 0 and 31.

How to define task execution attributes


a In the Project Navigator window, select the name of the task you wish to edit.
b Press the key combination ae to open the Task Information dialog box.
c Enter your values for the task attributes.
d Confirm with OK.
The attribute settings are shown in parentheses after the name of the task in the
Project Navigator window.

Tasks in order of their execution priority:


– Event-triggered via Interrupt I0
– Event-triggered via M100
– Event-triggered via X10
– Always executed
– Interval-triggered, every 10 ms

Note: The procedure for creating a new task is described in Chapter 4.

Reference Manual MELSEC MEDOC plus


6 – 6 Programming

6.3 Variables

6.3.1 Global and Local Variables


Variables are similar to operands. They contain the values of inputs, outputs or
internal memory locations in the PLC. There are two types of variables:
Global Variables
Local Variables

Global Variables
Global variables have fixed hardware addresses (absolute addresses). These absolute
addresses refer to a specific memory location for the variable in the CPU or a physical
input or output. Global variables are defined for the entire project and they can be
referenced as VAR_EXTERNAL in function block and program POUs. They make it
possible to exchange data between all the sub-programs that go to make up the
project.
Local Variables
Local variables (VAR) are only accessible within the one specific program organisation
unit (POU) in which they are declared. Thus, they cannot be used for exchanging data
between POUs.
Note: All variables that need to be referenced via fixed hardware addresses (e.g.
relays, registers and I/Os) should be declared as global variables. The great
advantage of this approach is that you can then use the symbolic names instead of
the hardware addresses to reference them in your program. This greatly improves the
readability of your programs, making them much easier to update and maintain. For
example, if input X0 triggers the Emergency-Off control routine, a reference to the
symbolic name ‘Emerg_Off’ is much easier to understand than a reference to input
X0.

6.3.2 Variable declarations


Each variable declaration has the following elements:
Class,
Autoextern option,
Identifier,
Absolute address (global variables only),
Data type,
Initial value (automatically),
Comment (optional).

MELSEC MEDOC plus Reference Manual


Programming 6 – 7

6.3.3 Class
The class keyword assigns the variable a specific property that defines how it is to be
used in the project.
Use in POUs:
Class Meaning
PRG FUN FB
VAR X X X Variable that is only used within the POU
Local variable with unchangeable initial
VAR_CONSTANT X X X
value used within the POU
Variable passed from outside that cannot be
VAR_INPUT - X X
altered within the POU
VAR_OUTPUT - - X Variable passed (output) by the POU
Local variable passed from outside and
VAR_IN_OUT - - X passes (output) by the POU, can be altered
within the POU
VAR_EXTERNAL X - X Global variable used in the POU header
Global variable with unchangeable initial
VAR_EXTERNAL_CONSTANT X - X
value used in the POU header
Global variable declared in the Global
VAR_GLOBAL X - X
Variable List
Global variable with unchangeable initial
VAR_GLOBAL_CONSTANT X - X
value declared in the Global Variable List

6.3.4 Identifiers and Absolute Addresses


Each variable is given a symbolic address, i.e. a name. This is referred to as the
identifier; it consists of a string of alphanumeric characters and underline characters.
The identifier must always begin with a letter or an underline character. Spaces and
mathematical operator characters (e.g. +, -, *) are not permitted.
Examples of identifiers: FAULT
ZEROSIG
LIM_SW_5
When global variables are declared they must also be assigned absolute addresses
that reference the memory location of the variable in the CPU or a physical input or
output.
When local variables are declared in the header of the POU they are automatically
assigned a suitable memory location in the CPU.

Reference Manual MELSEC MEDOC plus


6 – 8 Programming

You can use either the IEC syntax (IEC-Addr.) or the MITSUBISHI syntax (MIT-Addr.) to
assign the absolute addresses. Two address columns are available.
As soon as you have entered an address in one of these columns, the other address
also appears. You can enter either of the two address formats in both columns. If, for
instance, you enter a MITSUBISHI address in the IEC column, MM+ identifies it
immediately, places it in the correct column and produces the matching IEC address in
the other column.
Use upper case letters only and no spaces or mathematical operator characters
(e.g. +, -, *) in addresses.
When you define global variables you must specify the hardware addresses for each
individual variable. The address declarations are shown in the table below.

MITSUBISHI IEC
Size 5 Range Example
Address Address
X X0 ↔ %IX0
X1F ↔ %IX31 3
%I X
X37 ↔ %IX31 4
X7FFF ↔ %IX32767 5
Y Y0 ↔ %QX0
Y1F ↔ %QX31 3
%Q X
Y37 ↔ %QX31 4
Y7FFF ↔ %QX32767 5
D D450 ↔ %MW0.450
%M W, D 0 D501+
D502 ↔ %MD0.501
D0.5 ↔ %MX0.0.5
%M X5 0
D100.F ↔ %MX0.100.15
W 35 W35F ↔ %MW1.863
%M W, D 1 W301+
W302 ↔ %MD1.769
W35F.5 ↔ %MX1.863.5
%M X5 1
W35F.F ↔ %MX1.863.15
R 35 R450 ↔ %MW2.450
%M W, D 2 R501+
R502 ↔ %MD2.501
R450.5 ↔ %MX2.450.5
%M X5 2
R450.F ↔ %MX2.450.15
M / L / S 12 M0 ↔ %MX0.0
%M X 0
M1024 ↔ %MX0.1024
B 35 %M X 1 B3F ↔ %MX1.63
S 2 %M X 2 S10 ↔ %MX2.10
T Contact 7 %M X 3 TS10 ↔ %MX3.10
T Value %M W 3 TN40 ↔ %MW3.40

MELSEC MEDOC plus Reference Manual


Programming 6 – 9

MITSUBISHI IEC
Size 5 Range Example
Address Address
C Contact %M X 4 CS10 ↔ %MX4.10
C Value CN10 ↔ %MW4.10
%M W, D 4
CN210 ↔ %MD4.210 4
T Coil %M X 5 TC20 ↔ %MX5.20
C Coil %M X 6 CC20 ↔ %MX6.20
A3 A0 ↔ %MW5.0
%M W,D 5 A0+
A1 ↔ %MD5.0
V23 V1 ↔ %MW6.1
%M W,D 6 V2+
Z2 ↔ %MD6.2
Z %M W 7 Z2 ↔ %MW7.2
Z2.5 ↔ %MX7.2.5
%M X5 7
Z2.F ↔ %MX7.2.15
F %M X 7 F20 ↔ %MX7.20
L5 %M X 8 L30 ↔ %MX8.30
V5 %M X 9 V47 ↔ %MX9.47
N Not permitted in IEC
P Cf. network label
I Only allowed in event-triggered tasks
K K0 ↔ 0
H 16# HFF ↔ 16#FF
SM 5 %M X 10 SM1024 ↔ %MX10.1024
SD 5 %M W, D 10 SD450 ↔ %MW10.450
SD45.5 ↔ %MX10.45.5
%M X 10
SD45.F ↔ %MX10.45.15
SB 5 %M X 11 SB3F ↔ %MX11.63
SW 5 %M W, D 11 SW35F ↔ %MW11.863
SW5F.5 ↔ %MX11.95.5
%M X 11
SW5F.F ↔ %MX11.95.15
ZR 5 ZR327 ↔ %MW12.327
ZR40501 +
ZR40502 ↔$!C %MD12.40501
%M W, D 12 5,5,0,
255,25
5,255

ZR27.5 ↔ %MX12.27.5
%M X 12
ZR27.F ↔ %MX12.27.15
ST Contact 5 7 %M X 13 STS10 ↔ %MX8.10
ST Value 5 %M W 13 STN40 ↔ %MW8.40

Reference Manual MELSEC MEDOC plus


6 – 10 Programming

MITSUBISHI IEC
Size 5 Range Example
Address Address
U \G 5 U1\G8 ↔ %MW14.1.8
%M W, D 14 U2\G10 +
U2\G11 ↔ %MD14.2.10
U1\G8.5 ↔ %MX14.1.8.5
%M X 14
U1\G8.F ↔ %MX14.1.8.15
ST Coil 5 %M X 15 STC20 ↔ %MX9.20
J \X 5 %I X 16 J1\X1F ↔ %IX16.1.31
J \Y 5 %Q X 16 J1\Y1F ↔ %QX16.1.31
J \B 5 %M X 16. .1 J2\B1F ↔ %MX16.2.1.31
J \SB 5 %M X 16. .1 J2\SB1F ↔ %MX16.2.11.31
J \W 5 J1\W35F ↔ %MW16.1.1.863
%M W, D 16. .1 J1\W301 +
J1\W302 ↔ %MD16.1.1.769
J1\W5F.5 ↔ %MX16.1.1.95.5
%M X 16. .1
J1\W5F.F ↔ %MX16.1.1.95.15
J \SW 5 J1\SW35F ↔ %MW16.1.11.863
J1\SW301 +
J1\SW302 ↔$ %MD16.1.11.769
%M W, D 16. .11 !C5,5
,0,255
,255,2
55
J1\SW5F.5 ↔ %MX16.1.11.95.5
%M X 16. .11
J1\SW5F.F ↔ %MX16.1.11.95.15
BL 5 %M W 17 BL319 ↔ %MW17.319
TR 5 %M X 18 TR511 ↔ %MX18.511
DX 5 %I X 1 DX1F ↔ %IX1.31
DY 5 %Q X 1 DY1F ↔ %QX1.31
FX 5 Not needed in IEC
corresponds to VAR_INPUT
FY 5 Not needed in IEC
corresponds to VAR_OUTPUT or
function result
FD 5 Not needed in IEC
corresponds to VAR_OUTPUT,
VAR_INOUT or function result
J5 Not permitted in IEC
U5 Not permitted in IEC

MELSEC MEDOC plus Reference Manual


Programming 6 – 11

Table notes
A M, L and S devices are not compatible to old MEDOC projects. The system does
not check whether latch relay devices L (e.g. L100) are within the latch range of
the relay devices M. Memory-buffered M relays are not displayed as L latch relays.
L and S relays are handled differently in the Q series.
B In the A series CPUs the step status devices S are treated in the same way as M
relay devices. For example, this means that M100 and S100 are identical.
In the F and Q series CPUs the S devices are treated as step status devices
C Applies for A series controllers only
D Applies for F series controllers only
E Applies for Q series controllers only
F The size prefix is optional, i.e. the entries %IX10 and %I10 are effectively identical.
Prefixes:
X Bit device
W Word device
D Double word device
G The following types of MITSUBISHI devices are used for timers and counters:
STS, TS, CS Contact (Timer, Counter)
STC, TC, CC Coil (Timer, Counter)
STN, TN, CN, T, C Value (Timer, Counter)

6.3.5 Initial Value


The initial values are set automatically by the system and cannot be changed by the
user.

6.3.6 Comment
You can add a comment up to 64 characters long for each variable.

6.3.7 Autoextern option


Global variables activated in the Autoextern column are automatically added to all
existing and new POUs (programs and function blocks only). Detailed information see
page 3-60.

Reference Manual MELSEC MEDOC plus


6 – 12 Programming

6.3.8 Data Types


The data type of a variable defines the number of bits it contains, how they are
processed and the variable’s value range. The following data types are available.
Data type Value range Size
BOOL Boolean 0 (FALSE), 1 (TRUE) 1 bit
INT Integer -32.768 to 32.767 16 bits
DINT Double integer -2.147.483.648 to 2.147.483.647 32 bits
WORD Bit string 16 0 to 65.535 16 bits
DWORD Bit string 32 0 to 4.294.967.295 32 bits
REAL Floating-point value 3.4 +/- 38 (7 digits) 32 bits
TIME Time value T#-24d-0h31m23s648.00ms
to 32 bits
T#24d20h31m23s647.00ms
STRING A Character string max. 50 characters

A You can set the default value for the number of characters in string variables with
the option Extras - Options - General - Default String Length (characters).
The STRING datatype is only available for MELSEC Q series.
Data unit types (DUT) are structured, derived data types containing a collection of
variables which can be of different data types (➞ page 6-45).

MELSEC MEDOC plus Reference Manual


Programming 6 – 13

Data types hierarchy ANY

ANY

ANY_SIMPLE ARRAY DUT

ANY_NUM ANY_BIT TIME STRING


BOOL

WORD

DWORD

ANY_REAL ANY_INT
REAL INT

DINT

Data types hierarchy ANY16 and ANY32

ANY_16 ANY_32

WORD INT DWORD DINT

Reference Manual MELSEC MEDOC plus


6 – 14 Programming

6.4 Programming Languages

6.4.1 Networks
Programming is done in ‘networks’ in all programming languages except Sequential
Function Chart (SFC). You can define multiple networks, each of which is identified
with a network label. It is then possible to switch from one network to another within
the PLC program by using jump instructions in the program code. For a detailed
description of this please refer to chapter 3.
Network labels can have a maximum of eight characters and must always be
terminated with a colon (:). You can also assign a title to each network. These
network titles can be descriptive names up to 22 characters long, and using them
makes handling large projects with many networks a great deal easier.
Note: Remember that every network label uses one system label and that the total
number of system labels is limited to a maximum of 256. Since system labels are also
needed for other elements in MM+ (➞ page 5-19), you should only define labels to
networks to which you actually intend to perform a jump.

The Network List


The networks in your program organisation units are managed in the Network List,
which you can only open when the body window of the corresponding POU is open.
The list window contains all the POUs networks with their labels and titles. In the
window you can add more networks and edit existing ones. A search function (Find)
is provided for finding specific networks quickly (➞ Chapter 3).
IMPORTANT: For all practical purposes it is not possible to change the programming
language of a POU once you have selected it. The system will allow you to make the
switch, but if you do this you will lose all the code in the body. You should thus only
switch the programming language of bodies that do not contain any code!

MELSEC MEDOC plus Reference Manual


Programming 6 – 15

6.4.2 Text Editors


Instruction List (IL)
Programming in Instruction List is performed with a simple text editor.
An Instruction List program consists of a sequence of controller instructions. Each
controller instruction must contain an operator or a function or function block and
one or more operands/variables. Each controller instruction must begin in a new line.
You can also add optional comments to each instruction. All the programming
elements in the individual instructions must be separated by tab stops.
MELSEC Instruction List
The user interface for programming in MELSEC IL is identical to that for IEC IL.
However, only the ‘Pure’ MELSEC instruction set is supported (➞ Appendix E); you
cannot write IEC standard programs in the MELSEC IL editor. The functionality of the
MELSEC IL language corresponds to that of the MELSEC MEDOC programming and
documentation system. This enables you to easily import programs developed with
MELSEC MEDOC and integrate them into your MELSEC MEDOC plus programs
(➞ Chapter 7).
IEC Instruction List
The user interface for programming in IEC IL is identical to that for MELSEC IL. There
are just a few differences in programming:
MELSEC Networks in IEC IL
You can also integrate MELSEC networks in IEC IL programs, thus effectively giving
you access to the ‘Pure’ MELSEC programming instructions.
The Accumulator
The accumulator is a result management system often used in high-level
languages. The result of every operation is stored in the accumulator directly after
execution of the instruction. The accumulator thus always contains the operation
result of the last instruction executed. You do not need to program any input
conditions (execution conditions) for the operations; execution always depends on
the contents of the accumulator.

Note: The difference between programming in the MELSEC editor (with execution
condition) and in the IEC editor (with accumulator) is described in the Beginner’s
Manual (➞ Chapter 3).

Reference Manual MELSEC MEDOC plus


6 – 16 Programming

6.4.3 Graphical Editors


Ladder Diagram (LD)
In Ladder Diagram you can use both IEC and MELSEC programming instructions in
every network. A Ladder Diagram program consists of contacts (break and make),
coils, function blocks and functions. These elements are connected with horizontal
and vertical lines called interconnects. The circuits always begin at the power bar on
the left.
Functions and function blocks are displayed as graphical blocks. In addition to their
input and output parameters, some blocks also have a Boolean input (EN = ENable)
and a Boolean output (ENO = ENable Out). The status of the output always
corresponds to that at the input.
IMPORTANT: You must normally create a separate network for each circuit in a
Ladder Diagram program. However, you can also create an additional power bar
parallel to the standard one provided by the editor, connecting the two at one point.
This option makes it possible to perform programming in just one network where
this is more convenient.

Function Block Diagram (FBD)


In Function Block Diagram language, as in Ladder Diagram language, you can use
both IEC and MELSEC programming instructions in every network (➞ Appendix E). All
instructions are implemented using graphical blocks, which are connected with one
another with horizontal and vertical connecting lines. There are no power bars (rails)
in Function Block Diagram language.
Functions and function blocks are displayed as graphical blocks. In addition to their
input and output parameters, some blocks also have a Boolean input (EN = ENable)
and a Boolean output (ENO = ENable Out). The status of the output always
corresponds to that at the input.
IMPORTANT: In Function Block Diagram language you must create a separate
network for each circuit.

MELSEC MEDOC plus Reference Manual


Programming 6 – 17

6.4.4 Sequential Function Chart (SFC)


Sequential Function Chart is a graphical language. Strictly speaking it is not really a
genuine programming language but rather a structural tool which allows a clear
representation of processes.
The program (PRG) is the only program organisation unit supported in SFC.
SFC language has two basic elements, Steps and Transitions (continue conditions). An
SFC program sequence consists of a series of steps separated by transitions. Only one
step can be active at any one time in such a program sequence. The next step in the
sequence is activated when the preceding step has been implemented and the
transition condition is satisfied.
Steps and Actions
Several actions can be assigned to one step. An action can be a Boolean output
variable or a program, which can be written in any of the editors, including Sequential
Function Chart itself. All actions are listed in the Action Pool in the Project Navigator
window. A step to which no action is assigned is treated as a wait loop that stops
execution until the following transition condition is fulfilled. A step is activated when
the transition condition (continue condition) immediately preceding it is fulfilled.
Steps are represented graphically as rectangles containing a name (descriptor).
Macro Steps
Each step can be declared as a macro step, which in turn consists of a sequential
structure. The only limitation on the nesting depth of such structures is the memory
capacity of the controller used.
Macro steps are identified by two additional horizontal lines within the step rectangle.
Transitions
Each transition has a transition condition. Transition conditions can be programmed in
the Instruction List, Ladder Diagram and Function Block Diagram languages. Like the
steps, the transitions are also listed in the Project Navigator window.
Transitions are displayed in the editor with a small box lying on the vertical connecting
line between the steps.

Reference Manual MELSEC MEDOC plus


6 – 18 Programming

Initial Step
An SFC sequence always begins with an initial step. The initial step does not have to
be at the beginning, however – it can also be placed at another point in the sequence.
Note: The initial step is always the first step that is executed in an SFC program,
even if it is not placed at the physical beginning of the sequence.

The initial step is identified by a double outline.


Branching
SFC programs support both selective and parallel branching. Selective branches divide
into two or more transition conditions. Parallel branches are always inserted after
transitions, and they always activate actions or jumps.
Selective branching
In a selectively-branched sequence not more than one step can be active
simultaneously. If the transition conditions of two or more transitions in a
selectively-branched sequence are active at the same time the execution priority is
determined on the basis of the order of the sequences from left to right. This means
that only the sequence that is furthest to the left will be executed. The sequences to
the right of this sequence will not be executed, even if their transition conditions
evaluate true.
Selective branches are displayed as single horizontal lines.
Parallel branching
Parallel-branched sequences allow the activation of multiple steps simultaneously. The
steps leading off the parallel branch become active as soon as the preceding step and
the transition condition are satisfied.
Several processes can be executed simultaneously in parallel branches.
Parallel branches are displayed as double horizontal lines.

MELSEC MEDOC plus Reference Manual


Programming 6 – 19

Jumps
Jumps are executed with exit and entry steps (jumps and jump destinations). Each
entry step (i.e. the jump destination) is always directly followed by an action. You can
thus only insert an entry step when the action which is to follow it is selected. The exit
step must always be programmed after a transition, as it replaces the action that
would normally come in this position. This means that no further actions or transitions
can follow an exit step, which is thus also the final instance within its SFC sequence.
The relationship between the exit and entry steps is established by using the same
label (name) for both of them.
When you program a jump instruction pressing m displays a list of all the labels (i.e.
potential jump destinations) that have already been defined. You can then simply
select the appropriate label from the list and confirm to enter it.
Note: You will find examples of the sequencing rules described here on the
following pages.

EMERGENCY OFF for FX Series


For the FX series PLCs it is now possible to integrate an EMERGENCY OFF switch in an
SFC program. All step relays in the sequence are reset as soon as the EMERGENCY OFF
switch is activated. The calculated values in the steps are not lost when this happens.
The program process branches back to the initial step. This does not mean that the
complete sequence is re-initialized, however – the sequence is only interrupted. You
should always exercise caution when restarting processes. The EMERGENCY OFF
switch is declared as a BOOL variable with the comment !RESET!. It is also possible to
declare this variable in the Global Variable List.

Reference Manual MELSEC MEDOC plus


6 – 20 Programming

6.5 Programming in Sequential Function Chart Language


Programming in SFC language calls for systematic analysis of the control sequence
before you start. The algorithm for implementing the control task should be drawn up
in a systematic step-by-step procedure. SFC programs are planned on the basis of
statuses and status transitions. One starts by identifying all the statuses in the process
and connecting them with status transitions. The general statuses formulated in the
first program development phase can then be gradually made more precise. In the
final phase each status is implemented in a program and each status transition in a
condition (program).
Note: In the Beginner’s Manual (➞ Chapter 6) you will learn step by step how to
create an SCF program and to use the tools in the SFC editor.

6.5.1 Sequential Function Chart language Program Structure


The body of a newly-generated SFC POU always consists of the initial step, a transition
and the final step.
Note: When you are first trying out the SFC editor it’s a good idea to keep an eye
on the active tools in the Toolbar. Only the elements whose tool icons are active can
be inserted at the selected position. Create a test program to experiment with all the
available ways of using SFC language elements.

The following basic rules of thumb will help you with writing your first SFC programs:
Each step must always be followed by a transition, each transition by a step.
The only exceptions to this rule are exit and entry steps (jumps and jump
destinations). Both of them ‘replace’ steps, and they must thus always be
programmed directly after transitions.
Entry steps (jump destinations) must logically always be followed by a step that
can be executed.
An exit step (jump) must always be programmed after a transition that is not
followed by a step.
Selective branches can only be inserted before transitions.
Since a selective branch polls a variety of conditions before executing a step these
conditions must be placed in transitions directly after the branch.
Parallel branches can only be inserted after transitions.
This is because a parallel branch has the effect that two or more steps are
performed simultaneously after a common transition.

MELSEC MEDOC plus Reference Manual


Programming 6 – 21

You must assign a transition condition to every transition in the program.


A transition condition is a program that defines the conditions under which the
transition to the next step is to be enabled.
You must assign an action to every step in the program.
An action can be either a program or a Boolean output variable. Please note that
an action’s program is not a POU, however!

6.5.2 Sequence rules and examples


Simple sequences
A simple sequence consists of a series of alternating ‘Step – Transition’ pairs.

STEP_1
Example:
The transition from STEP_1 to STEP_2 is only executed if STEP_1 has been
executed and transition condition TRAN_1 evaluates true.
TRAN_1

STEP_2

Divergence into selective sequences


Branching to a selection of alternative sequences (divergence)
is programmed by programming one transition beneath the
STEP_1 horizontal line for each alternative sequence to be included in
the selection. Note that if several transition conditions evaluate
true at the same time only the sequence that is furthest to the
left will actually be executed!
TRAN_1 TRAN_2
Example:
The transition from STEP_1 to STEP_2 only takes place when
STEP_1 has been executed and transition condition TRAN_1
STEP_2 STEP_3 evaluates true. The transition from STEP_1 to STEP_3 only
takes place when STEP_1 has been executed, TRAN_2
evaluates true and TRAN_1 evaluates false.

Reference Manual MELSEC MEDOC plus


6 – 22 Programming

Convergence from selective sequences


The end of a selectively branched sequence is converged again
by programming one transition above the horizontal line for
STEP_1 STEP_2 each branch sequence to be terminated.

Example:
The transition from STEP_1 to STEP_3 only takes place when
TRAN_2 STEP_1 has been executed and transition condition TRAN_1
TRAN_1 evaluates true. The transition from STEP_2 to STEP_3 only
takes place when STEP_2 has been executed and TRAN_2
evaluates true.
STEP_3

Divergence into parallel sequences


You can only program one transition directly above the double
horizontal synchronisation line.
STEP_1
Example:
The transition from STEP_1 to STEP_2 and STEP_3 only takes
TRAN_1 place when STEP_1 has been executed and transition condition
TRAN_1 evaluates true. Following simultaneous activation of
STEP_2 and STEP_3 the two sequences are executed in parallel,
independently of one another.

STEP_2 STEP_3

Convergence of parallel sequences


You can only program one common transition beneath the
double horizontal synchronisation line.
STEP_1 STEP_2
Example:
The transition from STEP_1 and STEP_2 to STEP_3 only takes
place when both STEP_1 and STEP_2 have been executed and are
connected by the double horizontal line above the transition. The
TRAN_1 transition condition TRAN_1 must also evaluate true.

STEP_3

MELSEC MEDOC plus Reference Manual


Programming 6 – 23

Empty branches
This is a special form of selective branching in which
one or more alternative branches contain no steps.
STEP_1
Example:
If and only if TRAN_1 is false and TRAN_4 is true
the transition runs from STEP_1 to STEP_4, skipping
TRAN_4 STEP_2 and STEP_3.
TRAN_1

STEP_2

TRAN_2

STEP_3

TRAN_3

STEP_4

Exit and Entry Steps (Jumps)


A transition condition can be followed by an exit
step A instead of a step. The label of the exit step
references the corresponding entry step B, which
STEP_1 can be placed anywhere in a sequence directly
before an executable step. The exit and entry steps
must have the same designators (names). This
TRAN_1 structure can be used to program loop constructs.
LABEL_1 A Example:
The sequence is processed up to STEP_3. Then, if
STEP_2 STEP_3 has been executed, TRAN_3 evaluates false
and TRAN_4 evaluates true, execution performs a
jump back to STEP_2 via LABEL_1.

TRAN_2

STEP_3

TRAN_3 TRAN_4

LABEL_2 B
STEP_4

Reference Manual MELSEC MEDOC plus


6 – 24 Programming

Creating a Sample Program

Operations and Order of Procedure:


A Step and Transition
A
B Parallel Branch (Divergence)

C Convergence
D
D Step and Transition

E E Selective Branch (Divergence)


B
F Step and Transition

G Step and Transition


F H Step and Transition

I Convergence

The illustration shows the creation of an


example program in nine steps. The
shaded areas show the position of the
G selection highlight for insertion of the
corresponding element.

H
I

MELSEC MEDOC plus Reference Manual


Programming 6 – 25

6.5.3 Editing elements in the SFC language


You can edit all the elements in an SFC sequence. The commands for editing elements
are accessed in the Edit menu under Modify. Here too, only the commands that can
be performed for the current selection are active:
Initial step
Final step
Macro step
Entry step
Exit step

6.5.4 Zoom functions


Zoom functions for transitions
If you have not yet created a transition double-clicking on the transition symbol opens
the New Transition dialog box for the definition of a new transition.
If the transition has already been defined double-clicking on the transition symbol
opens the editor for the creation of the corresponding PLC program.

Zoom functions for steps


The Step Zoom Into option in Extras - Options - Zoom Header/Body enables you
to define which dialog box is to be opened when you double-click on a step symbol.
e Step Action Association Action Association dialog box: Association of an action
to a step
e First Action If Any If at least one action is already associated to the step the PLC
program of the first action in the list is opened for editing.
e Comment Dialog box Comment: Enables you to enter a comment text. If you
want the comment text to be displayed on the screen in the step box you must
activate the Extended Information feature in the View menu. This will also display
additional information in the Project Navigator window.

Reference Manual MELSEC MEDOC plus


6 – 26 Programming

6.5.5 Assigning Actions to Steps


You can assign actions to every step. An action is a program that can be written in
Instruction List (IEC or MELSEC), Ladder Diagram or Function Block Diagram language.
These programs are all listed in the Action Pool in the Project Navigator window.

How to associate actions to steps


a Select the step to which you wish to assign an action.
b Select Edit Action Association in the Tools menu to open the Action
Association dialog box.
c Press m to open the Action Name List, which shows all the programs in the
Action Pool.
Note: The procedure for creating a new action is described in Chapter 4 (‘How to
create new objects’).

d Select the required action and confirm with OK. The name is then displayed in the
Action Association field.
e Press ^ to close the dialog box.
The selection of actions from the Action Name List as described in step c is for the
association of programs already stored in the Action Pool. If no actions have yet been
created a message is displayed when you press m.
The action associated with a step does not have to be a program; you can also
associate steps with direct operands, effectively defining the operand as an action.
Note: Steps that have already been associated with actions are shown shaded in the
editor.

MELSEC MEDOC plus Reference Manual


Programming 6 – 27

6.5.6 Assigning Transition Conditions


Each transition must be associated with a transition condition. A transition condition
can be
a program written in the IL (IEC IL only), LD or FBD languages
a Boolean operand with a value of FALSE or TRUE
a Boolean variable with a value of FALSE or TRUE

How to assign transition conditions


a Open the body of the SFC POU.
b Select the transition symbol to which you wish to assign a condition.
c Enter the name of the condition.
d Select Zoom Body from the Tools menu. The New Transition dialog box is
displayed with the new transition name.
e Select the programming language you wish to use for the transition program.
f Confirm your selection with OK.
The editing window of the selected language editor is then opened, and the name of
the new transition is displayed below the Body entry of the SFC POU in the Project
Navigator window. You can now write the program for the transition condition.
Transitions that have been assigned a name are shown shaded in the sequence chart,
even if the associated program has not yet been created. This means that the
identification feature that applies for steps does not apply for transitions; you can only
check whether the associated program has been created by looking in the Project
Navigator window. If the program has been created the name of the transition will
appear under the Body entry in the Navigator.

Programming Transition Conditions


Programming a transition condition is the same as programming any other POU.
However, the program must be written in a network. Also, you are only allowed to
use one output variable, and this variable must have the name of the transition or the
name TRAN.

Reference Manual MELSEC MEDOC plus


6 – 28 Programming

6.5.7 Comments in Sequential Function Chart Language


You can now enter an additional comment for each step in the SFC editor. Each
comment can be up to 256 characters long.

Entering comments
a Activate the Extended Information option in the View menu to increase the size
of the step display in SFC language.
b Select the step in the sequence for which you wish to enter a comment. Take care
to only mark the step itself and not its name.
c Activate the Edit Step Comment option in the Tools menu or press je to
display the comment entry dialog box.
d Enter the text of your comment.

e Press be to insert the comment text into the box representing the step.

f You can suppress the comment text display by deactivating the Extended
Information option in the View menu.
See also the Comment option in Extras - Options - Zoom Header/Body -
Step Zoom Into (chapter 2).

MELSEC MEDOC plus Reference Manual


Programming 6 – 29

6.5.8 Sequence errors


The following examples illustrate two typical errors in SFC programs.
An ‘unsafe’ sequence
Transition T_4 can only be polled when both S_2 and
S_1 S_4 have been executed. However, as soon as T_2 is
false and T_3 is true, sequence execution continues with
S_5. The result is that it is possible for the process to
T_1 restart without S_4 being active and without it being
possible to execute S_6.
This type of process is referred to as ‘unsafe’.
S_2 S_3

T_2 T_3

S_4 S_5

T_4 T_5

S_6 S_7

T_6 T_7

An ‘inaccessible’ sequence
This sequence suffers from a similar problem. In this
S_1 case, T_6 is completely inaccessible when the
sequence containing steps S_5 and S_7 is executed.
T_6 can only be polled if both S_6 and S_7 are active.
T_1 S_6 can never be active, however, because T_4 can
only be polled and execute its transition when S_2 and
S_4 are active.
S_2 S_3

T_2 T_3

S_4 S_5

T_4 T_5

S_6 S_7

T_6

Reference Manual MELSEC MEDOC plus


6 – 30 Programming

6.6 Programming Functions


Programming the header and body of a function is no different from programming a
program POU. You can program functions in the following editors:
Instruction List (IL)
Ladder Diagram (LD)
Function Block Diagram (FBD)

The two main characteristics of functions are that they output exactly one data
element when they are processed and that they always deliver the same output values
in response to the same input values. Functions do not have any memory, and
although they can contain more than one data element (arrays) they can only output
one data element. Functions are thus independent program blocks; they have the
same functionality as normal programming instructions, and can be replaced and used
in other program sections at will.
Note: Each user-defined function uses one system label, irrespective of how often
the function is called (➞ page 5-19).

6.6.1 Using timers in functions


If you are not careful, programming timers in subprograms, functions and function
blocks can lead to problems. You should always remember that once a timer has been
triggered it just goes on counting independently, irrespective of whether the condition
that triggered the branch to the subprogram, function or function block is still true or
not. It is thus better to avoid using timers in this way if possible, and if you can’t avoid
it you should make allowances for this behaviour in the code of your program.

MELSEC MEDOC plus Reference Manual


Programming 6 – 31

6.6.2 Declarations
The first step in creating a function block is to declare it as a program organisation
unit.
Header
In the header you must declare all the variables used in the function. Function
variables can be either of the type VAR, VAR_INPUT or VAR_CONSTANT. The function
itself can be one of the data types (BOOL, INT, DINT, WORD, DWORD, TIME, REAL).
The variables declared in the header are also referred to as formal parameters.
Body
The body contains the program code to be performed on the variables declared in the
header. The result of the function must be explicitly assigned to the function name.

Note: The procedure for creating a new function is described in Chapter 4 (‘How to
create new objects’).

Formal
parameters

The result is
assigned to
the function
name

Reference Manual MELSEC MEDOC plus


6 – 32 Programming

6.6.3 Calling functions in the text editor


Note: All variables must be assigned when a function is called; the parameter list
must be complete.

When you call a function in Instruction List language you must first load the first
parameter into the accumulator with the Load instruction (LD). The next program line
then contains the references to the function’s name, as the operator, and to the other
variables declared in the header. When this statement is executed actual parameters –
i.e. specific values – are passed to the remaining formal parameters defined in the
header. The result of the function is stored in the accumulator.
The value 10 is loaded into the accumulator. This is then
followed by the function call FUN_1. The value in the
accumulator is added to Factor_A and multiplied by
Factor_B. The result is stored both in D100 and the
accumulator.

Note: Please note that you must always assign the values to the variables in the
correct order as dictated by the syntax!

Using the editing support function


a Position the cursor in the first column and enter the name of the function.
INSERT

b Press b and l. The parameters are inserted automatically, with dummy variable
question marks and the data type in the actual parameter positions.
LD ?STRING
INSERT ?STRING,
?INT
ST ?STRING

c Overwrite the dummy variable names with a direct address or a variable name.

MELSEC MEDOC plus Reference Manual


Programming 6 – 33

6.6.4 Calling functions in the graphical editors


The same procedure is used for calling functions in Ladder Diagram and Function
Block Diagram.

How to call functions in the graphical editors


a Open the POU body
b Select Function Block in the Tools menu. This opens the Function Block
Selection dialog box.
c Select the required function’s name (➞ page 3-54).
d Confirm with OK.
e The mouse pointer changes to a function ‘block’ symbol. Position it at the required
location in the editing area and press e. The graphical block representing the
function is inserted at the pointer location. The names of the variables are shown
at the function, inside the block representing the function. The name of the
function itself is shown at the output, which is also inside the function ‘block’
symbol.
f Allocate actual parameters (outside) to the formal parameters (inside).

Actual parameters Formal parameters

Reference Manual MELSEC MEDOC plus


6 – 34 Programming

6.7 Programming Function Blocks


Programming the headers and bodies of function blocks is no different from
programming normal program POUs. You can program function blocks with the
following languages:
Instruction List (IL)
Ladder Diagram (LD)
Function Block Diagram (FBD)

Function blocks can have one or more outputs and can produce one or more different
output values for the same input values. The results are stored after the function block
has been processed, and these values are used the next time the function block is
called. Function blocks must be instantiated before they can be called in a POU.

6.7.1 Using timers in function blocks


If you are not careful, programming timers in subprograms, functions and function
blocks can lead to problems. You should always remember that once a timer has been
triggered it just goes on counting independently, irrespective of whether the condition
that triggered the branch to the subprogram, function or function block is still true or
not. It is thus better to avoid using timers in this way if possible, and if you can’t avoid
it you should make allowances for this behaviour in the code of your program.

6.7.2 Declaration
The first step in creating a function block is to declare it as a program organisation
unit.
Header
All the variables used in the function block’s code must be declared in the header.
Variables in function blocks can be of the types VAR, VAR_IN_OUT, VAR_INPUT,
VAR_OUTPUT, VAR_CONSTANT, VAR_EXTERNAL or VAR_EXTERNAL_CONSTANT. The
result of the function can be one of the data types (BOOL, INT, DINT, WORD,
DWORD, TIME, REAL).
Body
The body contains the program code to be performed on the variables declared in the
header. Direct programming of hardware addresses is not permitted.

MELSEC MEDOC plus Reference Manual


Programming 6 – 35

EXAMPLE
The function block COUNTER stores the duration of a process. The header contains
declarations of three output variables (Hours, Minutes, Seconds), one input variable
(Process) and one global variable (SecClck) that addresses relay M9032, which
switches once per second.
Note: The procedure for creating a new function block is described in Chapter 4
(‘How to create new objects’).

Header of the function block

Body of the function block


As soon as an input signal is registered the
variable ‘Seconds’ is incremented once per
second.

When the value of ‘Seconds’ reaches 60


‘Minutes’ is incremented by 1 and
‘Seconds’ is reset to 0.

When the value of ‘Minutes’ reaches 60


‘Hours’ is incremented by 1 and ‘Minutes’ is
reset to 0.

Reference Manual MELSEC MEDOC plus


6 – 36 Programming

6.7.3 Instantiation
Function blocks cannot be called directly, they must be called as ‘instances’. When a
function block is ‘instantiated’ an instance, or copy, of it is created in the header
declaration table of the POU in question. The instance is declared as a variable VAR,
for which any identifier can be used. The ‘Type’ is the name of the function block.
Note: You can make multiple instances of one function block. However, remember
that each instance you create uses up one system label (➞ page 5-19).

EXAMPLE
In this example, the COUNTER function block programmed above is instantiated in the
MAIN program POU as PROCESS_TIME.

6.7.4 Calling function blocks in the text editor


You do not have to assign all the variables in the parameter list when you call a
function block. The old register values are used for those parameters not assigned in
the call.

Function blocks are called with the following instructions


CAL (Call)
CALC (CallConditional: conditional call)
CALCN (CallConditionalNot: negated conditional call)

Calling with a list of input parameters:


Syntax:
CAL ‘Instance Name’(‘Formal parameter’:=’Actual parameter’, ...)

EXAMPLE
The instance name of the function block is PROCESS_TIME. In this example, the actual
parameters X0, D1, D2 and D3 are assigned to the formal parameters ‘Process’,
‘Seconds’, ‘Minutes’ and ‘Hours’.
CAL Process_Time(Process:=X0, Seconds:=D1, Minutes:=D2, Hours:=D3)

MELSEC MEDOC plus Reference Manual


Programming 6 – 37

Call with input parameter load/store:


Syntax: LD Actual parameter
ST Formal parameter
CAL FBName()

EXAMPLE
The instance name of the function block is PROCESS_TIME. In this example, the
actual parameters X0, D100, D200 and D300 are assigned to the formal parameters
‘Process’, ‘Seconds’, ‘Minutes’ and ‘Hours’.
LD X0
ST Process
LD D100
ST Seconds
LD D200
ST Minutes
LD D300
ST Hours
CAL Process_Time()

Using the editing support function


a Position the cursor in the first column and enter the CAL instruction.
b Position the cursor in the second column and press m.
c Select the function block instance (FB_INST in the example) from the Variable
Selection dialog box.
CAL FB_INST

d Press b and l. The parameters are inserted automatically. The names of the
internal function block variables are entered as the formal parameters. Dummy
variable question marks and the data type are displayed in the actual parameter
positions.
CAL FB_INST(IN1:=?BOOL,
IN2:=?BOOL,
IN3:=?BOOL)

e Overwrite the dummy names with either a direct address or a variable name. Tip:
If you select the dummy name (?BOOL) and press m you can select the variable
directly from the list displayed. Select Apply to enter the variable.
CAL FB_INST(IN1:=X1,
IN2:=VAR_EIN1,
IN3:=VAR_EIN2)

Reference Manual MELSEC MEDOC plus


6 – 38 Programming

6.7.5 Calling function blocks in the graphical editors

How to call function blocks in the graphical editors


a Open the body of the program POU in which you wish to call the function block.
b Select Function Block in the Tools menu. This opens the Function Block
Selection dialog box.
c Select the required function block’s name (➞ page ???) and confirm with OK.
d Move the mouse pointer to the desired position in the editing window and press
the Space Bar to insert the function block.
e Press m for a list of the instance names declared in the header.
f Select the appropriate instance name and confirm with OK. The name is then
used as the identifier for the function block instance.
g Terminate the procedure by pressing e.
The names of the formal
parameters are shown in the
function block. The function block
type is COUNTER, the instance
name is ‘Process_T ime’
(➞ Header).

Formal Actual
parameters parameters

h Assign the actual parameters (outside) to the formal parameters (inside).

MELSEC MEDOC plus Reference Manual


Programming 6 – 39

6.7.6 Multiple use of a single instance


You can use the same instance of a function block in several different places within
the same PLC program. However, it is important to take care what values are written
to the output variables (D58 and D60 below).
Instance Inst_1 in network N_1

Instance Inst_2 in network N_2

Execution of the Inst_1 instance of the function block FB_WITH_EN_ENO is controlled


by relay M5 in network N_1 and by relay M7 in network N_2. The POU is executed
sequentially. Sequences 1 through 4 are processed in order on the basis of the
switching status of the relays.
Sequence 1: M5 = 1 and M7 = 0
a The function in network N_1 is executed.
b The result is written to D58 and D60.
Sequence 2: M5 = 0 and M7 = 1
a D58 contains the unchanged value of sequence 1.
b The function in network N_2 is executed.
c The result is written to D60.
Sequence 3: M5 = 0 and M7 = 1
a The result of sequence 2 is written to D58.
b The function in network N_2 is executed.
c The result is rewritten to D60.
Sequence 4: M5 = 0 and M7 = 0
a The result of sequence 3 is written to D58.
b Neither of the two functions are executed.
c The value written to D60 in sequence 3 remains unchanged.

Reference Manual MELSEC MEDOC plus


6 – 40 Programming

6.7.7 Execution of Function Blocks


Function blocks can be executed in different ways:
Macrocode execution
MC-MCR execution
Use with EN/ENO

The execution mode is selected in the Function Information dialog box.

How to set the execution option


a Select the function block in the Project Navigator window.
b Display the Function Information dialog box by pressing ae.
c Activate the check box. The Use MC-MCR option can only be activated when the
other two options have already been activated.
This does not make any changes to instantiation and the programming of instances in
the various programming languages.

MELSEC MEDOC plus Reference Manual


Programming 6 – 41

Macrocode execution
Standard execution: The function block is called via a system label
Macrocode execution: The function block is expanded internally

With Macro Code Without Macro Code


With Macro Code
(standard execution)
No internal system labels are needed to Each instance uses internal system labels
execute a function block instance. (pointers). A
Consequence: Since only a maximum of 256
Consequence: The number of function blocks system labels can be used you cannot use
you can use is only limited by the size of the more than a theoretical maximum of 256
PLC memory as function blocks are function blocks. In practice this number is even
independent of system labels. smaller as system labels are also required for
other internal processes.
Implementation of the function block
User-oriented execution of the function block construct in conformity with the IEC 1131.3
standard
No restrictions on the handing of timers and Restrictions on the handling of timers and coils
coils within the function block. within the function block (subroutines).

A To set the system labels parameter select the PLC_Config entry in the Project
Navigator window and then click on the System Variables button (➞ page 5-19).

The maximum permitted number


of system labels (internal pointers)
is 256.

Reference Manual MELSEC MEDOC plus


6 – 42 Programming

Macrocode execution, MC-MCR execution, Use with EN/ENO


The function blocks FB_1 through FB_5 and the corresponding instances i_FB_1
through i_FB_5 show the different execution possibilities.

The function block

Use of the funtion block

MELSEC MEDOC plus Reference Manual


Programming 6 – 43

FB_1 FB_2 FB_3 FB_4 FB_5


Macro NO YES NO YES YES
MC-MCR NO NO NO NO YES
EN-ENO NO NO YES YES YES
Generated LD X10 LD X20 LD M3 LD M4 LD M5
Code OUT M4096 AND X21 OUT M4098 OUT M41 OUT M51
LD X11 INCP D20 AND X30 LDI M4 MC N0
OUT M4097 SET M4099 CJ P2050 M4103
LD SM400 LD M4098 LD X40 LD X50
CALL P2048 ANI X30 AND X41 AND X51
LD SM400 RST M4099 INCP D40P2050 INCP D50
MOV D6144 D10 LD M4098 MCR N0
AND X31
SET M4100
LD M4098
ANI X31
RST M4100
LD M4098
OUT M4101
CALL P2049
LD M4101
OUT M31
LD SM400
MOV D6145 D30

Instance LD M4096 LD M4099


(no macro) AND M4097 AND M4100
INCP D6144 INCP D6145
RET RET

Sytem labels 1 System label No system labels 1 System label 1 System label No system labels
(no macro) (macro) (no macro) (EN/ENO and jump) (macro and MC/MCR)

Behaviour of: The function block is The function block is The function block is The function block is The statuses of the
always executed. The always executed. The only executed if the only executed if the devices are reset:
- Timers timers, counters and timers, counters and EN input is set. This EN input is set. This - Timer: Count value
- Counters outputs are thus outputs are thus means that the means that the reset to 0,
- Outputs controlled by the controlled by the timers, counters and timers, counters and contacts remain off
program. program. outputs retain their outputs retain their - Retentative timers
status from the last status from the last and counters:
execution. Timers execution. Timers count value and
continue to run. The continue to run. The input contact
status of counters, status of counters, status preserved,
accumulator/retentative accumulator/retentative output contact is
timers and outputs in timers and outputs in reset
OUT instructions is OUT instructions is - Devices in OUT
preserved. preserved. instructions:
outputs are reset
- Devices in SET, RST,
SFT instructions:
current status
preserved

Reference Manual MELSEC MEDOC plus


6 – 44 Programming

6.7.8 Global Function Blocks


Function blocks allow global instancing, so that the same instance can be used in
different program organisation units.

How to create a global instance


a Create a program organisation unit as a function block (in our example: MAIN).
b Create an instance (Main_Instance1) of this function block (MAIN) in the Global
Variable List.

c Declare this instance as VAR_EXTERNAL in the header of the POU (in our example:
INSERT) where the instance is to be inserted.

d Call up the function block in the body, and allocate to it the name of the instance.

MELSEC MEDOC plus Reference Manual


Programming 6 – 45

6.8 Programming Data Unit Types


Data unit types are structured, derived data types containing a collection of variables
which can be of different data types. Data unit types can be declared as global or as
local variables.
Note: Data unit types can only be used in the IEC editors.

6.8.1 Declaration
Data unit types must be defined in the DUT_Pool.
All the variables in the DUT structure must be declared in a special declaration table.
After this you must then create one or more instances of the data unit type in the
global variables declaration table.

How to declare a data unit type


a Select New in the Edit menu, then select DUT.
b Enter a name for the new DUT (max. 16 characters) and confirm with OK. The
name of the new DUT is displayed in the DUT_Pool of the Project Navigator
window.
c Double-click on the name of the new DUT in the Project Navigator window to
open its special declaration table.
d Enter a name (identifier) for the variable in the first field.
e Select the data type for this variable in the second field.
f The default initial value (Initial) is added automatically. If you wish, you can also
enter an optional comment for the variable.
g Repeat steps a – f until all the variables of the data unit type are defined.

Reference Manual MELSEC MEDOC plus


6 – 46 Programming

EXAMPLE
The following example shows the creation of a data unit type called SiloType. The
variable collection of SiloType contains two variables of the type INT and one
variable of the type BOOL.
a Enter the following lines in the declaration table for the data unit type:

b Store your entries.

6.8.2 Use of the DUT as global variable

How to declare the DUT


a Double-click on Global_Vars in the Project Navigator window.
b Enter the following lines in the global variables declaration table:

Silo1 and Silo 2 are the names of the variable of data type SiloType. Since
the elements in type SiloType can have different data types the address assignment
is handled automatically by the PLC, and no default initial values are shown.

MELSEC MEDOC plus Reference Manual


Programming 6 – 47

How to call the DUT


The data unit types declared as global variables can be referenced as VAR_EXTERNAL
in program and function block POUs.
a In the Project Navigator window, double-click on the header of the POU in which
you wish to declare a copy of the data unit type.
b Select VAR_EXTERNAL in the Class column in the table.
c In the Identifier column, open the dialog box with the list of the defined DUTs.
d Select the appropriate DUT name and confirm with OK. The data type, in this case
the name of the DUT, is entered in the Type field automatically.
e Enter a comment for your entry, if you wish.

EXAMPLE
You have created a Data Unit type called SiloType. Two variables of the type
SiloType, Silo1 and Silo2, have now been declared in the global variables list.
The structure of both is identical, so to reference the individual variables of each DUT
you only needs to prefix their names with the name of the respective global variable.
In Silo1 the values for the temperature and volume variables are determined by the
contents of registers D0 and D1, in Silo2 by D10 and D11. In Silo1 the Emergency
Off (EmergOFF variable) switch is controlled by the status of input X0, in Silo2 by
input X1.

Reference Manual MELSEC MEDOC plus


6 – 48 Programming

Instruction List:
SILO1 SILO2
LD D0 LD D10
ST Silo1.Temperatur ST Silo2.Temperature
LD D1 LD D11
ST Silo1.Volume ST Silo2.Volume
LD X0 LD X1
ST Silo1.EmergOff ST Silo2.EmergOff

Ladder Diagram and Function Block Diagram:

In the Ladder Diagram version of the example a function block of the type
‘Monitoring’ has been programmed for assigning the register values and the Boolean
input to the elements of the DUTs. Two separate instances (Silo_1 and Silo_2) of
this function block were then created for the two silos.

MELSEC MEDOC plus Reference Manual


Programming 6 – 49

6.8.3 Use of the DUT as local variable


Data unit types can also be passed directly as variables:
− As input and output parameters in function blocks
− As input parameters in functions

Create the Control function block


The function block processes the input variables and passes the results to the output
variables. The input variables IN_Temperature, IN_Volume and
IN_EmergOff are declared in the header, along with the output variable
Silo_Output. Silo_Output is declared as the data unit type Silo_Type.

Calling the Control_Use function block and passing the data unit type directly as an
output parameter
The function block Control is called in the program organisation unit
Control_Use, creating the instance Silo_FB_1.
The input variables of the function block obtain their values from devices D0, D1
and X0.
The output variables of Silo_Output are passed to the data unit type
Silo_DUT_1.

Reference Manual MELSEC MEDOC plus


6 – 50 Programming

6.9 Programming Arrays


An array is a collection of variables of the same data type. MM+ supports arrays with
up to a maximum of three dimensions.
Note: Arrays are only supported in the IEC editors.

6.9.1 Declaration
Arrays are declared in the header of the program POU. They can be declared as Local
or global variables.
EXAMPLE
This example shows the definition of a one-dimensional array called ArrSingle with
three elements of the type INT, and a two-dimensional array called ArrDouble with
three elements of the type INT in the first dimension and five elements of the type INT
in the second dimension.
a Open the header of a POU.
b Add a new line to the table with the following entries:

e VAR: Definition of the array as a local variable in the program organisation unit
‘P_3’.
e VAR_EXTERNAL: This array is defined as a global variable and referenced in the
header of program POU ‘P_3’ as an external (global) variable.
e ArrSingle / ArrDouble: Names of the arrays.
e ARRAY [0..2] OF INT: The one-dimensional array has three elements (0 – 2) of
the type integer (INT)
e ARRAY [0..2, 0..4] OF INT: This array is two-dimensional. The second dimension
is separated by a comma between the braces. In this example the first dimension
of ArrDouble has three elements (0 – 2) and the second dimension has five
elements (0 – 4).
e 3(0): Number of elements (3) with the default value 0 (0)
e 15(0) Number of elements (3 x 5 = 15) with the default value 0 (0)

MELSEC MEDOC plus Reference Manual


Programming 6 – 51

6.9.2 Calling
Instruction List:
One-dimensional arrays
LD Actual parameter
ST ‘Array Name’[‘Element’]

Two-dimensional arrays
LD Actual parameter
ST ‘Array Name’[‘Element of 1st Dimension’, ‘Element of 2nd Dimension’]

EXAMPLE
A two-dimensional array called ArrDouble has been defined with three elements in
the first dimension and five elements in the second dimension.
The data registers D0 and D1 are assigned to the following elements:
D0: Position 1 in the first dimension I, position 2 in the second dimension II
D1: Position 2 in the first dimension I, position 3 in the second dimension II
II
4

3 D1
ArrDouble
2 D0

I
0 1 2

Instruction List:
LD D0
ST ArrDouble[1,2]
LD D1
ST ArrDouble[2,3]

Ladder Diagram and Function Block Diagram:

Reference Manual MELSEC MEDOC plus


6 – 52 Programming

6.10 Programming Timers and Counters

6.10.1 TIMER and COUNTER Functions


The timer and counter functions are stored in the manufacturer library.
Timer Functions Counter Functions Operands Action
Normal
Pass setpoint value
timers/counters and
TIMER_M COUNTER_M and call (start)
extended
timer/counter
timers/counters
TIMER_VALUE_M COUNTER_VALUE_M Pass setpoint value
Extended
timers/counters only Call (start)
TIMER_START_M COUNTER_START_M
timer/counter
Pass setpoint value
and call (start) timer
MELSEC Q series’
TIMER_H_M -
high-speed timer
Set timer intervals by
parameters

Timers and counters always have the following four elements:


Timer Counter

Setpoint value TValue CValue


Actual value TN CN
Output coil TC CC
Input contact (status) TS CS

Note: The use of the various functions is illustrated below using a timer as an
example. Counters are used in exactly the same way.

MELSEC MEDOC plus Reference Manual


Programming 6 – 53

The TIMER_M function


Note: A detailed example of the use of the TIMER_M function is provided in the
Beginner’s Manual.

TIMER_M

Use of the normal timer TC20

Use of the extended timer TC256

The TIMER_M function both passes the setpoint value and starts the timer TC (TCoil).
The setpoint value is passed to TValue. With normal timers the setpoint value is passed
directly. With extended timers the passed setpoint value is assigned to the timer and
the setpoint value register (see below).

The TIMER_VALUE_M and TIMER_START_M functions


Using TIMER_VALUE_M and TIMER_START_M together provides exactly the same
functionality as TIMER_M. The only difference is that the parameter passing and timer
start operations are handled separately, which makes it possible to use them at
different points in the PLC program. TIMER_VALUE_M and TIMER_START_M can only
be used with the extended timers, and you must define the setpoint values registers
for the extended timers.
TIMER_VALUE_M

Passes the reference


value to the extended
timer TC256

TIMER_START_M
Starts timer TC256

Reference Manual MELSEC MEDOC plus


6 – 54 Programming

Defining the reference value registers for extended timers and counters
You must always define and set a number of parameters when you use timers or
counters. The dialog box shown below when you select the T/C Range button in the
PLC_Parameter window of the Project Navigator:
A B C D

A Start address of the normal timers to be used


B Start address of the extended timers to be used
C Number of timers to be used
D Number of counters to be used
E Type and head number (starting address) of the setpoint value registers to be used
for the extended timers
F Type and head number (starting address) of the setpoint value registers to be used
for the extended counters
Explanation of parameter values shown in the example
The start address for the extended 100ms timers is 256, i.e. TC256 (A). Register type
D (data registers) is selected for the setpoint value registers with a head number of
200 i.e. D200 (E). This means that the setpoint value of extended timer TC256 is
stored in D200. The assignments for the other timers and registers are thus
automatically:
Extended Timer Setpoint Value Register
TC256 D200
TC257 D201
TC258 D202
... ...
TC273 D217

MELSEC MEDOC plus Reference Manual


Programming 6 – 55

6.10.2 TIMER and COUNTER Function Blocks


A selection of new standard function blocks are provided for programming local
timers and counters. The system automatically uses free timers and counters from the
system range.
Advantages: No direct timer and counter addresses are required. You can create any
number of instances – depends on the number of system timers – with different
timers from just one function block.
The following function blocks are provided:
Function Blocks Comment
TIMER_10_FB_M 10 ms timer
TIMER_100_FB_M 100 ms timer
TIMER_CONT_FB_M retentative timer
TIMER_HIGH_FB_M high-speed timer MELSEC Q series only
TIMER_LOW_FB_M low-speed timer MELSEC Q series only
TIMER_CONTHFB_M retentative high-speed timer MELSEC Q series only
COUNTER_FB_M counter

MELSEC Q series’ timers


The timers will act as high-speed or low-speed timers when they are activated by the
appropriate instructions in the PLC program.
The timer intervals for the high-speed and low-speed range can be set in the PLC
Setup dialog box (➞ page 5-16). In order to be compatible to A series projects, the
function blocks TIMER_10_FB_M and TIMER_100_FB_M are available in the MELSEC Q
series as well. In a MELSEC Q series project they are the same as the function blocks
TIMER_HIGH_FB_M and TIMER_LOW_FB_M. But in this case, they are no longer
10-ms and 100-ms timers. Instead the timer interval set by the parameters is valid.

MELSEC A/Ans MELSEC Q Comment

TIMER_10_FB_M TIMER_HIGH_FB_M For the MELSEC Q series, it is


not the intervals 10 ms and
100 ms which are valid, but
the timer interval set by the
TIMER_100_FB_M TIMER_LOW_FB_M parameters.

Reference Manual MELSEC MEDOC plus


6 – 56 Programming

Defining the system range


You must define the system range before attempting to use local timers or counters.
The system then automatically selects a free timer or counter from this range. A
compile error will be displayed if you try to use these new function blocks without
previously defining the corresponding system range.
a Open the System Variables dialog box (PLC_Parameter – System Variables).

System timer

- 100 msec
- 10 msec
- retentive

System counter

b Define the necessary system range in the System Timers or System Counters fields.
This disables access to these addresses by other applications using direct
addressing. Please note that the three timer function blocks must use three
separate system timer ranges. The settings for the system timers must match the
general timer settings (PLC_Config – Timer/Counter Ranges).
Timer start address

MELSEC MEDOC plus Reference Manual


Programming 6 – 57

Instantiation
The use of these new function blocks is illustrated below using a 10 ms timer as an
example.
a Declare the following variables in the header:
TIMER_XYZ is the instance of
function block
TIMER_10_FB_M T imer start
address

b Select function block TIMER_10_FB_M in the body.

The timer function block has the following input and output variables:

The timer function block TIMER_10_FB_M for 10 msec


timers

Reference Manual MELSEC MEDOC plus


6 – 58 Programming

Designation
in the Meaning
Function
Coil Coil Activation condition for the timer process
Preset Setpoint value
ValueIn Initial value (Normally: 0)
➜ Note
ValueOut Actual value
Status Output contact The output contact is set when execution of the
function block is complete.

c Assign the instance names defined in the header to the function block and
allocate the necessary input and output variables.

nstanz TIMER_XYZ of function block


TIMER_10_FB_M

Note: If you do not need one of the parameters for your application, e.g. ValueIn in
the example, you can simply leave the contact unassigned. In this case, no program
code will be generated.

MELSEC MEDOC plus Reference Manual


Programming 6 – 59

6.11 The EN input and ENO output


Some programming instructions have an EN input and an ENO output in addition to
the normal input and output variables. These instructions are identified in the
standard library by the suffix _E, e.g. ABS_E, BCD_TO_DINT_E . The functions in the
manufacturer library do not have this suffix as they are all automatically provided with
an EN input and an ENO output.
Functionality
The EN input controls the execution of the instruction.
There are several different ways to connect the EN input:
A
E

B E

C E

D D

A Direct connection of the EN input to the power bar at the left (LD only). The EN
input is then always on and the instruction is always executed. When ADD_E is
used like this it will produce exactly the same result as ADD without the EN input.
B Link the EN input to a Boolean input variable. The instruction is then only exectued
when Variable_1 is active.
C Connect the Boolean result of a an operation to the EN input. The instruction is
then only executed when the result of the operation is TRUE.
D Connect the EN input to the ENO output of the preceding instruction. The three
instructions are then only executed when Variable_1 is active.
E The ENO output does not have to be connected; it can be left unconnected if it is
not needed.

Reference Manual MELSEC MEDOC plus


6 – 60 Programming

6.11.1 Execution with and without EN and ENO


User-written function WITH_EN_ENO:

With EN input and ENO output

User-written function WITHOUT_EN_ENO:

Without EN input and ENO output

User function WITH_EN_ENO


Execution of the function is controlled by relay M4.
M4 = 1 (TRUE):
− The function is executed.
− The result of the operation is written to D56.
− A new value is always written to D56.

M4 = 0 (FALSE):
− The function is not executed.
− No new value is written to D56. The value stored in D56 remains unchanged, it is
not reset.

User function WITHOUT_EN_ENO


− The function is executed continuously.
− The result of the operation is written to D57.
− A new value is always written to D57.

MELSEC MEDOC plus Reference Manual


Programming 6 – 61

Reference Manual MELSEC MEDOC plus


Compiling and Downloading Programs 7 – 1

7 Compiling and Downloading Programs

7.1 Error Check


Before compiling your project it is advisable to perform an error check on the project
or individual objects. The following checks are carried out:
Header
Checks of all the variable declarations (unique descriptors, addressing etc).
Body
The following checks are performed in the editors:
Graphical editors
Validity of the data types
Variable names (declarations)
Validity of the IEC addresses
Validity of the MITSUBISHI addresses
Definition of the input variables
Recursions
Interconnects
Label syntax

Text editors
Syntax of the operators and operands
Number of operands
Recursions
Jumps
Comments

Errors and warnings are displayed in a status window with explanations.


Note: When you double-click on an error message or warning in the status window
MM+ automatically opens the corresponding object, moves the point in the program
where the error was found and highlights the error in a different colour.

Reference Manual MELSEC MEDOC plus


7 – 2 Compiling and Downloading Programs

How to perform an error check on an object


a Select Check in the Object menu.
Or:
Click with the left mouse button on the Check tool:
Note: You do not have to save your editing changes in open objects before
selecting the Check option. If changes have been made the object is saved
automatically before Check is executed.

How to specify the max. number of errors and warnings


a Select the option Stop Check By in the Extras - Options - General menu.
b Enter the maximum number of errors and warnings. The check operation will be
stopped when the number of errors and warnings exceeds the limit specified here.
Range: 0 - 2,000.

7.2 Compiling
The compilation process translates the project written in MELSEC MEDOC plus into
code that the PLC CPU can execute. This translation process must be performed
before downloading the program to the PLC system.

How to compile the complete project


a Select Compile Project in the Project menu.
MELSEC MEDOC plus first performs checks on all the objects in the project and
displays any errors or warnings in a status window. If no errors are displayed this
means that the program code has been compiled without errors.

MELSEC MEDOC plus Reference Manual


Compiling and Downloading Programs 7 – 3

How to compile only modified objects


POUs that have not yet been compiled are identified in the Project Navigator with an
asterisk. POUs marked in this way were either created after the last compilation or are
not part of a task.

Already compiled

Not yet compiled

a Select Build Project in the Project menu.


Only the new objects which have not yet been compiled and the project elements
which depend on the changes will be compiled.
Note: When you double-click on an error message or warning in the status window
MM+ automatically opens the corresponding object, moves the point in the program
where the error was found and highlights the error in a different colour.

IMPORTANT: Please note that only those Program POUs that you have included in
your tasks are checked and compiled!

Earlier MM+ versions


You must completely recompile projects generated with earlier versions of MM+
(Compile Project) before you can use the Build Project function on them to compile
only changes made in the editing session.

Reference Manual MELSEC MEDOC plus


7 – 4 Compiling and Downloading Programs

7.3 Downloading Projects to the CPU

7.3.1 Communications port setup


You can only download compiled projects to the CPU. Before making your first
download, check that the port and its parameters are configured correctly.
Note: See Chapter 2 and the manuals of your MELSEC hardware for details on
connecting the controller to your computer.

How to configure the communications port


a Select Transfer Setup in the Online menu, then select Ports from the submenu
displayed. A dialog box will be opened with the following options (varies
depending on your configuration):

b Select the correct port for your configuration, then select the Setup button.
c After making your entries in the Setup and Transfer Setup dialog boxes, confirm
with OK.

MELSEC MEDOC plus Reference Manual


Compiling and Downloading Programs 7 – 5

a) Via the CPU interface

e PC Port You can select one of the serial ports COM1 through COM6 for the
PC Port setting.
e MELSECNET Access Host, Master, Local or Net 10 Station
If the PLC is installed in a local station you must also enter the station number.
If the PLC is installed in a station in MELSECNET 10 you must also enter the
network number and the station number.
Note: Q Series CPUs can only communicate with MM+ via the CPU port (cables:
SC-05, SC-08, SC-09). Support for communication with the Q series via computer link
module, Ethernet and MELSECNET will be implemented in a later version of MM+.

b) Via the MELSECNET (A7BDE)


e MELSECNET Access Host, Master or Local
If the PLC is installed in a local station you must also enter the station number.

c) Via the MELSECNET 10 (A7BDE)


e Network number The number of the network in which the transferring
station is located.
e Station number Number of the transferring station

Reference Manual MELSEC MEDOC plus


7 – 6 Compiling and Downloading Programs

d) Via the computer link module

e PC Port You can select one of the serial ports COM1 through COM6 for the
PC Port setting.
e MELSECNET Access Host, Master, Local or Net 10 Station
If the PLC is installed in a local station you must also enter the station number.
If the PLC is installed in a station in MELSECNET 10 you must also enter the
network number and the station number.
e Baud Rate Data transfer speed (300 – 19,200 Baud)
e Parity Communications parity (none, even or odd)
e Data Bits Number of data bits (7 or 8)
e Stop Bits Number of stop bits (1 or 2)
e Checksum Calculation Use checksumming to check for communication errors
e Message Wait Time Time for identification of the carrier signal in units of
10 ms

MELSEC MEDOC plus Reference Manual


Compiling and Downloading Programs 7 – 7

e) Via the Ethernet

e IP Address: Address of Layer 3 in decimal format


Example:
Definition at PLC:
16#A2 00 09 BE
is equal to
162.0.9.190
in decimal format.
e Port No.: Port number defined by the user The PLC Ethernet interface module
is able to handle up to 8 open connections simultaneously. Each connection is
defined by the Port Number.
Example:
Definition at PLC:
16#500
is equal to
1280
in decimal format.
e CPU Watch Time in units of 250 ms
e MELSECNET ACCESS: Access between Ethernet and MELSECNET
Host: Direct access to host station
Master: Access to Master station, if the Ethernet module is installed at the
Local station
Local: Access to Local station, if the Ethernet module is installed at the Master
station
Net10Station: Access to MELSECNET/10 station

Reference Manual MELSEC MEDOC plus


7 – 8 Compiling and Downloading Programs

Important: The following DIP switches must be set on the Ethernet modules
AJ71E71 and A1SJ71E71-B2/B5 in order to enable MELSEC MEDOC plus to interact
with the PLC.

A1SJ71E71-B2
DIP switch AJ71E71
A1SJ71E71-B5
1 OFF OFF
2 ON ON
3 OFF ON
4 OFF OFF
5 OFF -
6 OFF -
7 ON -
8 OFF -

e Station No.: The station number must be set if a station other than the host
station is defined MELSECNETLocal: Station numbers 1 - 64 MELSECNET/10:
Loop system: network number and station number 1 - 64 Bus system: network
number and station number 1 - 31 MELSECNET/B Local: Station numbers 1 - 31

f) MAC transparent mode


In transparent mode you can access the PLC and a MAC control terminal at the same
time. You can select either the PLC or the computer link module as the interface.
If no MAC control terminal is connected transparent mode must be switched off.
Note: Detailed information on transparent mode and the necessary parameters are
provided in the MAC manuals.

MELSEC MEDOC plus Reference Manual


Compiling and Downloading Programs 7 – 9

g) Modem Transmission between a PC and a MAC


Data transmission by modem allows you to conduct remote maintenance on stored
program control from a PC. Note, however, that data transmission settings between a
PC and a MAC can differ from the default transmission settings of the SPS. The
following diagram illustrates the communication path:

MELSEC
MEDOC MAC control PLC
plus unit
ACPU AJ71C**

Default data
transmission settings:
Data transmission settings must Baud rate: 9,600
be identical on these devices. Parity: odd
Data bits: 8
Stop bits: 1

Important: Always make sure MM+, the two modems and the MAC control
unit have the same data transmission settings.

Settings in MELSEC MEDOC plus


a Activate MAC transparent mode.PLC
b Select the PC communications port with which the modem is connected.
c Set the desired data transmission settings.

Important: Let us assume that you have set certain data transmission settings in
transparent mode which are different from the default. If you decide to disable
transparent mode at a later stage, without resetting the default values, MM+ will
notice this and present a warning. You can now either re-enable transparent mode
or reset the data transmission settings to the default values.

Reference Manual MELSEC MEDOC plus


7 – 10 Compiling and Downloading Programs

Default: MAC transparent mode remains turned off. Data transmission settings are
reset to default values.
Set MAC mode: MAC transparent mode is set again. Data transmission settings
remain as set.

MAC control unit settings


a Set the desired data transmission settings.
Detailed instructions for the control units are available in the MAC user’s manuals.

Modem settings
a Set the desired data transmission settings on the sending and receiving modems.
You can use any terminal program (e.g. Windows Terminal) to set the modem
settings.
b Receiving modem: set “Auto Answer On” (Hayes-compatible modem: ATS0=0).

MELSEC MEDOC plus Reference Manual


Compiling and Downloading Programs 7 – 11

Data transmission procedure


a Set data transmission settings in MM+ and on MAC.
b Receiving modem: set “Auto Answer On”.
c Set data transmission settings on receiving and sending modems.
d Start connection: dial receiving modem.
e Quit terminal software, though without hanging up.
f Take the necessary steps in MM+.

h) Release Com Port


When the PLC and other devices (e.g. the MAC terminal in transparent mode) are
connected to the Personal Computer via the same communication port (e.g. COM 1),
this port has to be released when switching between the two software applications
MELSEC MEDOC plus and MAC Programmer.
a Click on the command Release Com Port in the Online menu.
Important: The communication cannot be released when MM+ is running in
monitor mode.

7.3.2 Download parameters


You can specify precisely which objects and source information in your project you
want to download.

Reference Manual MELSEC MEDOC plus


7 – 12 Compiling and Downloading Programs

How to set the download parameters


a Select Transfer Setup in the Online menu, then select Project.
b Select the desired options in the Download Object and Source Information
fields of the dialog box.
Download- e PLC Parameter Downloads only the PLC configuration data to the
Parameters PLC CPU.
e Program Downloads only the compiled program code to the PLC.
e PLC Parameter and Program Downloads both the configuration data and the
compiled program code to the PLC.
Source e Symbolic Downloads the project together with all information, including the
Information POUs not defined in tasks.
e Structure Downloads the project together with all task information. If you
want to upload such a project from the PLC to the computer you can only do
this in MELSEC Instruction List format.
e No Information Downloads only the binary program code to the CPU.
e Drive Before transferring the source data to the MELSEC Q series CPU you
must first specify the drive to be used.
c Confirm your selections with OK.
IMPORTANT: The first time you download a new project it is important to ensure
that the option PLC Parameter and Program is selected.

MELSEC MEDOC plus Reference Manual


Compiling and Downloading Programs 7 – 13

7.3.3 The QnA’s File Structure

How to format and defragment the Q series drive


Before you can use the memory in the MELSEC Q series CPUs you must first format
the corresponding drive. This applies both for the internal RAM and the external
memory cards.
a Select Format Drive in the Online menu. The Format / Defrag dialog box is
displayed.

e Format Selecting this button starts the format procedure.


e Defrag Because of the file structure used in the Q series CPUs it is possible for the
drives to become fragmented after data have been written to the CPU, just as with
a normal hard drive. Selecting the Defrag button executes a procedure that
defragments the contents of the drive for better performance.

Reference Manual MELSEC MEDOC plus


7 – 14 Compiling and Downloading Programs

How to get File Information


a Select File Info in the Online menu. The File Info dialog box displays information
on the memory and the files in the CPU.

Memory use (Internal RAM)


e Size of download data Amount of downloaded data (unit: bytes)
e Available memory Amount of memory available for use (unit: bytes)
e Largest free block Largest free memory block available (unit: bytes)
In case this block is not large enough, use the Defrag option.

Files
e Internal RAM Files stored in internal RAM (Drive 0)
e IC Card A (RAM/ROM) Files in the RAM or ROM of the first memory card
(Drives 1 and 2)
e IC Card B (RAM/ROM) Files in the RAM or ROM of the second memory card
(Drives 3 and 4)
Note: Full details on the file structure used by the MELSEC Q series CPUs can be
found in the CPU manuals.

MELSEC MEDOC plus Reference Manual


Compiling and Downloading Programs 7 – 15

7.3.4 Downloading the Project


When you have checked the port settings and project parameters you can download
your project to the controller.

How to download the project to the PLC


a Select Transfer in the Project menu, then select MEDOC to PLC.
The progress of the download process will be documented in a status window.
Check list before downloading
Has the project been compiled without errors?
Are the port parameters set properly for the transfer?
Are the project parameters set correctly?

7.3.5 Comparing the programs in the PLC CPU and MM+


The Verify function compares the program code stored in the PLC CPU with the code
of the current project compiled by MM+.

Reference Manual MELSEC MEDOC plus


7 – 16 Compiling and Downloading Programs

7.3.6 Online Changes


There are two different ways to make changes to programs when the controller is in
RUN mode:
e Project – Online Program Change This option compiles the modified
program and transfers it to the PLC.
e Online – Online Change Mode Selecting this option compiles changes made
in a program network and transfers it to the PLC.

Werkzeug für den Menübefehl Online - Online-Change-Modus

Important notes:
You should only ever make changes to one contiguous program range in the PLC at a
time, and the range should not be too large. If you want to be absolutely sure that
you are not modifying excessively large sections it is advisable to use Online Change
Mode, as this mode only permits you to make changes to one network at a time.
After every change made to a network the system automatically performs a program
compare and transfers the modification directly to the PLC. This approach ensures
maximum program consistency and security.
In FX0 CPUs you can only change counters and timers when the PLC is in RUN mode.

Code Generation Options


In the Project - Other menu the Code Generation Options command is available.

The file structure used in the CPUs of the MELSEC Q series makes it necessary to
define an additional program range (in units of steps) for online changes when you
are using these controllers.

MELSEC MEDOC plus Reference Manual


Compiling and Downloading Programs 7 – 17

7.4 Exporting
When you perform an import/export both the PLC program data and all the
parameter settings are now imported and exported.

7.4.1 Exporting an MM+ project into an ASCII file


You can export and save the contents of your projects in ASCII format for archiving or
to provide the information to others. The ASCII file contains all the project data and
has the added advantage that it takes up significantly less storage space than the
contents of a complete project directory.

How to export the entire project


a Select the command Other in the Project menu, then select Export.
A dialog box is displayed.
b Enter the name for the ASCII file.
c Click on the OK button.
The progress of the export process is documented in a status window.

How to export individual objects


a Select the objects in Project Navigator you wish to export.
b Select the command Export in the Object menu.
A dialog box is displayed.
c Enter the name for the ASCII file.
d Click on the OK button.
The progress of the export process is documented in a status window.

7.4.2 Export to EPROM


This function stores an ASCII file in Motorola format which can then be used to
program PLC EPROMS with a standard EPROM programmer. Every line in the ASCII file
contains the corresponding hardware address and values. The Export to EPROM
command is in the Other submenu of the Project menu.

Reference Manual MELSEC MEDOC plus


7 – 18 Compiling and Downloading Programs

7.5 Importing
When you perform an import/export both the PLC program data and all the
parameter settings are now imported and exported.
MM+ provides a number of data import functions, which are listed briefly below.
Importing Programs from Files
Import an MM+ ASCII file
(Project - Other - Import) (Object - Import)

Import a MELSEC print file


(Tools - Import MEDOC Network)

Importing Programs from the PLC CPU


Symbolic Upload: Upload the project from the PLC CPU, together with all graphical
information (Project - Transfer - PLC to MEDOC (Symbolic))

MELSEC Upload: Upload the project from the PLC CPU in a MELSEC network
(Project - Transfer - PLC to MEDOC (MELSEC))

7.5.1 Importing MM+ ASCII files


A project saved as an ASCII file can be imported selectively. If you do not create a new
project before performing the import the selected objects are added to those in the
current project. This applies for all POUs, the tasks, DUTs and the global variables. The
import function only works on ASCII files saved with the MM+ Export function!
Note: You must first create an export file before you can perform an import, of
course.

How to import the entire project


a Select the command Other in the Project menu, then select Import.
A dialog box is displayed.
b Select the desired ASCII file.
c Click on the OK button.
The progress of the import process is documented in a status window.

MELSEC MEDOC plus Reference Manual


Compiling and Downloading Programs 7 – 19

How to import individual objects


a Select the command Import in the Object menu.
A dialog box is displayed in which you can select the objects that you wish to
import into the new or existing project.

b Mark the check boxes of the objects you wish to import.


– Data Types (Data Unit Types DUTs)
– Data Units (Global Data Unit Types DUTs)
– POUs
– Global Variables
– Tasks
– User Objects
c Click on the OK button.
A dialog box is displayed.
d Select the desired ASCII file.
e Click on the OK button.
The progress of the import process is documented in a status window.

Reference Manual MELSEC MEDOC plus


7 – 20 Compiling and Downloading Programs

7.5.2 Importing MELSEC MEDOC print files


Print files generated by MELSEC MEDOC (DOS version) can be loaded into IEC or
MELSEC Instruction Lists as MELSEC networks. The POU into which you wish to load
the file must be open. Please note that performing this import procedure
automatically overwrites the contents of the first network in the body!

How to import MELSEC MEDOC print files


In MELSEC MEDOC (DOS version):
a Select a file name as the printer port. The extension TMP is added to the file name
automatically.
b Select only the Instruction List and Name List in the program listing. Make sure
that the header is switched off!
c Start the print procedure.
In MELSEC MEDOC plus:
d Open the body of a MELSEC Instruction List or create a new MELSEC Instruction
List POU. This new POU must be a Program (PRG).
e Select New Network in the Edit menu, then select MELSEC Before from the
submenu displayed.
f Select Import MELSEC Network in the Tools menu.
g In the dialog box displayed specify the drive and directory where the import file is
stored and select the import file (TMP). Confirm your selection with OK. An option
box is opened.
MM+ checks whether the specified file is a valid import file, and whether it
contains program code and symbolic names. The default settings displayed in the
option box depend on the results of this check. For example, if no symbolic names
are found this option will be displayed in light grey and is not selectable.
h Confirm the selections with OK.
The progress of the import process is documented in a status window.

MELSEC MEDOC plus Reference Manual


Compiling and Downloading Programs 7 – 21

Options e MELSEC Program Import only the program code lines of the Instruction List.
e MELSEC Symbolic Names Import only the Name List. The entries from the list
are inserted both in the global variables declaration table and in the header of the
POU. Comments after relays and data registers are converted into symbolic names
and imported as comments. When this conversion is performed spaces, quotes
and periods are either deleted or replaced with underline characters in accordance
with the IEC standard.
The translation of the symbolic names can result in duplicate names for some
variables. If this happens the following dialog box is displayed:

The first two entries show the name of the existing variable and the name that the
program proposes to use to overwrite this variable.
Buttons e Replace Replace the old variable name with the new one.
e Repl. all Replace all existing variable names with new names. If you select this
button the program will replace all subsequent variables without prompting.
e Skip Skip this variable name without replacing it. The name is also not added to
the Variable List.
e Skip all Skip all variables with duplicate names and do not add any of them to
the Variable List. If you select this button the program will skip all subsequent
duplicate variables without prompting.

Reference Manual MELSEC MEDOC plus


7 – 22 Compiling and Downloading Programs

7.5.3 Symbolic Upload


When you perform a Symbolic Upload all the graphical and structural information
from the PLC CPU is uploaded, in addition to the binary code.

How to upload binary and symbolic data from the CPU


a Select Transfer in the Project menu, then select PLC to MEDOC (Symbolic).
b The upload must be stored in a new project. Enter the name of the new project to
be created in the dialog box displayed.
c Confirm your entry with OK.
d Select a PLC type and confirm with OK.
e A dialog box is displayed showing a selection of ports for the transfer procedure:
– CPU Port
– Computer Link (AJ71C24)
– MELSECNET (A7BDE)
– MELSECNET10 (A7BDE)
– Ethernet
f Select the appropriate port for your configuration and confirm with OK.
The progress of the import procedure is documented in a status window.

MELSEC MEDOC plus Reference Manual


Compiling and Downloading Programs 7 – 23

7.5.4 MELSEC Upload


The MELSEC Upload function reads the binary code from the PLC CPU and creates a
POU in MELSEC IL language with the standard name PRG_MAIN and a task with the
standard name MELSEC_MAIN.

How to upload binary project code from the CPU


a Select Transfer in the Project menu, then select PLC to MEDOC (MELSEC).
b Select the PLC type and confirm with OK.
c The binary upload must be stored in a new project. Enter the name of the new
project to be created in the dialog box displayed.
d Confirm your entry with OK.
e A dialog box is displayed showing a selection of ports for the transfer procedure:
– CPU Port
– Computer Link (AJ71C24)
– MELSECNET (A7BDE)
– MELSECNET10 (A7BDE)
– Ethernet
f Select the appropriate port for your configuration and confirm with OK.
The progress of the import procedure is documented in a status window.

Reference Manual MELSEC MEDOC plus


7 – 24 Compiling and Downloading Programs

7.5.5 Absolute Label


Absolute labels are used as jump destinations when PLC programs are uploaded in
MM+. Absolute labels are specific pointer addresses (e.g. P20). Every program section
identified with a pointer in the original PLC program is loaded to a separate MELSEC
network.
The absolute label is P_20

Absolute labels can also be assigned by the user, but you must be very careful to use
the correct syntax. Only addresses with the format P – underline – address are
interpreted as absolute labels.
P_20 Reference to pointer P20 (absolute label)
P20 Reference to a free pointer P** (not an absolute label)
Note: The labels with the format LAB_20 generated when you import MELSEC
MEDOC print files are not absolute labels!

MELSEC MEDOC plus Reference Manual


Compiling and Downloading Programs 7 – 25

Reference Manual MELSEC MEDOC plus


7 – 26 Compiling and Downloading Programs

MELSEC MEDOC plus Reference Manual


Diagnostics Functions and Online Operation 8 – 1

8 Diagnostics Functions and Online Operation

8.1 Debugging
The functions in the Debug menu make it possible to perform precise troubleshooting
and error analysis on your progress. In addition to standard aids such as breakpoints
and step program execution mode you can also perform a very detailed analysis of
program behaviour with the Sampling Trace and Status Latch functions.

8.1.1 Breakpoints
You can set exactly one breakpoint in any POU within a task. Program execution will
then stop at this point. You can also delete breakpoints and reset them at other points
in the program. Breakpoints allow you to perform checks at precise program execution
points.
In networks the breakpoint is always set at the beginning of the selected network.
Note: You can only set breakpoints in a compiled project, and the POU in which you
set the breakpoint must be integrated in a task.

How to set breakpoints


a Switch to Online mode by activating Monitor Mode in the Online menu or
clicking on the monitor mode icon:
Tool for activating the monitor mode

b Select Start Monitoring in the Online menu.


c In the Program POU, select the network in which you wish to insert the
breakpoint.
d Select Set Breakpoint in the Debug menu. The network is highlighted in a
different colour.

8.1.2 Step Mode


In Step mode the PLC program is executed one step at a time, halting after each step.
This function enables you to precisely check program execution and the contents of
each operand/device.

Reference Manual MELSEC MEDOC plus


8 – 2 Diagnostics Functions and Online Operation

The PLC must be switched to Step Run mode for Step mode execution to be possible.
IMPORTANT: In the IEC editors the code is optimised for the PLC CPU selected. This
means that Step mode program behaviour is different from that in MELSEC
Instruction List. In the MELSEC editor the position highlight jumps from one program
line to the next. In the IEC editors program lines or even entire networks can be
skipped.

How to execute programs in Step mode


a Open the POU you wish to execute in Step mode.
b Switch the PLC to Step Run mode.
c Activate the Monitor Mode in the Online menu.
d Select Start Monitoring in the Online menu.
e Select Step in the Debug menu.
A coloured highlight marks the current program line. Pressing the n key steps to the
next program step.

8.1.3 The Freeze Function


The Freeze option makes it possible to stop (‘freeze’) program execution with a bit
device. The PLC must be in Step Run mode for the Freeze function to be possible.

e Device ON Program execution is stopped as soon as the signal on the bit device
is on.
e Device OFF Program execution is stopped when there is no signal on the bit
device.

MELSEC MEDOC plus Reference Manual


Diagnostics Functions and Online Operation 8 – 3

8.2 PLC System Error Check

8.2.1 System errors


If a system error occurs MM+ outputs the corresponding error code. You can obtain
additional information on the error message by selecting the Help button.

8.2.2 User-defined errors


Error flags combined with an error location program make it possible to display errors
that occur in the course of the process. If an error is encountered an error flag (F) is
set, together with a special relay (M) to indicate the presence of an error condition.

Special relay M9009 is used to register the presence of a set error flag.
Special register D9009 stores the first set address of the error flag.
Special register D9124: F0 – F127 are programmed in the MELSEC network with
the OUT function.

The text for the error messages must be stored in the error file USER_ERR.TXT in the
current project’s directory.

How to create an error messages file


a Open the Windows Notepad editor (you can also use any other editor that saves
files in ASCII format without formatting codes).
b Create a new file.
c Enter the error messages, one message per line.
Syntax
F0; Text1
F1; Text2
You must enter a space between the semicolon and the text of the error message.
d Store the file as USER_ERR.TXT in the current project’s directory.

Reference Manual MELSEC MEDOC plus


8 – 4 Diagnostics Functions and Online Operation

8.2.3 Hardware Diagnostics


Selecting HW Diagnosis in the Debug menu shows all hardware errors registered.
e M9000 Fuse blown. This relay is set as soon as a blown fuse is registered in one
or more modules in the system. The relay will remain set even after you switch
back to normal status. (Does not apply for A2C CPUs.)
e M9002 I/O module verify error.
e M9005 Mains power drop. The relay is set after a power drop of no more than
20 ms. You can reset the relay after switching the power supply off and on again.
e M9006 Battery low. The voltage of the retentive memory battery has dropped
below the minimum level. This flag is reset when the battery is replaced.
e M9007 Battery low (latch relay). The voltage of the retentive memory battery has
dropped below the minimum level. This flag is reset when the battery is replaced.
e M9026 Clock data error. Set in the event of incorrect clock data (registers D9025 –
D9028). (Only for AnN/AnS CPUs.)
Hardware errors are indicated by cross symbols instead of minus signs on the
corresponding buttons. Clicking on a button with a cross displays context-sensitive
help for that error.
Note: You will find detailed descriptions and information on special relays and
special registers in the controller manuals.

MELSEC MEDOC plus Reference Manual


Diagnostics Functions and Online Operation 8 – 5

8.2.4 Scan
The Scan command in the Debug menu provides a statistical display of the scan time
performance of the program in the PLC CPU.
The program execution cycle periods can vary depending on status conditions, e.g.
whether inputs are polled during the cycle or not. The PLC CPU logs the following
scan times:
e Actual Scan Time The current program cycle time (special register D9018 in the A
series; D8010 in the FX series)
e Minimal Scan Time The last minimum scan time saved (special register D9017 in
the A series; D8011 in the FX series)
e Maximal Scan Time The last maximum scan time saved (special register D9019 in
the A series; D8012 in the FX series)

8.3 The Device Editor


The device editor is a tool for displaying and editing the contents of the PLC-CPU’s
word and bit devices. The main element of the device editor is a table that is very
similar to a Microsoft Excel worksheet, both in its appearance and in the way it is used.
You can read the values from the CPU to the table, and after editing them you can
then write the new values back to the CPU. Additionally, you can also write the table
contents to an external file and load external files for editing. These files are stored in
Excel 4.0 format, which makes it possible to edit them with Microsoft’s Excel
spreadsheet program as well.
Maximum table size is 16,383 lines and 255 columns, which means it can handle a
total of 4,177,665 cells. Effectively, the number of bit and word devices you can load
to the table is only restricted by the amount of available memory on your computer.
Warning prompts are displayed before all operations that alter table ranges, before
critical operations (e.g. writing to CPU inputs) and before you close the device editor.

Reference Manual MELSEC MEDOC plus


8 – 6 Diagnostics Functions and Online Operation

8.3.1 The worksheet


The Device Editor option in the Debug menu opens the Device Edit window, which
contains the worksheet table in which all editing actions are performed.
B A

The leftmost column of the table B contains the first of a consecutive sequence of
devices. Each series of devices is displayed across a table line C; the numbers of the
devices following the first device are obtained by adding the values shown at the
heads of the column A. The values of the devices are contained in the individual table
cells D.
The current display mode E of the selected cell is shown underlined. The display
mode is set in the pop-up menu (right mouse button).
Commands can be accessed by clicking on the buttons F or with the pop-up menu,
which can by displayed by clicking with the right mouse button or pressing ju.

MELSEC MEDOC plus Reference Manual


Diagnostics Functions and Online Operation 8 – 7

8.3.2 Buttons
e Read from PLC Reads the values of word and bit devices (registers) from the PLC.
You can choose to read either the entire table or a selected table range.
e Write to PLC Writes the table values to the PLC’s word and bit devices (registers).
You can write either the entire table or a selected table range.
Selected Devices: Read/write only the devices selected in
the table.

All Devices: Read/write all the registers in the table.

e Read from File Loads an external file stored in Excel 4.0 format.
e Write to File Writes the MM+ device table data to an external file in Excel 4.0
format.

IMPORTANT: The device table settings are not stored with the MM+ project. They
are lost irrevocably when you close the Device Edit window. If you want to access
the data again later you should always save the table to a file before closing the edit
window.

8.3.3 The pop-up menu


To display the pop-up menu click with the right mouse button or press ju.

Reference Manual MELSEC MEDOC plus


8 – 8 Diagnostics Functions and Online Operation

e Cut Copies the contents of selected cells to the clipboard and deletes them from
the table (bX)
e Copy Copies the contents of selected cells to the clipboard (bC)
e Paste Pastes the content of the clipboard to the table (bV)
e Paste Text Opens a dialog box in which you can enter ASCII text to paste to the
table. ASCII characters are only displayed in the table in the ASC display mode. You
cannot enter more characters than the selected device can store. A data register
can only store two ASCII characters, for example. You can enter more characters by
selecting several cells (i.e. a series of registers) and entering ASCII text.
e Insert Devices Displays this dialog box:
Device: List of the available devices for
selection.

All: Selects the entire range of devices


for insertion in the table.
Adresses: Allows specification of a
specific address range.

Display Mode: Specifies the display


mode for the new registers

e Delete Devices Deletes the selected device or device range. A prompt is displayed
asking for confirmation before the delete operation is executed.
e Find Device Searches for specific devices. You can select the search direction.
e Find Value You can also search for a specific value in a device register. Again, you
can specify the search direction.
e Replace Value Search and replace function for replacing device register values.
e Display Mode Displays this dialog box:

MELSEC MEDOC plus Reference Manual


Diagnostics Functions and Online Operation 8 – 9

Display Mode: Mode for displaying the selected devices

Register: Selects 16 or 32 bit register display.

e Options Displays the following dialog box in which you can set the basic options
for the table structure:

Number of Columns
Automatic: 8 rows for octal registers, 10 rows for decimal registers, 16 rows for hex
registers
Input Number: You can enter a value between 1 an 255.
Number of Rows
Maximum Number (16383): Sets the rows to the maximum of 16,383 rows.
Input Number: You can enter a value between 1 and 16,383.
Use Colors
When this check box is selected the table is displayed using different colors.
Additional Safety Inquiry
When this check box is selected the system displays an additional prompt asking
for confirmation for some critical operations.

Reference Manual MELSEC MEDOC plus


8 – 10 Diagnostics Functions and Online Operation

Inserting devices with the Insert Devices dialog box


Open the Device Edit window and select the top left cell of the table.
a Click with the right mouse button to open the pop-up menu.
b Click on Insert Devices with the left mouse button to display the Insert Devices
dialog box.
c Select the device type, address range and display mode, then click on OK.
Data registers D

Address range: D12 – D16

Display mode: Decimal

The devices are inserted in the table. Initially, all the devices are given a default
value of 0.
Devices D12 – D16
have been inserted
in the table.

D12 D13 D14 D15 D16

MELSEC MEDOC plus Reference Manual


Diagnostics Functions and Online Operation 8 – 11

Inserting devices directly


Open the Device Edit window.
a Click in any cell in a free line. All the cells in the line must be empty!
b Enter the device. The system automatically switches to editing mode when you
make an entry. MM+ only accepts valid entries. If you make an incorrect entry
editing mode will remain active.
The inserted device is then displayed in the leftmost table column.
Note: When you enter registers directly you can only store one register in a line; the
remaining cells in the line are disabled and cannot be selected.

Entering device values


a Select the cell where you want to enter the value.
b Enter the new value. The system switches to editing mode automatically when you
make an entry. MM+ only accepts valid entries. If you make an incorrect entry
editing mode will remain active.
Note: Double-clicking on a bit device (or pressing k) toggles the value of the
device between 0 and 1. Double-clicking on a word device activates editing mode.

Entering 32-bit values


A 32-bit value is stored in two 16-bit registers.
a Select the first of the two table cells.
b Hold down the j key and extend the selection to include the second cell using
the mouse or cursor key. Both cells now have a bold outline and the second cell is
shaded.
c Press bM to select the Display Mode dialog box from the pop-up menu.
d Select the 32-bit option in the Registers field.
e Click on OK to link the two selected cells.
e Enter a 32-bit value in the cell. MM+ will only accept valid entries.
Note: You can use the standard Windows mouse actions and key combinations in
the device table. Special key combinations are listed in the Appendix of this manual.

Reference Manual MELSEC MEDOC plus


8 – 12 Diagnostics Functions and Online Operation

8.3.4 Editing tables in Microsoft Excel


Entries in
Excel

D12 – D16
X5 – X9

Changing device designations


a Overwrite the entry in D12 in leftmost colum, e.g. by entering D24.
The line now contains the five data registers D24 – D28.

Adding devices to a line


a Select the cell in column +5 and enter the value to be contained by the new
register D17.
b Click with the right mouse button to open the pop-up menu and select the
Number Format option.
c Select the appropriate number format from the list in the dialog box.
The number formats in Excel correspond to the display mode in MM+. These
formats are represented by a fixed number of spaces and the @ character:

BIN: 1 space
OKT: 4 spaces
DEZ: No spaces
HEX: 2 spaces
ASC: 3 spaces

Note: Setting the correct number format (i.e. the right display mode) is absolutely
essential when you add new devices in an Excel table that you plan to reload in MM+
later!

MELSEC MEDOC plus Reference Manual


Diagnostics Functions and Online Operation 8 – 13

8.4 The Monitor Function


The Monitor function enables you to follow program execution and to check the
status of operands/devices in runtime. The data for Monitor mode can be read from:
The PLC itself, or
A Status Latch

To be able to use the Status Latch, you must first read and latch the data.
MM+ supports three different monitoring modes:
Program Monitor
Entry Data Monitor
Header Monitor
Link Monitor (see page 5-12)

Note: When a monitoring mode is activated all off MM+’s editing functions are
disabled.

8.4.1 Monitor Mode Options


In the Extras - Options menu you can specify options for the monitor mode.

e Displayed String Length Displaying long strings significantly reduces


performance in monitoring mode. It is thus advisable to limit the number of
characters to be displayed.
e Pollrate Interval at which the monitor polls the CPU, expressed in ms.

Reference Manual MELSEC MEDOC plus


8 – 14 Diagnostics Functions and Online Operation

8.4.2 The Online Toolbar


You can display an additional toolbar for online operations in monitoring mode.

The tools are described in the Appendix C.

How to display the online toolbar


a Select Extras - Options - Editing and activate the Online Toolbar option.

8.4.3 The Program Monitor


In the text and graphical editors the values of all visible variables are displayed in the
editing window, and they are updated after every program scan. The variables shown
are always those lying within the current editing window pane. If you scroll the
contents of the window or change its size the system automatically shows the values
of all new variables that come into the window, and stops displaying the values of all
variables that move out of the window.
Inputs and outputs that are set are displayed in the colours corresponding to the
colour parameter settings.
When you start monitoring in the Sequential Function Chart editor the active Steps in
the current window are shown in the colours set in the parameters. This enables you
to follow which Step is currently active.

How to open the Program Monitor window


a Switch to Online mode by activating Monitor Mode in the Online menu or
clicking on the monitor mode icon:
Tool for activating the monitor mode

b Open and select the body of the POU that you wish to switch to monitoring
mode.
c Select Start Monitoring in the Online menu.

MELSEC MEDOC plus Reference Manual


Diagnostics Functions and Online Operation 8 – 15

Active inputs and outputs are identified in colour.

Register D100 takes the value 255 of the base-8


literal.

In addition to Program POUs you can also use the Program Monitor for function
blocks and functions. When you activate monitoring for the operand status of
function blocks MM+ first prompts you to specify the Instance of the function block
for which you wish to activate the Program Monitor.
In the body of the program there is a
signal on the inputs and outputs of
Log_Add_1, which is an instance of
function block FB_1.

Log_Add_2 (an instance of function


block FB_1) has no signals on its I/Os
...

... as a result, no signals are


displayed for the devices of fucntion
block FB_1 in Monitor mode.

In Monitor mode, there would be


signals in the devices In_1, In_2 and
Out_1 of FB_1.

How to stop the Program Monitor window


a Activate the command Stop Monitoring in the Online menu.

Reference Manual MELSEC MEDOC plus


8 – 16 Diagnostics Functions and Online Operation

8.4.4 The Entry Data Monitor (EDM) and the Header Monitor
The Entry Data Monitor can be used to group objects from the open project in order
to obtain a display of their current status. Several windows can be opened at once.
The Header Monitor essentially offers all the functions available in the Entry Data
Monitor. The only difference, albeit an important one, is that calling up the Header
Monitor automatically displays the objects of the active POU.
The status of the following objects can be monitored in the Entry Data Monitor:
Global and Local Variables, POUs and Tasks.
The central element of the Data Entry Monitor is a table which the user can configure
himself.
The values in the table can be read from the CPU and also written back to the CPU
after editing. There is also the possibility of writing the table, i.e. the grouped objects,
and the configuration of the table into an external file, or of reading the data from an
external file.
The table is restricted to a maximum of 16,383 rows and 255 columns. This means
that a total of 4,177,655 cells can be managed. The number of objects in the table is
limited only by the available memory on your computer.
A security function is available to prevent data being written into the CPU.
The worksheet
In the Online menu, the Entry Data Monitor command calls up the EDM window.

MELSEC MEDOC plus Reference Manual


Diagnostics Functions and Online Operation 8 – 17

Note: The commands in the Edit and Tools menus can also be called up via the
pop-up menu. The pop-up menu appears if you press the right-hand mouse button
or press the key combination ju.

The Edit menu


The following commands are available in the Edit menu when the window of the Data
Entry Monitor is active:
e Insert Object A selection window appears containing all the objects available in
the current project.
e Next Object The object following the currently selected object is inserted. If the
selection marker is positioned on an Array entry, the next element of this Array is
inserted. If the selection marker is positioned on a numbered entry, the element
with the next number is inserted. In all other cases, the object with the next
consecutive address is inserted. This command is only available if the selected row
contains an elementary object and the selected object is not a sub-object.
e Insert Row A new row is inserted in front of the selected row. As the EDM does
not offer copy and paste operations, you cannot insert several rows at once.
e Delete Rows The selected row is deleted. You can also delete several rows at
once. This command is only available if the first object selected and the object
after the last object selected are not sub-objects.
e Delete All All entries in the table and the table configuration are deleted. You are
asked to confirm the command before it is executed.
e Close The EDM window is closed. All information is automatically saved. The
information concerning the current settings is stored in the MMP.INI file and is
loaded as the default when the EDM is next called up.

Reference Manual MELSEC MEDOC plus


8 – 18 Diagnostics Functions and Online Operation

The Tools menu


The following commands are available in the Tools menu when the window of the
Entry Data Monitor is active:
e Read from PLC The data are read from the PLC and displayed in the EDM table.
This command is only available in Offline mode.
e Write to PLC The data from the EDM table are written to the PLC. A dialog
window appears which allows you to choose whether only the selected objects or
all objects are to be transmitted. This command is only available in Offline mode.
e Read from File The file previously created with the Write to File command is
called up. This command is only available in Offline mode.
e Write to File Both the grouped objects and the configuration of the table can be
saved in an external file. This file has the file extension EDM. This command is only
available in Offline mode.
e Setup The Setup dialog window is opened, in which the EDM table can be
configured and the security function activated.
The columns for the EDM table
are compiled in the consecutive
rows.

MELSEC MEDOC plus Reference Manual


Diagnostics Functions and Online Operation 8 – 19

The pop-up menu for configuring the table


The Shortcut menu appears if you select the desired row and click on the right-hand
mouse button or press the key combination ju.
e Field list The Field List contains the possible column entries for the EDM table.

e Insert row A new row is inserted in front of the selected row.


e Delete row The selected row is deleted.
e Delete All All entries are deleted. You are asked to confirm your choice before the
command is executed.
The buttons for configuring the table
e Close The dialog window is closed. The settings are saved.
e Cancel The operation is aborted. The settings are not saved.
e Read Setup The file previously created with the Write Setup is called up.
e Write Setup The table configuration can be stored in an external file. This file is
given the extension SED.
e Password The password for the security function is defined here.
e Security on/off A security function is available to prevent data being written into
the CPU. The security function can be switched on or off. You are prompted for
the password.

Reference Manual MELSEC MEDOC plus


8 – 20 Diagnostics Functions and Online Operation

How to open the Entry Data Monitor or the Header Monitor


a Activate the Monitor Mode command in the Online menu.
b Select the POU to be switched to Monitor Mode.
c Select the Entry Data Monitor or Header Monitor command in the Online
menu. The dialog window containing the EDM table appears.

How to insert an object


a Select any cell in the desired row. A selected cell is indicated by the double border.
(If the Name or Address column is selected, you can now enter the name or
address directly.)
b Select the Insert Object command from the Edit menu or from the pop-up menu.
c Select the desired object and click on OK. You can also select several objects in the
list - consecutively or selectively. You also have the possibility of transferring the
entire list of Global Variables, as well as the entire POU and Task pool.

How to insert a 32-bit register


a As an IEC address: Enter the corresponding address in the Address (IEC) column,
e.g. %MD0.0.

As a MITSUBISHI address: Enter the two contiguous MITSUBISHI addresses in the


Name column, e.g. D3+D4.

How to change the values of the objects


a Select the desired values column.

In the case of bit operands: You can switch between the two possible entries (0
and 1) by double-clicking or pressing the SPACE key.

In the case of word operands: Activate the Edit Mode (mouse click or m). Enter
the desired value. MM+ only accepts valid entries. Pay attention to the correct
format (decimal, octal, etc.). The Edit Mode remains active in the event of an
incorrect entry.

MELSEC MEDOC plus Reference Manual


Diagnostics Functions and Online Operation 8 – 21

How to open and close a structure


The word Structure in the Type column indicates a tree structure. If a tree structure is
open, all the associated variables of the POU are displayed.
a Select the Name cell in the row containing a structure.
b Closing an open structure: The open structure is indicated by a minus sign in front
of the name. Double-click on the Name cell or press the b- key combination. This
closes the tree structure.

Opening a closed structure: The closed structure is indicated by a plus sign in front
of the name. Double-click on the Name cell or press the b+ key combination.
This opens the tree structure.

Open
structure

Closed
structure

Reference Manual MELSEC MEDOC plus


8 – 22 Diagnostics Functions and Online Operation

Arrays in the Entry Data Monitor


You can enter arrays in the Entry Data Monitor. All elements of the array can be read,
written and set.
If the array is large it may not be possible to display all its elements on the screen at
the same time. You can set the default number of elements to display to a maximum
of 50 with the option Extras - Options - General - Array Elements To Show.
You can also change this value in the prompt dialog that is displayed when you open
an array in the Entry Data Monitor.

The entry in the Lower Bound field specifies the first array element to be displayed.

MELSEC MEDOC plus Reference Manual


Diagnostics Functions and Online Operation 8 – 23

8.5 Status Latch


Note: Status Latch is only supported by the A series PLC CPUs. In the AnA/AnU
series online mode Status Latch is only possible for the extended file registers! With
the AnN CPUs the Status Latch is defined in the parameters (➞ page 5-3).

Status Latch provides a ‘snapshot’ of the current register contents.


You can make detailed specifications of the data to be latched. In contrast to the
Sampling Trace function, Status Latch allows you to store all variables, not just the
word and bit devices. The down side of this is that Status Latch can only provide a
momentary snapshot of program status, not a continuous dynamic picture.
Even so, the ability to provide a full representation of device status and to specify the
exact time at which the Status Latch is to be performed in the program make this
feature very useful for debugging and troubleshooting.

How to take a ‘snapshot’ of current program


status and write it to the CPUs latch range
a Program an SLT instruction in the Program POU.
b Transfer the program to the PLC CPU.
c Select Status Latch in the Debug menu.
d Enter the device range to be latched in the dialog box. Bit register ranges must be
entered in multiples of 16.
e Select Write Parameters to write the parameters to the PLC CPU.
f Read Values reads the values from the PLC CPU.

Reference Manual MELSEC MEDOC plus


8 – 24 Diagnostics Functions and Online Operation

Device range e Add Adds the selected device range to the list box.
e Change Changes the selected device range in the list box, replacing it with the
new values in the entry fields.
e Delete Deletes the selected device range in the list box.
e Clear List Deletes all the devices ranges in the list box.
Latched data e Block No. The latched data are written into the file registers R. Enter the block
number. Only relevant for AnA/AnU series.
e Write Parameter Writes the device ranges in the list to the PLC CPU.
e Read Values Reads the device range values from the PLC as soon as the SLT
instruction is executed in the program. The dialog box is closed as soon as all the
values have been read out.
e Save Saves the device range configuration.
This command stores all the device range entries in the list to a configuration file.
These configuration files are given the extension SLT.
e Load Loads a previously saved SLT configuration file.
This command enables you to load SLT configuration files saved with the Save
command into the list box. This feature is particularly useful with long lists of
devices, as it means you only have to enter them once. The ranges of the loaded
list can then be written directly to the PLC CPU.
e Monitor latch/Stop Monitor The latch monitor shows the current latch status of
the PLC CPU. If there are no values in the register memory the message Not
completed is displayed. If the latch values have already been read in the message
Completed is displayed.

MELSEC MEDOC plus Reference Manual


Diagnostics Functions and Online Operation 8 – 25

How to read out the Status Latch values


a Drop down the Online menu and make sure that the system is in Monitoring
Mode.
b Also in the Online menu, check that the setting Monitor from Status Latch is
activated.
You can now use all the monitoring tools that are normally available in the PLC
monitoring modes:
Program Monitor
Entry Data Monitor
Monitor Header

8.6 Sampling Trace


Sampling Trace performs one bit and word sample per program scan cycle, or at
user-defined intervals.

8.6.1 A Series
Note: This function is only available with series A PLCs if the PLC program contains
the STRA instruction. Before you can repeat the Sampling Trace you must also reset
the STRA condition with the STRAR instruction.
With the AnN CPUs the Sampling Trace function has to be defined in the parameters
(➞ page 5-3).

You can sample up to 16 bit devices and 10 word devices at defined intervals or during
each program cycle. The results can be displayed in several windows as trend curves,
using different colours.
This function makes it possible to provide a clear visualisation of errors that cannot be
followed in monitoring mode, thus simplifying error analysis. For example, you can
generate breakdowns of fast processes or follow the behaviour of the specified
devices at high speed.

Reference Manual MELSEC MEDOC plus


8 – 26 Diagnostics Functions and Online Operation

How to perform a Sampling Trace


a Program the STRA and STRAR instructions in the Program POU.
b Transfer the program to the PLC CPU.
c In the Debug menu, select Sampling Trace.
d Enter the bit and word devices to be latched in the dialog box displayed.
e Define the Sampling Mode.
f Specify the Sampling Scale.
h Select the Download Define button.
i Select the Activate Sampl. button.
j Select the Read Result button.
k Select the View Result button.

Defining the sampling data

Sampling Mode e per Scan Cyclical sampling once every program scan.
e per Time Interval Sampling at defined time intervals.

MELSEC MEDOC plus Reference Manual


Diagnostics Functions and Online Operation 8 – 27

e Scan Time Scan time interval definition. The maximum value you can enter is
200, corresponding to an interval of 2,000 ms (10 ms units). This means that data
are written to the Sampling Trace memory every 2 seconds. If you enter a value of
‘0’ in this field the data are written after every program cycle.

Sampling Scale e Total Number Definition of the total scope of the Sampling Trace data. The
maximum value is 1,024.
e Times after [STRA] On Number of data to be registered after the STRA
instruction is set. The effective Sampling Trace is equal to the total number minus
the number of data defined after the STRA instruction.

Sampled data e Ext. R Block Number The sampled data are written into the extended file
registers R. Enter the block number. Only relevant for AnA series.
Buttons e Download Define Downloads the list of defined bit and word devices to the PLC.
e Activate/Deactivate Sampl. Activates/deactivates sampling.
This button is used to start the Sampling Trace procedure at the beginning of a
session, opening a monitor window. No data are actually available until the STRA
instruction has been executed, however. Once STRA has been executed, the
storage of the Sampling Trace begins. Once this procedure has been completed
the message Data available is displayed.
e Read Result Reads out the Sampling Trace values from the PLC CPU.
e View Result Displays the curves for the Sampling Trace data.
e Define Window Allows you to define the curve characteristics for the devices to
be displayed.
e Monitor sampl. /Stop Monitor Displays the same monitor window that is
displayed when you select the Activate Sampl. button. If a sample has already
been written the data is displayed in the window. The STRAR instruction can be
used to rewrite the Sampling Trace register range.
e Load Load a previously stored Sampling Trace configuration.
You can store your curve and device parameters in a configuration file that can
then be reloaded with this command (➞ Save button).
e Save Save Sampling Trace configuration to file.
Saves the current Sampling Trace configuration to a file, together with the list of all
defined devices and the curve definitions. These files are given the extension SAM.

Reference Manual MELSEC MEDOC plus


8 – 28 Diagnostics Functions and Online Operation

How to define a sampling curve


a Select Define Window in the Sampling Trace Define dialog box. This opens the
Sampling Window Defines dialog box.

e Add Add a new sampling curve.


e Delete Delete a defined sampling curve.
To be able to delete a curve you must first select the corresponding entry in the
list.
e Edit Edit a sampling curve definition.
To be able to edit a curve definition you must first select the corresponding
entry in the list.
e Colour Settings Colour settings for the curve window.
These colour settings do not affect the curve line itself.
b Select the Add button. This opens a dialog box in which you can enter a name for
the curve.
c Confirm with OK. This opens another dialog box in which you can define the curve
parameters.
Note: Every defined curve window is displayed on the screen. The number of curves
you can display clearly depends on the size of your computer monitor.

MELSEC MEDOC plus Reference Manual


Diagnostics Functions and Online Operation 8 – 29

Range Setting e Minimum Smallest curve value to be displayed.


e Maximum Largest curve value to be displayed.
e Scaling Scale units for the curve display.
e Height Relative height of the curve display.
Device Lists The source list is displayed on the left, containing all devices defined. The target list
on the right contains the devices to be used for the curve to be displayed.
e >> Copy from source list to target list.
Select the device to be copied in the source list, then select this button.
e << Copy from target list back to source list.
In the target list, select the device you wish to return to the source list and then
select this button.
Buttons e Curve Colour Define the colours of the curves.
To be able to define the curve colours you must first select the corresponding
device in the target list. Selecting the button then displays the standard
Windows colour settings dialog box. Select the desired colour for the device,
then confirm with OK. The colour selections are shown to the right of the
device entries in the target list.
d When you have made all the necessary entries, confirm each dialog field with OK.

Reference Manual MELSEC MEDOC plus


8 – 30 Diagnostics Functions and Online Operation

How to display the Sampling Trace results


Check List
Have you entered all devices correctly?
Have you made the entries for the curve definitions?
Have you transferred the data to the PLC with Download Define?
Are the data available in the PLC (Monitor Sampl.)?

a Select the View Result button in the Sampling Trace Define dialog box.
A window is opened displaying the defined curves, showing the development of the
values of the devices assigned to them.

The progress of the Sample is shown on the horizontal axis. The vertical axis shows
the value range set under Range Settings in the curve definition. You can scroll the
contents of the window with the horizontal and vertical scrollbars. The button
labelled 1 marks a dotted line showing the current values of the devices on the
defined curves. The device names and their current values are displayed to the left of
the curve windows. Moving the dotted line with the button updates the value displays
of the devices.

MELSEC MEDOC plus Reference Manual


Diagnostics Functions and Online Operation 8 – 31

How to shift the value marker line


Scrolling the window contents with the scrollbar does not move the dotted value line
into the new window pane. You can drag the line past the edges of the window with
the 1 button.
a Position the mouse pointer on the button.
b Press and hold down the left mouse button.
c Drag the line in the desired direction.

8.6.2 FX Series
The FX CPU does not need a STRA instruction for Sampling Trace. Accordingly, the
Sampling Trace Define dialog box contains two additional options for these
controllers, Bit Mask and Mask Edge. Bit Mask is used to enter an input device.
Mask Edge defines whether the signal for the Sampling Trace is to be triggered on the
rising edge, falling edge or by both rising and falling edge (undefined).
All the other options in the dialog box are the same as those for the A Series.

Reference Manual MELSEC MEDOC plus


8 – 32 Diagnostics Functions and Online Operation

MELSEC MEDOC plus Reference Manual


APPENDIX

Reference Manual MELSEC MEDOC plus


MELSEC MEDOC plus Reference Manual
Glossary A– 1

A Glossary
Absolute address
A variable’s absolute address references a fixed memory location in the CPU or a physical input or
output. This absolute address can be assigned using either IEC syntax (IEC address) or MITSUBISHI
syntax (MITSUBISHI address). The user must only assign absolute addresses for the global variables.
The program assigns suitable memory locations for the local variables automatically.
Absolute Label
Absolute labels are the addresses of specific pointers in the PLC program (e.g. P20). When PLC
programs are uploaded to MM+ absolute labels are assigned as jump instruction destinations. Every
program section identified by a pointer in the original PLC program is loaded in a separate MELSEC
network. You can also use absolute labels (Syntax: P_20) when you assign your own names to
networks.
Accumulator
The accumulator is a result handling facility used in IEC Instruction List. You may be familiar with it
from other high-level programming languages. The result of every operation performed is written
to the accumulator directly after execution. The accumulator thus always contains the result of the
last instruction programmed. This means that you do not have to program any input conditions
(execution conditions) for the operations, as execution is always dependent on the contents of the
accumulator.
Action
An action is allocated to every step in an SFC sequence. These actions can be Boolean output
variables or PLC programs.
Action Pool
When you write a POU in Sequential Function Chart language the action pool is displayed in the
Project Navigator window as an entry in that POU. The Action Pool contains all the actions
belonging to the program organisation unit.
Actual parameters
Functions and function blocks have two kinds of parameters: Formal parameters and actual
parameters. The formal parameters are the variables used when you create a function or a function
block. The actual parameters are the variables or values passed to the function or function block
instance when they are used in another program organisation unit.
’Adapted’ MELSEC instructions
‘Adapted’ MELSEC instructions are MITSUBISHI ELECTRIC instructions with a special modified
nomenclature (e.g. BMULTI_M, PLUS_M, FLOAT_MD) for use in the IEC editor. They always have the
suffix _M for ‘MELSEC’ or _MD for ‘MELSEC Dedicated instruction’. All the ‘adapted’ MELSEC
instructions are stored in the Manufacturer Library. These instructions can only be used in the IEC
editor (➞ Appendix E).
Array
Arrays are derived data types, consisting of fields of one kind of variable. You can define arrays with
up to three dimensions.
AutoConnect mode
The Autoconnect mode is a special editing mode used in the graphical editors (➞ Chapter 3).
Body
Program organisation units (POUs) always consist of a header and a body. The body contains the
actual PLC program code.

Reference Manual MELSEC MEDOC plus


A – 2 Glossary

Breakpoint
Breakpoints are a debugging aid. You can set a breakpoint at any point in a program organisation
unit. The execution of the PLC program will then automatically stop at this point.
Class
The class is specified in the declaration table to define the way variables are to be used in the
project. The following classes are supported: VAR, VAR_CONSTANT, VAR_INPUT, VAR_OUTPUT,
VAR_IN_OUT, VAR_EXTERNAL, VAR_EXTERNAL_CONSTANT, VAR_GLOBAL and
VAR_GLOBAL_CONSTANT.
Comment
You can enter and store explanatory comment texts for all objects used in MM+.
Compiling
When you compile a project MM+ translates the program into code that can be read and executed
directly by the PLC.
Computer link module
One of the several ways of connecting the PLC to your personal computer is with a MITSUBISHI
ELECTRIC computer link module. Computer link modules available from MITSUBISHI ELECTRIC
include the following models: AJ71C21, AJ71UC24, A1SJ71C24-R2.
Continue condition
➞ ‘Transition condition’
Controller instruction
PLC programs written in Instruction List language consist of a series of controller instructions. Each
controller instruction contains an operator, i.e. the programming instruction, and an operand, i.e.
the variable.
CPU interface
You can connect the PLC to your personal computer via the CPU interface, which is located on the
PLC unit.
Data type
The data type of a variable defines the number of bits it contains, how they are processed and the
variable’s value range. The following data types are available: BOOL, INT, DINT, WORD, DWORD,
TIME, REAL, ARRAY, STRING.
Data Unit Type
The Data Unit Type (DUT) is a structured data type. It contains a collection of variables.
Declaration table
Declaration tables are lists used for managing and declaring both global and local variables.
Device Editor
The device editor allows you to display and edit the contents of the PLC CPU’s bit and word devices
(registers). The central element of the device editor is a table that is very similar to a Microsoft Excel
worksheet, both in its appearance and in the way it is used.
Dialog box
A dialog box is a special kind of window used for handling dialogs with the user. They can contain
a number of different elements, including fields for entering data, check boxes or radio buttons for
selecting options and messages containing important warnings or information. Dialog boxes are
displayed at many different points in the program, for example when you select menu commands
followed by three periods (e.g. Open...).
Download
Transfer process from MM+ to the PLC

MELSEC MEDOC plus Reference Manual


Glossary A– 3

DUT Pool
The DUT Pool is one of the standard entries in the Project Navigator window (DUT_Pool). It
contains all the Data Unit Types used in the project.
Edit mode
When you are editing the body of a POU you can choose between Select mode and Edit mode. In
Edit mode you can perform actions on selected program elements (e.g. move, overwrite, delete etc).
Editing area
The editing window for working on the body of a POU is divided into two main areas, the network
bar and the editing area. The editing area is where you enter the component elements of your
program.
Editor
The MM+ editors are program modules used for writing and editing programs in the supported
programming languages. The editors are displayed as separate windows on the screen. MM+
includes text, graphical, IEC and MELSEC editors.
EN input
In addition to their input and output variables, some function blocks also have a Boolean input (EN
= ENable) and a Boolean output (ENO = ENable Out). The status of the ENO output always
corresponds to the current status of the EN input.
ENO output
➞ ‘EN input’
Entry Data Monitor
MM+ supports a variety of different monitoring modes: Program Monitor, Entry Data Monitor and
Header Monitor. In the Entry Data Monitor mode the program displays the status of a user-defined
list of variables. The variables in this list can be displayed in any order.
Ethernet card
One of the several ways of connecting the PLC to your personal computer is via an Ethernet
network. To do this, you must then have an Ethernet card in your PC and connect it to the
MITSUBISHI ELECTRIC Ethernet module.
Final step
The final step is the last step in an SFC sequence.
Formal parameters
➞ ‘Actual parameters’
Function
The function is a program organisation unit (POU) with the class ‘Function’ (FUN). It can be used in
the same way as a normal programming instruction. When they are executed, functions deliver
precisely one output variable. Functions do not store any internal status data. This means that all a
function’s internal variables are always set to 0. When a function is called with the same input
parameters it thus always delivers the same output value.
Function block
The function block is a program organisation unit (POU) with the class ‘Function Block’ (FB). It can
be used in the same way as a normal programming instruction. Function blocks deliver one or more
output variables when they are executed. All the values of the output variables and the internal
variables are stored in the function block following execution. This means that function blocks do
not necessarily always deliver the same output values when they are called again with the same
input parameters. Function blocks can only be called in the form of instances. Be careful not to
confuse these function blocks with the graphical function blocks used in the Function Block and
Ladder Diagram language!!

Reference Manual MELSEC MEDOC plus


A – 4 Glossary

Function Block Diagram


Function Block Diagram (FBD) is a programming language. Programming instructions are displayed
as graphical blocks which are connected with horizontal and vertical interconnect lines. Be careful
not to confuse these graphical function blocks with the Function Block (FB) program organisation
units!!
Function blocks in the graphical editors
In the graphical editors most programming instructions are displayed as graphical blocks in the
editing screen. These graphical blocks are sometimes referred to as ‘function blocks’. Be very
careful not to confuse these blocks with the Function Block program organisation units!!
Global variable
Global variables have fixed hardware addresses (absolute addresses). They are declared ‘globally’
for the entire project and can be referenced from all function block (FB) and program (PRG)
program organisation units by declaring them in the header as VAR_EXTERNAL. They make it
possible to exchange data between the individual program modules that make up the project. The
global variables are also included as a standard entry in the Project Navigator window, Global_Vars.
Graphic macro
You can define any selected section of a PLC program as a graphic macro. Macros are a useful
construct when you need to use the same piece of code several times at different points in your
PLC program. Graphic macros are only supported in the graphical editors.
Graphical editor
The following programming languages use graphical editors, which are used in the same way as a
standard graphics drawing program: Ladder Diagram (LD), Function Block Diagram (FBD) and
Sequential Function Chart (SFC).
Header
Program organisation units (POUs) always consist of a header and a body. The header contains the
declarations of all the variables used in the POU, which are organised in a declaration table.
Header Monitor
MM+ supports a variety of different monitoring modes: Program Monitor, Entry Data Monitor and
Header Monitor. Header Monitor mode is fundamentally the same as Entry Data Monitor mode.
However, in addition to the user-defined list of variables the monitor also always displays the
variables of the active program organisation unit.
Identifier
The identifier is the name allocated to a variable that serves as its symbolic address.
IEC address
The IEC address assigns a fixed memory location to a global variable. The syntax of IEC addressing
is defined in the IEC 1131.3 standard. Examples: %IX0 (input X0) , %MW0.450 (data register D450).
IEC editor
The IEC editor is used for programming in the IEC 1131.3 programming languages.
IEC function
➞ ‘Programming instructions’
IEC function block
➞ ‘Programming instructions’
IEC Instruction List
MM+ supports both IEC Instruction List language and MELSEC Instruction List. In IEC Instruction
List the program is written according to the IEC 1131.3 standard, using only the instructions from
the IEC standard library. However, if you need to do so you can insert MELSEC networks in
programs written in IEC Instruction List.
IEC operator
➞ ‘Programming instructions’

MELSEC MEDOC plus Reference Manual


Glossary A– 5

IEC programming instruction


➞ ‘Programming instructions’
Initial step
The initial step is the first step in an SFC sequence.
Initialisation file
SC.INI is the ‘initialisation file’ for MM+. It is stored in the Windows directory and contains all the
parameters necessary for initialising the MM+ program when it is started.
Input variable
➞ ‘Output variable’
Installation program
The installation program INSTALL.EXE copies the contents of the MM+ program distribution disks
to your hard disk and sets the program up for your hardware configuration.
Instance
An instance is a copy of a function block. Function blocks can only be called in the form of
instances. Instances are created by declaring them in the headers of program organisation units,
and they are called in the body of the POU. Special programming instructions are provided for
calling instances.
It is also possible to create global function block instances. These global instances can be used in
different program organisation units.
Instructions
➞ ‘Programming instructions’, ‘Controller instructions’
Instruction List
Instruction List is a programming language. MM+ supports two Instruction List variants, IEC
Instruction List and MELSEC Instruction List. An Instruction List program consists of a list of
controller instructions.
Interconnect mode
Interconnect mode is a special editing mode in the Ladder Diagram editor, with functionality similar
to a line-drawing tool in a graphics program. In Interconnect mode you connect programming
elements by drawing horizontal and vertical lines between them.
Interface card
One of the several ways of connecting the PLC to your personal computer is with the A7BDE
interface card from MITSUBISHI ELECTRIC. This is an expansion card which must be installed in your
computer. (Not yet supported)
Jump entry point
The jump entry point is the point in an SFC sequence to which a jump is to be performed (i.e. the
jump label).
Jump exit point
The jump exit point is the point in an SFC sequence from which a jump is to be performed (i.e. the
position of the jump instruction).
Jump instruction
Jump instructions are used to execute a branch from the current POU to another network. In the
graphical editors the jump instruction is implemented as a tool. In IEC Instruction List jumps are
programmed with the JMP operator.
Label
The word ‘Label’ is automatically displayed as a dummy variable when you are programming jump
instructions in the graphical editors. It must be overwritten with the designator of the actual jump
entry point or destination (➞ absolute label, network label, system label)

Reference Manual MELSEC MEDOC plus


A – 6 Glossary

Ladder Diagram
Ladder Diagram is a programming language. The programming elements are contacts (inputs), coils
(outputs) and programming instructions which are displayed as graphical blocks. These elements
are connected to make circuits using horizontal and vertical interconnect lines. The circuits always
start at the power bar on the left.
Library
There are three types of libraries: Standard Library, Manufacturer Library and User Library.
Local variables
Local variables are only accessible within the program organisation units in which they are declared.
They are declared in the POU header.
Macro step
In an SFC sequence a macro step is a step that in turn contains another complete SFC sequence.
Manufacturer Library
The Manufacturer Library (Manufacturer_Lib) contains the ‘adapted’ MELSEC programming
instructions, with a special nomenclature for use in the IEC editor (➞ ‘Programming Instructions’ in
the appendix).
MELSEC editor
The MELSEC editor is used for editing MELSEC Instruction Lists and MELSEC networks.
MELSEC Instruction List
MM+ supports both IEC Instruction List language and MELSEC Instruction List language. MELSEC
Instruction List programs only contain MELSEC networks.
MELSEC network
MELSEC networks are programmed according to the DIN 19239 standard, using only the ‘pure’
MELSEC instructions.
MELSEC programming instructions
➞ ‘Programming instructions’
MELSEC upload
The MELSEC upload procedure loads a program into MM+ from the PLC unit. Only the binary data
is read in when this process is carried out.
MITSUBISHI address
The MITSUBISHI address is used to assign a fixed memory location to a global variable. Examples:
X0, M1024.
Monitoring mode
MM+ supports a variety of different monitoring modes: Program Monitor, Entry Data Monitor and
Header Monitor.
Network
A network is a logically continuous program section within a program organisation unit.
Network bar
The editing window in which you work on the body of a POU is divided into the network bar and
the editing area. The network bar is used for making the network label and title assignments.
Network label
The network label is the name assigned to a network. It can be used as the destination address for
jump instructions in PLC programs.
Network list
The network list contains all the networks in a program organisation unit, along with their network
labels and titles.

MELSEC MEDOC plus Reference Manual


Glossary A– 7

Network title
The network title is a brief description of the network. It is optional, and it is not displayed in the
network bar.
Null modem cable
➞ ‘RS-232 cable’
Object
MM+ uses the following objects: The IEC Standard Library (Standard_Lib), the Manufacturer Library
(Manufacturer_Lib), the PLC Parameter (PLC_Parameter), the Task Pool (Task_Pool), the Data Unit
Type Pool (DUT_Pool), the Global Variables (Global_Vars) and the POU Pool (POU_Pool). These
objects are all displayed as standard entries in the Project Navigator window.
Object window
Object windows contain the data of selected objects (e.g. the declaration table for the global
variables or a task’s table).
Output variable
Function blocks have input and output variables. The input variables give the function block the
values it uses to perform its programmed operations. The output variables pass the results of these
operations out of the function block.
PLC Parameter
The PLC parameter (PLC_Parameter) is one of the standard entries in the Project Navigator window.
It contains the user-editable parameters of the connected PLC system.
POU Pool
The POU Pool is one of the standard entries displayed in the Project Navigator window (POU_Pool).
It contains all the program organisation units used in the project.
Power bar
In the Ladder Diagram graphical editor all circuits start at the vertical power bar on the left of the
editing area. This bar is sometimes also referred to as the rail.
Program
1) Program = An application program (e.g. MM+);
2) Program = A PLC program, consisting of a series of programming instructions;
3) Program = A program organisation unit classed as a ‘Program’ (PRG). Program POUs can only be
executed in tasks.
Program class
The program class of a POU defines its functionality. You can declare POUs as Programs (PRG),
Function Blocks (FB) or Functions (FUN).
Program group
The Windows Program Manager organises programs in groups called ‘program groups’. Each group
can contain a large number of individual programs (i.e. application programs). The MM+ installation
program automatically creates a program group for MM+ containing the MM+ program icon.
Program Monitor
MM+ supports a variety of different monitoring modes: Program Monitor, Entry Data Monitor and
Header Monitor. You can activate the Program Monitor mode in all the editors. This monitor
displays the values and switching statuses of the variables visible in the current editor window.
Program organisation unit
Program organisation units (POUs) can be regarded as subprograms or program modules. There are
three different POU classes, defined by their functionality: Programs (PRG), Function Blocks (FB) and
Functions (FUN). Every POU consists of a header and a body.

Programming elements

Reference Manual MELSEC MEDOC plus


A – 8 Glossary

Examples of programming elements in the graphical editors include contacts, function blocks,
interconnect lines and variable connections.
Programming instructions
MM+ supports the following groups of programming instructions: IEC programming instructions,
MELSEC programming instructions and user programming instructions (➞ ‘Programming
Instructions’ in the appendix).
Programming language
MM+ supports the following programming languages for writing PLC programs: Instruction List (IL),
Ladder Diagram (LD), Function Block Diagram (FBD), Sequential Function Chart (SFC).
Project
The project is the element at the top of the MM+ object hierarchy. It is equivalent to a PLC system.
Project name
The project name is actually the name of a subdirectory. This subdirectory contains all the individual
files that form the components of a project.
Project Navigator
The Project Navigator is the control centre of MM+. It is used to administrate all the objects that go
to make up a project. It is displayed on the screen as a separate window, the Project Navigator
window.
Project Navigator tree
The entries in the Project Navigator window are arranged using a hierarchical tree structure. Some
of the levels can be expanded and collapsed to display or hide further levels of the tree hierarchy.
Project Navigator window
All the objects contained in a project are listed in the Project Navigator window. This window is
opened on the left hand side of the screen as soon as you create or open a project. It always
contains the following standard entries: Standard_Lib, Manufacturer_Lib, PLC_Parameter, Task_Pool,
DUT_Pool, Global_Vars and POU_Pool.
’Pure’ MELSEC Instructions
The ‘pure’ MELSEC instructions are the original MITSUBISHI MELSEC instructions with the standard
nomenclature (e.g. AND=, +, FLOAT). These instructions are only supported in the MELSEC editor
(➞ ‘Programming Instructions’ in the appendix).
Return instruction
The Return instruction effects a return from a function block to the point in the program from
where the function block was called. In the graphical editors the Return instruction is implemented
as a tool. In the IEC Instruction List editor returns are implemented with the RET operator.
RS-232 cable
An RS-232 cable wired as a null modem cable is required for connecting the personal computer to
a computer link module.
Select mode
When you are working in the programming editors you can choose between Select mode and Edit
mode. In Select mode the mouse pointer is displayed as an arrow with which you can select the
various programming elements.
Sequence
Sequences are written with the Sequential Function Chart language (SFC). An SFC sequence
consists of steps, actions, transitions and transition conditions. Both parallel and selective branching
are supported in sequences.

Sequential Function Chart Language

MELSEC MEDOC plus Reference Manual


Glossary A– 9

Sequential Function Chart is a programming language in which steps are linked together with
conditions referred to as continue conditions. The elements of the SFC language are steps, actions,
transitions and transition conditions.
SFC sequence
➞ ‘Sequence’
Signal configuration
You can set the following signal configuration parameters for the input and output variables of a
function block and the input contacts and output coils used in the Ladder Diagram language: Poll
for signal status 0 or 1, set and reset.
Standard Library
The Standard Library (Standard_Lib) contains the standard IEC functions (e.g. INT_TO_BOOL) and
function blocks (e.g. R_TRIG).
Status bar
The status bar displayed at the bottom of the screen shows information on the current status of
the project. You can configure the status bar to suit your personal requirements.
Step
Sequences in the SFC language always consist of several steps connected by transitions. An action
is assigned to each step in the sequence.
Step mode
Step mode execution is a debugging aid. In this mode, the program is executed one step at a time.
Please note that the connected PLC system must be switched to step run mode when you use this
option.
STRING
A STRING data type contains characters.
System Label
The system labels (pointers) are system variables that MM+ needs for internal management of the
project. A maximum of 256 system labels are supported. One system label is needed for each of
the following elements: every instance of a function block, every user-defined function, every
event-triggered task, every network label.
Task
A task contains one or more program organisation units of the class ‘Program’ (PRG). The task
controls the execution of its component POUs. Tasks can be event-triggered, interval-triggered or
priority-triggered.
Task Pool
The Task Pool (Task_Pool) is one of the standard entries in the Project Navigator window. It contains
all the tasks defined in the project.
Text editor
The text editor is used for writing and editing Instruction List programs. Its functionality is similar to
that of a standard word processor.
Toolbar
The toolbar displays icons with which the most-used menu commands can be selected directly by
clicking with the mouse.
Transition
Transitions connect steps in SFC language sequences. Each transition is allocated a transition
condition, i.e. a continue condition that controls how and when control is passed to the next step
in the sequence.

Transition condition

Reference Manual MELSEC MEDOC plus


A – 10 Glossary

A transition condition is a PLC program. It is executed when the preceding SFC step is completed,
and if the condition is satisfied control is passed to the next step in the sequence.
Upload
Transfer process from the PLC to MM+
User library
A user library gives you the possibility of creating functions and program segments which can be
used on a supra-project basis. The program segments are grouped in a library and can be used in
any project. Following updating, changes made to the library can be applied to other projects. A
user library can contain all the objects that are also available in a project: Global Variables List,
Structured Data Types, Arrays and Program Organisation Units. You can assign a password to
protect the know-how in the library. The name of the user library file has the file extension SUL.
User programming instructions
Programming instructions written by the user. ➞ ‘Programming instructions’.
Variable
Variables can be compared with operands. They contain the values of inputs, outputs or internal
memory locations in the PLC. MM+ makes a distinction between global and local variables.
Variables are declared and administered in declaration tables; they are defined with a class, an
identifier, an absolute address (global variables only) and a data type.
Wizard
The Wizard is a special aid that can be activated and deactivated by editing the initialisation file
SC.INI. When the Wizard is activated the program can automatically generate a program
organisation unit and a task for you when you create a new project.

MELSEC MEDOC plus Reference Manual


Keyboard Commands B – 1

B Keyboard Commands

B.1 MM+ Menu Keys


Key(s) Functions
a Activate/deactivate the Menu Bar
u Activate/deactivate the Menu Bar
x Move through Menu Bar to the right (MM+ menus and Windows control menu)
z Move through Menu Bar to the left (MM+ menus and Windows control menu)
k When Menu Bar activated: Open Windows control menu
A - Z When Menu Bar or menu activated: Select corresponding menu or menu
option/command (e.g. L for Online)
e Activate highlighted menu or menu option/command
w Move highlight up through menu options
y Move highlight down through menu options
^ Exit menu/selection
ao Quit MELSEC MEDOC plus (Project - Quit)
l Activate Help system
ae Switch to next application program
a| Switch to previously-selected application program
b ^ Open Task List (list of all application programs currently running)

Reference Manual MELSEC MEDOC plus


B – 2 Keyboard Commands

B.2 Project Navigator Keys


Key(s) Function
w Move highlight up through Project Navigator Window
y Move highlight down through Project Navigator Window
x Scroll window contents to the right
z Scroll window contents to the left
{ Page window contents up one screen
} Page window contents down one screen
b+ Display lower tree levels of selected entry (Tools - Expand)
+ : numerical key
b- Hide lower tree levels of selected entry (Tools - Collapse)
- : numerical key
bX Cut selected entry and copy to the clipboard (not available for all entries!)
(Edit - Cut)
bC Copy selected entry to clipboard (not available for all entries!) (Edit - Copy)
bV Paste data from the clipboard to highlight position (Edit - Paste)
c Delete selected entry (not available for all entries!) (Edit - Delete)
e Open object window or dialog box of selected entry (Object - Open)
bo Close Project Navigator Window (i.e. close project) (Project- Close)

MELSEC MEDOC plus Reference Manual


Keyboard Commands B – 3

B.3 Object Window Keys


Key(s) Function
b| Step through all opened windows
bq Switch to next window
bjq Switch to previous window
{ Page window contents one screen up
} Page window contents one screen down
b{ Scroll window contents to the left
b} Scroll window contents to the right
a- Open the Windows control menu of the active window
bo Close the active window (Object - Close)
bjT Arrange all opened windows side by side (Window - Tile)
w 1) Move pointer up in window
2) Following selection of Move (Size) in the control menu: Move window up (resize
window)
y 1) Move pointer down in window
2) Following selection of Move (Size) in control menu: Move window down (resize
window)
x 1) Move pointer right in window
2) Following selection of Move (Size) in control menu: Move window right (resize
window)
z 1) Move pointer left in window
2) Following selection of Move (Size) in control menu: Move window left (resize
window)
e 1) Storing the new window position or window size
2) In Project Navigator Window: Open the object window or dialog box of the
selected entry
bS Save object (Object - Save)
aC Check object (Object - Check)
bP Print object (Object - Print)
ae View object information (Object - Information)

Reference Manual MELSEC MEDOC plus


B – 4 Keyboard Commands

B.4 Dialog Box Keys


Key(s) Function
aq Move to next dialog box
ajq Move to previous dialog box
a Activate/deactivate control menu button
u Activate/deactivate control menu button
| Step through options from top to bottom / from left to right
j| Step through options from bottom to top / from right to left
aA - Z Execute option (e.g. L for Latch Range)
e 1) Control menu button selected: Open control menu
2) Option selected: Execute option (often the same as clicking the OK! button)
3) List box: Activate selected element
ao Close dialog box (often the same as selecting the Cancel! button)
^ Close dialog box (often the same as selecting the Cancel! button)
xz Step through options
wy 1) Step through options
2) List box: Page list up/down one screen at a time
ó 1) List box: Move to first list element
2) Text box: Move to first character
d 1) List box: Move to last list element
2) Text box: Move to last character
k 1) List box: Activate/deactivate list element
2) Activate/deactivate check boxes

MELSEC MEDOC plus Reference Manual


Keyboard Commands B – 5

B.5 Table Keys


Key(s) Function
w Move up one line at a time
y Move down one line at a time
x Move right one cell at a time
z Move left one cell at a time
{ Page window contents up one screen at a time
} Page window contents down one screen at a time
ó 1) Move to cell in the first column
2) Editing mode: Move to first character in the cell
d 1) Move to cell in the last column
2) Editing mode: Move to last character in the cell
| Step through all cells from left to right
j| Step through all cells from right to left
bó Move highlight to beginning of table
bd Move highlight to end of table
jw Extend or reverse continuous selection up one line at a time
jy Extend or reverse continuous selection down one line at a time
jó Select current line
jd Select current line
jbó Select all lines from the first line to the current line
jbd Select all lines from the current line to the last line
ay Open dialog box or list box of a selected cell containing an arrow symbol
k Activate editing mode in the current cell
e Deactivate editing mode in the current cell
c 1) Delete selected range
2) Editing mode: Delete character to right of cursor (Edit - Delete)
BACKSPACE 1) Delete selected range
2) Editing mode: Delete character to left of cursor
bX Cut selected range and copy to clipboard (Edit - Cut)
bC Copy selected range to clipboard (Edit - Copy)
bV Paste data from clipboard to current position (Edit - Paste)
je 1) From any cell: Move to first column of the next line
2) From any cell in the last line: Insert a new line
aBACKSPACE Undo the last command (not supported for all operations!) (Edit - Undo)
bBACKSPACE Undo the last Undo command (not supported for all operations!) (Edit - Redo)
an Find (Edit - Find)
n Find Next (Edit - Find Next)

Reference Manual MELSEC MEDOC plus


B – 6 Keyboard Commands

Key(s) Function
b + First cell in the line is marked by a - sign: Display all lines in the comment column
+ : numerical key (Tools - Expand declaration)
b - First cell in the line is marked by a + sign: Display only one line in the comment
- : numerical key column (Tools - Collapse declaration)

MELSEC MEDOC plus Reference Manual


Keyboard Commands B – 7

B.6 Device Editor Keys


Key (s) Function
w Move up one cell
y Move down one cell
x Move right one cell
z Move left one cell
bw Move to top of current data range
by Move to bottom of current data range
bx Move to right edge of current data range
bz Move to left edge of current data range
{ Page up
} Page down
b{ Page left
b} Page right
ó Select cell in first column of current row
d Select cell in last column of current row
bó Select cell in first column of first row (top left)
bd Select cell in last column of last row (bottom right)
| Step through all cells from left to right
j| Step through all cells from right to left
e Step down through all cells
je Step up through all cells
jw Extend or cancel selection upwards one line at a time
jy Extend or cancel selection downwards one line at a time
jx Extend or cancel selection right one cell at a time
jz Extend or cancel selection left one cell at a time
bjw Extend or cancel selection to top of current data range
bjy Extend or cancel selection to bottom of current data range
bjx Extend or cancel selection to right edge of current data range
bjz Extend or cancel selection to left edge of current data range
j{ Extend or cancel selection up one page
j} Extend or cancel selection down one page
bj{ Extend or cancel selection left one page
bj} Extend or cancel selection right one page
jó Extend or cancel selection to beginning of current line
jd Extend or cancel selection to end of current line
bjó Extend or cancel selection to first column in first line (top left)
bjd Extend or cancel selection to last column in last line (bottom right)

Reference Manual MELSEC MEDOC plus


B – 8 Keyboard Commands

Key (s) Function


jk Select current line
bk Select current column
bjk Select entire table
bA Select entire table
c Delete selected range
bX Cut selected range to clipboard
bC Copy selected range to clipboard
bV Paste contents of clipboard
bh Copy selected range to clipboard
jh Paste contents of clipboard
jc Cut selected range to clipboard
m Activate editing mode for selected cell
BACKSPACE Clear contents of selected cell and activate editing mode
be Terminate editing mode
^ Abort editing mode
k Toggle value of selected bit device between 0 and 1

MELSEC MEDOC plus Reference Manual


Keyboard Commands B – 9

B.7 Instruction List Editor Keys


Key(s) Function
aT E Activate editing mode (Tools - Edit Network)
aT D Activate Select mode (Tools - End Edit)
wyxz 1) Select mode: Move cursor/pointer in window
2) Editing mode: Scroll through Instruction List
e 1) Select mode - Pointer on network bar: Open dialog box for entry of network
labels and titles
2) Editing mode: Select/enter new line
k 2x Select mode - pointer on network bar: Open dialog box for assigning network label
and title
k 1) Select mode - pointer on network bar: Activate network
2) Select mode - cursor/pointer in editing window: Activate editing mode
kwy Pointer on bottom border line of network bar: Change size of network area
kxz Pointer on column dividing line: Change column width
| 1) Line without text: Select next column
2) Line with text: Move text to next column
m 1) Cursor/pointer in first column: Open programming instructions list
2) Cursor/pointer in second column: Open variables list
{ Page window contents up one screen
} Page window contents down one screen
b{ Scroll window contents to the right
b} Scroll window contents to the left
ó Move to first character in the line
d Move to last character in the line
bó Move to beginning of Instruction List
bd Move to end of Instruction List
jx Extend or reverse selection to the right one character at a time
jz Extend or reverse selection to the left one character at a time
jw Extend or reverse selection up one line at a time
jy Extend or reverse selection down one line at a time
jbó Select all lines from the first line to the current line
jbd Select all lines from the current line to the last line
c 1) Delete selected range
2) Delete character to right of cursor (Edit - Delete)
BACKSPACE 1) Delete selected range
2) Delete character left of cursor
bX Cut selected range and copy to clipboard (Edit - Cut)
bC Copy selected range to clipboard (Edit - Copy)
bV Paste data from clipboard to current position (Edit - Paste)

Reference Manual MELSEC MEDOC plus


B – 10 Keyboard Commands

Key(s) Function
an Find (Edit - Find)
n Find Next (Edit - Find Next)
aBACKSPACE Undo last command (not supported for all operations!) (Edit - Undo)
bBACKSPACE Undo last Undo command (not supported for all operations!) (Edit - Redo)
aA Insert a new network after the current network (Edit - New Network - After)
aB Insert new network before the current network (Edit - New Network - Before)

MELSEC MEDOC plus Reference Manual


Keyboard Commands B – 11

B.8 Graphical Editor Keys


Key(s) Function
bA Activate Select mode (Tools - Select Mode)
bT Activate Interconnect mode (draw lines) (Tools - Interconnect Mode)
wyxz Move pointer
k(2x) 1) Pointer on network bar: Open dialog box for entering network labels and titles
2) Pointer on a contact: Open dialog box for signal configuration F"Helvetica"P10
e Pointer on network bar: Open dialog box to assign network label and title
kwy Pointer on lower border of network bar: Change size of network area
{ Page window contents up by one screen
} Page window contents down by one screen
b{ Scroll window contents to the right
b} Scroll window contents to the left
k 1) Select programming element
2) Select network bar
3) Activate editing mode to overwrite the dummy names Var and Label
m 1) Editing mode for overwriting dummy variable name Var: Open list of variables
2) Open list of programming instructions
kwxyz 1) Move selected programming element
2) Following selection of Tools - Open Row/Column: Increase row/column spacing
3) Following selection of Tools - Comment: Draw a comment box
4) Interconnect mode: Draw interconnect lines
kwxyz Select a continuous group of program elements
jwxyz Select several program elements individually
c 1) Delete selected range
2) Delete character right of cursor (Edit - Delete)
BACKSPACE Delete character left of cursor
bX Cut selected range and copy to clipboard (Edit - Cut)
bC Copy selected range to clipboard (Edit - Copy)
bV Paste data from clipboard to current position (Edit - Paste)
an Find (Edit - Find)
n Find Next (Edit - Find Next)
aBACKSPACE Undo last command (not supported for all operations!) (Edit - Undo)
bBACKSPACE Undo last Undo command (not supported for all operations!) (Edit - Redo)
bN Insert input contact (Tools - Contact)
bL Insert output coil (Tools - Coil)
bJ Insert jump instruction (Tools - Jump)
bR Insert return instruction (Tools - Return)
bI Insert input variable (Tools - Input Variable)
bO Insert output variable (Tools - Output Variable)

Reference Manual MELSEC MEDOC plus


B – 12 Keyboard Commands

Key(s) Function
bG Draw horizontal line segment (Tools - Horizontal Line Segment)
bE Draw vertical line segment (Tools - Vertical Line Segment)
bF Insert programming instruction (Function Block) (Tools - Function Block)
bW Increase horizontal spacing (Tools - Open Row)
bU Increase vertical spacing (Tools - Open Column)
a1 Insert graphic macro 1 (Tools - Custom 1)
a2 Insert graphic macro 2 (Tools - Custom 2)
a3 Insert graphic macro 3 (Tools - Custom 3)
a4 Insert graphic macro 4 (Tools - Custom 4)
a5 Insert graphic macro 5 (Tools - Custom 5)
aA Insert new network after the current network (Edit - New Network - After)
aB Insert new network before the current network (Edit - New Network - Before)
| Step through all the variables in the current network forwards, selecting them one
after another.
j| Step through all the variables in the current network backwards, selecting them one
after another.
+ Function block is activated: Increment number of input variables (pins)
(+: numerical key) (Edit - Increment Pins)
- Function block is activated: Decrement number of input variables (pins)
(-: numerical key) (Edit - Decrement Pins)

MELSEC MEDOC plus Reference Manual


Keyboard Commands B – 13

B.9 Sequential Function Chart Editor Keys


Key(s) Function
wyxz Move highlight
bz Highlight on a connection line: Move highlight to the leftmost branch in the row
bx Highlight on a connection line: Move highlight to the rightmost branch in the row
bw Move highlight to the next branch above or to the Initial Step
by Move highlight to next branch below or to the Final Step
jz Extend selection to the element to the left of the highlight
jx Extend the selection to the element to the right of the highlight
jw Extend the selection up one element
jy Extend the selection down one element
jbz Highlight on a connection line: Extend the selection to the leftmost element in the
row
jbx Highlight on a connection line: Extend the selection to the rightmost element in the
row
jbw Extend the selection to the next element above or to the Initial Step
jby Extend the selection to the next element below or to the Final Step
| Move the highlight to the next element
j| Extend the selection to the next element
ó Move the highlight to the first column
d Move the highlight to the last column
bó Move the highlight to the beginning of the program
bd Move the highlight to the end of the program
jó Select all elements between the current highlight position and the left column
jd Select all elements between the current highlight position and the right column
jbó Select all elements between the current highlight position and the beginning of the
program
jbd Select all elements between the current highlight position and the end of the
program
e 1) Highlight on an unnamed Transition or an unnamed Step: Switch to Editing mode
2) Highlight on a named Step: Open window of associated POU
3) Highlight on a Macro Step: Open Macro Program window
^ 1) Undo all selections
c Delete selected elements
{ Page window contents up by one screen
} Page window contents down by one screen
an Find (Edit - Find)
n Find Next (Edit - Find Next)
bU Insert Step/Transition unit at the current position (Edit - Insert - Step/Trans Unit)
bF Insert Step at the current position (Edit - Insert - Step)

Reference Manual MELSEC MEDOC plus


B – 14 Keyboard Commands

Key(s) Function
bT Insert Transition at the current position (Edit - Insert - Transition)
bL Insert left divergence from the current position (Edit - Insert - Lef t Divergence)
bR Insert right divergence from the current position (Edit - Insert - Right Divergence)
jbL Insert left convergence to the current position (Edit - Insert - Lef t Convergence)
jbR Insert right convergence to the current position (Edit - Insert - Right Convergence)
bjJ Insert Label (jump destination/entry step) (Edit - Insert - Label)
bJ Insert Jump (jump/exit step) (Edit - Insert - Jump)
bI Open (zoom) Step, Transition or Macro Program window (Tools - Zoom Into)
bB Undo zoom operation (Tools - Zoom Back)

MELSEC MEDOC plus Reference Manual


Keyboard Commands B – 15

B.10 Keys for Checking and Downloading Programs


Key(s) Function
jaC Compile project (Project - Compile Project)
baW Download project to CPU (Project - Transfer - Medoc -> PLC)
jbD Change program in Online mode operation (Project - Online Prog. Change)
aC Check object (Object - Check)
bs Start program monitoring (Online - Start Monitoring)
as Stop program monitoring (Online - Stop Monitoring)
jas Open monitoring window for variable status of current Header (Online - Monitor
Header)
jbs Open Entry Data Monitor (Online - Entry Data Monitor)
j ^ Activate Monitoring mode (Online - Monitoring Mode)
aS Switch PLC CPU to Start or Stop mode (Online - Start/Stop PLC)
p Go to breakpoint (Debug - Go To Breakpoint)
r Execute program in stop mode, stopping after each step (Debug - Step)
jaE Display contents of system error registers (Debug - System Errors)
aU Associate error messages to error flags (Debug - User Errors)

Reference Manual MELSEC MEDOC plus


B – 16 Keyboard Commands

B.11 Online Help System Keys


Key(s) Function
l Activate Help system
I Contents button
S Search button
Z Back button
R History button
< << button (previous topic)
> >> button (next topic)
a Activate Menu Bar
| Select one of the icons/buttons on the screen
Step through the icons/buttons clockwise
j| Select one of the icons/buttons on the screen
Step through the icons/buttons anticlockwise
b| Select all the icons/buttons on the screen
be Copy the current help topic text to the clipboard
je Copy the clipboard contents to the Annotate dialog box
ao Close the Help window

For more details on using the online Help system select How to use help in the Help
menu.

MELSEC MEDOC plus Reference Manual


Tools C–1

C Tools

C.1 General Tool Icons


Tool Function Menu command Key(s)
Open an existing project Project - Open

Save an opened project Project - Save

Arrange open windows side by side Window - Tile jbT

Arrange open windows overlapping Window - Cascade

Activate Monitoring mode during Online - Monitoring Mode


Online operation

Activate Online Change mode Online - Online-Change


Mode

Start the check routine for the currently Object - Check aC


selected object

Generate the crossreference data base Project - Make


Crossreference

Cut the selected object to the clipboard Edit - Cut bX

Copy the selected object to the Edit - Copy bC


clipboard

Paste object from the clipboard Edit - Paste bV

Reference Manual MELSEC MEDOC plus


C – 2 Tools

C.2 Instruction List Editor Tool Icons


Tool Function Menu command Key(s)
Insert a new network before the Edit - New Network - Before aB
current network

Insert a new network after the current Edit - New Network - After aA
network

Activate Select mode, End Editing mode Tools - End Edit

Activate Editing mode, End Select mode Tools - Edit Network

MELSEC MEDOC plus Reference Manual


Tools C–3

C.3 Ladder Diagram and Function Block Diagram Editor Tool Icons
Tool Function Menu command Key(s)
Insert a new network before the Edit - New Network - Before aB
current network

Insert a new network after the current Edit - New Network - After aA
network

Activate Select mode, End Editing mode Tools - Select Mode bA

Activate Interconnect mode, Line tool Tools - Interconnect Mode bT

Insert input contact (Ladder Diagram Tools - Contact bN


only)

Insert output coil (Ladder Diagram only) Tools - Coil bL

Insert programming instruction Tools - Function Block bF


(Function Block)

Insert input variable Tools - Input Variable bI

Insert output variable Tools - Output Variable bO

Insert Jump instruction Tools - Jump bJ

Insert Return instruction Tools - Return bR

Increase vertical spacing Tools - Open Row bW

Increase horizontal spacing Tools - Open Column bU

Insert comment Tools - Comment

Reference Manual MELSEC MEDOC plus


C – 4 Tools

C.4 Sequential Function Chart Editor Tool Icons


Tool Function Menu command Key(s)
Insert a Step/Transition unit at the Edit - Insert - Step/Trans bU
current position Unit

Insert a Step at the current position Edit - Insert - Step bF

Insert a Transition at the current position Edit - Insert - Transition bT

Insert a left divergence from the current Edit - Insert - Lef t bL


position Divergence

Insert a right divergence from the Edit - Insert - Right bR


current position Divergence

Insert a left convergence to the current Edit - Insert - Lef t jbL


position Convergence

Insert a right convergence to the Edit - Insert - Right jbR


current position Convergence

Insert a Label (entry step/jump Edit - Insert - Label bjJ


destination)

Insert a Jump (exit step jump Edit - Insert - Jump bJ


instruction)

Open (zoom) a Macro Program window Tools - Zoom Macro

Open (zoom) the Action Association Tools - Edit Action


window for the selected Step Association

Open (zoom) the Body of a Step or Tools - Zoom Body


Transition

Open (zoom) a Step, Transition, or Tools - Zoom Into bI


Macro Program window

Undo zoom operation (i.e. close Tools - Zoom Back bB


window)

Find next element Edit - Find Next n

MELSEC MEDOC plus Reference Manual


Tools C–5

C.5 Project Navigator Window Tool Icons


Tool Function Menu command Key(s)
Display lower levels of the Project Tools - Expand a+
Navigator tree

Hide displayed levels of the Project Tools - Collapse a-


Navigator

Create a new Program Organisation Unit Object - New - POU aN

Create a new Data Unit Type Object - New - DUT

Create a new Task Object - New - Task aK

Create a new Action (this icon is only Object - New - Action jaA
enabled when a POU written in
Sequential Function Chart language is
selected)

Reference Manual MELSEC MEDOC plus


C – 6 Tools

C.6 Online (Monitor Mode) Tool Icons


Tool Function Menu command Key(s)
Breakpoint setzen Debug - Set Breakpoint

Breakpoint löschen Debug - Delete Breakpoin

Gehe zum Breakpoint Debug - Got to Breakpoint p

POE-Body aufrufen Debug - Step r

Entry-Data-Monitor öffnen Online - Entry Data Monitor jbs

Sampling Trace Debug - Sampling Trace

Header des aktuellen POE-Bodys Online - Monitor Header jas


monitoren

Monitoren starten im aktuellen Fenster Online - Start Monitoring bs

Monitoren stoppen im aktuellen Online - Stop Monitoring as


POE-Body

MELSEC MEDOC plus Reference Manual


Tools C–7

Reference Manual MELSEC MEDOC plus


Temporary Files D–1

D Temporary Files

D.1 Temporary Files Created when Projects are Compiled


A number of temporary files are created during compilation. These files are normally
deleted when the program is finished with them; if you don’t want them to be
deleted you must start MM+ with the /debug command line option. To do this, add
this option to the MM+ command line in the Program Item Properties dialog box in
the Windows Program Manager:
c:\mmplus\sc.exe /debug.
_tskmain.sic Data of all tasks allocated to the MAIN memory range (stored in a
special format)
_tskmain.out Data of all tasks allocated to the MAIN memory range (special
MELSEC code)
_tskmain.bin Data of all tasks allocated to the MAIN memory range (the
compiled code that is downloaded to the controller)
_tsksub.sic Data of the Task MELSEC_SUB, allocated to the SUB memory range
(stored in a special format)
_tsksub.out Data of the Task MELSEC_SUB, allocated to the SUB memory range
(special MELSEC code)
_tsksub.bin Data of the Task MELSEC_SUB, allocated to the SUB memory range
(the compiled code that is downloaded to the controller)
POUname.sic Data of a specific Program Organisation Unit (stored in a special
format)
POE-Name.out Data of a specific Program Organisation Unit (special MELSEC
code)
POE-Name.bin Data of a specific Program Organisation Unit (the compiled code
that is downloaded to the controller)
_end.sic Data of the END instruction (stored in a special format)
_end.out Data of the END instruction (special MELSEC code)
_end.bin Data of the END instruction (the compiled code that is downloaded to
the controller)
main.map All the data of the program allocated to the MAIN memory range
(compiled structural tree)
sub.map All the data of the program allocated to the SUB memory range
(compiled structural tree)
sfc.map All the data of the program written in Sequential Function Chart
Language (compiled structural tree)

Reference Manual MELSEC MEDOC plus


D – 2 Temporary Files

sfccode.cod Data of the Program Organisation Units that were written in


Sequential Function Chart Language (compiled code)
mmicro.bin Data of the Program Organisation Units that were written in
Sequential Function Chart Language - MELSEC A-Series (compiled code)
build.out, tab.out, rebuild.out, comp.out Compiling data

D.2 Temporary files Created During Downloads


dwl_sym.asc
upl_sym.pac
upl_main.bin
upl_sub.bin
fnw_main.dis
fnw_sub.dis
fnw_imp.asc
task_imp.asc

MELSEC MEDOC plus Reference Manual


Programming Instructions E – 1

E Programming Instructions

Programming Instructions

User-programmed
Programming Instructions
IEC Programming Instructions MELSEC in the form of
IEC Editors Programming Instructions Program Organisation Units (POUs)
IEC Editors

‘Pure’
IEC Operators MELSEC Instructions Functions
(e.g. LD, ST, CAL) MELSEC Editor (Name of the Function POU)
(e.g. +, B*)

‘Adapted’
MELSEC Instructions Function Blocks
IEC Functions (Name of the
IEC Editors
(e.g. INT_TO_BOOL, ROR) Function Block POU)
(e.g. PLUS_M, BMULTI_M,
FLOAT_K_P_MD)

Contents of the Contents of the


Standard Library Manufacturer Library
IEC Function Blocks
(e.g. R_TRIG, F_TRIG)

Standard Library
The standard library contains all the IEC functions and function blocks. Every available
function has a FUN (function) POU, the headers of which you can open and view on
the screen.
Manufacturer Library
The Manufacturer Library contains the ‘adapted’ MELSEC instructions, with a
nomenclature adapted for use in IEC. Every function has a FUN (function) POU, the
headers and bodies of which you can open and view on the screen. With the help of
a special tool you can also add your own POUs to the Manufacturer Library. These
POUs can be declared as functions (FUN), function blocks (FB) or programs (PRG).

Reference Manual MELSEC MEDOC plus


E – 2 Programming Instructions

MELSEC Instructions
The functionality of the ‘adapted’ and ‘pure’ MELSEC functions is identical. The only
difference between the two versions is the way they are written and how they are
used in the various editors.
The ‘pure’ MELSEC instructions use the familiar MELSEC nomenclature (e.g. AND=, +,
FLOAT). These instructions can only be used in the MELSEC editor.
This dialog box is displayed when you are working in the MELSEC
editor. The list contains the ‘pure’ MELSEC instructions.

The ‘adapted’ MELSEC instructions use a special nomenclature. Their names always
end with _M for MELSEC or _MD for MELSEC Dedicated Instructions (e.g. PLUS_M,
FLOAT_K_P_MD). You can use these instructions in the IEC editor.
This dialog box is displayed when you are working in
the IEC editor. The list of the Manufacturer Library
contains the ‘adapted’ MELSEC instructions.

MELSEC MEDOC plus Reference Manual


Programming Instructions E – 3

The suffixes _P_MD and _K_MD indicate that the instruction in question is executed
on a rising edge or with a constant.
Example
MELSEC Editor IEC Editor Explanation
LEDA FLOAT FLOAT_MD Normal execution (16 Bit)
LEDC (S)
LEDC (D)
LEDR
LEDB FLOAT FLOAT_P_MD Pulse-triggered execution (16 Bit)
LEDC (S)
LEDC (D)
LEDR
LEDA FLOAT FLOAT_K_MD Normal execution (16 Bit)
SUB (S) Constant used in operand (S)
LEDC (D)
LEDR
LEDB FLOAT FLOAT_K_P_MD Pulse-triggered execution (16 Bit)
SUB (S) Constant used in operand (S)
LEDC (D)
LEDR
LEDA DFLOAT DFLOAT_MD Normal execution (32 Bit)
LEDC (S)
LEDC (D)
LEDR
LEDB DFLOAT DFLOAT_P_MD Pulse-triggered execution (32 Bit)
LEDC (S)
LEDC (D)
LEDR
LEDA DFLOAT DFLOAT_K_MD Normal execution (32 Bit)
DXNR (S) Constant used in operand (S)
LEDC (D)
LEDR
LEDB DFLOAT DFLOAT_K_P_MD Pulse-triggered execution (32 Bit)
DXNR (S) Constant used in operand (S)
LEDC (D)
LEDR

EN input and ENO output


In the Standard Library, most of the programming instructions are displayed in two
similar forms. The only difference between these programming instructions is the
suffix _E. This suffix specifies functions and function blocks which have an EN input
and an ENO output (➜ page 6-60).
The functions in the Manufacturer Library do not have this suffix although they all
have an EN input and an ENO output.

Reference Manual MELSEC MEDOC plus


E – 4 Programming Instructions

E.1 IEC Programming Instructions


No. of Data types
Modi-
Instruction Description input Input Output
fier
variables variables variables
) IEC Instruction List operator e.g. MUL( NE(. The left
Right parenthesis AND( parenthesis
The right parenthesis (close parenthesis) is used is added to
to evaluate a deferred operation. The beginning the operator
of the deferred operation is marked with a left itself as a
parenthesis modifier.
ABS Absolute value 1 INT, DINT INT, DINT
ABS_E Writes the input variable data to the output
variable with a positive sign.
ADD ( Addition n (IN1) – INT, DINT
ADD_E (2 – 28) (INn):
INT, DINT,
Constant
ADD_TIME Addition 2 (IN1), (IN2): TIME
ADD_TIME_E TIME
AND N, ( Logical AND operation n WORD, WORD,
AND_E (2 – 28) DWORD, DWORD,
BOOL, BOOL
Constant
BCD_TO_DINT Converts BCD format to binary format (DINT) 1 BOOL, DINT
BCD_TO_DINT_E WORD,
DWORD
BCD_TO_INT Converts BCD format to binary format(INT) 1 BOOL, INT
BCD_TO_INT_E WORD,
DWORD
BOOL_TO_DINT Converts BOOL data type to DINT data type 1 BOOL DINT
BOOL_TO_DINT_E
BOOL_TO_DWORD Converts BOOL data type to DWORD data type 1 BOOL DWORD
BOOL_TO_DWORD_E

BOOL_TO_INT Converts BOOL data type to INT data type 1 BOOL INT
BOOL_TO_INT_E
BOOL_TO_TIME Converts BOOL data type to TIME data type 1 BOOL TIME
BOOL_TO_TIME_E
BOOL_TO_WORD Converts BOOL data type to WORD data type 1 BOOL WORD
BOOL_TO_WORD_E
CAL C, N IEC Instruction List operator - - -
Calls a Function Block instance.
In the Instruction List language Function Block
instances are called with the CAL operator.
The operator must be followed by the instance
name, which in turn must be followed by the
argument list in parentheses, containing the
actual parameters to be passed to the formal
parameters.

MELSEC MEDOC plus Reference Manual


Programming Instructions E – 5

No. of Data types


Modi-
Instruction Description input Input Output
fier
variables variables variables
DINT_TO_BCD Converts binary format (DINT) to BCD format 1 DINT, BOOL,
DINT_TO_BCD_E Constant WORD,
DWORD
DINT_TO_BOOL Converts DINT data type to BOOL data type 1 DINT BOOL
DINT_TO_BOOL_E
DINT_TO_DWORD Converts DINT data type to DWORD data type 1 DINT DWORD
DINT_TO_DWORD_E
DINT_TO_INT Converts DINT data type to INT data type 1 DINT INT
DINT_TO_INT_E
DINT_TO_REAL Converts DINT data type to REAL data type 1 DINT REAL
DINT_TO_REAL_E
DINT_TO_TIME Converts DINT data type to TIME data type 1 DINT TIME
DINT_TO_TIME_E
DINT_TO_WORD Converts DINT data type to WORD data type 1 DINT WORD
DINT_TO_WORD_E
DIV ( Division; (IN1) : (IN2) 2 (IN1), (IN2): INT, DINT
DIV_E INT, DINT,
Constant
DIV_TIME Division; (IN1) : (IN2) 2 (IN1), (IN2): TIME
DIV_TIME_E TIME
DWORD_TO_BOOL Converts DWORD data type to BOOL data type 1 DWORD BOOL
DWORD_TO_BOOL_E

DWORD_TO_DINT Converts DWORD data type to DINT data type 1 DWORD DINT
DWORD_TO_DINT_E
DWORD_TO_INT Converts DWORD data type to INT data type 1 DWORD INT
DWORD_TO_INT_E
DWORD_TO_TIME Converts DWORD data type to TIME data type 1 DWORD TIME
DWORD_TO_TIME_E
DWORD_TO_WORD Converts DWORD data type to WORD data type 1 DWORD WORD
DWORD_TO_WORD_E

EQ ( Equality (=); n (IN1) – BOOL


EQ_E [(IN1 = IN2)] & [(IN2) = (IN3)] & ... & [(INn-1) = (2 – 28) (INn): INT,
(INn)]; DINT,
If the comparison result is true, then 1 to WORD,
output. DWORD,
If the comparison result is false, then 0 to BOOL,
output. Constant
F_TRIG Function Block; 1 (CLK): BOOL Q: BOOL
F_TRIG_E Falling edge detector; the current signal status
on the output variable (Q) changes in response
to a falling edge on the input variable (CLK).

Reference Manual MELSEC MEDOC plus


E – 6 Programming Instructions

No. of Data types


Modi-
Instruction Description input Input Output
fier
variables variables variables
GE ( Greater than/equals sequential comparison n (IN1) – BOOL
GE_E (>=); (2 – 28) (INn): INT,
[(IN1) >= (IN2)] & [(IN2) >= (IN3)] & ... & DINT,
[(INn-1) >= (INn)]; WORD,
If the comparison result is true, then 1 to DWORD,
output. BOOL,
If the comparison result is false, then 0 to Constant
output.
GT ( Greater than sequential comparison (>) n (IN1) – BOOL
GT_E [(IN1) > (IN2)] & [(IN2) > (IN3)] & ... & [(INn-1) (2 – 28) (INn): INT,
> (INn)] DINT,
If the comparison result is true, then 1 to WORD,
output. DWORD,
If the comparison result is false, then 0 to BOOL,
output. Constant
INT_TO_BCD Converts binary format (INT) to BCD format 1 INT BOOL,
INT_TO_BCD_E WORD,
DWORD
INT_TO_BOOL Converts INT data type to BOOL data type 1 INT BOOL
INT_TO_BOOL_E
INT_TO_DINT Converts INT data type to DINT data type 1 INT DINT
INT_TO_DINT_E
INT_TO_DWORD Converts INT data type to DWORD data type 1 INT DWORD
INT_TO_DWORD_E
INT_TO_REAL Converts INT data type to REAL data type INT REAL
INT_TO_REAL_E
INT_TO_TIME Converts INT data type to TIME data type INT TIME
INT_TO_TIME_E
INT_TO_WORD Converts INT data type to WORD data type 1 INT WORD
INT_TO_WORD_E
JMP C, N IEC Instruction List operator - - -
Jump to network label
Performs a jump from one program section to
a label in another network. You must specify
the network label name after the operator.
LD N IEC Instruction List operator 1 BOOL, -
Load WORD,
Loads the value of the specified operand into DWORD,
the accumulator. INT, DINT
LE ( Less than/equals sequential comparison (<=) n (IN1) – BOOL
LE_E [(IN1) <= (IN2)] & [(IN2) <= (IN3)] & ... & (2 – 28) (INn): INT,
[(INn-1) <= (Inn)] DINT,
If the comparison result is true, then 1 to WORD,
output. DWORD,
If the comparison result is false, then 0 to BOOL,
output. Constant

MELSEC MEDOC plus Reference Manual


Programming Instructions E – 7

No. of Data types


Modi-
Instruction Description input Input Output
fier
variables variables variables
LIMIT Value limitation 3 (MN), (IN), INT, DINT,
LIMIT_E If (IN) > (MX), then (MX) to output. (MX): INT, WORD,
If (IN) < (MN), then (MN) to output. DINT, DWORD,
If (MN) < (IN) > (MX), then (IN) to output WORD, BOOL
DWORD,
BOOL
LT ( Less than sequential comparison (<) n (IN1) – BOOL
LT_E [(IN1)< (IN2)] & [(IN2)< (IN3)] & ... & [(INn-1) < (2 – 28) (INn): INT,
(INn)] DINT,
If the comparison result is true, then 1 to WORD,
output. DWORD,
If the comparison result is false, then 0 to BOOL
output.
MAX Select maximum value n (IN1) – INT, DINT,
MAX_E The largest value in (IN1) – (INn) as written to (2 - 28) (INn): INT, WORD,
the output. DINT, DWORD,
WORD, BOOL
DWORD,
BOOL
MIN Select minimum value n (IN1) – INT, DINT,
MIN_E The smallest value in (IN1) – (INn) is written to (2 - 28) (INn): INT, WORD,
the output. DINT, DWORD,
WORD, BOOL
DWORD,
BOOL
MOD Remainder (IN1) - [(IN1) : (IN2)] x (IN2) 2 (IN1), (IN2): INT
MOD_E INT, DINT
MOVE Move 1 INT, DINT INT, DINT
MOVE_E
MUL ( Multiplication n (IN1) – INT, DINT
MUL_E (2 – 28) (INn): INT,
DINT
MUL_TIME Multiplication 2 (IN1), (IN2): TIME
MUL_TIME_E TIME
MUX Multiplexer n (K): INT, INT, DINT,
MUX_E Writes the data of the input variable between (2 – 28) DINT; (IN0) WORD,
(INO) and (Inn) to the output. The input – (INn): INT, DWORD,
variable is specified in (K). DINT, BOOL
WORD,
DWORD,
BOOL
NE ( Not equal (<>) 2 (IN1), (IN2): BOOL
NE_E [(IN1) <> (IN2)] INT, DINT,
If the comparison result is true, then 1 to WORD,
output. DWORD,
If the comparison result is false, then 0 to BOOL
output.

Reference Manual MELSEC MEDOC plus


E – 8 Programming Instructions

No. of Data types


Modi-
Instruction Description input Input Output
fier
variables variables variables
NOT Negation 1 WORD, WORD,
NOT_E DWORD, DWORD,
BOOL BOOL
OR N, ( Logical OR operation n WORD, WORD,
OR_E (2 – 28) DWORD, DWORD,
BOOL BOOL
R IEC Instruction List operator 1 BOOL -
Reset
Resets the BOOL variable to 0. This operation is
only performed if the value in the accumulator
is 1.
R_TRIG Function Block 1 (CLK): BOOL (Q): BOOL
R_TRIG_E Rising edge detector
The status of the output variable (Q) is
changed in accordance with the presence of a
rising edge on the input variable (CLK).
REAL_TO_DINT Converts REAL data type to DINT data type REAL DINT
REAL_TO_DINT_E
REAL_TO_INT Converts REAL data type to INT data type REAL INT
REAL_TO_INT_E
RET C, N IEC Instruction List operator - - -
Return from a Function Block
Executes a return from a Function Block to the
program in which the Function Block instance
was called.
ROL Rotate left 2 (IN): BOOL, WORD,
ROL_E Rotates the data of the input variable (IN) to WORD, DWORD,
the left by (N) bits. No bits are lost in this DWORD; BOOL
process. (N): Constant
ROR Rotate right 2 (IN): BOOL, WORD,
ROR_E Rotates the data of the input variable (IN) to WORD, DWORD,
the right by (N) bits. No bits are lost in this DWORD; BOOL
process. (N): Constant
S IEC Instruction List operator 1 BOOL -
Set
Sets the value of the BOOL variable to 1. This
operation is only performed when the value in
the accumulator is 1.
SEL Binary selection 3 (G): BOOL; INT, DINT,
SEL_E When (G) = 0 then (IN0) to output. (IN0), (IN1): WORD,
When (G) = 1 then (IN1) to output. INT, DINT, DWORD,
WORD, BOOL
DWORD,
BOOL
SHL Left shift 2 (IN): BOOL, WORD,
SHL_E Shifts the data of the input variable (IN) to the WORD, DWORD,
left by (N) bits. The upper (N) bits of (IN) are DWORD; BOOL
lost in this process. (N): Constant

MELSEC MEDOC plus Reference Manual


Programming Instructions E – 9

No. of Data types


Modi-
Instruction Description input Input Output
fier
variables variables variables
SHR Right shift 2 (IN): BOOL, WORD,
SHR_E Shifts the data of the input variable (IN) to the WORD, DWORD,
right by (N) bits. The lower (N) bits of (IN) are DWORD; BOOL
lost in this process. (N): Constant
ST N IEC Instruction List operator 1 BOOL, -
Store WORD,
Stores the value of the specified operand to the DWORD,
accumulator. INT, DINT
SUB ( Subtraction; (IN1) - (IN2) 2 (IN1), (IN2): INT, DINT
SUB_E INT, DINT
SUB_TIME Subtraction; (IN1) - (IN2) 2 (IN1), (IN2): TIME
SUB_TIME_E TIME
TIME_TO_BOOL Converts TIME data type to BOOL data type 1 TIME BOOL
TIME_TO_BOOL_E
TIME_TO_DINT Converts TIME data type to DINT data type 1 TIME DINT
TIME_TO_DINT_E
TIME_TO_DWORD Converts TIME data type to DWORD data type 1 TIME DWORD
TIME_TO_DWORD_E
TIME_TO_INT Converts TIME data type to INT data type 1 TIME INT
TIME_TO_INT_E
TIME_TO_WORD Converts TIME data type to WORD data type 1 TIME WORD
TIME_TO_WORD_E
WORD_TO_BOOL Converts WORD data type to BOOL data type 1 WORD BOOL
WORD_TO_BOOL_E
WORD_TO_DINT Converts WORD data type to DINT data type 1 WORD DINT
WORD_TO_DINT_E
WORD_TO_DWORD Converts WORD data type to DWORD data type 1 WORD DWORD
WORD_TO_DWORD_E
WORD_TO_INT Converts WORD data type to INT data type 1 WORD INT
WORD_TO_INT_E
WORD_TO_TIME Converts WORD data type to TIME data type 1 WORD TIME
WORD_TO_TIME_E
XOR N, ( Logical exclusive OR operation n WORD, WORD,
XOR_E (2 – 28) DWORD, DWORD,
BOOL BOOL

Reference Manual MELSEC MEDOC plus


Menu structure F–1

F Menu structure

The following pages show the menu structure of MM+. The menu structure and the available
commands are context-sensitive, changing depending on what you are currently doing in the
program.

Project
New...
Open...
Close
Save
Save as...
Other P Delete...
Rename...
Copy...
Import...
Export...
Export to Eprom
Update Libraries
Code Generation Options
Compile Project
Build Project
Transfer P PLC to MEDOC (Symbolic)
PLC to MEDOC (MELSEC)
MEDOC to PLC
Verify
Online Prog. Change
Browse
Make Crossreference
Documentation...
Printer Setup...
Printout
Change Security Level...
Change Passwords...
Quit
1 Project 1
2 Project 1
3 Project 1
4 Project 1

Reference Manual MELSEC MEDOC plus


F – 2 Menu structure

Object
New P POU...
Task...
Action...
Data Unit Type
Open
Close
Save
Rename
Comment
Information
Show P Call Tree
Reference List
Check
Print
Import...
Export...
Open Body/Header

MELSEC MEDOC plus Reference Manual


Menu structure F–3

Edit
Cut
Copy
Paste
Delete
Find...
Find Next
Replace...
Update Library
User Library P Install/Create...
Deinstall
Modify...
Open...
Close
Save
Delete
Change Password...

Edit
in IL, LD, FBD
Undo
Redo
Cut
Copy
Paste
Delete
Find...
Find next
Replace...
Network P Top
Before
After
Bottom
MELSEC Before 1
Increment Pins 2
Decrement Pins 2

1 only available in the IEC Instruction List


2 only available in LD and FBD

Reference Manual MELSEC MEDOC plus


F – 4 Menu structure

Edit
in SFC
Undo
Redo
Cut
Copy
Paste
Delete
Find...
Find Next
Replace...
Mark
Macro
Expand Macro
Modify P Name
Initial Step
Final Step
Macro Step
Entry Step
Exit Step
Insert P Step/Transition
Step
Transition
Left Divergence
Right Divergence
Left Convergence
Right Convergence
Label
Jump

Edit
in the Entry Data Monitor (EDM) and Header Monitor
Insert Objects
Next Object
Insert Row
Delete Rows
Delete All
Close

MELSEC MEDOC plus Reference Manual


Menu structure F–5

Tools
Expand/Expand Declaration
Collapse/Collapse Declaration
Sort 1 P Type
Class
Address 2
Identifier

1 only available in the Header


2 only available in the Global Variable List

Tools
in IL
Edit Network
End Edit
Network List...
Import MEDOC Network
List Operators/Operands
New Variable...
Zoom P Header
Body

Tools
in SFC
Edit Action Association
Edit Step Comment
End Edit
List Operands...
New Variable...
Zoom Macro
Zoom Body
Zoom Into
Zoom Back
Find Error

Reference Manual MELSEC MEDOC plus


F – 6 Menu structure

Tools
in LD and FBD
Contact 1
Coil 1
Jump
Return
Input Variable
Output Variable
Horizontal Line Segment
Vertical Line Segment
Functionblock
Comment
Open Row
Open Column
Define Grafic Macros...
Custom P Custom 1
Custom 2
Custom 3
Custom 4
Custom 5
More Custom
Select Mode
Interconnect Mode
Auto Connect
Recalculate Line
Networklist...
List Operators/Operands
New Variable...
Zoom P Header
Body

1 only available in Ladder Diagram

Tools
in the Entry Data Monitor (EDM) and Header Monitor
Read from PLC
Write to PLC
Read from File
Wrtie to File
Setup...

MELSEC MEDOC plus Reference Manual


Menu structure F–7

Online
Start Monitoring
Stop Monitoring
Monitor Header
Entry Data Monitor
Online-Change Mode
Monitoring Mode
Monitor from PLC
Monitor from Status Latch
Change Instance...
Start/Stop PLC
PLC Status
Transfer Setup P Ports
Project
Entry Code P Current
New
Delete
PLC Clear P Latch
Release Com Port
Format Drive
File Info

Debug
Set Breakpoint
Go To Breakpoint
Delete Breakpoint
Step
Link Monitor
Status Latch
Freeze
Device Edit...
System Errors
User Errors
HW Diagnosis
Scan

Reference Manual MELSEC MEDOC plus


F – 8 Menu structure

View
Toolbar
Statusbar
Horizontal Scrollbar
Grid
Zoom P 50%
75%
100%
150%
Printer Preview
Font...
Colors P Background...
Selection...
Text...
Selected Text...
Read Only Text...
Locked Text...
Foreground...
Enabled Breakpoint...
Active Breakpoint...
Monitoring...
Errors...
Shade left top...
Shade right bottom...
Grid...
Browsed Item...
Save Workspace
Load Workspace
Extended Information
Environment
Configure Statusbar
System Defaults

MELSEC MEDOC plus Reference Manual


Menu structure F–9

Extras
Project Backup...
Project Restore...
Declare Externals...
Delete Externals...
Options...

Window
Tile
Cascade
Arrange Icons
Close All
1 Window 1
2 Window 2
3 Window 3
4 Window 4

Reference Manual MELSEC MEDOC plus


Compliance List G–1

G Compliance List

This list provides a description of all the features of the MELSEC MEDOC plus
programming and documentation system that comply with the specifications of IEC
standard 1131, Part 3.
The format of the list corresponds to the tables in IEC 1131.3. This makes it possible to
obtain additional information quickly by referring to the corresponding tables and the
accompanying texts in the IEC standard publication.

Character set features


Table 1 No. Description Note

1 ISO/IEC 646 character set “A-Z,_” Supported


2 Lower case characters “a-z” Supported
3a Number sign “#” Supported
3b Pound sign “£” Not supported
4a Dollar sign “$” Supported
4b Currency sign Not supported
5a Vertical bar “|” Not supported
5b Exclamation mark “!” Not supported
6a Left and right brackets “[]” Supported (Arrays)
6b Left and right parentheses “()” Supported

Identifier features
Table 2 No. Description Note

1 Upper case and numbers Supported


2 Upper and lower case, numbers, embedded Supported
underlines
3 Upper and lower case, numbers, leading or Supported
embedded underlines

Comment feature
Table 3 No. Description Note

1 (*This is a comment*) Supported

Reference Manual MELSEC MEDOC plus


G – 2 Compliance List

Numeric literals
Table 4 No. Description Note

1 Integer literals Supported


2 Real literals Not supported
3 Real literals with exponents Not supported
4 Base 2 literals Supported
5 Base 8 literals Supported
6 Base 16 literals Supported
7 Boolean zero (0) and one (1) Not supported
8 Boolean FALSE and TRUE Supported

Character string literals


Table 5 No. Description Note

1 ‘’, ‘A’, ‘ ‘, ‘$", ‘$R$L", ‘$0D$0A’, ‘$$1.00’ Supported

Two-character combinations in character strings


Table 6 No. Description Note

2 $$ Not supported
3 $’ Not supported
4 $L or $I Not supported
5 $N or $n Not supported
6 $P or $p Not supported
7 $R or $r Not supported
8 $T or $t Not supported

Duration literal features


Table 7 No. Description Note

1a Duration literals without underlines:


Short prefix Supported
1b Long prefix Not supported
2a Duration literals with underlines:
Short prefix Supported
2b Long prefix Not supported

MELSEC MEDOC plus Reference Manual


Compliance List G–3

Date and time of day literals


Table 8 No. Description Note

1 Date literals (long prefix) Not supported


2 Date literals (short prefix) Not supported
3 Time of day literals (long prefix) Not supported
4 Time of day literals (short prefix) Not supported
5 Date and time literals (long prefix) Not supported
6 Date and time literals (short prefix) Not supported

Date and time of day literals notation


Table 9 No. Description Note

Time literals notation Not supported

Elementary data types


Table 10 No. Description Note

1 BOOL Supported
2 SINT Not supported
3 INT Supported
4 DINT Supported
5 LINT Not supported
6 USINT Not supported
7 UINT Not supported
8 UDINT Not supported
9 ULINT Not supported
10 REAL Supported
11 LREAL Not supported
12 TIME Supported
13 DATE Not supported
14 TIME_OF_DAY or TOD Not supported
15 DATE_AND_TIME or DT Not supported

Reference Manual MELSEC MEDOC plus


G – 4 Compliance List

16 STRING Supported
17 BYTE Not supported
18 WORD Supported
19 DWORD Supported
20 LWORD Not supported
Plus: EDGE, CHANGE, SGRAY, GRAY, DGRAY, BCD,
WFIX, DFIX

Hierarchy of generic data types


Table 11 No. Description Note

ANY
ANY_NUM
ANY_REAL
REAL
ANY_INT
DINT
INT

ANY_BIT
DWORD
WORD
BOOL

TIME

Data type declaration feature


Table 12 No. Description Note

1 Direct derivation of elementary data types Not supported


2 Enumerated data types Not supported
3 Subrange data types Not supported
4 Array data types Supported
5 Structured data types Supported

MELSEC MEDOC plus Reference Manual


Compliance List G–5

Default initial values


Table 13 No. Description Note

BOOL = FALSE Supported


INT, DINT = 0 Supported
WORD, DWORD = 0 Supported
REAL = 0.0 Supported
TIME = T#0s Supported

Data type initial value declaration features


Table 14 No. Description Note

1 Initialisation of directly derived types Not supported


2 Initialisation of enumerated data types Not supported
3 Initialisation of subrange data types Not supported
4 Initialisation of array data types Not supported
5 Initialisation of structured data type elements Not supported
6 Initialisation of derived structure data types
Not supported

Location and size prefix features for directly represented variables


Table 15 No. Description Note

1 I, Input location Supported *


2 Q, Output location Supported *
3 M, Memory location Supported *
4 X, Single bit size Supported *
5 None, Single bit size Not supported
6 B, Byte (8 bits) size Supported *
7 W, Word (16 bits) size Supported *
8 D, Double word (32 bits) size Supported *
9 L, Long (quad) word (64 bits) size Not supported
* See table page 6 - 4

Reference Manual MELSEC MEDOC plus


G – 6 Compliance List

Variable declaration keywords


Table 16 No. Description Note

VAR / VAR_CONSTANT Supported


VAR_INPUT Supported
VAR_OUTPUT Supported
VAR_IN_OUT Supported
VAR_EXTERNAL / VAR_EXTERNAL_CONSTANT Supported
VAR_GLOBAL / VAR_GLOBAL_CONSTANT Supported *
VAR_ACCESS Not supported
RETAIN Not supported
CONSTANT Not supported
AT Supported *
* Supported implicitly through the editor

Variable type assignment features


Table 17 No. Description Note

1 Declaration of directly represented, non-retentive


variables Supported
2 Declaration of directly represented retentive variables
Not supported
3 Declaration of locations of symbolic variables
Supported
4 Array location assignment Supported
5 Automatic memory allocation of symbolic variables
Supported
6 Array declaration Supported
7 Retentive array declaration Not supported
8 Declaration of structured variables Supported

MELSEC MEDOC plus Reference Manual


Compliance List G–7

Variable initial value assignment features


Table 18 No. Description Note

1 Initialisation of directly represented, non-retentive


variables Not supported
2 Initialisation of directly represented retentive
variables Not supported
3 Location and initial value assignment to symbolic
variables Not supported
4 Array location assignment and initialisation
Not supported
5 Initialisation of symbolic variables Not supported
6 Array initialisation Not supported
7 Retentive array declaration and initialisation Not supported
8 Initialisation of structured variables Not supported
9 Initialisation of constants Not supported

Graphical negation of Boolean signals


Table 19 No. Description Note

1 Negated input Supported


2 Negated output Supported

Use of EN input and ENO output


Table 20 No. Description Note

1 Use of EN and ENO


Required for Ladder Diagram (LD) language Supported
2 Use of EN and ENO
Optional for Function Block Diagram (FBD) language Supported
3 FBD without EN and ENO Supported

Typed and overloaded functions


Table 21 No. Description Note

1 Overloaded functions (untyped) Supported *


2 Typed functions Not supported
* Implicit typing through passing of the actual parameters

Reference Manual MELSEC MEDOC plus


G – 8 Compliance List

Type conversion function features


Table 22 No. Description Note

1 *_TO_** Supported
2 TRUNC Not supported
3 BCD_TO_** Supported
4 *_TO_BCD Supported

Standard functions with one numeric variable


Table 23 No. Description Note

1 ABS Not supported


2 SQRT Not supported
3 LN Not supported
4 LOG Not supported
5 EXP Not supported
6 SIN Not supported
7 COS Not supported
8 TAN Not supported
9 ASIN Not supported

10 ACOS Not supported


11 ATAN Not supported

Standard arithmetic functions


Table 24 No. Description Note

12 ADD Supported
13 MUL Supported
14 SUB Supported
15 DIV Supported
16 MOD Supported
17 EXPT Not supported
18 MOVE Supported

MELSEC MEDOC plus Reference Manual


Compliance List G–9

Standard bit-shift functions


Table 25 No. Description Note

1 SHL Supported
2 SHR Supported
3 ROR Supported
4 ROL Supported

Standard bitwise Boolean functions


Table 26 No. Description Note

5 AND Supported
6 OR Supported
7 XOR Supported
8 NOT Supported

Standard selection functions


Table 27 No. Description Note

1 SEL Supported
2a MAX Supported
2b MIN Supported
3 LIMIT Supported
4 MUX Supported

Standard comparison functions


Table 28 No. Description Note

5 GT Supported
6 GE Supported
7 EQ Supported
8 LE Supported
9 LT Supported
10 NE Supported

Reference Manual MELSEC MEDOC plus


G – 10 Compliance List

Standard character string functions


Table 29 No. Description Note

1 LEN Not supported


2 LEFT Not supported
3 RIGHT Not supported
4 MID Not supported
5 CONCAT Not supported
6 INSERT Not supported
7 DELETE Not supported
8 REPLACE Not supported
9 FIND Not supported

Functions of time data types


Table 30 No. Description Note

1 ADD (TIME, TIME, TIME) Not supported


2 ADD (TOD, TIME, TOD) Not supported
3 ADD (DT, TIME, DT) Not supported
4 SUB (TIME, TIME, TIME) Not supported
5 SUB (DATE, DATE, TIME) Not supported
6 SUB (TOD, TIME, TOD) Not supported
7 SUB (TOD, TOD, TIME) Not supported
8 SUB (DT, TIME, DT) Not supported
9 SUB (DT, DT, TIME) Not supported
10 MUL (TIME, ANY_NUM, TIME) Not supported
11 DIV (TIME, ANY_NUM, TIME) Not supported
12 CONCAT (DATE, TOD, DT) Not supported
13 DT_TO_TOD Not supported
14 DT_TO_D Not supported

MELSEC MEDOC plus Reference Manual


Compliance List G – 11

Functions of enumerated data types


Table 31 No. Description Note

1 SEL Not supported


2 MUX Not supported
3 EQ Not supported
4 NE Not supported

Function block I/O parameter usage features


Table 32 No. Description Note

Input read Supported


Input write Supported
Output read Supported
Output write Supported

Function block declaration features


Table 33 No. Description Note

1 RETAIN qualifier on internal variables Not supported


2 RETAIN qualifier on output variables Not supported
3 RETAIN qualifier on internal function blocks
Not supported
4a Input/output declaration (textual) Supported
4b Input/output declaration (graphical) Not supported
5a Function block instance name as input (textual)
Not supported
5b Function block instance name as input (graphical)
Not supported
6a Function block instance name as input/output
(textual) Not supported
6b Function block instance name as input/output
(graphical) Not supported

Reference Manual MELSEC MEDOC plus


G – 12 Compliance List

7a Function block instance name as external variable


(textual) Not supported
7b Function block instance name as external variable
(graphical) Not supported
8a Declaration of rising edge inputs (textual) Not supported
8b Declaration of falling edge inputs (textual) Not supported
9a Declaration of rising edge inputs (graphical) Not supported
9b Declaration of falling edge inputs (graphical) Not supported

Standard bistable function blocks


Table 34 No. Description Note

1 Bistable function block (set dominant) Not supported


2 Bistable function block (reset dominant) Not supported
3 Semaphore with non-interruptable “Test and Set”
Not supported

Standard edge detection function blocks


Table 35 No. Description Note

1 Rising edge detector Supported


2 Falling edge detector Supported

Standard counter function blocks


Table 36 No. Description Note

1 Up-counter Not supported


2 Down-counter Not supported
3 Up-down counter Not supported

MELSEC MEDOC plus Reference Manual


Compliance List G – 13

Standard timer function blocks


Table 37 No. Description Note

1 TP Not supported
2a TON Not supported
2b T—-0 Not supported
3a TOF Not supported
3b 0—-T Not supported

Standard timer function blocks — timing diagrams


Table 38 No. Description Note

TP Not supported
TON Not supported
TOF Not supported

Program declaration features


Table 39 No. Description Note

1-9b Features 1 to 9b of table 23


10 Formal input and output parameters Not supported
11-14 Features 1-4 of table 17
15-18 Features 1-4 of table 18
19 Use of directly represented variables Supported
20 VAR_GLOBAL...END_VAR
declaration within a program Supported
21 VAR_ACCESS...END_VAR
declaration within a program Not supported

Reference Manual MELSEC MEDOC plus


G – 14 Compliance List

Step features
Table 40 No. Description Note

1 Step - graphical form with directed links Supported


Initial step - graphical form with directed links
2 Step - textual form without directed links Not supported
Initial step - textual form without directed links
3a Step flag - general form: Not supported
name.X = a variable of type BOOL
3b Step flag - direct connection of Boolean variable Not supported
name.X to right side of step
4 Step elapsed time - general form Not supported
name.T = a variable of type TIME

Transitions and transition conditions


Table 41 No. Description Note

1 Transition condition using ST language Not supported


2 Transition condition using LD language *
3 Transition condition using FBD language *
4 Use of transition connector Supported
4a Transition condition in LD language with transition
connector Supported
4b Transition condition in FBD language with transition Supported
connector
5 Transition condition in ST in textual form
Not supported
6 Transition condition in IL in textual form
Not supported
7 Transition with transition name Supported
7a Transition condition using LD language Supported
7b Transition condition using FBD language Supported
7c Transition condition using IL language Supported
7d Transition condition using ST language Not supported
* Supported through connectors

MELSEC MEDOC plus Reference Manual


Compliance List G – 15

Declaration of actions
Table 42 No. Description Note

1 Any Boolean variable declared in a VAR or Supported


VAR_OUTPUT block, or their graphical equivalents,
can be an action.
2I Graphical declaration of an action in LD language Supported
2s Inclusion of SFC elements in an action Not supported
2f Graphical declaration of an action in FBD language Supported
3s Textual declaration of an action in ST language Not supported
3i Textual declaration of an action in IL language Supported

Step/action association
Table 43 No. Description Note

1 Action block *
2 Concatenated action blocks *
3 Textual step body with action calls Not supported
4 Action block “d” field Not supported
* Implemented through the editors

Action block features


Table 44 No. Description Note

1 “a”: Qualifier Not supported


2 “b”: Action name Not supported
3 “c”: Boolean “indicator” variables Not supported
4 “d”: Action using IL language Not supported
5 “d”: Action using ST language Not supported
6 “d”: Action using LD language Not supported
7 “d”: Action using FBD language Not supported
8 Use of action blocks in ladder diagrams Not supported
9 Use of action blocks in function block diagrams Not supported

Reference Manual MELSEC MEDOC plus


G – 16 Compliance List

Action qualifiers
Table 45 No. Description Note

1 None: Non-stored (mull qualifier) Supported


2 N: Non-stored Not supported
3 R: overriding Reset Not supported
4 S: Set (stored) Not supported
5 L: time Limited Not supported
6 D: time Delayed Not supported
7 P: Pulse (edge) Not supported
8 SD: Stored and time Delayed Not supported
9 DS: Delayed and Stored Not supported
10 SL: Stored and time Limited Not supported

Sequence evolution
Table 46 No. Description Note

1 Single sequence Supported


2a Divergence of sequence selection, priority of Supported
evaluation from right to left
2b Divergence of sequence selection, user-defined Not supported
priority of evaluation (numbers)
2c Divergence of sequence selection with user-defined Not supported
mutual exclusion of transition conditions as
specified by IEC 848.
3 Convergence of sequence selection Supported
4 Simultaneous sequences — divergence Supported
Simultaneous sequences — convergence
5abc Sequence skip (corresponding to 2a, b, c) Supported (2a only)
6abc Sequence loop (corresponding to 2a, b, c) Not supported
7 Directional arrows in SFC charts Not supported

MELSEC MEDOC plus Reference Manual


Compliance List G – 17

Compatible SFC features (graphical only)


Table 47 No. Description Note

40 1, 3a, 3b, 4 Not supported


41 1, 2, 3, 4, 4a, 4b, 7, 7a, 7b Not supported
42 1, 2l, 2s, 2f Not supported
43 1, 2, 4 Not supported
44 1 to 9 Not supported
45 1 to 10 Not supported
46 1 to 7 Not supported
57 all Not supported

SFC minimal compliance requirements (graphical only)


Table 48 No. Description Note

40 1 Supported
41 1 or 2 or 3 or (4 and (4a or 4b)) or Supported
(7 and (7a or 7b or 7c or 7d))
42 1 or 2l or 2f Supported
43 1 or 2 or 4 *
45 1 or 2 Supported
46 1 and (2a or 2b or 2c) and 3 and 4 Supported
47 (1 or 2) and (3 or 4) and (5 or 6) and (7 or 8) and Not supported
(9 or 10) and (11 or 12)
* Implemented through the editors

Reference Manual MELSEC MEDOC plus


G – 18 Compliance List

Configuration and resource declaration features


Table 49 No. Description Note

1 CONFIGURATION...END_CONFIGURATION Not supported


construction
2 VAR_GLOBAL...END_VAR Not supported
construction within CONFIGURATION
3 RESOURCE...ON...END_RESOURCE Not supported
construction
4 VAR_GLOBAL...END_VAR Not supported
construction within RESOURCE
5a Periodic TASK construction within RESOURCE Not supported
5b Non-periodic TASK construction within RESOURCE Not supported
6a PROGRAM declaration PROGRAM-to-TASK Not supported
association
6b PROGRAM declaration with FUNCTION Not supported
BLOCK-to-TASK association
6c PROGRAM declaration with no TASK association Not supported
7 Declaration of directly represented variables in Not supported
VAR_GLOBAL
8a Connection of directly represented variables to Not supported
PROGRAM inputs
8b Connection of GLOBAL variables to PROGRAM inputs Not supported
9a Connection of PROGRAM outputs to directly Not supported
represented variables
9b Connection of PROGRAM outputs to GLOBAL Not supported
variables
10a VAR_ACCESS...END_VAR construction Not supported
10b Access paths to directly represented variables Not supported
10c Access paths to PROGRAM inputs Not supported
10d Access paths to GLOBAL variables in RESOURCES Not supported
10e Access paths to GLOBAL variables in Not supported
CONFIGURATION
10f Access paths to PROGRAM outputs Not supported

MELSEC MEDOC plus Reference Manual


Compliance List G – 19

Task features
Table 50 No. Description Note

1a Textual declaration of periodic TASKS according to Not supported


feature 5a of table 49
1b Textual declaration of non-periodic TASKS according Not supported
to feature 5b of table 49
2a Graphical representation of periodic TASKS Supported
2b Graphical representation of non-periodic TASKS Supported
3a Textual association with PROGRAMS according to Not supported
feature 6a of table 49
3b Textual association with FUNCTION BLOCKS Not supported
according to feature 6b of table 49
4a Graphical association with PROGRAMS (within Supported
RESOURCES)
4b Graphical association with FUNCTION BLOCKS Supported
(within PROGRAMS in RESOURCES)
5a Non-pre-emptive scheduling Supported
5b Pre-emptive scheduling Not supported

Examples of instruction fields


Table 51 No. Description Note

Label, Operator, Operand Supported

Reference Manual MELSEC MEDOC plus


G – 20 Compliance List

Instruction List (IL) operators


Table 52 No. Description Note

1 LD Supported
2 ST Supported
3 S, R Supported
4 AND, N, ( Supported
5 &, N, ( Not supported
6 OR, N, ( Supported
7 XOR, N, ( Supported
8 ADD, ( Supported
9 SUB, ( Supported
10 MUL, ( Supported
11 DIV, ( Supported
12 GT, ( Supported
13 GE, ( Supported
14 EQ, ( Supported
15 NE, ( Supported
16 LE, ( Supported
17 LT, ( Supported
18 JMP, C, N Supported
19 CAL, C, N Supported
20 RET, C, N Supported
21 ) Supported

Function block invocation features for IL language


Table 53 No. Description Note

1 CAL with input parameter list Supported


2 CAL with load/store of input parameters Supported
3 Use of input operators Not supported

Standard function block input operators for IL language


Table 54 No. Description Note

!!!Only relevant when supported in 53.3!!!

MELSEC MEDOC plus Reference Manual


Compliance List G – 21

Operators of the ST language


Table 55 No. Description Note

1 (Expression) parenthesisation Not supported


2 Identifier (argument list) Not supported
3 ** Not supported
4 _ Not supported
5 NOT Not supported
6 * Not supported
7 / Not supported
8 MOD Not supported
9 + Not supported
10 - Not supported
11 <, >, <=, >= Not supported
12 = Not supported
13 <> Not supported
14 & Not supported
15 AND Not supported
16 XOR Not supported
17 OR Not supported

ST language statements
Table 56 No. Description Note

1 Assignment := Not supported


2 Function block invocation and FB output usage Not supported
3 Return Not supported
4 If Not supported
5 Case Not supported
6 For Not supported
7 While Not supported
8 Repeat Not supported
9 Exit Not supported
10 Empty statement Not supported

Reference Manual MELSEC MEDOC plus


G – 22 Compliance List

Representation of lines and blocks


Table 57 No. Description Note

1 Horizontal lines: ISO 646 “–” character, semigraphic Not supported


2 Horizontal lines, graphic Supported
3 Vertical lines ISO 646 “+” character, semigraphic Not supported
4 Vertical lines, graphic Supported
5 Horizontal/vertical connection ISO 646 “+” Not supported
character, semigraphic
6 Horizontal/vertical connection, graphic Supported
7 Line crossing without connection ISO 646 Not supported
characters, semigraphic
8 Line crossing without connection, graphic Supported
9 Connected and non-connected corners ISO 646 “+” Not supported
character, semigraphic
10 Connected and non-connected corners, graphic Supported
11 Blocks with connecting lines, ISO 646 character, Not supported
semigraphic
12 Blocks with connecting lines, graphic Supported
13 Connectors using ISO 646 characters, semigraphic Not supported
14 Connectors, graphic Supported

Graphic execution control elements, examples


Table 58 No. Description Note

1 Unconditional jump in FBD language Supported


2 Unconditional jump in LD language Supported
3 Conditional jump in FBD language Supported
4 Conditional jump in LD language Supported
5 Conditional return in LD language Supported
6 Conditional return in FBD language Supported
7 Unconditional return from functions and function Supported
blocks
8 Alternative representation in LD language Supported

MELSEC MEDOC plus Reference Manual


Compliance List G – 23

Power bar
Table 59 No. Description Note

1 Left power bar with attached horizontal link Supported


2 Right power bar with attached horizontal link Not supported

Link elements
Table 60 No. Description Note

1 Horizontal link Supported


2 Vertical link (with attached horizontal links) Supported

Contacts
Table 61 No. Description Note

1 Normally open contact (make) —| |— Supported *


2 Normally open contact (make) —! !— Not supported *
3 Normally closed contact (break) —| / |— Supported *
4 Normally closed contact (break) —! / !— Not supported *
5 Positive transition-sensing contact —| P |— Supported *
6 Positive transition-sensing contact —! P !— Not supported *
7 Negative transition-sensing contact —| N |— Supported *
Negative transition-sensing contact —! N !— Not supported *
* Graphical

Reference Manual MELSEC MEDOC plus


G – 24 Compliance List

Coils (terminating operations)


Table 62 No. Description Note

1 Coil —( )— Supported *
2 Negated coil —( / )— Supported *
3 SET (latch) coil —( S )— Supported *
4 RESET (unlatch) coil —( R )— Supported
5 Retentive (memory) coil —( M )— Not supported
6 SET retentive (memory) coil —( SM )— Not supported
7 RESET retentive (memory) coil —( RM )— Not supported
8 Positive transition-sensing coil —( P )— Not supported
9 Negative transition-sensing coil —( N )— Not supported

MELSEC MEDOC plus Reference Manual


Index – i

! C
32-bit file access, 2-3 Call Tree, 4-26
Class, 6-6, 6-7, A-2
A Closing
Dialog box, 3-13
Absolute address, 6-6, A-1 Object, 3-10
Absolute label, 3-28, 7-24, A-1 Window, 3-10
Accumulator, 6-15, A-1 Collapsing, 3-6
Action, A-1 Colors, 3-15
Creating, 4-20 Com Port, 7-11
Pool, A-1 Comment, 6-6, 6-11, A-2
Actual parameter, 6-38, A-1 Graphical editor, 3-34, 3-40
Address, A-1 Object, 4-22
Absolute address, 6-7 Sequential Function Chart, 3-6, 6-28
MITSUBISHI address, 6-7 Text editor, 3-32, 3-33
Array, 6-50, A-1 Compiling, 7-2, A-2
Calling, 6-51 Object, 7-3
Declaration, 6-50 Project, 4-5, 7-2
Entry data monitor, 8-22 Compliance list, G-1
Programming, 6-50 Computer link module, 7-6, A-2
ASCII file Installation, 2-20
Export, 7-17 Copyright, 2-1
Import, 7-18 Counter
Autoconnect function, 3-41 Counter function, 6-52
Autoextern function, 3-60 Counter function block, 6-55
Autorouting function, 3-43 Extended counter, 5-4
Interrupt counter, 5-17
B Latch range, 5-4
Local counter, 6-55
Body, 3-1, A-1
Parameters, 5-8
Editing, 3-27
Programming, 6-52
Error check, 7-1
Cross Reference, 4-32
Information, 4-24
Creating, 4-33
Opening, 3-27
MMP.INI, 2-6
Breakpoint, 8-1, A-2
Options, 2-14
Query, 4-34

Reference Manual MELSEC MEDOC plus


ii – Index

D Entry data monitor, 8-16, A-3


32-bit register, 8-20
Data type, 3-25, 3-26, 6-6, A-2 Array, 8-22
Hierarchy, 6-13 Changing values, 8-20
Data unit type, 6-45, A-2 Deleting objects, 8-17
Calling, 6-47 File, 4-2, 8-18
Creating, 4-20 Inserting objects, 8-17, 8-20
Declaration, 6-45 MMP.INI, 2-7
Pool, 4-4 Opening, 8-20
Programming, 6-45 Pop-up menu, 8-19
Debugging, 8-1 Structures, 8-21
Default setting Worksheet, 8-16
Parameters, 5-12 Environment, 3-13
Screen display, 3-16 Error check, 8-1
Status bar, 3-8 Error message file, 8-3
Device editor, 8-5, A-2 Hardware diagnosis, 8-4
32-bit value, 8-11 Scan, 8-5
Copying, 8-8 System errors, 8-3
Cutting, 8-8 User-defined errors, 8-3
Deleting devices, 8-8 Ethernet, 7-7
Display mode, 8-8 Installation, 2-23
File, 4-2, 8-7 Expanding, 3-5
Inserting devices, 8-8, 8-10 Export, 7-17
Keyboard commands, B-7 ASCII files, 7-17
MMP.INI, 2-7 File, 4-2
Pasting, 8-8 Object, 7-17
Pop-up menu, 8-7 Project, 7-17
Table in Microsoft Excel, 8-12 To Eprom, 7-17
Worksheet, 8-6
Dialog box, 3-12 F
Closing, 3-13
File structure
Keyboard commands, B-4
MELSEC Q series, 7-13
Selecting, 3-13
Files, 4-1, D-1
Downloading
Fonts, 3-14
SEE Transfer
Formal parameter, 6-38, A-3
E Freeze function, 8-2
Function, A-3
Editing Calling, 6-32
Body, 3-27 Declaration, 6-31
Editor, 3-27 Editing support in text editor, 6-32
General, 3-17 Programming, 6-30
Graphical editor, 3-34 Using timer, 6-30
Object, 3-7 Function block, 6-34, A-3
Table, 3-21, 3-22 Calling, 6-36
Text editor, 3-33 Declaration, 6-34
Editor, A-3 Editing support in text editor, 6-37
Editing, 3-27 Global FB, 6-44
SEE ALSO Graphical editor Instantiation, 6-36
SEE ALSO Text editor Macrocode execution, 4-25, 6-40
Emergency off, 6-19 MC-MCR, 4-25, 6-40
EN/ENO, 4-24, A-3, E-3 Using timer, 6-34
Function block, 3-48 Function Block Diagram, A-4
SEE ALSO Graphical editor

MELSEC MEDOC plus Reference Manual


Index – iii

G Import, 7-18
ASCII files, 7-18
Global DUT, 6-46 File, 4-2
Global Function Block, 6-44 MELSEC Upload, 7-23
Global variable, 4-4, 6-6, A-4 Object, 7-19
Graphical editor, 3-34, 6-16, A-4 Print files, 7-20
Anchor point, 3-45 Project, 7-18
Autoconnect, 3-41 Symbolic Upload, 7-22
Autorouting, 3-43 Initial value, 6-6, 6-11
Changing editing area spacing, 3-40 Initialisation file
Comment, 3-34, 3-40 SEE MMP.INI
Configuring input signals, 3-47 Input
Configuring output coils, 3-47 Graphical editor, 3-47
Context menu, 3-36 Negation, 3-47
Error check, 7-1 Installation, 2-1
Function Block Diagram, 6-16 Instance, 6-36, 6-39, A-5
Inserting elements, 3-39 Instruction List, A-5
Inserting lines, 3-43 SEE Text editor
Jump instruction, 3-51 Interconnect mode, 3-36
Keyboard commands, B-11 Interface card A7BDE
Ladder Diagram, 6-16 Installation, 2-22
Macro, 3-53
Moving elements, 3-42 J
Options, 3-35
Jump
Power bar, 3-34
Graphical editor, 3-51
Programming instruction, 3-54
Sequential Function Chart, 6-19, 6-23
Recalculate lines, 3-44
Return instruction, 3-51 K
Rubberbanding, 3-42
Selecting an element, 3-39 Keyboard
Selecting several elements, 3-39 Selecting menu commands, 3-3
Tools, 3-38, C-3 Working in tables and editors, 3-17
Variable, 3-34, 3-47, 3-56 Keyboard commands, B-1
Grid, 3-13, 3-14
L
H
Label, A-5
Hardware requirements, 2-1 Absolute label, 3-28, 7-24
Header, A-4 Network label, 3-28
Error check, 7-1 System label, 3-29, 5-19
Opening, 3-21 Ladder Diagram, A-6
Header monitor, 8-16 SEE ALSO Graphical editor
Latch range, 5-4
I Library, 4-7, A-6
Editor, 3-55
I/O configuration, 5-9
SEE ALSO Manufacturer library
Icon, 3-11
Pool, 4-3
Identifier, 6-6, 6-7, A-4
SEE ALSO Standard library
IEC address, 6-8
SEE ALSO User library
Variable, 3-57
Link settings, 5-12
Local DUT, 6-49
Local variable, 6-6, A-6

Reference Manual MELSEC MEDOC plus


iv – Index

M O
MAC transparent mode, 7-8 Object, 3-4, 4-1, A-7
Macrocode execution, 4-25, 6-40 Call Tree, 4-26
Manufacturer library, 4-8, A-6, E-1 Closing, 3-10, 4-20
MC-MCR execution Comment, 4-22
Function block, 4-25, 6-40 Compiling, 7-3
Task, 6-3 Copying, 4-21, 4-22
Memory parameters, 5-2 Creating, 4-20
Menu bar, 3-1, 3-2 Cutting, 4-21
Menu commands, F-1 Deleting, 4-21
Keyboard commands, B-1 Displaying in the navigator, 3-4
MiniNet, 5-21 Editing, 3-7
MITSUBISHI address, 6-8, A-6 Error check, 7-1
MMP.INI, 2-4 Export, 7-17
Modem transmission, 7-9 Import, 7-19
Monitoring, 8-13, A-6 Information, 4-23
Entry data monitor, 8-16 Keyboard commands, B-3
Header monitor, 8-16 Opening, 3-9, 4-20
Online toolbar, 8-14, C-6 Pasting, 4-22
Program monitor, 8-14 Printing, 4-29
Mouse Reference List, 4-26
Selecting menu commands, 3-3 Renaming, 4-21
Working in tables and editors, 3-17 Saving, 4-21
Security level, 4-28
N Subordinated objects, 4-26
Superordinated objects, 4-26
Navigator, 3-1, 3-4, 4-2, A-8 Online
Collapsing, 3-6 Changes in online mode, 7-16
Displaying objects, 3-4 SEE ALSO Monitoring
Editing objects, 3-7 Online Help System
Expanding, 3-5 Keyboard commands, B-16
Extended information, 3-6 Online toolbar, 8-14, C-6
Keyboard commands, B-2 Opening
Levels, 3-4, 3-5, 3-6 Body, 3-27
Tools, C-5 Header, 3-21
Network, 3-27, 6-14, A-6 Object, 3-9
Changing size, 3-29 Table, 3-21
Entering a new network, 3-28 Window, 3-9
MELSEC network, 3-32, 6-15 Options, 2-9
Network bar, 3-27 Output
Network label, 3-28 Graphical editor, 3-47
Network list, 3-28, 3-30, 6-14 Negation, 3-47
Novell , 2-3 Set/Reset, 3-47

MELSEC MEDOC plus Reference Manual


Index – v

P Protection, 4-27
Object, 4-28
Parameters, 5-1 Project, 4-27
Transfer, 7-11 User library, 4-10
PLC
Changing PLC type, 5-1 Q
Connecting PLC to PLC, 2-17
Quitting MM+, 2-3
Setup, 5-13
Supported PLCs, 5-22 R
Pointer, 7-24
Port Redo, 3-19
Release Com Port, 7-11 Reference List, 4-26
Printer Replacing data, 3-19
Configuration, 4-29 Resource, 4-1
Connection, 2-24 Return instruction
Printing, 4-29 Graphical editor, 3-52
File, 4-2
MMP.INI, 2-6 S
Options, 2-9
Setup of page, 4-31 Sampling Trace, 8-25
Program, A-7 A series, 8-25
Program monitor, 8-14 Defining a sampling curve, 8-28
Program organisation unit, 4-6, A-7 Defining the sampling data, 8-26
Creating, 4-20 Displaying the results, 8-30
Information, 4-24 FX series, 8-31
Pool, 4-5 Performing a Sampling Trace, 8-26
Programming instruction, 3-54, A-8, E-1, E-2 Screen display
Assigning variables, 3-47, 3-56 Customizing, 3-13
EN/ENO, 3-48, E-3 Fonts, 3-14
Programming language, 6-14 Saving, 3-15
SEE ALSO Editors Zoom factor, 3-14
Project, 4-1, A-8 Scrollbar, 3-13
Backup, 4-18 Searching data, 3-19
Closing, 4-15 Select mode, 3-36
Comparing projects, 7-15 Sequential Function Chart, 6-17, A-9
Compiling, 4-5, 7-2 Action, 6-17
Copying, 4-17 Assigning action to step, 6-26
Creating, 4-11 Assigning transition condition, 6-27
Deleting, 4-16 Branching, 6-18
Error check, 7-1 Comment, 3-6
Export, 7-17 Initial step, 6-18
Import, 7-18 Jump, 6-19, 6-23
Opening, 4-13 Keyboard commands, B-13
Password, 4-27 Macro step, 6-17
Printing, 4-30 MMP.INI, 2-7
Recovering, 4-14 Programming, 6-20
Renaming, 4-16 Sequence errors, 6-29
Restore Backup, 4-19 Sequence rules, 6-21
Saving, 4-16 Step, 6-17
Security level, 4-28 Tools, C-4
Transfer, 7-4, 7-15 Transition, 6-17
Using Backup, 4-14 Zooming, 6-25

Reference Manual MELSEC MEDOC plus


vi – Index

Software Requirements, 2-1 Timer


Standard library, 4-7, A-9, E-1 Extended timer, 5-4
Starting MM+, 2-3, 3-2 In function, 6-30
Status bar, 3-1, 3-7, 3-13, A-9 In function block, 6-34
Configuration, 3-7 Latch range, 5-4
Default setting, 3-8 Local timer, 6-55
MMP.INI, 2-5 Parameters, 5-8
Status Latch, 5-3, 8-23 Programming, 6-52
Reading data, 8-25 Timer function, 6-52
Writing data, 8-23 Timer function block, 6-55
Step mode, 8-1 Timer interval, 5-16
System label, 3-29, 5-19, A-9 Toolbar, 3-1, 3-13
System variable, 5-18 Tools, C-1
Graphical editor, 3-38
T Transfer, 7-4
Comparing projects, 7-15
Table, 3-21 Computer link module, 7-6
Column width, 3-23 Configuring communications port, 7-4
Dialog box, 3-23 CPU interface, 7-5
Editing, 3-21, 3-22 Ethernet, 7-7
Inserting a new line, 3-23 Import, 7-18
Keyboard commands, B-5 Keyboard commands, B-15
List box, 3-23 MAC transparent mode, 7-8
Opening, 3-21 MELSECNET, 7-5
Selecting a line, 3-22 MELSECNET/10, 7-5
Selecting cells, 3-22 Modem, 7-9
Selecting several lines, 3-22 Online changes, 7-16
Sorting entries, 3-24 Parameters, 7-11
Task, 6-2, A-9 Ports (MMP.INI), 2-6
Creating, 4-20
Information, 4-25 U
MC-MCR, 6-3
Pool, 4-4 Undo, 3-19
Text editor, 3-32, 6-15, A-9 User library, 4-8, A-10
Accumulator, 6-15 Creating, 4-9
Column width, 3-33 Deleting, 4-11
Comment, 3-32, 3-33 File, 4-2
Editing mode, 3-33 MMP.INI, 2-5
Error check, 7-1 Password, 4-10
Instruction List, 6-15 Removing, 4-11
Keyboard commands, B-9 Updating, 4-11
MELSEC Instruction List, 6-15
Programming instruction, 3-54
Tools, C-2
Variable, 3-56

MELSEC MEDOC plus Reference Manual


Index – vii

V
Variable, 3-47, 3-56, 6-6, A-10
Autoextern, 3-60
Declaration, 6-6
External variable, 3-60
SEE ALSO Global variable
Graphical editor, 3-47
SEE ALSO Local variable
System variable, 5-18
Text editor, 3-32

W
Window, 3-9
Arranging, 3-10, 3-11
Changing display size, 3-11
Closing, 3-10
Icons, 3-11
Keyboard commands, B-3
Opening, 3-9
Selecting, 3-10
Wizard, 4-13, A-10
MMP.INI, 2-6
Workspace
Loading, 3-16
Saving, 3-15

Z
Zooming, 2-10

Reference Manual MELSEC MEDOC plus

You might also like