1、GXDEV8-O-FB-E13JU44SH(NA)-080376E-A(0302)MEESW8D5C-GPPW-EOperating Manual (Function Block) Operating ManualMODELMODELCODEOGX DeveloperVersion 8 Operating Manual (Function Block)(Function Block)GSpecifications subject to change without notice.When exported from Japan, this manual does not require app
2、lication to theMinistry of Economy, Trade and Industry for service transaction permission.HEAD OFFICE : 1-8-12, OFFICE TOWER Z 14F HARUMI CHUO-KU 104-6212,JAPANNAGOYA WORKS : 1-14 , YADA-MINAMI 5 , HIGASHI-KU, NAGOYA , JAPANA - 1 A - 1 SAFETY PRECAUTIONS (Always read these instructions before using
3、this equipment.) Before using this product, please read this manual and the relevant manuals introduced in this manual carefully and pay full attention to safety to handle the product correctly. The instructions given in this manual are concerned with this product. For the safety instructions of the
4、 programmable controller system, please read the CPU module users manual. In this manual, the safety instructions are ranked as “DANGER“ and “CAUTION“. ! DANGERCAUTION!Indicates that incorrect handling may cause hazardous conditions,resulting in death or severe injury.Indicates that incorrect handli
5、ng may cause hazardous conditions, resulting in medium or slight personal injury or physical damage.Note that the ! CAUTION level may lead to a serious consequence according to the circumstances. Always follow the instructions of both levels because they are important to personal safety. Please save
6、 this manual to make it accessible when required and always forward it to the end user. Design Instructions !DANGER For data change, program change, and status control made to the PLC which is running from a Personal computer, configure the interlock circuit externally so that the system safety is e
7、nsured. The action to be taken for the system at the occurrence of communication errors caused by such as loose cable connection must be determined for online operation of PLC from Personal computers. !CAUTION Before performing online operations (program change during PLC CPU RUN, forced I/O operati
8、on, RUN-STOP or similar operating condition change, remote operation) with the personal computer connected to the running PLC CPU, read the manual carefully and ensure safety fully. Note that program change during PLC CPU RUN (online change) may cause such problems as program corruption depending on
9、 the operation condition. Use the equipment after fully understanding the precautions given in the GX Developer Operating Manual. A - 2 A - 2 REVISIONS * The manual number is given on the bottom left of the back cover. Print Date * Manual Number Revision Feb., 2003 SH (NA)-080376E-A First edition Oc
10、t., 2003 SH (NA)-080376E-B Correction Section 3.13, Section 5 Jun., 2004 SH (NA)-080376E-C Correction Abbreviations and Generic Terms in This Manual Sep., 2004 SH (NA)-080376E-D Addition Section 3.6.3 Dec., 2004 SH (NA)-080376E-E Correction Section 3.6.3 Aug., 2005 SH (NA)-080376E-F Correction Secti
11、on 3.13 Dec., 2005 SH (NA)-080376E-G Correction Section 1.5.1, Section 1.5.2, Section 3.3 Mar., 2006 SH (NA)-080376E-H Correction Section 1.1, Section 3.9, Section 3.10 Oct., 2006 SH (NA)-080376E-I Correction Section 8.1, Section 8.2 Japanese Manual Version SH-080359-J This manual confers no industr
12、ial property rights or any rights of any other kind, nor does it confer any patent licenses. Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property rights which may occur as a result of using the contents noted in this manual. 2003 MITSUBISHI ELECTR
13、IC CORPORATION A - 3 A - 3 INTRODUCTION Thank you for choosing the Mitsubishi MELSOFT series Integrated FA software. Read this manual and make sure you understand the functions and performance of MELSOFT series sequencer thoroughly in advance to ensure correct use. CONTENTS Safety Precautions .A- 1
14、Revisions A- 2 INTRODUCTIONA- 3 Contents .A- 3 About Manuals .A- 5 Abbreviations and Generic Terms in This ManualA- 6 1 OVERVIEW 1- 1 to 1- 7 1.1 What Is Function Block (FB)? 1- 1 1.2 Features . 1- 2 1.3 Layouts and Names of Windows for Creating FB. 1- 2 1.4 What You Should Understand Before Using t
15、he FB. 1- 5 1.5 Specifications . 1- 5 1.5.1 Compatible CPUs. 1- 5 1.5.2 Specifications of and precautions for the FB. 1- 5 2 GENERAL PROCEDURES FOR EDITING THE FB 2- 1 to 2- 2 3 CREATING NEW SEQUENCE PROGRAM USING FB 3- 1 to 3-44 3.1 Crating New Project for FB 3- 3 3.2 Adding New FB Definition to th
16、e Created Project. 3- 5 3.3 Creating FB Definition Program. 3- 7 3.4 Creating FB Variables 3-13 3.5 Converting the FB Definition (Convert (Compile) 3-16 3.6 Pasting the Converted FB to Sequence Program (FB Utilization) . 3-18 3.6.1 Pasting the FB definition to sequence program 3-18 3.6.2 Changing th
17、e name (FB name) of the pasted FB (FB name changing) 3-21 3.6.3 Changing the module start I/O addresses of the FB definition. 3-23 3.7 Creating the Sequence Program. 3-25 3.7.1 Editing the sequence program. 3-25 3.7.2 Confirming the data of the pasted FB 3-28 3.7.3 Searching/replacing the sequence p
18、rogram (Search/replace). 3-30 3.7.4 Creating/displaying the comments, statements or notes (Sentence creation) . 3-32 3.8 Converting the Sequence Program into Program to Be Executed on the PLC CPU (Convert (Compile) 3-33 3.9 Reading the Sequence Program from the PLC CPU (Read from PLC) 3-36 3.10 Writ
19、ing the Sequence Program to the PLC CPU (Write to PLC) . 3-37 A - 4 A - 4 3.11 Monitoring and Testing the Sequence Program . 3-38 3.11.1 Monitoring the sequence program. 3-38 3.11.2 Testing the sequence program (Device test) 3-41 3.12 Correcting the FB. 3-43 3.13 Making Online Program Correction to
20、the Sequence Program 3-44 4 UTILIZING THE EXISTING FB TO CREATE SEQUENCE PROGRAM 4- 1 to 4- 9 4.1 Creating Project for FB 4- 1 4.1.1 Creating a new project . 4- 1 4.1.2 Reading the existing project. 4- 1 4.2 Utilizing the Existing FB Definition (Copy). 4- 2 4.2.1 Utilizing the existing FB definition
21、 from another project 4- 2 4.2.2 Utilizing the existing FB definition within the same project . 4- 4 4.3 Changing the FB Definition Name. 4- 6 4.4 Correcting the Program Body or FB Variables of the Utilized FB Definition 4- 8 4.5 Converting the FB Definition (Convert (Compile) 4- 9 4.6 Pasting the C
22、onverted FB to the Sequence Program (FB Utilization) . 4- 9 4.7 Creating the Sequence Program. 4- 9 4.8 Converting the Sequence Program into the Program to Be Executed on the PLC CPU (Convert (Compile) 4- 9 4.9 Writing the Converted Sequence Program to the PLC CPU (Write to PLC) . 4- 9 5 DELETING UN
23、NECESSARY FB DEFINITION FROM THE PROJECT 5- 1 to 5- 2 6 COMBINING MULTIPLE PROGRAMS INTO ONE 6- 1 to 6- 2 6.1 Combining Sequence Programs into One 6- 1 6.2 Combining Comments into One (Data Joint) 6- 2 7 VERIFYING THE PROJECTS 7- 1 to 7- 2 8 PRINTING 8- 1 to 8- 5 8.1 Printing the Sequence Program In
24、cluding FB. 8- 1 8.2 Printing the FB Definition . 8- 4 APPENDICES Appendix- 1 to Appendix - 2 Appendix 1 Character Strings Unusable as Labels and FB Names .Appendix- 1 INDEX Index - 1 to Index - 2 A - 5 A - 5 About Manuals The following manuals are also related to this product. In necessary, order t
25、hem by quoting the details in the tables below. Related Manuals Manual Name Manual Number (Model Code) GX Developer Version 8 Operating Manual (Startup) Describes the system configuration, installation method and starting method of GX Developer. (Option) SH-080372E (13JU40) GX Developer Version 8 Op
26、erating Manual Explains the functions of the programming, printout, monitoring and debugging methods and so on GX Developer. (Option) SH-080373E (13JU41) GX Developer Version 8 Operating Manual (Structured Text) Describes the structured text (ST) program creation methods, print-out methods, etc. usi
27、ng GX Developer. SH-080367E (13JU37) QCPU(QMode) Programming Manual (Structured Text) Describes the structured text language programming methods. SH-080366E (13JF68) Structured Text (ST) Programming Guide Book Written for those who will create structured text (ST) programs for the first time. Descri
28、bes the basic operation methods and functions through sample programs. SH-080368E (13JF69) REMARK The above manuals are contained in the CD-ROM together with the software package as a set. If you want the manuals separately, they are available optionally as printed matter. When placing an order, ple
29、ase indicate the manual numbers (type codes) given in the above table. A - 6 A - 6 Abbreviations and Generic Terms in This Manual This manual uses the following generic names and abbreviations to represent the GX Developer software package and PLC CPU modules. The module type is given when the corre
30、sponding type must be indicated clearly. Generic Term/Abbreviation Description GX Developer Generic product name of product types SW8D5C-GPPW, SW8D5C-GPPW-A, SW8D5C-GPPW-V and SW8D5C-GPPW-VA. FB Abbreviation of the function block. ST Abbreviation of a structured text. QnACPU Generic name of the MELS
31、EC-QnA series PLC CPUs. QCPU (Q mode) Generic name of the Q00(J)CPU, Q01CPU, Q02(H)CPU, Q06HCPU, Q12HCPU, Q12PHCPU, Q12PRHCPU, Q25HCPU, Q25PHCPU and Q25PRHCPU. ACPU Generic name of the MELSEC-A series PLC CPUs. It includes the QCPUs (A mode) and motion controllers (SCPU). QCPU (A mode) Generic name
32、of the Q02(H)-A and Q06H-A. FXCPU Generic name of the MELSEC-FX series PLC CPUs. (The target PLCs are the FX0, FX0S, FX0N, FX1, FX2, FX2C, FX1S, FX1N, FX2N and FX2NC.) QnA series When GX Developer is started on the QnACPU. Q series When GX Developer is started on the QCPU (Q mode). 1 - 1 1 - 1 MELSO
33、FT1 OVERVIEW 1 OVERVIEW This manual describes the operations of editing the function block (hereafter abbreviated to the FB) of the GX Developer Version 7 software package (hereafter abbreviated to GX Developer). For the explanation of the functions other than the FB, refer to the corresponding manu
34、als given in the “Related Manuals“. 1.1 What Is Function Block (FB)? The FB is a function designed to convert a ladder block, which is used in a sequence program repeatedly, into a component (FB) to utilize it in the sequence program. This not only increases the efficiency of program development but
35、 also reduces programming mistakes to improve program quality. FBDefinition of FBDefinition of FB definition program and FB variablesFB variablesFB definition programUtilization of FBPasting of FB to sequence program Creation of sequence programCompileDebuggingWrite to PLC 11: GX Developer performs
36、write to PLC to write the compiled sequence program to the PLC CPU. When writing the program to a PLC with “Label program (ST, FB, Structure) “ selected, the FB can be restored using “Read from PLC“. 1 1 - 2 1 - 2 MELSOFT1 OVERVIEW 1.2 Features The FB has the following features. (1) Conversion of pr
37、ogram into component Displaying a standard program as a single block improves the reuse and readability of the program, facilitating editing and debugging. This ensures ease of configuring a large-scale program. (2) Uniform program quality Reusing the components of a standard program provides unifor
38、m program quality, which is independent of the technological level of a program developer. It also prevents programming mistakes during utilization. (3) Editing function of high operability The FB can be utilized easily in a sequence program by drag and drop operation. 1.3 Layouts and Names of Windo
39、ws for Creating FB This section describes the layouts and names of the windows used to create the FB. (1) Window used to create FB definition program (FB definition window) This window is used to edit an FB definition program, which is created in a ladder or list format. Labels define variable types
40、, device types and others on the FB variable setting window in (2). FB definitionFB variablesProgram bodyFunction Block tab (FB tab)FB definition windowFB definition program1 1 - 3 1 - 3 MELSOFT1 OVERVIEW FB definitionFB variablesProgram bodyFB definition program(2) Window used to create FB definiti
41、on labels (variables) (FB variable setting window) This window is used to define the labels used for the FB definition. FB variable setting window1 - 4 1 - 4 MELSOFT1 OVERVIEW (3) Window used to create a sequence program (Sequence program window) This window is used to edit a sequence program where
42、the FB is pasted. Create the sequence program in a ladder format. A list format cannot be used. Project data listSequence program windowOutput ladder sectionFunction block (FB)Input ladder section11: The step numbers of the sequence program, which is not yet compiled, are displayed with parentheses,
43、 i.e. (Step number). After completion of compile, the step numbers are displayed without parentheses. When compile is complete, the step numbers may be changed. Name DescriptionFB tab Tab that displays the FB definition of the project data list. FB variables (Header) Label used for the FB definition
44、. FB definition Data having a Body and Header as a pair. FB definition window Window used to edit an FB definition program. FB definition program (body) Program whose labels have been created on the FB definition window. FB variable setting window Window used to set FB variables. Project tab Table t
45、hat displays project information in the project data list. FB Function block pasted to a sequence program. FB section Square symbol that represents the FB pasted to the sequence program. Input ladder section Input ladder on the left side of the FB section. Output ladder section Output ladder on the
46、right side of the FB section. Sequence program window Window used to edit the sequence program where the FB is pasted. FB definition name Name of the FB definition displayed on the FB tab FB name Name of the FB pasted to the sequence program. Different names are attached to the FBs that are pasted f
47、rom the same FB definition. FB window Window used to read or monitor the program in the FB pasted to the sequence program. The FB window cannot be used to write a program. Use the FB definition window to write a program. 1 - 5 1 - 5 MELSOFT1 OVERVIEW 1.4 What You Should Understand Before Using the FB As in a normal sequence program, the FB is used to create a program u