Q-Series Basic Course ( for GX Works2 )
Total Page:16
File Type:pdf, Size:1020Kb
z SAFETY PRECAUTION z (Always read these instructions before using the products.) When designing the system, always read the relevant manuals and give sufficient consideration to safety. During the exercise, pay full attention to the following points and handle the product correctly. [EXERCISE PRECAUTIONS] WARNING z Do not touch the terminals while the power is on to prevent electric shock. z Before opening the safety cover, make sure to turn off the power or ensure the safety. z Do not touch the movable portion. CAUTION z Follow the instructor's direction during the exercise. z Do not remove the module of the demonstration machine or change wirings without permission. Doing so may cause failures, malfunctions, personal injuries and/or a fire. z Turn off the power before installing or removing the module. Failure to do so may result in malfunctions of the module or electric shock. z When the demonstration machine (such as X/Y table) emits abnormal odor/sound, press "Power switch" or "Emergency switch" to turn off. z When a problem occurs, notify the instructor as soon as possible. REVISIONS *The textbook number is written at the bottom left of the back cover. Print date *Textbook number Revision Oct., 2012 SH-081123ENG-A First edition This textbook confers no industrial 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 textbook. © 2012 MITSUBISHI ELECTRIC CORPORATION CONTENTS CHAPTER 1 BASICS OF PROGRAMMABLE CONTROLLER 1- 1 to 1-14 1.1 Program··········································································································································· 1- 1 1.2 Program Processing Procedure······································································································ 1- 4 1.3 MELSEC-QnUD Module Configuration···························································································1- 5 1.4 External I/O Signal and I/O Number······························································································· 1-11 1.5 System Configuration and I/O Number of Demonstration Machine··············································· 1-14 CHAPTER 2 OPERATING GX Works2 2- 1 to 2-64 2.1 Features of GX Works2··················································································································· 2- 3 2.1.1 MELSOFT iQ Works················································································································· 2- 7 2.2 Basic Knowledge Required for Operating GX Works2 ··································································· 2- 9 2.2.1 Screen configuration in GX Works2 ························································································· 2- 9 2.2.2 Ladder editor···························································································································· 2-11 2.2.3 Project······································································································································ 2-20 2.3 Operation Before Creating Ladder Program ·················································································· 2-22 2.3.1 Starting up GX Works2············································································································ 2-22 2.3.2 Creating a new project············································································································· 2-23 2.4 Preparation for Starting Up CPU···································································································· 2-25 2.5 Creating Ladder Program··············································································································· 2-32 2.5.1 Creating a ladder program using the function keys································································· 2-32 2.5.2 Creating a ladder program using the tool buttons ··································································· 2-34 2.6 Converting Program (Ladder Conversion) ····················································································· 2-36 2.7 Writing/Reading Data to/from Programmable Controller CPU······················································· 2-37 2.8 Monitoring Ladder Program Status ································································································ 2-40 2.9 Diagnosing Programmable Controller CPU ··················································································· 2-43 2.10 Editing Ladder Program ··············································································································· 2-45 2.10.1 Modifying a part of the ladder program ················································································· 2-45 2.10.2 Drawing/deleting lines ··········································································································· 2-47 2.10.3 Inserting/deleting rows··········································································································· 2-50 2.10.4 Cutting/copying ladder program ···························································································· 2-55 2.11 Verifying Data······························································································································· 2-58 2.12 Saving Ladder Program ··············································································································· 2-59 2.12.1 Saving newly-created or overwritten projects ······································································· 2-59 2.12.2 Saving a project with another name ······················································································ 2-60 2.13 Reading the saved project ··········································································································· 2-61 2.14 Opening Projects in Different Format··························································································· 2-62 2.15 Saving Projects in Different Format ····························································································· 2-63 CHAPTER 3 DEVICE AND PARAMETER OF PROGRAMMABLE CONTROLLER 3- 1 to 3- 6 3.1 Device·············································································································································· 3- 1 3.2 Parameter········································································································································ 3- 3 (1) CHAPTER 4 SEQUENCE AND BASIC INSTRUCTIONS -PART 1- 4- 1 to 4-42 4.1 List of Instruction Explained in this Chapter···················································································· 4- 1 4.2 Differences between OUT and SET / RST ································································ 4- 4 4.3 Measuring Timer ····························································································································· 4- 5 4.4 Counting by Counter ······················································································································· 4- 6 4.5 PLS / PLF ·························································································································· 4-14 4.6 MC / MCR ·························································································································· 4-20 4.7 FEND / CJ / SCJ / CALL / RET ············································································ 4-24 4.7.1 FEND ······························································································································· 4-24 4.7.2 CJ / SCJ ·················································································································· 4-27 4.7.3 CALL(P) / RET ········································································································ 4-31 4.8 Exercise·········································································································································· 4-35 4.8.1 Exercise 1 LD to NOP···································································································Project name QTEST 1 ········ 4-35 4.8.2 Exercise 2 SET, RST····································································································Project name QTEST2 ········ 4-36 4.8.3 Exercise 3 PLS, PLF····································································································Project name QTEST3 ········· 4-38 4.8.4 Exercise 4 CJ, CALL, RET, FEND························································································Project name QTEST4 4-39 CHAPTER 5 BASIC INSTRUCTION -PART 2- 5- 1 to 5-58 5.1 Notation of Values (Data)················································································································ 5- 1 5.2 Transfer Instruction ························································································································· 5- 9 5.2.1 MOV (P) ··························································································································· 5- 9 5.2.2 BIN (P) ·····························································································································