Home
GX Works 2 Operating Manual Stru
Contents
1. 5 20 structured ladder 1 2 Structured ladder editor pp 6 5 structured ladder FBD pp 8 2 structured ladder FBD editor 6 5 8 2 Structured project 1 2 Symbolic information 11 5 T sarine DE 7 4 RS 4 3 templates ee 7 5 6 15 rr a 2 2 2 U 45 Mee 13 3 User Library cR 13 4 V Vatlable er ee suene 8 19 8 37 IW WANING ee rer EU 10 6 10 7 WOrk WINGOW 2 2 writing symbolic information from programmable controller M 11 5 SPECIFIC POSITION x O LL O Z O X lt N COMPILING PROGRAMS CONVERTING sad WRITINGREADING DATA TO FROM PROGRAMMABLE CONTROLLER CPU MONITORING ome 8 0 t D X Og Zo t 2 INDEX APPENDIX SETTING OPTIONS Index 3 Microsoft Windows are registered trademarks of Microsoft Corporation in the United States and other countries Ethernet is a trademark of Xerox Corporation All other company names and product names used in this manual are trademarks or registered trademarks of their respective companies GX Works2 Version1 Operating Manual Structured Pro
2. e Select View Print Wrap Position z The wrapping position for printing window is displayed lt Zo Wrapping position uu cz OQ nO P P P wa PI 3 C 9 x10 x11 M22 H X12 x13 M23 N Z u gt EI testes abcess ADD o Dac 032 D33 D34 010 2 2 D o ADD D36 037 PROGRAM Q1 CONFIGURATIONS Point Wrapping positions When the paper size is changed by the print setting the wrapping positions are adjusted automatically SETTING LABELS COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST fee PROGRAMS EDITING STRUCTURED N 2 nc nc Lu e t m iS GX Works2 8 EDITING STRUCTURED LADDER PROGRAMS MEMO MELSOFT SPECIFIC POSITION x o LL O X lt N 9 SEARCHING FOR SPECIFIC POSITION This chapter explains how to move to a specified position in the program COMPILING PROGRAMS CONVERTING s WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU 9 1 Searching for Specific Position in ST Program 9 2 9 2 Searching for Specific Position in Structured Ladder FBD Program 9 4 TT 0 t D YX Og Zy t p ENT APPENDIX SETTING OPTIONS
3. Stop Build by Error 25 Warning 100 Display contents Set the items on the screen Item Description Error Set the number of errors that stops compilation 1 to 9999 Warning Set the number of warnings that stops compilation 1 to 9999 10 6 10 4 1 Changing the number of errors and warnings that stop compilation 10 4 Changing Operating Conditions of Compilation 10 4 2 Hiding warning messages Hide messages displayed on the Output window when compiling programs The registered warnings are not displayed on the Output window Screen display SPECIFIC POSITION or O LL O Z I O X lt N Select Tool Options Compile gt Output Result Invalidate Warning Disable Warning Codes Add Delete To register the warnings enter the warning code and click the 3 button COMPILING PROGRAMS CONVERTING a mh Operating procedure WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU The registered warnings are not displayed on the Output window Invalidate Warning Invalidate Warning Disable Warning Codes C2800 Disable Warning Codes 000 2800 Delete Delete Enter MONITORING ome 8 e cancel the registration select the warning code and click the sete button The unregistered warnings are displayed on the Output window Invalidate Warning Invalidate Warning Disable Warning Cod
4. 1 16 1 3 5 List of functions for editing in ST language pp 1 17 1 3 6 List of functions for editing in structured ladder FBD 1 18 2 SCREEN CONFIGURATION 2 1to2 2 2 1 Overview of Screen Configuration 2 2 3 PROGRAMMING PROCEDURE 3 1to3 4 3 1 Creating Programs 3 2 4 PROGRAM CONFIGURATIONS 4 1to4 16 4 1 Program Configurations of Structured Project 4 2 4 2 Creating Program Files and Tasks 4 3 4 2 1 Procedure for creating program files and tasks pp 4 3 4 2 2 Registering program blocks to tasks pp 4 4 4 2 3 Selling executing Condition S 5 22 22 029 iko 4 7 4 3 Creating POUs 4 10 4 3 1 Procedure forcreating POLIS otis e roster odd su acto sunu etek 4 10 4 4 4 3 2 Setting properties of functions and function blocks Using POUs 4 4 1 Using functions and function blocks pp o SETTING LABELS 5 1 5 2 9 3 5 4 5 5 5 6 5 7 5 8 Label Setting Screens Setting Global Labels Setting Local Labels for Program Blocks Setting Labels for Functions and Function Blocks Common Operations for Setting Labels 5 5 1 ASS E E 5 5 2 5 5 3 Selecting data IV OCS nauta oen eae a uisus ba ulia Polon aes 5 5 4 E GITIING TOWS Setting Structured Data Labels 5 6 1 Setting data type of
5. 2 0 FO Ow co Q ac D HP 2 2 HP wn Z Q LADDER PROGRAMS Er GX Works2 5 SETTING LABELS 5 1 Label Setting Screens This section shows label setting screens Labels are set on each screen below according to the type of label Navigation Project Parameter Intelligent Function Module Global Device Comment Global Label ABS Global t Program Setting E Program 08 MAIN 01 P Program g Local Label i FB FLIN E E FB 01 E Program Local Label 2 88 FUM 01 Program Local Label 3 a Structured Data Types AMR Structd E Local Device Comment 3 Device Memory hai Device Initial value i WW lt User Library a Global Label Setting screen Define labels that can be used for all POUs in the project Section 5 2 Global Label Setting Global1 Der Class Label Name Constant Y Comment Remark Relation with System System Label Name Attribute van GLOBAL v Transport Complete _ m MX 100 VAR GLOBAL been 1 435 1 VAR GLOBAL CONSTANT TU iu MA ooo VAR GLOBAL Product amp Data Stuctt Detail Setting Detail Setting Stuc EEUU sLabell mam RENE o ERN lee bi fee exo xxiell6 Bows VAR GLOBAL NN __ xiir Browse Li o System Label Operat
6. e Double nsianed Bit 32Bit Label Data Type Device Address Double VWord Unsigned Bit s26 it Double wordIUnsigned ABit 32Bi Double Word Unsigned Bit s26 it Automatically set data Point When not using bit specification When the bit specification is not used uncheck the Use Bit Designation item on the Structure Device Setting screen 5 22 5 6 3 Assigning devices to structured data type labels 5 6 Setting Structured Data Type Labels 5 6 4 Assigning devices to structure array type labels Set devices for the structure array type global labels on the Structure Device Setting screen When VAR_GLOBAL is set for Class and the structure array is set for Data Type on the Global Label setting screen Detail Setting is displayed in the Device and Address columns Click Detail Setting to display the Structure Device setting screen Screen display OVERVIEW 2 i Click Detail Setting on the label setting screen 2 lt s Global Label Setting Global DER gt E Label Name Data Type Constant Device Address Comment Remark Relation with System Label System Label Name Attribute B LLI 1 Structll0 3 Detail Setting Detail Setting Struct1 2 2 956 DQ 4 b System Label Operation To reflect the changes of the table above to the 3 Je Change CJ el Register Release system label database Notification De
7. Close the window displayed on the uppermost position Move to the next uppermost window cr A m i ITI Tl Tl 5 YON YOON 1 O ct Appendix 1 2 Navigation Window toolbar icons The following table shows the Navigation Window toolbar icons esu Shortcut key Corresponding menu Description Reference Add New Data Add data to the project Copy selected data Common Paste copied data RN Expand All Uncompiled Expand all uncompiled data in the tree on the Ry Data Project view and the User Library view Common Collapse All Collapse all data in the tree on the Project view P and the User Library view Z i ta App 6 Appendix 1 2 Navigation Window toolbar icons Appendix 7 List of Toolbars and Shortcut Keys Appendix 1 3 Toolbar icons and shortcut keys for setting labels The following explains the toolbar icons and the corresponding shortcut keys used for setting labels SPECIFIC POSITION x O LL O Z I O X lt N B Label toolbar icons 1 1 22 The following table shows the Label toolbar icons and the corresponding shortcut keys O Shortcut key Corresponding menu Reference 2 2 T Shift Insert New Declaration Before Add a row above the cursor position ee OO 7 DEBERE New Declaration After Add a row below the cursor position E gt F
8. 13 5 13 6 13 3 5 Deleting user library from project pp 13 8 13 3 6 Setting password to user IIBFaty e el eei a coepi axes a el esses Meee en dri 13 9 t 13 10 13 4 Using User Library 13 11 13 4 1 Installing user library data to project pp 13 11 13 4 2 Creating programs using user library pp 13 12 T343 Eding IS Me RE EE 13 13 AMpdatndqiusel IDEAE yii a 13 15 1945 5 Displaymq Sell 13 16 14 SETTING OPTIONS 14 1 14 6 14 1 Basic Operations 14 2 14 2 Option Setting List 14 3 APPENDIX App 1 to App 20 Appendix 1 List of Toolbars and Shortcut Keys App 2 Appendix 1 1 Common toolbars and shortcut KeyS pp App 2 Appendix 1 2 Navigation Window toolbar icons pp App 6 Appendix 1 3 Toolbar icons and shortcut keys for setting labels App 7 Appendix 1 4 Toolbar icons and shortcut keys for setting device memory pp App 8 Appendix 1 5 Toolbar icons and shortcut keys for verification result pp App 9 Appendix 1 6 Toolbar icons for executing sampling trace pp App 9 Appendix 1 7 Toolbar icons and shortcut keys for program App 10 Appendix 1 8 Toolbar icons and shortcut keys for I O system setting function App 19 Appendix 1 9 Shortcut keys for operating intelligen
9. OVERVIEW The contents excluding label names displayed on the tool hints can be set by the following operation Operating procedure 2 O 1 Select Tool gt Options Program Editor Structured Ladder FBD ST gt 4 Hint gt gt uu LL LL x gZ 2 Set the following items O Display a monitoring result When the labels used for element when only O Monitored Value during zs the elements are bu Species for array a structured monitoring data type the monitoring values not displayed lt Display a label class VAR_GLOBAL e e C o D o Device Display a device assigned to the label in the device x4 format Tool Hint Display Items Addes Display a device assigned to the label in the address 94 1X1 format Data Type Display a data type of the label Bit Constant Value Display a constant value of the label FALSE Display label comments GLOBAL comment Display a remark of the global label GLOBALI remark Single Line Line Display tool tips in a single line Tool Hint Display Format Line Display tool tips in multiple lines PROGRAM Q1 CONFIGURATIONS SETTING LABELS Single line GLOBALI Out01 GLOBALL GLOBAL X1 36IXL Bit FALSE Comment of GLOBAL1 Remark of GLOBAL COMMON OPERATIONS lt PROGRAM EDITORS lt Multiple lines gt GLOBALI utl gt
10. Delete the selected data Ctrl Shift E Paste the Paste the copied data to a folder data to a folder Add the EE function module data UT Shift shift LE MOGUIG to the project being edited Close the project being edited and exits Move to the next cross reference information TT 0 t D YX Og Zy t p ENT SETTING OPTIONS Move to the previous cross reference X information Move focus between the Cross lt Reference window and work windows x LLI e z Appendix 1 1 Common toolbars and shortcut keys App 5 r GX Works2 APPENDIX Toolbar Shortcut key icon Corresponding menu Description Reference Find Device Search for a device label in the program E Ctr Find String Search for a string 1 E a Co Replace Replace device label Replace String Replace a string Search for an item in the downward direction Search for an item in the upward direction Start monitoring the current values of Common registered devices labels and intelligent Start Watching function module Stop monitoring the current values of Stop Watching registered devices labels and intelligent function module Register Device Test with Execution Condition Register the device test with execution condition
11. Display on the Local Label Setting screen For the Structure Device Setting screen the read only screen is displayed EDITING ST PROGRAMS Q ac D HP 2 2 HP wn Z Q LADDER PROGRAMS 5 6 3 Assigning devices to structured data type labels 5 21 r GX Works2 5 SETTING LABELS B Entering device names automatically The Automatic filling function can be used when setting series of devices for the same data type data on the Structure Device Setting screen When using the Automatic filling function whether to use bit specification of word device can be selected 1 Click Detail Setting on the label setting screen The Structure Device Setting screen is displayed 2 Enter the device name to the Device Address column Series of devices are automatically set in the cells following the one entered skipping the cells where devices are already set When using bit specification Label Mame Data Type Address E AAA Double w ard LI nsigned Bit 32Bit Double W ord Unsigned Bi 328it y Double w ord LI nsianed Bit 32Bit Label Hame Data Type Device Address Double Word Unsigned Bit 32Bit Double W ord Unsigned Bit 22Bit Automatically co 0 5 set data Double wVaerd Lnsigned Bi 32Bit When not using bit specification Label M ame Data Type Device Double VWord Unsigned Bit s2B it p1l Double W ord Unsigned Bi 328it p
12. MITSUBISHI MELSOFT Integrated software GX Works2 vso Operating Manual Data Name Filtering Cond Filtering Condition ition P s NN G 122 Step No 2 Device md User Library tee ae ee a Step No 5 Device Inj Cross Pielerenoe Inlcenalion of Al Device Labet 11 Reference output Simple Devico Labeli Crenlyahe DataType Deis ftom j Adone Conner xo ai m x ail ail X K10 Se 00 00 ao ail vm va MELSOFT ntegrated FA Software E SW1DNC GXW2 E SAFETY PRECAUTIONS Always read these instructions before using this product Before using this product thoroughly read this manual and the relevant manuals introduced in this manual and pay careful attention to safety and handle the products properly The precautions given in this manual are concerned with this product For the safety precautions of the programmable controller system refer to the User s Manual for the CPU module In this manual the safety precautions are ranked as NWARNING and NCAUTION TERME 1 Indicates that incorrect handling may cause hazardous conditions resulting in l WARNING death or severe injury 1 I Indicates that incorrect handling may cause hazardous conditions resulting in t1 CAUTION minor or moderate injury or property d
13. Operations for Setting Labels This section explains the common operations for each label setting editor OVERVIEW 9 5 1 Classes 2 gt ad 2 0 Label classes indicate from which POU and how the label can be used nf Selectable labels are different according to the type of label setting editor The following table shows selectable labels for each label setting editor 3 O Applicable x Not applicable Q Type of usable label setting editor Z u Class Description n Global label Local label Function Function block g OO A common label that can be used for program e VAR GLOBAL _ A common label with a constant value that can be X CONSTANT used for program blocks and function blocks A label that can be used for program blocks and A label with a constant value that can be used for VAR program blocks and function function blocks p x fo O 1 Alatch type label that is used within the range of VAR_RETAIN declared program block and function block A label that is used for an input of function VAR_INPUT function block x x Q Its value cannot be changed in a POU VAR OUTPUT A label that is used for an output of function block Q A label that can be used for both input and output VAR IN OUT of function block with the same name x x x Its value can be changed in a POU 1 Not supported by FXCPU PROGRAM y CONFIGURATIONS SETTING LABELS O COMMON OPERATIONS mj
14. PROGRAMS Q or D HP e D 2 N Z Q LLI LADDER PROGRAMS 6 1 1 Available programming languages 6 3 Er GX Works2 6 COMMON OPERATIONS OF PROGRAM EDITORS 6 1 2 Available comment formats The following explains a comments that can be used for each program editor B Comments on the ST editor On the ST editor comments are enclosed by pem and y Tran01 TRUE B Comments on the structured ladder FBD editor On the structured ladder FBD editor comments can be pasted anywhere in the same manner as ladder symbols gt Section 8 9 amp POU 02 PRG Program Structured Ladder FBD In the Guided mode comments can be J added at the start of a ladder block C gt Section 8 10 9 B Label comments Label comments and remarks set at label setting can be displayed on tool hints Section 6 2 8 6 4 6 1 2 Available comment formats 6 2 Common Operations of Program Editors 62 Common Operations of Program Editors This section explains the common operations of program editors ST editor and structured ladder FBD editor The operating method when using a structured ladder FBD editor is explained in this section OVERVIEW 2 a m a a 6 2 1 Using POUs Function Block Selection window ic 4 D ii E Select POUs such as functions or function blocks from the Function Block Selection w
15. i GX Works2 4 PROGRAM CONFIGURATIONS B Task executing conditions An executing condition for a program file can be set to a task A task executing condition is set on the Property screen of the task Select the task to be set in the Project view in advance Screen display Select Project Object Property Property Details comment Attributes Event TRUE Interval 0 Priority 31 Data Name Task 01 Title Last Change 6 26 2009 9 29 06 AM Operating procedure e Set the items on the screen Item Description s Kec dung condition TRUE Execute the task in every scan Scan execution Event FALSE Execute the task in the cycle specified in the Interval field Fixed scan execution Device or label name Execute the task when the specified device or label is TRUE Event execution Set the cycle time to execute the task in a constant cycle Enter FALSE in the Event field Set the cycle time in time type format Ex T 100ms T 24d20h31m23s647ms For details of time type format refer to the following manual MELSEC Q L F Structured Programming Manual Fundamentals Do not set shorter time than the scan time of sequence program Set the task execution priority in the range from 0 to 31 Tasks with smaller values are Priority executed by priority Tasks of the same priority are executed in the alphabetical order of task data names Title Enter a title of the task
16. GX Works2 5 SETTING LABELS Reading label setting data Read label setting data from CSV files Operating procedure 1 Select Edit gt Read from CSV File amp The Read from CSV File screen is displayed Read from CSV File Look in Co GX W orks2 0 E3 Gifalobalt csv My Recent Documents My Network File name Places Files of type CSV tab delimited cs m 2 Select the file name to be read and click the 2 button The following message is displayed MELSOFT Series GX Works Reading of the specified File will start Do vau want to continue Caution The current header setting will be deleted IF many windows are open iE may take mare time to read Once reading is executed it cannot be undone 3 Click the Yes button The label setting data is read to the project 5 8 Writing Reading Data to from CSV Files B CSV file format The title name of Label Setting Editor links with the title name of the CSV file Data of column which coincides in the title name of Label Setting Editor in the CSV file is read to Label Setting Editor Data of column which does not coincide in the title name of Label Setting Editor cannot be read to the CSV file Columns order of the CSV file can be read even if it does not coincide in the columns order of Label Setting Editor OVERVIEW 2 ke lt l
17. Set an argument of the template in the ja Ctrl Ait Mark Template Right selected status from the right by mm selecting the menu each time COMPILING PROGRAMS CONVERTING Set a bookmark at the cursor line If a Ctrl 7 Toggle has already been set delete the set bookmark s L ih maie E peers mama a WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU Ctrl x Nm 1 Zoom in the screen one level 6 2 4 Ctrl Num 1 Zoom out the screen one level Ctrl Jump to the specified line Eu shift Zoom Header Body Mh the label setting screen of the shift Delete LM Cut the selected data the selected data Paste the cut copied data at the cursor Shift Insert Paste position Instruction Help Display details of instructions details of instructions Common Enter an assignment operator when Section EE See LS rd editing the inline structured text program 7 1 1 1 Num indicates keys in the numeric keypad MONITORING TT 0 t D YX lt Zo o m m ENT SETTING OPTIONS APPENDIX INDEX Appendix 1 7 Toolbar icons and shortcut keys for program editors App 13 GX Works2 APPENDIX B Structured Ladder FBD toolbar icons and shortcut keys The following table shows the toolbar icons and the
18. To add or delete an argument select a function or a function block and proceed the following operation Adding an argument e Select Edit Number of Pins Increment Deleting an argument e Select Edit Number of Pins Delete 281 Increment pins OR E 3 4 Added arguments Decrement pins Point Adding and deleting arguments Arguments can also be added or deleted using the following method Using the Or key Changing the height of the ladder symbol using the mouse 8 20 8 6 3 Changing the number of arguments for functions and function blocks 8 Changing Display Format of Variables 67 Display Format of Variables This section explains how to change the display format of variables OVERVIEW 8 7 1 Displaying variable names in multiple lines 2 z Z Change the view mode to display variable names of contacts and coils in multiple lines by setting the ni option oes Operating procedure 3 1 Select Tool Options Program Editor gt Structured Ladder FBD gt Label Z 2 Select Display label name comment of contact or coil in multiline zd OO Y c D o J Setthe values of Display Lines and Visible Characters per Line Single line Multiple lines Local al 2345670490 1234557 sa 50 co oO m m m m 5 8 7 2 Displaying l
19. Compile Result 1 hitializationCommand gt A EN ENOT s B dj D0 o o n n n 2 AD ow 3 a MI cue 0 Vw 20 oS D 4 im Oo woo o 4 vw 8 al ow Ww co Compile Result ee MOV EN gt LD M8190 eS re 0 5 B8 o 0 2 INC DO INC D1 mmand e v gt gt INC r a sc 2 es e LD m8190 1 1 EN 0001 012287 BD ee di n LD M8190 em we a ok oe Ace we OUT M8189 4 3 eee oe TE D12287 D1 D2 MEL EN ENO EN ENO IM S SL Do 1 di 51 di D MM SS 88 View Display Compile Result The compilation result is not displayed when the compilation target is an assignment command in which the source data amp and the target data are the same Tm Example in ST language MO M0 Poi oint Precautions on FXCPU For FXCPU when a block password with the validated setting for Read protect the execution program exists the compilation result cannot be displayed 6 14 6 2 6 Opening label setting screen of program editor being edited 6 2 Common Operations of Program Editors 6 2 8 Setting display contents of tool hint Content defined on the label setting screen as tool hints is displayed by placing the cursor on a label name on the program editor
20. Data Double W ord Unsigned Bit s26 it M0011 Double w ord Unsigned Bit 32Bit XMDU 13 Duces aw Double Using bit specification Devices can be set by specifying a bit device of word device when entering devices automatically 1 Click Detail Setting on the label setting screen The Structure Device Setting screen is displayed 2 Check the Use Bit Designation item 3 Set the device name for the start element data of the array Devices are set to the same data type or bit device data type 5 24 2 6 4 Assigning devices to structure array type labels 5 6 Setting Structured Data Type Labels Point Data for which device name can be entered For the structure array type a device name can be entered only for the start element of array For the subsequent array elements device names offset from the device number set for the start element are automatically set Offset values An expression such as 1 2 can be specified for an incremental value of device such as UO GO When 0 is specified for the incremental value the device number same as the data set to the start of devices is set to all data in the array OVERVIEW SCREEN CONFIGURATION lt De D O X A PROCEDURE PROGRAM Sy CONFIGURATIONS SETTING LABELS COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST PROGRAMS Q ac
21. Data Security Setting reading writing data Print Batch print multiple data in the project Print Preview Display a print preview of data to be batch printed Print Window Print the open screen Print Window Preview Display the print preview of the open screen Printer Setup Change the printer settings Display the recently used GX Works2 project paths and open the selected project Start GX Developer Start GX Developer from GX Works2 Exit Exit GX Works2 Recently used files 1 to 4 Edit common function Undo Restore the previous processing status Redo Restore the processing deleted with Undo Cut Cut the selected data Copy Copy the selected data Paste Paste the cut or copied data at the cursor position 1 3 1 List of functions common to Simple project and Structured project Reference Intelligent Common Intelligent Common Chapter 13 Common Reference 1 3 List of Functions Find Replace common function Reference Cross Reference Display the usage of selected device or label Device List Display the usage of devices gt Find Device Search a device label in the program a Find Instruction Search an instruction o Find Contact or Coil Search a contact or coil corresponding to the specified 2 device Find String Search a string T Replace Device Replace a device label in the program Common 2 lt Replace Instruction Replace an instruction Z Replace Str
22. Device Memory F9 Device Initial value For the operating method of the ladder editor refer to the following manual K gt GX Works2 Version 1 Operating Manual Simple Project 2 User Library Jj Connection Destination SFC editor For the operating method of the SFC editor refer to the following manual K gt GX Works2 Version 1 Operating Manual Simple Project Point Creating new program data Program data are created in the project view 15 GX Works2 Version 1 Operating Manual Common Program data are created paired with a label editor when a new POU is created 6 1 Types of Program Editor 6 1 1 Available programming languages The following table shows the programming languages that can be used for each POU O Available x Not available Programming language POU Structured 1 BEBE ladder FBD Ladder 1 SFC OVERVIEW vz 1 Not supported by FXCPU EE Point o Changing programming languages e Select a programming language when creating a new POU a For creating a new data refer to the following manual vie GX Works2 Version 1 Operating Manual Common The programming language that is selected when creating a program cannot be changed later To change to another programming language create a new POU PROGRAM Q1 CONFIGURATIONS SETTING LABELS COMMON OPERATIONS f OF PROGRAM EDITORS EDITING ST
23. OVERVIEW 1 Click the head left end of the comment POU 03 PRG Program Structured Ladder FBD Incut Comment 2 Drag it to the desired position aMi E piperren Var_04 _IN 0ut03 2 ZEE Var 05 IN ZEE Ecke cm me RA MM XE DAT TES ES LLI EE 5 m M eo o Click and drag E OO OO X X aA amp POU 03 PRG Program Structured Ladder FBD B ESSEN CC TET EEEE 04 Out03 Fo ERTET Var 0 S PROGRAM Q1 CONFIGURATIONS SETTING LABELS COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST fee PROGRAMS EDITING STRUCTURED N 2 nc nc Lu e t m 8 9 3 Moving comments 8 33 iS GX Works2 8 EDITING STRUCTURED LADDER PROGRAMS 8 10 Editing Guided This section explains how to edit programs in the Guided mode which is convenient when data is entered mainly from the keyboard Screen display Select Edit Guided Mode Guided Editing 8 amp Ladder PRG Program Structured Ladder FBD Grid cursor Grid in Guided mode 8 10 1 Overwrite mode and insert mode Select either overwrite mode or insert mode in the Guided mode Edit Grid cursor color Overwrite Mode Overwrites the existing ladder symbol at the cursor Bl
24. ms 0 5ms 1000ms 129 40 0 ms 0 5ms 1000ms Remote Reset 130 20 0 ms 0 S5ms 1000ms Allow I31 10 0 ms 0 5ms 1000ms High Speed Interrupt Setting 6 Output Mode at STOP to RUN Interrupt Program Fixed Scan Program Setting Previous State High Speed Execution C Recalculate Output is 1 scan later ans Symbol Example B eem e6 9o 9o G o o GENERIC TERMS AND ABBREVIATIONS IN THIS MANUAL This manual uses the generic terms and abbreviations listed in the following table to discuss the software packages and programmable controller CPUs Corresponding module models are also listed if needed Generic term and abbreviation GX Works2 Existing application GX Developer GX IEC Developer MELSOFT Navigator iQ Works Personal computer Basic model QCPU High Performance model QCPU Universal model QCPU QCPU Q mode LCPU FXCPU FXGP WIN MELSAP3 MELSAP L SFC TERMS Description Generic product name for SWnDNC GXW2 E n version Generic product name for SWnD5C GPPW E SWnD5C GPPW EA SWnD5C GPPW EV and SWnD5C GPPW EVA n version Generic product name for SWnD5C MEDOC3 n version Product name for the integrated development environment included in SWnDNC IQWK iQ Platform compatible engineering environment MELSOFT iQ Works n version Abbreviation for iQ platform supporting engineering environment MELSOFT iQ Works Generic term for personal c
25. 2011 SH NA 080781ENG K Section 1 3 1 Japanese Manual Version SH 080732 P This manual 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 manual 2008 MITSUBISHI ELECTRIC CORPORATION INTRODUCTION Thank you for purchasing the Mitsubishi integrated FA software MELSOFT series Before using this product thoroughly read this manual to develop full familiarity with the functions and performance to ensure correct use CONTENTS SAFETY PRECAUTIONS Em A 1 CONDITIONS OF USE FOR THE PRODUCT A 2 Fo Ns A MX Seeeeeen A 3 NE A 6 S e Iz Eos er eC c PM ee A 6 MANUALS HE DUM rdi E A 12 GENERIC TERMS AND ABBREVIATIONS IN THIS MANUAL pp A 21 A 21 1 OVERVIEW 1 1to1 20 1 1 What is Structured Project 1 2 1 2 Features of Structured Project 1 2 1 3 List of Functions 1 5 1 3 1 List of functions common to Simple project and Structured 1 5 1 3 2 List of functions for editing in ladder language pp 1 16 1 3 3 List of functions for editing SFC diagrams 4 1 16 1 3 4 List of functions for editing SFC
26. Delete intelligent function module data Display properties of an intelligent function module data Save data of the positioning module selected on the Project Save the Positioning Module Data view to a file Read from the Positioning Module Data Intelligent Function Module Parameter List Open Other Data Open Other Project Read ASC Format File Import GX Configurator QP Data Export to GX Developer Format File Save an open project in GX Developer format Read data from the positioning module and reflect it to the positioning module selected on the Project view Display a list of set unset parameters of an intelligent function module Open a project created with GX Developer Read an ASC format file Read a project created with GX Configurator QP Library Create Create a new library Install Import a created library to the project Deinstall Reload Rename Delete a library from the project Update the library imported to the project Rename a library Open Enable editing of a library Close Disable editing of a library Change Password Set a password for a library Save As Name and save a project Save Save a library file Help Display help information of the library Security Change Password Change the password of the current login user Manage user information of the project Add delete a user or change the user information Set the access authorization of each user related to
27. OF PROGRAM EDITORS EDITING ST PROGRAMS Q ac D HP 2 2 HP wn Z Q LADDER PROGRAMS 5 5 1 Classes 5 13 GX Works2 5 SETTING LABELS 5 5 2 Data types Label data types are described in the following table For details such as value ranges of each data type refer to the following manuals gt MELSEC Q L F Structured Programming Manual Fundamentals MELSEC Q L Programming Manual Common Instruction gt User s Manual Function Explanation Program Fundamentals of the CPU module to be used Note that data types are different according to the programming language ladder SFC ST structured ladder FBD The following table shows data types that can be used for each programming language Applicable x Not applicable Programming language Data type ST Structured ladder FBD Word signed NE EE Q Double word signed EE NEN Word unsigned 16 bit string Q Double word unsigned 32 bit string Q Single precision real 1 Double precision real 2 i SF O Retentive timer 4 x 1 For FXCPU this item is supported by FX2N FX2Nc FX3G FX3u and FX3uc only 2 Supported by Universal model QCPU LCPU only 3 For FXCPU this item is supported by FX3U and FX3uc only 4 For FXCPU this item is supported by FX1N FX1NC FX2N FX2NC FX3G FX3U and FX3uc only 5 For ladder language these items cannot be used for inline structured text 5 14 2
28. Procedure Display the program editor Select Project view gt POU Program gt POU Program Edit the program in the specified programming language 4 3 1 Procedure for creating POUs Reference GX Works2 Version 1 Operating Manual Common Reference Chapter 5 Reference Chapter 6 4 3 Creating POUs 4 3 2 Setting properties of functions and function blocks oet properties of a function and function block Select a function or function block to be set in the Project view in advance Screen display Select Project gt Object Property For function For function block Property Property Details Comment Details comment Data Mame FUN 01 Data Name FB 01 Title Title of Function Title Title of Function Block Result Type Word Signed Use Macrocode Use EN ENO w Use MC MCR Type Function Use Language Function Block Last Change 6 26 2009 11 47 32 AM Language Structured Ladder FBD Last Change 6 28 2011 11 59 33 PM Operating procedure e Set the items on the screen Item Description Set the data type of return value of the function Click and select a data type from the list Apply function block program codes to each location where instances are used at compilation Even if EN of the function block is OFF the output variable is retained at ON To turn OFF the output variable when EN is OFF select the Use MC MCR ch
29. The outputs and the current values of timers in the task are reset when the task is not Timer ds executed Singh Th tput d th t val f ti in the task tained when the task i t Control Notchecked e m e current values of timers in the task are retained when the task is no Interval Attributes 4 8 4 2 3 Setting executing conditions 4 2 Creating Program Files and Tasks Point Interruption start for QCPU Q mode LCPU To enable an interruption start set an interrupt pointer number IO to 131 in the Event field In this case create a program using the basic instruction El Enable Interrupt for the program blocks registered to scan execution tasks Interruption start for FXCPU The following shows the settings for FXCPU e 1001 rising input interruption 1000 falling interruption 1600 to 1800 timer interruption OVERVIEW 1010 to 1060 counter interruption 5 For details refer to the following manual FXCPU Structured Programming Manual Device amp Common When the program block registered to the task is created in the ladder m When the program block registered to the task is created in the ladder items of Attributes cannot be set OQ When the program end instruction is used When the program end instruction such as the FEND or GOEND instruction is used program blocks and or tasks 3 following the program end instruction are not executed z The following tables show the task ex
30. a global label and a local label This error can be F1055 Output window lt gt 1 Warning 0 CheckWarning 0 English Structured Q06UDH Host Station 1 WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU Point Build function Only the program being edited is converted when the Convert the selected program is selected on the Confirm Build Method screen When two or more changes are required in a program and if Execute compile after conversion is selected every time program is changed processing time is required for each compilation To reduce compilation processing time select Convert the selected program first and select Execute compile after conversion after all changes are made in a program Compiling programs when adding changing labels For precautions on compiling programs when adding changing labels refer to Section 10 5 3 MONITORING eme 8 T 0 0 Og Z t INDEX APPENDIX gt SETTING OPTIONS CD Er GX Works2 10 CONVERTING COMPILING PROGRAMS 10 2 Compiling All Programs This section explains how to batch compile all program blocks that are registered to tasks Compilation target Converts compiles all program blocks Operating procedure 1 Select Compile gt Rebuild All The following message is displayed Uncheck the item if the duplicated coil check ladder c
31. be switched to hide 8 8 7 T Section Grid Indicate specific positions of tab stop and start end positions of lines 888 8 1 Creating Ladder FBD Programs 8 1 1 Selecting editing modes Select a program editing mode The following table shows the selectable modes Place ladder symbols such as contacts and coils in a ladder block Select mode Connect ladder symbols with a line Section 8 2 This mode is used for editing programs mainly with the mouse Interconnect mode Connect placed ladder symbols with a line pes OVERVIEW 2 Place ladder symbols such as contacts coils and instructions within the grid x A Section or Guided mode frames 8 10 This mode is used for editing programs mainly with the keyboard m 5 oo B Mouse cursor and grid S The following table shows different appearances of the mouse cursor and grid according to the mode D Table 6 4 1 1 Displays in different editing modes for the structured ladder editor che OO roe D o Mode Menu and toolbar Auto connect Mouse cursor Grid display Edit Select Mode Select mode s 101 4 O a x o dit Interconn ect Mode EN 1 O LL mode LF z 5 oO Edit Guided Mode mm zi 86 HH SETTING LABELS COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST lee PROGRAMS EDITING STRUCTURED N
32. chm Text file txt Operating procedure 1 Select a user library to which a property is set and select Project gt Object gt Property 5 The Property screen is displayed Details Comment Data Name Lib 1 Title LibO1 Title Library File C Documents and Settings Administrator My Last Change 6 15 2009 10 48 05 PM Help File C Documents and Settings 4dmir Browse 2 Click the button The Open a help file screen is displayed 3 Select a file to be set The path and name of the selected help file are displayed on the Property screen 4 Click the button The specified help file is set as the user library help 13 10 13 3 7 Set help file to library 13 4 Using User Library 13 4 Using User Library SPECIFIC POSITION LL 2 O X lt o This section explains how to use a created user library 13 4 1 Installing user library data to project Install user library data from the existing library file to the project Screen display COMPILING PROGRAMS CONVERTING s Select Project gt Library Install Install Library Library File C Documents and Settings 4dministratoriMy Gocuments Use WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU Library Name LlserLibO1 OK Cancel Operating procedure 1 Set the items on the screen gt MONITORING QJ ome 8 Item Description Lib
33. project are displayed Display hide the Device List window Common Device List In the Device List window the usage of selected device is displayed Display hide the Watch window Watch 1 to 4 In the Watch window the monitoring result is displayed Intelligent Function Module Monitor rob EURCHOnMOdMe Monitor Display hide the Intelligent Function Module Monitor window Intelligent Intelligent Function Module Guidance e the Intelligent Function Module Guidance Display hide the Find Replace window Find Replace In the Find Replace window the search replace result is Common displayed Break Point Window Display hide the Break Point window Break Device Window Display hide the Break Device window Common Skip Range Window Display hide the Skip Range window COMMON OPERATIONS J OF PROGRAM EDITORS EDITING ST PROGRAMS Q D te e 2 a kK N Z Q LLI LADDER PROGRAMS 1 3 1 List of functions common to Simple project and Structured project Tue r GX Works2 1 OVERVIEW Online common function Reference Common Password Keyword nn programmable controller CPU PLC Memory Operation M PLC User Data E Copy the program memory data in the programmable Common Program Memory Batch Download Latch Data Backup standard ROM Common PLC Module Change J Common Register Cancel Display Module Menu 1 3 1 List of functions common to Simple proj
34. 1 Select Tool Options gt Program Editor gt Structured Ladder FBD gt Guided EDITING ST lee PROGRAMS 2 Select Enter label names after contacts and coils EDITING STRUCTURED N 5 e Lu t m 8 10 6 Wrapping ladder 8 37 iS GX Works2 8 EDITING STRUCTURED LADDER PROGRAMS 8 10 9 Inserting comment entry fields to ladder blocks to be added Insert a comment entry field at the top of a ladder block in the Guided mode Operating procedure 1 Select Edit gt Guided Mode gt Auto Comment i 2 Select Edit New Ladder Block List Before amp A ladder block with a comment entry field is added Point e Width of automatically inserted comment The width of automatically inserted comment can be changed by the following operation Select Tool Options Program Editor gt Structured Ladder FBD gt Guided and set the Auto Comment Block Width Entering a comment in the desired grid Hold down the f key and press the key and a comment can be entered to the grid at the cursor position 8 38 8 10 9 Inserting comment entry fields to ladder blocks to be added 8 11 Checking Wrapping Position for Printing 8 11 Checking Wrapping Position for Printing This section explains how to display the wrapping positions of ladder for printing window Operating procedure OVERVIEW
35. 20 VO Compiling programs when adding changing labels When programs are compiled after adding changing labels devices are reassigned to labels in uncompiled POUS only Since previous device values may remain among the devices reassigned to labels clear the previous device values by the following procedure when adding changing labels 1 Add change labels only Do not edit the programs 2 Select Compile Build and compile the programs 3 Register added changed labels to the Watch window and clear the current values to 0 4 Edit the programs and select Compile Online Program Change Assigning devices to labels when compiling all programs All programs need to be compiled when the following operations are performed Changing the following PLC parameters 1 e Common Pointer No and Timer Limit Setting on the PLC System tab File Register and File for Local Device on the PLC File gt gt tab Settings on the lt lt Device gt gt tab e Changing the following option settings Default Length of String Data Type in Label Setting Editor e Settings in Compile Changing automatically assigned devices Updating instructions and application functions when opening Structured project 10 18 10 5 3 Precautions on Compilation 10 5 Compilation Changing PLC type Changing project type Reading data from programmable controller CPU except for when reading symbolic information
36. 5 e Lu t m 8 1 1 Selecting editing modes 8 3 iS GX Works2 8 EDITING STRUCTURED LADDER PROGRAMS 8 2 Editing Select This section explains how to enter instructions 8 2 1 Entering ladder symbols Enter ladder symbols such as contacts coils and application instructions Table 8 2 1 1 Ladder symbols Shortcut key Open Contact 1 1 Close Contact 2I Open Branch HI I3 Close Branch Input Label Output Label Horizontal Line 0 8 6 Vertical Line 5 Rising Pulse 12 tH Falling Pulse 1 dit Rising Pulse Close 3 E Falling Pulse Close 13 ow Comment t 1 These items cannot be used for FBD 2 Not supported by FXo FXos FXoN FXu and FX2c 3 Supported by Universal model QCPU LCPU Operating procedure 1 Select Edit Ladder Symbol ladder symbol The shape of the mouse cursor changes according to the selected ladder symbol 8 4 8 2 1 Entering ladder symbols 8 2 Editing in Select Mode 2 Click the position where the ladder symbol is entered in the program editing area The selected ladder symbol is entered 8 2 2 Entering instructions Enter an instruction in the Select mode Operating procedure 1 Select Edit gt Input Instruction 29 The Input Instruction screen is displayed Input Instruction Exit Browse Manual L Ladder symbol L Instruction device selection field
37. Common Applied Application Fxoy FX1 FXan FXiNc Tests ele FXu FX2c FX2Nc Learning the types and details of basic Using application ladder instructions Details Details Details language descriptions of TT devices and parameters Learning details of specifications ii E functions and instructions of SFC Learning the fundamentals for creating a structured program language Details Details Details Learning the descriptions of Using devices structured parameters and ladder FBD error codes or ST language Learning the types and details of sequence instructions Learning the types and details of application instructions A 17 How to read this manual Supported CPU Chapter heading Supported programmable Index on the right of the page controller CPUs are shown in number clarifies the chapter of icons under the section title currently open page 8 1 Nreating Ladder FBD Programs 8 1 Creating Ladder FBD Programs Ne E This section explains how to create ladder programs and functions for creating ladder programs on the gt structured ladder F BD editor The structured ladder FBD editor is a language editor in graphic format for creating programs in the structured ladder FBD language E Ladder symbols such as contacts coils and functions func
38. D12275 6 s d D12273 74 2MWID 12275 76 d MO 12273 74 Displaying in the entered format e Select View View Mode Label Variables are displayed in the format as they are entered Displaying in the device format e Select View gt View Mode Device Entered format is displayed in the device format As for labels the assigned devices are displayed in the device format Displaying in the address format e Select View View Mode Address Devices are displayed in the address format As for labels the assigned devices are displayed in the address format Displaying label comments e Select View View Mode gt Comment Label comments are displayed Device comments are not displayed Switching label device address display e Select View gt View Mode Change Label Device Address Mode The display is switched in order label device address by selecting the menu each time Change Label Device Address Mode First operation Second operation Entered format display Device format display Address format display Third operation 8 7 5 Changing display format of variable 8 23 OVERVIEW SCREEN Gd CONFIGURATION PROCEDURE lt De D O X A PROGRAM Q1 CONFIGURATIONS SETTING LABELS COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST lee PROGRAMS EDITING STRUCT
39. Intelligent indicated as the reference refer to the following manuals respectively Common GX Works2 Version 1 Operating Manual Common Intelligent GX Works2 Version 1 Operating Manual Intelligent Function Module 4 Parameter j e54 I ng II Ce Common Intelligent Function Modde lt amatectiedeeas lt Intelligent Global Device Comment Common GlobalLabel ttt Define labels shared among POUs Section 5 2 amp Global Program Setting 2 Initial Program ft ttt es Define the program execution order and type L gt Common MAIN Task OL Register program blocks to the task L gt Section 4 2 POLI D1 Program Local Label if Scan Program if Standby Pragram f Fixed Scan Program ilf Mo Execution Type FOU ee ee pe n Kee Define POUs Section 4 3 E 53 Pragram Mj POLI 01 vaa b Lee de o ee Program block p Chapter 6 h Program Write a program in the desired programming language lt gt Chapter 7 Local Label Define labels Section 5 3 3 Chapter 8 POLI 02 at Program Local Label gn POLI 05 ab Program Lacal Label i jf 000 04 8 Program H Local Label FB FUN a pemese sempus Function block FB Function FUN Chapter 6 hi Program Write a program the desired programming language lt gt Chapter 7 H Local Label Define labels lt gt
40. LD SM400 INCP D6144 CALL P2048 RET LD SM400 MOV D6144 D10 4 12 4 3 2 Setting properties of functions and function blocks 4 3 Creating POUs Point When the Use Macrocode check box is not checked Since pointers of automatically assigned devices are used the number of function instances that can be created is limited to the number of pointers or less specified on the Device Label Automatic Assign Setting screen Section 5 7 Check the Use Macrocode check box if the number of set pointers or more instances are required Using the MC MCR instruction for EN control The following shows the example of codes when the following programs are compiled Note that devices are assigned as follows e Input1 XO Input2 X11 e Output 010 The program at the location of use E MAING PRG Program Structured Ladder FBD FEL HT M4 EW ENO api inputi Process Hours Output Input Pulse I Robe Function block FB 01 FB Program Structured Ladder FBD Code to be created in the program at the location of use Use MC MCR LD M40 OUT M41 MC NO M4096 LD X0 AND X11 INCP D10 MCR NO LD M40 OUT M41 LDI M40 MC MCR is not used CJ P2050 The check box is not checked LD XO AND X11 INCP D10 P2050 MC MCR is used The check box is checked 4 3 2 Setting properties of functions and function blocks OVERVIEW SCREEN CONFI
41. Options gt Program Editor gt Structured Ladder FBD gt OVERVIEW Guided z mU P ouELS S S Eo 3 pow d 6 ED gosse Bo sp o9 so s 1 1 uu i 4 E Jd OR a ee a pert cec ga ec C ee eee tne eee amp ewe oe ee DES vd We UE A ee M 3 LL LL cz 2011 OO zw x Pew ee Be ee ae ea NO 3 zu 2 Select Ladder Wrapping ZA 6 Point ru Target of wrapping ladder to be displayed Ladders edited after setting the above option are wrapped The display of edited ladders before setting the above option is not changed PROGRAM Q1 CONFIGURATIONS 8 10 7 Setting Guided mode as the default editing mode oet the Guided mode as the default editing mode of the structured ladder FBD editor Operating procedure 1 Select Tool Options Program Editor gt Structured Ladder FBD gt Guided SETTING LABELS 2 Select Open Structure Ladder FBD Editor in guided mode 8 10 8 Entering variable names after contacts and coils COMMON OPERATIONS mj OF PROGRAM EDITORS Enter variable names continuously after a contact or a coil is entered Operating procedure
42. REVISIONS The manual number is written at the bottom left of the back cover Print date Manual number Revision Jul 2008 SH NA 080781ENG A First edition Jan 2009 SH NA 080781ENG B Model Addition QOOUJ Q01U Q10UDH Q10UDEH Q20UDH Q20UDEH FX series MANUALS Section 6 2 7 Appendix 1 4 Correction GENERIC TERMS AND ABBREVIATIONS IN THIS MANUAL Section 1 1 Section 1 3 1 Section 1 3 5 Section 1 3 6 Section 4 2 Section 5 3 Section 5 4 Section 5 7 Section 6 1 1 Section 6 2 1 Section 6 2 2 Section 6 2 8 Section 7 1 Section 7 2 Section 7 5 Section 7 5 1 Section 7 6 5 Section 8 1 Section 9 4 Section 9 5 Section 11 2 Appendix 1 1 Appendix 1 5 Jul 2009 SH NA 080781ENG C Addition Q00J Q00 Q01 Addition Section 6 4 3 Chapter 7 Correction MANUALS GENERIC TERMS AND ABBREVIATIONS IN THIS MANUAL Section 1 2 Section 1 3 Section 2 1 Section 4 1 Section 4 2 1 Section 4 2 2 Section 4 2 3 Section 4 3 1 Section 4 3 2 Section 4 4 1 Section 5 1 Section 5 2 Section 5 3 Section 5 4 Section 5 6 1 Section 6 1 Section 6 2 1 Section 6 2 3 Section 6 2 4 Section 6 3 Section 6 3 1 Section 6 4 Section 6 4 4 Section 6 4 10 Section 6 4 11 Section 6 4 13 Chapter 8 Section 9 1 Section 11 2 Section 11 3 Section 12 2 Appendix 1 Section 6 3 4 is changed to Section 7 12 Section 6 4 3 to Section 6 4 12 are changed to Section 6 4 4 to Section 6 4 13 Chapter 7 to
43. Shift IDelete Delete Row Delete the row at the cursor position gt Read from CSV File Read label settings from the CSV file 5 E Section 5 8 gs jay se _ _ Write to CSV File Write label settings to the CSV file e S Conf Update of System Rect sim tee ool 1 S Label Database 9 proj 9 labels Import system label information and E pe mpor system Habe reflect it on global labels Section 5 2 pa Register Device Name of Register a selected global label as a System Label system label z Disable System Label Disable the relation between a selected or E Relation global label and a system label E 6 Other shortcut keys The following table shows other shortcut keys for setting labels i Select All Select all rows Display all lines of comment and remark Section t of the selected line 5 5 4 Display only the first line of comment and Ctr T of the selected line TT 0 t D YX Og Zy u t m ENT SETTING OPTIONS APPENDIX INDEX Appendix 1 3 Toolbar icons and shortcut keys for setting labels App GX Works2 APPENDIX Appendix 1 4 Toolbar icons and shortcut keys for setting device memory The following explains the toolbar icons and the corresponding shortcut keys for setting device memory B Device Memory toolbar icons The following table shows the Device Memory toolbar icons and the corresp
44. amp K gt GX Works2 Version 1 Operating Manual Common Title 1 Display the title of the target memory by clicking the Refresh button gt z NET Option Display Size Check this to display Size and memory capacity in the file list Select the data to be written read Select the memory from the list zl by clicking the cell under Target Memory For details of the memory card application refer to the following manual K gt User s Manual Hardware Design Maintenance and Inspection of the CPU module to be used File list Target Memory WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU Memory capacity 2 Writing Size Display the total size of written data checked in Target Display the free space volume of the target memory Display the used space volume of the target memory 1 Not supported by FXCPU 2 For FXCPU program size and symbolic information data size are displayed when executing the Write to PLC function Symbolic information size is displayed on the screen for projects with labels of FX3U FX3UC version 3 00 or later only MONITORING ome 8 When a program program file device comment or device memory is selected the range can be set by clicking the Detail Detail button When reading data from the programmable controller CPU and the device memory is selected the detailed settings are required For details refer to the following manual 5 GX Works2
45. eee Mew Password Confirm Password WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU gt MONITORING QJ eme 8 Operating procedure 1 Set the items on the screen Item Description Library Name Display a library name to which a password is set Password Setup Set a password ir x Oc ze 8 Old Password Enter a previous password Leave the field blank when setting a password for the first time New Password Enter a new password Confirm Password Re enter a new password for confirmation 2 Click the button Point Password Set a password within 14 characters using alphanumeric characters and symbols correspond to the ASCII code 20H to 7EH For details of ASCII code refer to the following manual s GX Works2 Version 1 Operating Manual Common Libraries saved in library files If a user library is saved in the library file the password setting is also saved Library files must be managed carefully if they are shared with multiple projects Editing status Before using this function enable the editing of the user library L Section 13 4 3 INDEX APPENDIX gt SETTING OPTIONS 13 3 6 Setting password to user library 13 9 r GX Works2 13 USING USER LIBRARIES 13 3 7 Set help file to library Set a help file to the library Specified files created in the following formats can be set as help data e Windows help file hlp HTML help file
46. gt os 25 O OY e Remark of GLOBAL Ss lt a 5 0 Cg CD D nc 4 HP 85 6 2 8 Setting display contents of tool hint 6 15 r GX Works2 6 COMMON OPERATIONS OF PROGRAM EDITORS 6 2 9 Opening label setting and program screens for selected POU Display label settings or a program of the function or function block selected on the program editor Displaying a label setting screen e Select View gt Zoom Header Body Header Displaying a program editor e Select View gt Zoom Header Body Body View Zoom Header Body Header Class abel Name ata e onstant i 2 v IN 01 Bit s 3 VAR INPUT IN 02 Bit 1 POU 01 PRG Program Structured Ladder FBD em mi UD Deed 6 v m ward Function FB Label Setting FUNO1 FUN Bit bool Var02 BOOL_TO_INT __BOOL View gt Zoom Header Body r Body 0 Point Displaying by double clicking the function or function block For a structured ladder FBD program a label editor or program editor can be opened by double clicking POU Select Tool Options Program Editor Structured Ladder FBD FB FUN and set Double clicking opens header or Double clicking opens body 6 16 6 2 9 Opening label setting and program screens for selected
47. pp 8 10 7 Setting Guided mode as the default editing 8 10 8 Entering variable names after contacts and 8 10 9 Inserting comment entry fields to ladder blocks to be added 8 11 Checking Wrapping Position for Printing 9 SEARCHING FOR SPECIFIC POSITION 9 1 Searching for Specific Position in ST Program 9 1 1 Jumping to specified line pp 9 1 2 WISIN 9 2 Searching for Specific Position in Structured Ladder FBD Program 9 2 1 Jumping to specified ladder block number pp 10 CONVERTING COMPILING PROGRAMS 10 1 Converting Compiling Created Programs 10 2 10 2 Compiling All Programs 10 4 10 3 Executing Online Program Change Simultaneously with Conversion Compilation 10 6 10 4 Changing Operating Conditions of Compilation 10 6 10 4 4 Changing the number of errors and warnings that stop compilation 10 6 104 2 Hiding Wwarnmg Messages aaa 10 7 10 4 3 Using same name for global label and local label pp 10 8 10 4 4 Using same lower case label name AS device pp 10 8 10 4 5 Connecting PLS PLF or ALT outputs directly to other inputs with lines 10 9 10 4 6 Assigning common devices to outputs of function with 1
48. require caution Intelligent Function Module GX Works2 Version 1 Operating Manual Intelligent Function Module v IQ Works Interaction 1 K gt GX Works2 Version 1 Operating Manual Common 2 Checking this option enables use of the option setting S 5 Use MELSOFT Navigator of MELSOFT Navigator The option setting specified 2 Option Information MELSOFT Navigator at the time of opening this Sedi ED ection System Label Setting project is used 52 Set how to system labels When system labels i2 pd FONS MEINE are entered system label names are determined 9 based on this setting at the time of project save E 1 Not supported by FXCPU S 2 Not supported by Simple Project 3 For FXCPU this item is supported by FX3G FX3u and only A X Z LLI A A lt gt lt Q 2 14 5 r GX Works2 14 SETTING OPTIONS MEMO q q NOI LISOd 215419945 SAVJdooyd 1 5 SNIHOHV3S I9NILH3ANOO IO83 O1 VIVO 9NIQV3S ONLLISM x e z A A 4 YATIOULNOD FTEVWNWYOOUd ONIYOLINOW 5 SNOILdO ONILLAS qo XIGNAddV m X3QNI HASN ONISN App 2 List of Toolbars and Shortcut Keys Appendix 1 P N MELSOFT uu GX Works2 APPENDIX 1 List of Toolbars Shortcut Keys This section shows the list of toolbars and shortcut keys that can be used in Structu
49. 0 027777777 E oO o 5 E DRCR window Y Global Device Comment E DRCRP 2 A i Pinks eee eee ns ce ae t E DROL Function Block T E Wis 6 we a eee gt loa ew bee ee te eee E DROLP B Initial Program 11 DROR Selection window p3 rc Peer ee DRORP i NM DscL Work 8 MANI _ d stan dio Program rs a E Bened window ud MUERE DEM B osa a i Execution Type a E DSERP lt i X B DSFL Bj DSFLP E DSFR B DSFRP User Library B DSORT E DSTR E Connection Destination B DSTRP Ej psum i Cross Reference E 4 Docking window Cross Reference Information Condition Setting Current Value DaaTpe Type Class DevicejLabel All Device Label x Device Label Device Instruction Ladder Symbol Position Status bar English Structured QO6UDEH Host Station NU Display contents Name Description Reference Title bar Display a project name Menu bar Display menu options for executing each function Toolbar Display tool buttons for executing each function Appendix 1 A main screen used for operations such as programming Work window i E parameter setting and monitoring GX Works2 Version 1 Operating Manual A sub screen to support operations performed on a work Docking window Common
50. 3 Supported by Universal model QCPU LCPU Operating procedure SETTING LABELS 1 Select a contact or coil 2 Select Edit Signal Configuration Toggle COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST lee PROGRAMS EDITING STRUCTURED N 5 e nc Lu t m 8 5 2 Changing contact and coil in predetermined order 8 17 iS GX Works2 8 EDITING STRUCTURED LADDER PROGRAMS 8 6 Operating Functions Function Blocks This section explains how to operate functions and function blocks 8 6 1 Adding variables automatically when entering functions and function blocks Configure the option setting in order to add input output variables automatically when functions or function blocks are entered This setting is enabled only when the Auto connect function is activated Operating procedure 1 Select Tool Options Program Editor Structured Ladder FBD FB FUN 2 Select Automatic input output labels To add an output variable to ENO select Automatic ENO labels J Select Edit Auto Connect Without adding input output variables Adding input output variables 1 CTDE CIO E EN EN ENO CD CD Q LOAD CV LOAD PV PV 8 18 8 6 1 Adding variables automatically when entering functions and function blocks 8 6 Operating Functions and Function Blocks 8 6 2 Ed
51. 32 5 Time Timer 4 Set the data type of the array element in the same m Type Class 1 ointer manner as setting the normal data type CUN i Structured Data Types Function Blocks Array Element ARRAY Element To change the offset To change the offset Array start value Array end value to a value other than 0 edit the offset value by directly entering the array type declaration in text on each label setting screen Has LablNam Data Type 1 Bit D 2 2 w ard LInsigned Bit 15Eit 1 2 3 Struct 0 4 5 16 5 5 3 Selecting data types 5 5 Common Operations for Setting Labels To change the array to a two or three dimensional array Edit two or three dimensional array by directly entering the array type declaration in text on each label setting screen For details on array type declarations refer to the following manual z MELSEC Q L F Structured Programming Manual Fundamentals Class Label Name Data Type EM 1 MAR Bit O 2 0 4 2 VAR O daa2 MWondlnsigned Bit lBBit O 4 0 0 1 2 2 VAR datas jStucti 1 5 0 1 Point When a constant type is set for Class For labels whose classes are set as VAR CONSTANT or VAR GLOBAL CONSTANT arrays cannot be set for the data type If they are set an error occurs at
52. 9 Vertical Line Insert a vertical line Ctrl No Attribute Set the step attribute to no attribute St Ctrl 2 Stored Coil Set the step attribute to Stored Coil Simple Stored Operation without Set the step attribute to Stored Operation E Ctrl 3 Transition Check SE Stored Operation with Set the step attribute to Stored Operation e c Ctrl 41 Transition ST E Ctrl 5 Reset the step attribute Alt 5 Vertical Line Draw Line Insert l at the cursor position Selection Divergence m Alt F7 Draw Line 9 Insert 4 at the cursor position Simultaneous Divergence Alt FS Draw Line x Insert sd at the cursor position Selection Convergence Alt FQ Draw Line Insert 34 at the cursor position Simultaneous ani IEiol Convergence Draw Line Delete Line Delete a line at the cursor position Ts Edit the SFC step transition comments Sort SFC Step Sort the SFC block step numbers 55 SFC All Block Batch Batch monitor all blocks in the SFC Monitoring program Insert zz at the cursor position n g ct a Tl 16 Appendix 1 7 Toolbar icons and shortcut keys for program editors Appendix 7 List of Toolbars and Shortcut Keys ssl Shortcut key Corresponding menu Reference Scroll the screen to display active steps fO SFC Auto Sc
53. A 0 Z o 85 6 2 1 Using POUs Function Block Selection window 6 5 5 Works2 6 COMMON OPERATIONS OF PROGRAM EDITORS Operating procedure 1 Select a POU to be used from the POU list 2 Drag amp drop the selected POU to the program editor Selection H BKXMRP BEXOR E BEXORP E BMOw E BMOVP Drag and Drop E BOOL_TO_DINT B BOOL_TO_DINT_E B BOOL_TO_DWORD BOOL_TO_DWORD_E E BOOL TO INT E TO E TO STR TO STR E BOOL TO TIME TO TIME E B TO WORD B BOOL TO WORD E 6 6 6 2 1 Using POUs Function Block Selection window 6 2 Common Operations of Program Editors Searching fora POU name by its initial letter Search for a particular item among those displayed on the POU list tree by its initial letter Operating procedure In the POU list field enter the initial letter of the POU to be searched for The cursor moves to the entered initial letter of the POU If there is no POU with the entered initial letter the selection status does not change Selection Selection Function I Function Black Standard Edge Detection B Ej F TRIG E E R TRIG Ej R TRIG E Counter Timer Standard Bistable RS E RSE E 5R E SRE Standard Edge Detection E F_TRIG Ej F TRIG E E R TRIG Ej R TRIG E Press the key Counter Timer J Standard Bistable E RS E RSE E E SRE Displayi
54. Changing Display Format of Variables 8 21 8 7 1 Displaying variable names in multiple lines pp 8 21 8 7 2 Displaying labels and devices simultaneously pp 8 21 8 7 3 Displaying instance names in multiple lines 4 8 22 8 7 4 Specifying the number of displaying characters for variable 8 22 8 7 5 Changing display format Of Variable pp 8 23 8 8 Editing Ladder Blocks 8 26 8 8 1 Iriser ng ladder DIOCKS sos acera sderbi sa R e Eben LI poc Fea ibaa 8 26 8 8 2 Deleting ladder DIOCKS pp 8 26 8 8 3 Cutting copying pasting and moving ladder blocks pp 8 27 8 8 4 Editing ladder block headers Ne 8 28 8 8 5 Editing listed ladder DOCKS 5 iecit a a Oat Mercy de Socii doct 8 29 8 8 6 Setting ladder block labels titles 7 8 30 8 8 7 Switching to display hide left power rail pp 8 30 8 8 8 VIS DIA MAG gg 8 31 8 9 Editing Comments 8 32 8 9 1 COMMMGINS ETE o Em 8 32 8 9 2 Changing the size of comment entry field pp 8 32 8 9 3 Moving Commens TE 8 33 8 10 Editingin Guided Mode 8 10 1 Overwrite mode and insert mode pp 9 10 2 Entering ladder SyMDOIS pet adea d ea Frei OE edi cues reos Peau estas iain MEER R tees 8 10 4 Connecting ladder symbols with lines pp 9410 5 audio ERE lo por Ee IEEE date ut saa Ee vende MEUS RE 8 10 6 Wrapping ladder
55. Comment and Remark columns Double click in the row number cell of the table am data3 ARRAY 0 3 OF Struct E eee CNET Only the first line is displayed PROGRAM Sy CONFIGURATIONS SETTING LABELS array of structure Struct element 0 group element 1 groupe datas ARRAY 0 3 OF Struct VAR B Selecting all rows All lines are displayed COMMON OPERATIONS mj OF PROGRAM EDITORS All rows can be selected by the following operation e Select Edit Select All E Function FB Label Setting FB 01 FB Label Name Jata Type Constant Ci omment VAR NFU ES gt V A data CONSTANT S d VAR oe VAR DUTPUT C O Ox ST E D xs 5 2 Oo ZO Ce c 2 ED e 5 5 5 4 Editing rows 5 19 i GX Works2 5 SETTING LABELS 5 6 Setting Structured Data Type Labels This section explains how to set structured data type labels 5 6 1 Setting data type of structure Set the elements of the structure on the Structure Setting screen Screen display Select Project view gt POU gt Structured Data Types gt structure Structure Setting Struct1 Label Name Data Constant Comment 1 Bit Member 2 data2 Word Unsigned Bit Strina 15 bit BEEN Member2 dote Bit 0 2 LL Member 4 ee 5 Operating procedure e Set the items on t
56. Common Reference Common Simple Common Chapter 14 Common Section 5 7 Common Common 1 3 List of Functions Tool common function Built in MO Module Tool Positioning Monitor Display the Positioning Monitor screen High Speed Counter Monitor Display the High Speed Counter Monitor screen I O Monitor Display the I O Monitor screen Check Intelligent Function Module Parameter Check the duplication of devices set in the Auto refresh Check Auto Refresh Duplication function and display the result Intelligent Function Module Tool Analog Module Offset Gain Setting Configure the offset gain setting of the analog module Q61LD Two Point Calibration Setting Q61LD Default Setting Configure the Q61LD default setting Temperature Input Module Configure the Q61LD two point calibration setting Configure the offset gain setting of the temperature input Offset Gain Setting module Temperature Control Module Auto Tuning Execute the auto tuning function of the temperature control module Execute the sensor correction function of the temperature Sensor Correction Function control module Counter Module Execute the preset function of the counter module QD75 LD75 Positioning Module Execute the positioning monitor Execute the positioning test Execute the wave trace Execute the location trace Serial Communication Module Predefined Protocol Support Function Start the
57. Developer or GX IEC Developer is read the read data are in uncompiled status Compile the program again after executing the Read from PLC function MONITORING eme 8 Precautions for reading symbolic information For the precautions for reading label programs symbolic information of the existing application using GX Works2 or or reading label programs symbolic information of GX Works2 using the existing application refer to the following 0 manual lt GX Works2 Version 1 Operating Manual Common D For FXCPU The symbolic information data can be read from written to the programmable controller CPU in FX3u and FX3uc version 3 00 or later only e When a memory cassette to which the symbolic information has been written is used on an FXCPU other than F X3u F X3uc version 3 00 or later the symbolic information may be corrupted Saving project automatically after writing data to programmable controller CPU A project can be saved automatically after writing data to the programmable controller CPU by setting the option Check the Save project after writing to PLC item under Tool gt Options Project gt Automatic Save INDEX APPENDIX gt SETTING OPTIONS 11 5 5 GX Works2 11 WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU MEMO 11 6 aN MELSOFT 12 MONITORING This chapter explains how to monitor the program execution status of the programmable controller CPU
58. Execution Target Datat No f Yes ats Edit Data Parameter Program Select All Cancel All Selections Option d Display Size Module Name Data Name Detail Last Change Target Memory Size Sor eui Symbolic Information Sie File li Dekail e list 2010 08 05 16 08 09 Uncompiled 2010 08 05 16 08 08 Uncompiled 2010 08 05 16 08 09 Uncompiled p PLC Network Remote Password Switch Setting 2010 08 05 16 05 57 25 ie aa i 4 Necessary Setting Mo Setting Already Set Set if itis needed o Setting Already Set Writing Size Free Volume Use Volume Memory capacity 0 226 856 18 904Bytes Refresh Execute Close Related Functions lt lt Remote Set Clock PLC User Data Write Title Format PLC Clear PLC Memory Arrange PLC Operation Memory Memory 11 2 11 1 Writing Reading Data to from Programmable Controller CPU Operating procedure 2 rE 1 Setthe items on the screen e oO 2 Item Description GL Connection Channel List Display the information on the set connection target Ten Switch the setting target module Setting target module tab If the target data of write read exists the color of the tab name is displayed in blue PLC Module Set to write the data to the programmable controller CPU Set to write the data of the intelligent function module to buffer memory flash S Intelligent Function Module 1 ROM of the intelligent function module 5
59. GLOBAL E Data Type Bit Label Name bool5 Device i m Registered tant label list Comment Newly register labels to Global1 and set it to the program Apply Minimize dialog after applying Point 9 Display setting for Label Registration Selection screen For a structured ladder FBD program the Label Registration Selection screen can be displayed when inserting an undefined label by setting the option below Select Declare new label name under Tool Options Program Editor gt Structured Ladder FBD Label B Entering registered labels Select and enter the registered labels on the Label Registration Selection screen Register labels with label setting editor Chapter 5 or on the Label Registration Selection screen lt gt Registering new labels Operating procedure 1 Select the argument to which a label is entered on a program editor Li 2 Select Edit List Operands The Label Registration Selection screen is displayed 6 8 6 2 2 Using labels in the program 6 2 Common Operations of Program Editors 3 Set the items on the screen item Description Select from Registered Label Scope to Find Select a label setting editor s name of the search destination Type Classification Select a type classification of data type gt Section 5 5 3 Data Type Select a data type Display a list of labels existing in the label setting editor of the search
60. L VIO Li 19 AND M6186 20 OUT B4 lt Compilation result of ladder block 2 gt Step Compile Result 21 LD BS 22 AND B6 23 OUT M6187 24 LD M3 AN Maid SET M8190 D 3 rim When M3 M4 are OFF x qe the execution result is 34 not stored on M8190 6 M8188 37 a 38 RST M8188 39 D M3190 40 AND M8188 B9 may ON even 41 OUT M3 M4 are OFF 10 11 SPECIFIC POSITION ma O LL 2 E ina lt o COMPILING PROGRAMS CONVERTING a mh WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU MONITORING ome 8 T O 0 c Og Z t INDEX APPENDIX gt SETTING OPTIONS r GX Works2 10 CONVERTING COMPILING PROGRAMS Example of program which outputs the correct result Create a program as indicated below to output the correct operation result to BY Use instruction AND E with EN ENO to output instruction Regard logical AND of input AND E s execution result as output s execution condition Example of ladder Compilation result of ladder block 1 AND E e 9 o gt o cC 9 o 53 o o 9 o o o oe 5 0 LD BO EEE EE 933 5 1 AND B1 B IN Eo 5 PEE 2 OUT M8178 gie pq 0000 0 000 0 00 j 4 5 SET M6182 GIONE AES ie ENO P 7 ANI M8178 M2 EN ENO I
61. LADDER PROGRAMS 7 1 4 Using templates 1 5 GX Works2 7 EDITING ST PROGRAMS MEMO 7 6 7 1 4 Using templates MELSOFT 8 8 1 8 2 8 3 8 4 8 5 8 6 8 7 8 8 8 9 8 11 EDITING STRUCTURED LADDER FBD PROGRAMS This chapter explains the functions of program editor to edit structured ladder FBD programs Creating Ladder FBD Programs 8 2 Editing in Select Mode 8 4 Drawing Lines 8 7 Operating Ladder Symbols 8 11 Changing Type of Contact and Coil 8 15 Operating Functions and Function Blocks 8 18 Changing Display Format of Variables 8 21 Editing Ladder Blocks 8 26 Editing Comments 8 32 8 10 Editing in Guided Mode 8 34 Checking Wrapping Position for Printing 8 39 OVERVIEW CONFIGURATION SCREEN QJ lt De D O X A PROCEDURE PROGRAM Q1 CONFIGURATIONS SETTING LABELS COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST lee PROGRAMS EDITING STRUCTURED N 5 e Lu t m iS GX Works2 8 EDITING STRUCTURED LADDER PROGRAMS 8 1 Creating LadderFBD Programs This section explains how to create ladder programs and functions
62. Selection window 6 2 1 Output Window Display hide the Output window Section 10 6 Display hide the Cross Reference pe NM RN NENNEN au Watch 1 to 4 Display hide the Watch window Intelligent Function Module Display hide the Intelligent Function Monitor Module Monitor window Intelligent 5 Intelligent Function Module Display hide the Intelligent Function Guidance Module Guidance window m EBENE Find Replace Display hide the Find Replace window Common Shortcut key Corresponding menu Description Reference B Intelligent Function Module toolbar icons The following table shows the Intelligent Function Module toolbar icons ig Shortcut key Corresponding menu Reference QD75 LD75 Positioning Execute a wave trace of the QD75 LD75 Module Wave Trace positioning module te QD75 LD75 Positioning Execute a location trace of the QD75 Module Location Trace LD75 positioning module serial Communication Execute a circuit trace of the serial rd Module Circuit Trace communication module QD75 LD75 Positioning Execute a positioning monitor of the Intelligent d Module Test Monitor QD75 LD75 positioning module 9 cg QD75 LD75 Positioning Execute a positioning test of the QD75 Module Test Monitor LD75 positioning module Li Offset Gain Setting of Execute offset gain setting of the Temperature Input Module temperature input module Lin Offset Gain Setting of Execute offset gain setting
63. Structured Ladder FBD ST gt Compile Condition2 2 Check the function s to be set f any of these check boxes are not checked bit type outputs of function s are not retained An operation equivalent to the OUT instruction f the check box es is checked bit type outputs of the function s are retained An operation equivalent to the SET instruction COMPILING PROGRAMS CONVERTING a mh Generation of Code Keeping bit Type Output v DNMT TO BOOL E D WORD TO BOOL_E TIME TO BOOLE MOT E v LIMITATION E MAXIMLIM E MINIMLIM E EQ E ME E GT E GE E LT E LE E AMD E OR E Iv User Defined Function with ENJENO User Defined Function Block with EM EMO WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU Example Retaining the INT TO BOOL E output INT TO BOOL E EN ENO INT MONITORING ome 8 Check box is checked gt lt Check box is checked Start up condition EN Ll Y Bit type output Return value TT 0 t D YX Og Zy t p ENT INDEX APPENDIX gt SETTING OPTIONS 10 4 7 Retaining bit type outputs of functions 10 13 r GX Works2 10 CONVERTING COMPILING PROGRAMS 10 5 Compilation By compilation operation the labels are assigned to devices and programs created in project with labels are converted to executable programs in a programmable controller CPU Checking the compilation sta
64. Syntax Blue Syntax S ntax Device Operator Black Comment Dark green THEN 2 Operator Operator Constant Black 5 String constant Black Device Black Global label Magenta 7 Local label Magenta _bind2 ALSE END IF J FBO input DoolD input2 XKT input3 lt LUFBI Functionblack For details refer to the following manual K gt GX Works2 Version 1 Operating Manual Common 7 1 ST Editor 7 1 1 Writing ST programs Write a ST program For functions instructions used for ST program refer to the structured programming manuals Operating procedure OVERVIEW Write a program in the text format using a keyboard FOR counter 0 TO 10 BY 2 DO The colors of defined labels devices syntaxes operators 5 constants string constants and comments change when they are entered 2 0 Syntaxes entered in lower case characters automatically Yz changed to upper case characters oo 3 Point Options of labels displayed while typing a label Labels match to the entered characters are displayed while typing a label If only one option is available it is automatically vie Global labels and local labels of corresponding POU are displayed 225 D o FOR counter 0 TO 10 BY 2 DO co PROGRAM Q1 CONFIGURATIONS Entering assignment operators Press the cte shift keys to
65. This check box can be checked only if both of the Use EN ENO and Use Macrocode check boxes are checked e If the MC MCR instruction is used and the function block is not executed the outputs and the current values of timers in the function block are reset If the instruction is not used the current values are retained Return value of function Program the function names as labels in a function to set a return value Setting function names as labels is not needed Data type set on Result Type can be used Example Set return value of function name FUN 01 to 0 Structured ladder FBD lt ST gt FUN 01 0 Applying function blocks to locations where instances are used The following shows the example of codes when the following programs are compiled Note that devices are assigned as follows e Input1 XO Input2 X11 e Output 010 The program at the location of use POUO 2 PRG Program Structured Ladder FBD FB Bid FB 01 Input Process Hours Input Pulse I s dee les d Function block 1 FB Program Structured Ladder FBD i TE gt 1 L 9 4 ENO Lu 4 X arT Haurs Use Macrocode Code cheated program at the Function block code location of use Applied AND 11 The check box is checked INCP D10 LD XO a P2048 Not applied OUT M4097 AND iene The check box is not checked
66. With grid gt lt Without grid gt SCREEN Gd CONFIGURATION lt De D O X A PROCEDURE PROGRAM Q1 CONFIGURATIONS SETTING LABELS COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST lee PROGRAMS EDITING STRUCTURED N 5 e nc nc Lu e lt m 8 8 8 Displaying grid 8 31 iS GX Works2 8 EDITING STRUCTURED LADDER PROGRAMS 8 9 Editing Comments This section explains how to edit comments Comments can be entered in the same manner as ladder symbols Section 8 2 1 Operating procedure Select Edit Ladder Symbol Comment amp 8 9 1 Editing comments Edit a comment Operating procedure 1 Click the comment The comment entry field is enabled a Comment entry field 2 Enter a comment Press the Ctr Enterl keys to insert a line feed E Input Comment 8 9 2 Changing the size of comment entry field Change the size of a comment entry field After changing to the Select Mode change the size by the following procedure Section 8 1 1 Operating procedure 1 Click the bottom right corner of the comment Input a Comment yn A Drag the corner to adjust the size Input Comment Input Comment 8 32 8 9 1 Editing comments 8 9 Editing Comments 8 9 3 Moving comments Move a comment Comments can be moved only within the same ladder block Operating procedure
67. a mh WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU MONITORING ome 8 TT 0 t D YX Og Zy t p ENT INDEX APPENDIX gt SETTING OPTIONS iS GX Works2 10 CONVERTING COMPILING PROGRAMS 10 4 6 Assigning common devices to outputs of function with EN ENO Assign common devices to each function when system devices are automatically assigned to outputs of function with EN ENO while editing on the structured ladder FBD ST editor Operating procedure 1 Select Tool gt Options gt Compile gt Structured Ladder FBD ST gt Compile Condition3 2 Uncheck the Automatically assign each system device to output of functions that use EN ENO check box f the check box is checked the individual devices are assigned to each function f the check box is not checked the same device is assigned to the outputs Example Devices automatically assigned to outputs of function with EN ENO Check box is checked The individual devices are assigned AND E AND_E Input EN ENO Input EN ENO M Input IN Output Inputs i Inout4 Isl AND_E AND_E Input EA ERO Input EN ENO Inpute IN Dutput Inputs IH lt Check box is not checked gt The same device is assigned AND E AND_E Input EA ENG Input END Input IN L IN D
68. and Warnings 10 6 1 Correcting errors and warnings Check and correct errors warnings SPECIFIC POSITION LL 2 O X lt o Operating procedure 1 Double click the error warning message displayed on the Output window The corresponding error location in the program is displayed Output F ebuild All COMPILING PROGRAMS CONVERTING Result Data Class Content Error Code 1 MAIMI Program compile device or label Not declared Ladder Block No 2 2 Error 5UB1 Program comp ype labeli values are required For contacks La C2016 Double click a mh lt Error 2 Warning 0 Check Ww aming 0 WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU Unit_Ready MONITORING ome 8 Input KAY f I L EN ENO oapeedl 8 d r HMoator al 2 Check the corresponding error location and correct the error as instructed by the error warning message T O 0 c Og Z t INDEX APPENDIX gt SETTING OPTIONS 10 6 1 Correcting errors and warnings 10 23 r GX Works2 10 CONVERTING COMPILING PROGRAMS MEMO 10 24 10 6 1 Correcting errors and warnings aN MELSOFT SPECIFIC POSITION x O LL O Z I O X lt N 11 WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU This chapter explains how to write read
69. counter sarl 10 DU 0 counter 12 ELSIF Wargi gt 22400 THEN sarl 10 Sarti Varll Warb sarl 10 4ar01 10 0 END IF FORE B Monitoring bit type labels and bit devices The following shows the display of bit type labels and bit devices at the monitoring FALSE TRUE IF OR THEN IF THEN Metodin TRUE TRUE END IF END IF 12 6 12 4 Monitoring Programs on ST Editor Point Displaying monitoring values When the labels are used for array element or when the elements are not specified for array or structured data type the monitoring values are not displayed correctly The monitoring values on tool hint are not displayed correctly either Monitoring values of each element for array or structured data type can be checked on the Watch window COS Input 1 Array nl index ArrayOut index 0 ArrayOutlO 0 0 SPECIFIC POSITION or O LL O Z I O X lt N CONVERTING COMPILING PROGRAMS s EN WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU MONITORING TT 0 t YX Og Zy 0 0 p ENT INDEX APPENDIX gt SETTING OPTIONS NO N Lon GX Works2 12 MONITORING 12 5 Monitoring Programs Structured Editor This section explains the display of the structured ladder FBD editor at the monitoring Screen display Select Online Monitor Start Monitoring K
70. cursor position Close Contact dete contact at the cursor 5 Insert a closed contact branch at the 7 Insert coil at the cursor position v 1 1 a i V m E ons 00 21 ct a qim Tl NEE x ps Delete Vertical Line B maA m SI DAD 10 Appendix 1 7 Toolbar icons and shortcut keys for program editors Toolbar icon Sa Appendix 7 List of Toolbars and Shortcut Keys 2 Shortcut key Corresponding menu Reference 5 2 0 E Insert a rising pulse close branch at the Og Shift ART ev Rising Pulse Close Branch zm Insert falling pulse close branch at the X O ini And d 25 Operation Result Rising Insert an operation result rising pulse at F5 the cursor position Operation Result Falling Insert an operation result falling pulse at co Ctrl Ait 5 the cursor position Insert an operation result inversion at the F1 0 Edit Line Input a line at the cursor position it 1 Simple Delete Line Delete the line at the cursor position OO Insert Inline Structured wT 1 1 Ctrl B Insert an inline structured text box 3 Statement Edit statements E 5 x Se Batch edit the statements notes in the Display the list of line statements used in Ct
71. destination Select a label to be entered OVERVIEW Registered label list 2 Minimize dialog after applying After clicking the set button check this to minimize the Label 2 Registration Selection screen gt Zo 4 Click the button The selected label is applied to the program editor 3 Registering new labels u Select and enter the new labels on the Label Registration Selection screen SS Y c D o Operating procedure 1 Select the argument to which a label is entered on a program editor E 2 Select Edit gt List Operands gt PROGRAM Q1 CONFIGURATIONS The Label Registration Selection screen is displayed E lt 3 Set the items on the screen 2 item Description Label Enter label Label Setting Information Scope to Register Select a label setting editors name of registering destination Select a class name of label from the list displayed by clicking l lt Section 5 5 1 Class Set a data type from the Data Type Selection screen displayed by clicking Data Type lt Section 5 5 3 It can also be entered directly Set a device to be assigned to the label when GLOBAL is selected for Device Class e When the Device column is blank a device is automatically assigned COMMON OPERATIONS Enter a constant value when VAR GLOBAL CONSTANT or VAR CONSTANT Co
72. editor On the structured ladder FBD editor the cursor position at the time of the drop operation becomes the position of the input pin at the upper left of the function or function block PROGRAM CONFIGURATIONS CD e 5 Set an instance name MAIN1 PRG Program Structured Ladder FBD 9 O UADIT AO di UK bl 2 ee ee For a function block set an instance name the Label BB EET m 5 inputi utputl 0o Registration Selection screen displayed when a function MEE function block is dropped For the method for setting the Label Registration Selection screen refer to the following section Section 6 2 2 Using labels the program COMMON OPERATIONS mj OF PROGRAM EDITORS 6 Set an argument MAIN2 PRG Program Structured Ladder FBD Enter a device or label name for the argument defined in the function or function block FO Point E Inserting functions and function blocks 8 Functions and function blocks can be also inserted by the following operation e Select a function or a function block from the Project view and drag and drop it to the desired position nas a 5 0 Ee CD o Or Z 4 4 1 Using functions and function blocks 4 15 GX Works2 4 PROGRAM CONFIGURATIONS Using function blocks created in other programming languages Use
73. enter an assignment operator 7 1 2 Automatic indention SETTING LABELS Insert a tab as the indention at the head of a new line automatically when a line feed is inserted during program editing The indention can be set in the option setting Operating procedure COMMON OPERATIONS mw OF PROGRAM EDITORS 1 Select Tool Options Program Editor MAIN_ST PRG Program ST gt ST FOR counter 0 TO 10 BY 2 DOJ o x n 2 Select Auto Indention Si MAIN PRG Program ST 9 q FOR counter 0 TO 10 BY 2 DO EO Es 3 Enter the ST control statement to the ST editor such as a FOR statement 8 When a line feed is inserted the next line is indented based on the content of the statement Po lt T Om zo E 7 1 1 Writing ST programs 7 3 5 GX Works2 7 EDITING ST PROGRAMS 7 1 3 Setting tab length Set a tab length in the option setting Operating procedure 1 Select Tool Options Program Editor ST 2 Set the Tabulator Length 4 7 1 3 Setting tab length 7 1 ST Editor 7 1 4 Using templates Insert templates correspond to the instructions functions control syntaxes on the ST editor A template of argument is inserted when an instruction or function is entered from the Function Block Selection window by the drag and drop operation A template is an argument data type defined for each instruction function or a format of control syntax
74. entry field The following table shows the display contents of the screen Name Description Select a ladder symbol Ladder symbol selection field Clicking the button displays the list of ladder symbols Instruction device entry field Enter an instruction and or a device 2 Enter an instruction and device and click the button The shape of the cursor changes according to the selected instruction 3 Click the desired position The instruction is entered at the cursor position 8 2 2 Entering instructions OVERVIEW SCREEN CONFIGURATION lt De D O X A PROCEDURE PROGRAM Q1 CONFIGURATIONS SETTING LABELS COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST lee PROGRAMS EDITING STRUCTURED N 5 e nc nc Lu e t m iS GX Works2 8 EDITING STRUCTURED LADDER PROGRAMS B Changing instruction Change entered operator function or function block Operating procedure 1 Selectan operator function or function block to be changed 2 Press the initial letter of the instruction to be changed on the keyboard A list of instructions is displayed on the Input Instruction screen x Exit Browse Input Instruction Replace JF Fe MAX E MAXIMLIM MAXIMUM E MAXP MER MEAM MEAMP MEF 3 Select an instruction and click the button The operator
75. for creating ladder programs on the structured ladder FBD editor The structured ladder FBD editor is a language editor in graphic format for creating programs in the structured ladder FBD language Ladder symbols such as contacts coils and functions function blocks are used to create structured ladder FBD programs Each ladder symbol is connected with a line The suitable editing mode can be selected according to the program entry method and editing target 7 Section 8 1 1 Screen display Select Project view POU Program gt program Program Ladder block header Program editing area bool chook 3 Ladder block g bool5 IN Left power amp bool8 MEN rail O _ _ l _ _ _ _ _ _ E ODEDE DEEE qp 4 Return 5 K Ladder Block gt Label2 krl BRE e Label Input label Grid A unit for creating a program EROSION A ladder block consists of a ladder block header and a program editing area SPOME ladder Diockheadei Display information such as a title set for each ladder block and a label name of the jump Section target 8 8 4 T An area for creating a program Program gating arga Ladder symbols can be placed in the grid area SR A start position of the structured ladder program Section the display of left power rail
76. function or function block is changed After changing the instruction adjust the arguments of the instruction if necessary Point Entering POUs Operators functions and function blocks can also be selected from the Function Block Selection window gt Section 6 2 1 Instruction device entry field When more than one character of an instruction label is entered on the Input Instruction screen options of instruction label whose first characters match are displayed An instruction label can be selected by using the nil key Input Instruction d Exit Browse Manual CALL e When nothing is entered in the ladder symbol selection field instruction space device label be entered For example Id However when an instruction exists as a ladder symbol such as JMP and RET is entered it is entered as a ladder symbol For entering in functional description select JF rs on the ladder symbol selection field and enter an instruction such as JMP Entering unregistered labels By setting the option a new label setting can be added on the Label Registration Selection screen when an unregistered label is entered Check the Declare new label name item under Tool Options Program Editor gt Structured Ladder FBD Label Section 14 2 Browse Manual button A detail of the instruction can be displayed by clicking the Browse Manual button on the Input Instruction scr
77. function blocks created in other programming languages The following table shows the function blocks that can be called from the program function block Applicable x Not applicable Function blocks to be called Structured ladder Program function block that Structured ladder x calls function blocks FBD s o j o e 1 Function blocks in the ladder language cannot call function blocks Only programs can call function blocks The following explains the precautions for calling function blocks from ladder to ST or from ST to Ladder language 1 Check Enable function block call from ladder to ST and from ST to ladder under Tool Options Compile gt Basic Setting gt Section 14 2 Note that the program becomes in the uncompiled status when the option setting is changed Compile the program again 2 The following requirements must be satisfied when using function blocks created in the ST language in the ladder program Data type of the input output label is any of the following types bit word signed double word signed single precision real double precision real string The number of the input output labels is less than 24 e The number of characters of the input output label is less than 16 The Use Macrocode item is checked in the option setting of the function blocks The Use EN ENO item is not checked in the option setting of the function blocks Function bl
78. h Oy ged lisa which is out of display target is Display only system labels with no device assigned Refinement Characters Refinement Find Subject Whole Display Find Characters Find Next Select System Label Name Label Name Data Type Constant CPU Name Project Name Device Attribute Comment Label mult Label mult Word Signed QO6UDHCPU Simple 02 Common Label mul2 Label mul2 Word Signed QO6UDHCPU Simple 02 Common Label mul3 Label mul3 Word Signed QO6UDHCPU Simple 02 Common Label mul4 Label mul4 Word Signed QO6UDHCPU Simple 02 Common Label mul5 Label mul5 Word Signed QO6UDHCPU Simple 02 Common m eS P oon oon A WwW Ne Relationship diagram between system label database 1 and project 2 Import E Ea Led lope E 2 Check Select of a system label to import to the project Click the et button 4 The following message is displayed MELSOFT Series GA Works i Imported system label to global label Until the project is saved the imported system label cannot synchronize with the system label database Please save the project 5 Click the button e V For FXCPU this button is supported by FX3G FX3u and FX3uc only Registers a global label as a system label 1 Select a global label to register as a system label 2 Click the pevce Name button 3 The following message is displayed MELSOFT Series GA Works Do you wank to continu
79. in other projects update the user libraries in each project in advance L Section 13 4 4 s WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU gt MONITORING QJ ome 8 T oi 14 Oc 2 Y 5 INDEX APPENDIX gt SETTING OPTIONS 13 3 4 Saving library file CD N iS GX Works2 13 USING USER LIBRARIES 13 3 5 Deleting user library from project Delete a user library from the project Operating procedure 1 Selecta library name to be deleted in the User Library view Multiple libraries can be selected 2 Select Project Library Deinstall The selected data is deleted Point Deleting user library The saved library file is not deleted even if a user library is deleted All POUs using the deleted library file become in the uncompiled status Compile the program again 13 8 13 3 5 Deleting user library from project 13 3 Creating User Library 13 3 6 Setting password to user library Set a password to protect data in the user library Once the password is set programs in the POUs are hidden on the screen Structures global labels and local labels are displayed Screen display SPECIFIC POSITION or O LL O Z I O X lt N Select Project gt Library Change Password Password of Library Setting Library Mame Password Setup COMPILING PROGRAMS CONVERTING s Old Password
80. into 4x5 parts of smaller grids to specify a position Q1 CONFIGURATIONS 2 Move the cursor to the position where the line is to be connected by pressing the key SETTING LABELS 3 Press the 5 button Horizontal line A horizontal line is drawn by the length of one divided grid COMMON OPERATIONS mj OF PROGRAM EDITORS 4 Press the 51 button Vertical line A vertical line is drawn by the length of one divided grid EDITING ST lee PROGRAMS EDITING STRUCTURED N 2 e Lu t m 8 10 2 Entering ladder symbols 8 35 iS GX Works2 8 EDITING STRUCTURED LADDER PROGRAMS 8 10 5 Drawing lines Draw a line Operating procedure 1 Select Tool Options Program Editor gt Structured Ladder FBD gt Guided 2 Select Allow hotkey repeater Draw a line using the Horizontal Line Segment or Vertical Line Segment screen Operating procedure 1 Press the 6 Horizontal line or v ETE Vertical line button The Horizontal Line Segment or Vertical Line Segment screen is displayed 2 Setthe length of the line to be drawn using the grid width height as the unit of length A line of the specified length is displayed 8 36 8 10 5 Drawing lines 8 10 Editing in Guided Mode 8 10 6 Wrapping ladder Wrap a ladder if it does not fit in one line Operating procedure 1 Select Tool
81. measure GX Works2 Version 1 Operating Manual Common For precautions on compiling all programs refer to Section 10 5 3 SETTING LABELS Assigning device with Device Label Automatic Assign Setting Assign the devices to labels with the Device Label Automatic Assign Setting during compilation For details refer to Section 10 5 The assigned devices can be checked with the cross reference function GX Works2 Version 1 Operating Manual Common Devices within the range set on the Device Label Automatic Assign Setting screen cannot be used in a program COMMON OPERATIONS mj OF PROGRAM EDITORS Precautions when the multiple types of devices are assigned automatically QCPU mode LCPU 2 lt Refer to Precautions on compilation c gt Section 10 5 3 25 Device types setting ranges mian The types of automatically assigned devices differ by the type of CPU 8 The setting ranges depend on the number of device points set in PLC parameter Q For details of PLC parameter refer to the following manual 52 lt GX Works2 Version 1 Operating Manual Common 3 Lr c E 5 7 1 Precautions on automatically assigned devices 5227 i GX Works2 5 SETTING LABELS Precautions when displaying the Device Label Automatic Assign Setting screen When displaying the Device Label Automatic Assign Setting screen an error message may be displayed In this case terminate GX Works2 copy vsfl
82. program 6 2 Common Operations of Program Editors 6 2 3 Undo and redo Undo and redo the previous editing status B Undo Operating procedure e Select Edit Undo if after editing the ladder The previous editing status is restored B Redo Operating procedure e Select Edit Redo after performing Undo The operation deleted by clicking the Undo button is restored 6 2 3 Undo and redo 6 11 OVERVIEW SCREEN CONFIGURATION lt De D O X A PROCEDURE PROGRAM Q1 CONFIGURATIONS SETTING LABELS COMMON OPERATIONS lt PROGRAM EDITORS EDITING ST PROGRAMS Q ac D HP 2 2 HP wn Z Q LADDER PROGRAMS 5 Works2 6 COMMON OPERATIONS OF PROGRAM EDITORS 6 2 4 Changing display size of editing screen Change the display size of editing screen Screen display Select View Zoom gt Set Zoom Factor Zoom Magnification C 200 C 150 100 75 C 50 Specify 87 5 c Operating procedure Set the items on the screen Item Description 200 150 100 75 50 Change the display size of editing screen with a selected magnification Specify Set a magnification specified by every 12 596 6 12 6 2 4 Changing display size of editing screen 6 2 Common Operations of Program Editors 6 2 5 Splitting editing screen Split
83. sequence programs to from the programmable controller CPU or memory card COMPILING PROGRAMS CONVERTING amd mih For the overview of the data write read operation refer to the following manual GX Works2 Version 1 Operating Manual Common WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU 11 1 Writing Reading Data to from Programmable Controller CPU 11 2 MONITORING ome 8 TT 0 t D YX Og Zy t p ENT APPENDIX SETTING OPTIONS INDEX 11 1 Er GX Works2 11 WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU 11 1 Writing Reading Data to from Programmable Controller CPU This section explains how to write the Structured project data to the programmable controller CPU or memory card and how to read the data from the programmable controller CPU or memory card to the project Symbolic information can be written to read from a programmable controller CPU for projects with labels of FX3U FX3UC version 3 00 or later only Screen display Select Online gt Write to PLC S y Read from PLC 4 For QCPU mode LCPU FXCPU version 3 00 or later symbolic information is displayed on the file list Online Data Operation Connection Channel List Serial Port PLC Module Connection LISB System Image C Read Write C Verify Delete Setting target PLC Module intelligent Function Module
84. to 12 are changed to Chapter 9 to 14 Print date Manual number Revision Mar 2011 SH NA 080781ENG I Addition Section 5 7 1 Section 10 5 1 Section 10 5 2 Section 10 5 3 Correction MANUALS Section 1 3 1 Section 5 4 Section 5 7 Section 6 2 1 Section 6 2 2 Section 8 2 2 Section 8 9 Section 8 9 2 Section 10 1 Section 10 2 Section 10 4 4 Section 10 4 6 Section 10 5 Section 11 1 Section 14 2 Appendix 1 1 Appendix 1 6 Jul 2011 SH NA 080781ENG J Model Addition 02 L26 PBT Section 8 7 2 Section 8 8 7 Appendix 1 2 Correction MANUALS GENERIC TERMS AND ABBREVIATIONS IN THIS MANUAL Section 1 2 Section 1 3 1 Section 1 3 6 Section 2 1 Section 4 3 2 Section 4 4 1 Section 5 2 Section 5 3 Section 5 4 Section 5 6 3 Section 5 7 1 Section 6 1 Section 6 1 2 Section 6 2 1 Section 6 2 6 Section 6 2 7 Section 6 2 8 Section 6 2 9 Section 8 1 Section 8 2 1 Section 8 5 1 Section 8 5 2 Section 8 6 3 Section 8 7 5 Section 8 8 4 Section 8 8 7 Section 8 8 8 Section 8 9 3 Section 8 10 Section 8 11 Section 10 1 Section 10 2 Section 10 4 4 Section 10 5 2 Section 10 5 3 Section 11 1 Section 12 1 Section 12 3 2 Section 12 4 Section 13 3 7 Section 13 4 5 Section 14 1 Section 14 2 Appendix 1 6 Section 8 7 2 to Section 8 7 4 are changed to Section 8 7 3 to Section 8 7 5 Section 8 8 7 is changed to Section 8 8 8 Appendix 1 2 to Appendix 1 8 are changed to Appendix 1 3 to Appendix 1 9 Sep
85. to be assigned gt Assign ZR for temporary variable WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU Example 2 lt Device automatic assign setting gt Set the following device range D device 8000 to 8191 W device 0 to 1023 Device to be assigned Assign W for temporary variable MONITORING ome 8 Checking points of the empty automatically assigned device O D 2 lt Z 0 0 D The usage of devices within the range set on the Device Label Automatic Assign Setting can be checked by searching devices within the automatically assigned device range with the Device List Example When 4000 to 8191 of D device are set on the Device Label Automatic Assign Setting search D4000 to D8191 with the Device List The range of number of empty device points is the devices before the device numbers being used among D4000 to D8191 For example if D5000 to D8191 are used D4000 to D4999 are the number of empty device points within the range set on the Device Label Automatic Assign Setting For details of Device List refer to the following manual gt Works2 Version 1 Operating Manual Common INDEX APPENDIX gt SETTING OPTIONS 10 5 2 Assigning devices 10 17 iS GX Works2 10 CONVERTING COMPILING PROGRAMS 10 5 3 Precautions on Compilation When the multiple types of devices are assigned automatically QCPU Q mode LCPU If a program or label is chan
86. using the program editor For the overview of monitoring refer to the following manual s GX Works2 Version 1 Operating Manual Common 12 1 12 2 12 3 12 4 12 5 Starting and Stopping Monitoring of Program 12 2 Starting and Stopping Monitoring of Function Blocks 12 3 Changing Operating Conditions of Monitoring 12 4 Monitoring Programs ST Editor 12 6 Monitoring Programs in Structured Ladder FBD Editor 12 8 SPECIFIC POSITION or O LL O Z I O X lt N COMPILING PROGRAMS CONVERTING s EN WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU MONITORING TT 0 t YX Og Zy t p ENT APPENDIX SETTING OPTIONS INDEX 12 1 r GX Works2 12 MONITORING 12 1 Starting and Stopping Monitoring of Program This section explains how to monitor a program on the program editor Open the program editor to be monitored in advance Starting monitoring of programs otart monitoring of the program Operating procedure e Select Online Monitor Start Monitoring amp amp The monitoring starts Stopping monitoring of programs otop monitoring of the program Operating procedure e Select Online Monitor Stop Monitoring 8 The monitoring stops Point Changing current values During monitoring bit devices can be forced ON OFF and the current values of devices
87. window Navigation window Display contents of a project in tree format Section 4 1 Eunctien Black window Display a list of functions such as function blocks used for Section 6 2 1 programming Output window Display compilation and check results errors and warnings Section 10 6 Cross Reference window Display cross reference results Device List window Display the device usage list Walchwndow Tied A screen used for monitoring and changing current device values GX Works2 Version 1 D Men A screen used for monitoring intelligent function modules ee Moa Monitor 1 to 10 9 9 Common Find Replace window A screen used for searching and replacing character strings in the project Status bar Display information about a project being edited SWVuDONd SIAVHSOSd H3OOV1 LS SNI LIO3 GSYyNLONYLS ONILIGS SYHOLIGS 10 SNOILV3H3dO NOWI AOO SNOILVYNDISNOOD S139V1S59NILL3S INVHOOMWd NOLLVYNDIANOO f P Isle tele N33HOS MAIANSAO IN el e Creating Programs PROGRAMMING PROCEDURE This chapter explains how to create programs in Structured project 3 1 3 tl MELSOFT uw 5 Works2 3 PROGRAMMING PROCEDURE 3 1 Creating Programs This section explains the general operating steps from the creation of a program in Structured project to the execution of the created program in the programmable cont
88. 0 10 10 4 7 Retaining bit type outputs of functionsS pp 10 13 10 5 Compilation 10 14 10 5 1 Compilation target data when compiling all programs pp 10 14 10 5 2 wWASsigning devibBS axis He qM WE mie M Pd AN 10 15 10 5 3 Precautions on Compilations uses euius ad a Ela debant aul 10 18 10 6 Checking for Errors and Warnings 10 22 10 6 1 Correcting errors and Warning aed 10 23 11 WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU 11 1 Writing Reading Data to from Programmable Controller CPU 10 1 to 10 24 11 1to 11 6 11 2 12 MONITORING 12 1to12 10 12 1 Starting and Stopping Monitoring of Program 12 2 12 2 Starting and Stopping Monitoring of Function Blocks 12 3 12 3 Changing Operating Conditions of Monitoring 12 4 12 3 1 Changing current value display format decimal hexadecimal of word type variable 12 4 12 3 2 Setting the number of displaying characters for character strings 12 5 12 4 Monitoring Programs on ST Editor 12 6 12 5 Monitoring Programs in Structured Ladder FBD Editor 12 8 13 USING USER LIBRARIES 13 1to 13 16 13 1 User Libraries 13 2 13 2 Procedure for Using User Library 13 3 13 3 Creating User Library 13 4 13 3 1 Creating user libraries 4 13 4 19332 libraiy Name se 13 5 19 9 9 Oad a tunes dies uite D
89. 10 4 4 For details refer to the following manual gt GX Works2 Version 1 Operating Manual Common Assigning devices automatically Devices are automatically assigned to labels when a program is compiled The device assignment range can be changed on the Device Label Automatic Assign Setting screen Section 5 7 The assigned devices can be checked with the cross reference function GX Works2 Version 1 Operating Manual Common Return value of function VAR OUTPUT cannot be set in a function Program the function names as labels in a function to set a return value Setting function names as labels is not needed Data type set on Result Type can be used Example Set return value of function name FUN 01 to 0 Structured ladder FBD gt ST FUN 01 0 B Maximum number of input output labels The maximum number of input output labels can be used in a function a function block differs depending on programming languages When setting input output labels with local label setting of function function block set within the number of the input output labels shown in the following table Programming language Function block 1 4 Ladder language 1 to 24 1 to 24 Including I O label Including I O label Structured ladder FBD 0 to 253 0 to 253 or ST language Including I O label 1 The I O label is counted that each of input output labels is one label 5 5 Common Operations for Setting Labels 5 5
90. 2 Click the position where a row or column is inserted Process Pulse Inserts a column by each click A row or column is inserted by each click Deleting rows and columns Delete a row or a column Operating procedure 1 Select Edit gt Insert Row Insert Column 1 Process ae The cursor changes to 1 Shift click 2 Hold down the shift key and click the position where a row Process jos or column is deleted A row or column is deleted by each click Deletes a column by each click 8 10 8 3 6 Inserting and deleting rows and columns 8 4 Operating Ladder Symbols 8 4 Operating Ladder Symbols This section explains how to operate ladder symbols such as contacts or coils in the select mode OVERVIEW 8 4 1 Moving ladder symbols 2 lt c Zo Disable the Auto connect function and move a ladder symbol n OO Operating procedure Zo 3 1 Select Edit gt Select Mode TR F D The cursor changes to Inputi Output lt D 2 Click a ladder symbol 7 Op aot ao Drag it to the desired position Inputi Output PROGRAM Q1 CONFIGURATIONS 8 4 2 Moving ladder symbols with lines connected Enable the Auto connect function and move a ladder symbol with the lines connected Operating procedure SETTING LABELS 1 Select Edit Auto
91. 2 8 FBD ST Tool Hint Display Format Select display lines on tool hint Display label name Section comment of contact or Set display lines and characters per line 87 coil in multiline Label COMPILING PROGRAMS CONVERTING Select whether to display labels and devices which are Display labels and assigned to the labels when Label is selected from Section devices View Mode Users can neither edit the displayed 8 7 2 devices nor set them to the Find Replace target s Select whether to display label registration selection Section dialog when entering new labels 8 6 2 Wrap instance name for Select whether to wrap function block instance name function block at the function block width l Section Be Specify the number of display characters of function or 8 7 label namelcomment function block label input output Select whether to add input output label when function labels block or function is pasted Section FB FUN Select whether to add ENO output label when function 8 6 1 Automatic ENO labels block or function is pasted Double clicking opens Select whether a program editor is displayed when 6 2 9 body function or function block is double clicked FBD Editor in guided Select whether to overwrite I O label with grid line Section when ruling a grid line over function or function block 8 3 2 Select whether to wrap ladder The edited ladder shall Ladder Wrapping be object after changing the settin
92. 8 Toolbar icons and shortcut keys for I O system setting function The following table shows the toolbar icons and the corresponding shortcut keys for the I O system setting function Shortcut key Corresponding menu Reference SPECIFIC POSITION x O LL 2 E X lt o bi 8 Paste the cut copied data at the cursor Haste osition P Common Execute I O System Execute the I O system setting function Setting and starts simulation Disable I O System Setting Disable the execution of the I O system setting function CD cte Create a new I O system setting 5 p Open an existing I O system setting 9 2 2 Ctrl 151 Save the I O system setting 2 x eu E Ctrl Copy the selected data 11 WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU S E Start Monitoring Start monitoring the I O System Setting Monitoring oes the I O System Setting Alt FA Exit MO System Settings Exit the I O system setting MONITORING ome 8 TT 0 t D YX Og Zo 0 0 p ENT SETTING OPTIONS 2 lt a 2 Q A lt INDEX Appendix 1 8 Toolbar icons and shortcut keys for I O system setting function App 19 Ln GX Works2 APPENDIX Appendix 1 9 Shortcut keys for operating intelligent function module The following explains the toolbar icons and the corresponding shortcut keys for e
93. 9 2 Data types 5 5 Common Operations for Setting Labels 5 5 3 Selecting data types Select a data type Data type can be selected on the Data Type Selection screen other than direct data entry Screen display OVERVIEW Click L in the data type entry field on each label setting screen Data Type Selection Libraries Data Type c Word Signed 2 Double Word Signed Word Unsigned Bit String 16 bit LL Double Word Unsigned Bit String 32 bit cz FLOAT Single Precision OO String 32 oO Time Timer Counter 3 Retentive Timer Type Class Pointer Simple Types Structured Data Types Function Blocks D Array Element T Q ARRAY e e c a aA os Operating procedure 2 gt 1 Selecta type in the Type Class x Item Description 2 Simple Types Specify this to select a data type from basic types such as bit and word ids Specify this to select a data type from the defined structures Hata Not displayed for the structured data settings Specify this to select a data type from the defined function blocks Not displayed for the label settings structured data settings 2 Inthe Libraries field select the reference source such as the defined structure that is used as the data type SETTING LABELS Item Description lt ALL gt Browse data types and structures function blocks defined in the project and all librari
94. AL is automatically set for Class Change it if necessary Characters that can be used for label names Any of the following label names causes an error at compilation A label name that includes a space A label name that begins with a numeral A label name which is same as the one used for devices Lower case label names can be used by setting the option Section 10 4 4 For details refer to the following manual lt GX Works2 Version 1 Operating Manual Common Specifying devices addresses The digit specified bit device K4MO or bit specified word device 00 1 can be specified for devices addresses Specifying timer counter devices When Data Type is a bit type specified devices are treated as contacts TS STS CS When Data Type is a word type specified devices are treated as current values TN STN CN Assigning devices automatically Devices are automatically assigned to labels which are not set devices when compiling a program The device assignment range can be changed on the Device Label Automatic Assign Setting screen 9 Section 5 7 The assigned devices can be checked with the cross reference function GX Works2 Version 1 Operating Manual Common System label Devices are automatically assigned to labels which are not set devices when compiling a program The device assignment range can be changed on the Device Label Automatic Assign Setting screen Section 5 7 System labels whose Attribu
95. AR RETAINRange Latch 1 Lian 10 O E se Latch 1 Able to clear the value by using a latch clear key Latch 2 Unable to clear the value by using a latch clear key Clearing will be executed by remote operation or program Caution 1 Label nonassigned devices of the automatically assigned ones while compiling will be allotted the device that displayed at the lowest of the selected ones Ex Device will be assigned to ZR when D and ZR are selected 2 Changing the assignment target device may also change the processing speed since the arithmetic processing speed For R and ZR is difference from other devices Operating procedure e Set the items on the screen Item Description Select latch 1 or latch 2 Latch selection field Select when the range of latch 1 latch 2 is set on the lt lt Device gt gt tab of PLC parameters Device Display the devices to be assigned automatically Digit Display whether the range of device assign setting is in decimal or hexadecimal Assign Selection Check the device to be assigned automatically Multiple devices can be set i Start nssignment pu Enter the range of device points to be assigned automatically Range End Total Points Display the total points of each device range for VAR and VAR RETAIN Display the device point range set on the lt lt Device gt gt tab of PLC parameters PLC Parameter When the latch range is set display the device point range
96. AT E ox EM EMO p o 4 wh x 5 100 B Monitoring contacts and coils The following shows the display of contacts and coils at the monitoring FALSE TRUE Input Output Input Output DH oO mi m B Monitoring bit type labels and bit devices The following shows the display of bit type labels and bit devices at the monitoring TRUE FALSE 12 8 12 5 Monitoring Programs in Structured Ladder FBD Editor B Monitoring labels other than bit type labels and word devices 2 4 The monitoring values of labels other than bit type labels and word devices are displayed to the right of E the corresponding labels or devices 25 ds Monitoring value of CosVal 0 Input cos o EN ENO F Hadian amp ngle 0 55 d r cCasval 0 0525 Point Displaying monitoring values Monitoring values of FB I O arguments can be checked with the tool hint For the display method of the tool hint refer to Section 6 2 8 COMPILING PROGRAMS CONVERTING s 50412 2550 IM Out 3 INT Out 5 OA WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU a O T TE 2 E e C o T fob 3 e When the labels are used for array element or when the elements are not specified for array or structured data type the monitoring values are not displ
97. Chapter 11 are changed to Chapter 8 to Chapter 12 Oct 2009 SH NA 080781ENG D MANUALS GENERIC TERMS AND ABBREVIATIONS IN THIS MANUAL Section 1 3 1 Section 1 3 6 Section 5 1 Section 5 2 Section 5 3 Section 5 4 Section 6 4 2 Section 6 4 7 Section 12 1 Section 12 2 Appendix 1 2 Appendix 1 6 Jan 2010 SH NA 080781ENG E Model Addition 02 L26 BT L CONDITIONS OF USE FOR THE PRODUCT Section 6 2 11 Correction MANUALS GENERIC TERMS AND ABBREVIATIONS IN THIS MANUAL Section 1 3 Section 2 1 Section 4 1 Section 4 2 3 Section 4 4 1 Section 5 2 Section 5 7 Section 6 2 2 Section 6 4 2 Section 6 4 3 Section 6 4 7 Section 6 4 13 Section 8 1 Section 8 2 Section 8 4 7 Section 9 1 Section 12 1 Section 12 2 Appendix 1 Section 6 2 11 is changed to Section 6 2 12 Apr 2010 Sep 2010 Jan 2011 SH NA 080781ENG F SH NA 080781ENG G SH NA 080781ENG H Revision Model Addition Q50UDEH Q100UDEH LJ72GF15 T2 MANUALS GENERIC TERMS AND ABBREVIATIONS IN THIS MANUAL Section 1 2 Section 1 3 1 Section 2 1 Section 5 2 Section 5 3 Section 5 4 Section 5 5 Section 5 7 Section 8 1 Section 8 2 Section 8 4 3 Section 8 5 Section 11 1 Section 12 2 Appendix 1 1 Appendix 1 2 Appendix 1 6 Appendix 1 8 Section 5 8 Correction Section 1 2 Section 1 3 1 Section 4 3 2 Section 4 4 1 Section 5 2 Section 5 3 Section 5 4 Section 5 7 Section 6 2 1 Section 6 2 2 Section 6 2 10 Sec
98. Connect Inputi Input Output The cursor changes from s to 2 Click ladder symbol i 3 Drag it to the desired position Drag The ladder symbol moves with the lines connected COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST fee PROGRAMS EDITING STRUCTURED N 5 e nc nc Lu e t m 8 4 1 Moving ladder symbols 8 11 r GX Works2 8 EDITING STRUCTURED LADDER PROGRAMS Point Bend points of the line The bend points of the line when the ladder symbol is moved are at the adjacent points of ladder symbols Bend point A bend point can be changed to any desired point by adding a bend point on the line as shown below When adding a bend point select Edit Interconnect Mode L Interconnect Mode 17 Select Mode Double click Move the ladder symbol xD a 0 1s 6 9 6 0 D A bend point is added Added bend point J L Note that when deleting the added bend point delete not only the line but the bend point as well as shown below Select a range and press Delete xO Y10 _ ET f 8 12 8 4 2 Moving ladder symbols with lines connected 8 4 Operating Ladder Symbols 8 4 3 Copying ladder symbols Copy a ladder symbol within the editor or to another structured ladder FBD editor Copying ladder symbols by the drag and drop operation Ladder symbols can be copie
99. D HP 2 2 HP wn Z Q LADDER PROGRAMS 5 6 4 Assigning devices to structure array type labels 5 25 GX Works2 5 SETTING LABELS 57 Setting Ranges for Devices Assigned Automatically This section explains how to set the ranges for devices that are automatically assigned to labels The devices set as automatically assigned device are assigned to labels during compilation L Section 10 5 B QCPU mode LCPU Screen display Select Tool Device Label Automatic Assign Setting Device Label Automatic Assign Setting Set a device range to automatically assign to labels Labels will be assigned from its way down the displayed device list when multiple devices are selected Device Digit Assign Assignment Range Total Points PLC Parameter 0 Selection Stat End Device Setting Range RE E VAR Range 6144 12287 6144 ah a eee LE VaR RETAIN Renge 16 pem um Ss Latch XS zach 0 5 1 1 evice peer selection 88 VAR Range m pof m o 0 ELE Bach 16 O Ss Pointer Low WAR Range e wo 208 4095 El Timer i VAR Range m Joj wv 6 2047 t e VAR RETAIN Range Ttath 10 O E Retentive Timer VAR Range 0 VAR RETAINRange Latch 1 STtath 10 O A Counter ie VAR Range VAR RETAIN Range Latch 1 Ctath 10 O ae fi el d E V
100. Fi Set a path of the library file to be installed M iL Click the button and select a folder in the Open Library screen Library Name Enter a library name ir x ze gt 2 Click the button The selected library file data are installed and the library name is displayed on the User Library view Point Maximum number of user libraries The maximum number of user libraries that can be created in a project is 800 INDEX APPENDIX gt SETTING OPTIONS 13 4 1 Installing user library data to project 13 11 r GX Works2 13 USING USER LIBRARIES 13 4 2 Creating programs using user library 13 12 Use data in a user library to create programs in a project Using user library data programs Use programs in a user library by registering them to a task For details of registering programs to a task refer to Section 4 2 mM Using user library data global labels Use global labels in a user library by selecting them in a program For details of selecting global labels in a program refer to Chapter 5 Mm Using user library data functions function blocks Use functions function blocks in a user library by selecting a user library for POU type in the Function Block Selection window For details of using functions function blocks refer to Section 5 4 mM Using user library data structures Use structures in a user library by setting them in each label editor For details of using stru
101. For details of data types and formats displayed in the templates refer to the following manual MELSEC Q L F Structured Programming Manual Fundamentals OVERVIEW c Operating procedure LL LL cz 1 Move the cursor to the instruction function control syntax entered to the ST editor 99 3 2 Select Edit gt Display Template 8 A template is inserted Z lt a 3 Enter variables according to the inserted template 50 ro D o Delete the data type name enclosed by and enter a label name or device that is equivalent to the data type POU 01 PRG Program ST IF NDTH POU 01 PRG Program ST IFC AN Y BIT AND ANY BIT THEM aro arT cournter CD Z lt vara sward l counter zg END IF D LL 2 TE EI 5 EE Point Inserting templates A template can also be inserted by right clicking the instruction function control syntax entered to the ST editor and SETTING LABELS selecting Display Template Ex from the shortcut menu Editing arguments Select Edit Mark Template Left Mark Template Right F or press Ctrl Ait keys to set an argument of the template in the selected status one by one Si POU_01 PRG Program ST COMMON OPERATIONS et OF PROGRAM EDITORS END IF EDITING ST PROGRAMS Q ac D HP 2 2 HP wn Z Q
102. GURATION PROGRAMMING aN PROCEDURE PROGRAM CONFIGURATIONS SETTING LABELS COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST PROGRAMS Q ac D HP 2 2 HP op Z Q LADDER PROGRAMS i GX Works2 4 PROGRAM CONFIGURATIONS 4 4 Using POUs This section explains how to use the created POUs e Program blocks are used by registering them to tasks 7 Section 4 2 2 e Functions and function blocks are used in program blocks 7 gt Section 4 4 1 4 4 Using POUs 4 4 1 Using functions and function blocks select a function or function block from the Function Block Selection window and insert it to a program Function Block Selection window gt Section 6 2 1 Operating procedure OVERVIEW 1 In the Project view select POU Program program Program 5 The program editor is displayed q Fo 2 Select View Docking Window Function Selection Block Selection Window Tu The Function Block Selection window is displayed 7 EXTUS Function Black 3 Select Project from the combo box za OO The functions and function blocks defined in the project are D o displayed in tree format 1 4 Select function or function block and then drag and drop it to the program editor The selected function or function block is inserted to the specified position on the
103. INDEX i GX Works2 9 SEARCHING FOR SPECIFIC POSITION 9 1 Searching for Specific Position in ST Program This section explains how to search for a specific position in the ST program For searching for devices and instructions refer to the following manual L gt GX Works2 Version 1 Operating Manual Common 9 1 1 Jumping to specified line A cursor jumps to the specified line Screen display Select Find Replace Jump Jump Line Mo ou Operating procedure 1 Set the items on the screen Item Description Enter a line number to which a cursor jumps Line No Click to select a line number from the list of previously searched lines 2 Click the button The cursor jumps to the specified line 9 1 2 Using bookmarks Use bookmarks that are placed at positions in a program for frequent reference Bookmarks allow quick reference to specific positions in a program Si FUN 01 FUN Word Signed Program S BN FOR counter 0 TO 10 BY 2 DO IF ar 2 12345 THEN vardl wvaru counter ELSIF 22400 THEN Varo Yvar01 Varde END IF END FOR Bookmark 9 2 9 1 1 Jumping to specified line 9 1 Searching for Specific Position in ST Program Setting canceling a bookmark Select Find Replace Bookmark Toggle Bookmark A new bookmark is set at or the existing bookmark is cleared from the line where the cursor is placed Jumping from bookmar
104. Lu e lt m 8 7 5 Changing display format of variable 8 25 iS GX Works2 8 EDITING STRUCTURED LADDER PROGRAMS 8 8 Editing Ladder Blocks This section explains how to edit ladder blocks 8 8 1 Inserting ladder blocks Add or insert a new ladder block Inserting a ladder block at the start e Select Edit New Ladder Block List Top A new ladder block is inserted at the start of all ladder blocks Inserting a ladder block in front of the current ladder block e Select Edit New Ladder Block List Before i ladder block is inserted front of the ladder block being edited Inserting a ladder block in back of the current ladder block Select Edit New Ladder Block List After T A new ladder block is inserted in back of the ladder block being edited Inserting a ladder block at the end e Select Edit New Ladder Block List Bottom A new ladder block is inserted at the end of all ladder blocks 8 8 2 Deleting ladder blocks Delete a selected ladder block Operating procedure Select Edit Delete 8 26 8 8 1 Inserting ladder blocks 8 8 Editing Ladder Blocks 8 8 3 Cutting copying pasting and moving ladder blocks Cut copy paste move ladder blocks within the editor or to another program editor on the screen Ladder blocks can be pasted moved between program editors with the same programming language OVERVIEW Operatin
105. M EDITORS This chapter explains the common operations of program editors used to edit sequence programs OVERVIEW CONFIGURATION SCREEN QJ lt De D O X A PROCEDURE 6 1 Types of Program Editor 6 2 6 2 Common Operations of Program Editors 6 5 PROGRAM Q1 CONFIGURATIONS SETTING LABELS COMMON OPERATIONS lt PROGRAM EDITORS 2 0 FO Ow co Q ac D HP 2 2 HP wn Z Q LADDER PROGRAMS Er GX Works2 6 COMMON OPERATIONS OF PROGRAM EDITORS 6 1 Types of Program Editor This section explains how to edit programs according to the programming language Navigation Project gis _ ST editor Chapter 7 Par ameter Intelligent Function Module Global Device Comment Global Label fie Program Setting f POU 01 PRG Program ST AAR FOR counter 0 TO 10 BY 2 DO IF Yar02 lt 12345 THEN VarQ1 Var01 counter ELSIF Var01 gt 22400 THEN Var01 Var01 Var02 END IF END FOR 4 Program Local Label Structured ladder FBD editor gt Chapter 8 POU 02 PRG Program Structured Ladder FBD T Local Label H a POU _03 i Program Local Label 000 04 M Program t3 Local Label Em EX Structured Data Types Local Device Comment
106. N B4 E B2 TIN c p EM Uomo m koe d Gee E ipi o dm Berssseseeenteenseeteennenn Mn mII 12 LD M2 2 AN 13 AND M8177 M3 EN ENO 14 SET M8180 B5 IN 15 LD M2 1 5 8180 RM 18 LD MD 19 2 AND x amp x 20 OUT M8179 M4 EN ENO 21 LD M8182 B IN 2 OUTMEI76 B8 IN 24 LD M8179 25 AND 8176 26 SET B4 27 LD M8179 Regard logical AND Use instruction RS of input AND E s AND E with execution result as EN ENO output s execution Compilation result of ladder block 2 gt con d ition Step Compile Result 30 LD 65 31 AND B6 32 OUT M8178 33 LD M3 34 AND M8178 35 SET M8182 36 LD M3 37 ANI M8178 38 RST M8182 39 LD 67 40 AND B8 41 OLIT M8177 42 LD M4 43 AND 8177 44 SET M8180 45 LD M4 46 ANI M8177 47 RST M8180 48 Store logical AND 49 of input AND E s 53 execution result on z SETB9 M8179 Only when M3 M4 are ON the operation result is stored on B9 10 12 10 4 6 Assigning common devices to outputs of function with EN ENO 10 4 Changing Operating Conditions of Compilation 10 4 7 Retaining bit type outputs of functions Retain bit type outputs of the target function s Operating procedure SPECIFIC POSITION or O LL O Z I O X lt N 1 Select Tool gt Options gt Compile gt
107. NYLS ONILIGS SYHOLIGS 10 SNOILV3H3dO NOWI AOO SNOILVYNDISNOOD S139V1S59NILL3S NVS5oad NOILVUNDISNOS Fels ONIIINVHOOHd MAIANSAO 19 et N SCREEN CONFIGURATION This chapter explains the screen configuration of GX Works2 Overview of Screen Configuration 2 1 2 tl MELSOFT uw r GX Works2 2 SCREEN CONFIGURATION 2 1 Overview of Screen Configuration This section explains the main frame basic screen of GX Works2 that is displayed when it is started up The following screen shows a main frame configuration in which a work window and docking windows are displayed Screen display Title bar MELSOFT Series GX Works Unset Project MAIN1 PRG Program Structured Ladder FBD T t Project Edit Find Replace Compile view Online Debug Diagnostics Tool Window Help Menu bar m DE m mm JETER TREE 3 9 8 aid CS ERR ER FR ER ER US m ee AMI EE dz ses MEO tn SS SE ES 4 ALE HE AE o gt SM ty Toolbar i Navigation i Selection x d DE ce ee All Parts T H wL xx x vx ee w d E 2 AMh NL E DP SvST 21 Parameter om TG wo LE Mola Navigation Intelligent Function Modul B 1l 0
108. ON AND OR SAFETY MANUALS TECHNICAL BULLETINS AND GUIDELINES FOR the PRODUCT Prohibited Application Prohibited Applications include but not limited to the use of the PRODUCT in e Nuclear Power Plants and any other power plants operated by Power companies and or any other cases in which the public could be affected if any problem or fault occurs in the PRODUCT Railway companies or Public service purposes and or any other cases in which establishment of a special quality assurance system is required by the Purchaser or End User e Aircraft or Aerospace Medical applications Train equipment transport equipment such as Elevator and Escalator Incineration and Fuel devices Vehicles Manned transportation Equipment for Recreation and Amusement and Safety devices handling of Nuclear or Hazardous Materials or Chemicals Mining and Drilling and or other applications where there is a significant risk of injury to the public or property Notwithstanding the above restrictions Mitsubishi may in its sole discretion authorize use of the PRODUCT in one or more of the Prohibited Applications provided that the usage of the PRODUCT is limited only for the specific applications agreed to by Mitsubishi and provided further that no special quality assurance or fail safe redundant or other safety features which exceed the general specifications of the PRODUCTS are required For details please contact the Mitsubishi representative in your region
109. POU erra SIAVHSOSd H3OOV1 LS ONILIGS GSYyNLONYLS ONILIGS SHOLIQ3 Le SNOILV3H3dO NOWI AOO SNOILVYNDISNOOD S139V1S59NILL3S NVS5oad NOILLVYNDIANOO C N33HOS ONIIINVHOOHd MAIANSAO IN e N EDITING ST PROGRAMS This chapter explains the functions of ST editor to edit ST programs ST EdIOF ccs 7 1 T tl MELSOFT uw r GX Works2 7 EDITING ST PROGRAMS 7 1 ST Editor This section explains how to edit programs on the ST editor The ST editor is a language editor in text format for creating programs in the ST language The operating method is the same as that of general text editor Spaces tabs and line feeds can be entered between keywords and variable names of the ST control syntax Screen display Select Project view gt POU gt Program gt program gt Program amp MAIN ST PRG Program ST FOR counter 0 TO 10 BY 2 DO IF Yarl gt 12345 THEN Var Var counter ELSIF Yarl lt 22500 THEN Yarl Yarl Var2 ELSE FOR count 01 20 TO 123 DO FOR count 02 2 0 TO 223 DO IF count 01 100 THEN Yarl Varl 2 ELSE Yari Yarl 3 END IF END FOR END FOR END IF END FOR Point Display colors On the ST editor the following display colors can be specified by selecting View Color and Font The colors in the parentheses indicate the default colors
110. RAMMABLE CONTROLLER CPU MONITORING TT 0 t YX Og Zy t p ENT APPENDIX SETTING OPTIONS INDEX 12 3 2 Setting the number of displaying characters for character strings 12 5 r GX Works2 12 MONITORING 12 4 Monitoring Programs on ST Editor This section explains the display of the ST editor at the monitoring Screen display Select Online Monitor Start Monitoring Ei FUN 01 FUN Bit Program ST iFWfjonkii THEN TRUE EMD IF FOR counter 0 TO 10 Ev 2 DO counter 12 IF 01 lt 12345 THEM Var 10 sarl DO counter arf 10 DO 0 counter 12 ELSIF arli gt 22400 THEN Var 10 sarl var Sar var 10 arli 10 ven I spitwindow EAL IF END FORE JEn 1e EI RR Select Online Monitor gt Start Monitoring Bit Type only amp FUN 01 FUN Bit Program ST ORKTI THEN IF FOR counter 0 10 BY 2 DO IF ar01 12345 THEN war01 DO counter ELSIF war01 gt 22400 THEN war01 war01 war02 END IF END FOR Monitoring labels other than bit type labels and word devices The monitoring values of labels other than bit type labels and word devices are displayed on the right side of the split window Mi FUN 01 FUN Bit Program ST Monitoring value of counter Eg FOR counter 0 TG 10 2 DO counter 1 IF ard 12345 THEN sarl 10 sarl DU
111. ROGRAMS Q ac D HP 2 2 HP op Z Q LADDER PROGRAMS Er GX Works2 1 OVERVIEW Assets of past programs can be utilized In GX Works2 sequence programs created with previous versions of GX Developer and GX IEC Developer can be imported which enables efficient utilization of program assets 018 8 213 Sle Pom IOO a fru pl cuj efe le me let af z z t5 FAFAFA AEA zs ESFAE A t p GX Developer o Ready Rey Host sation T 1 3 List of Functions 1 3 List of Functions This section shows the list of functions of GX Works2 The functions are divided into common functions available Project Online Debug Diagnostics Tool Window and Help and functions used for each editing and setting target Edit Find Replace Compile and View For Common Simple and Intelligent indicated in the Reference column refer to the following manuals respectively N OVERVIEW Common GX Works2 Version 1 Operating Manual Common GX Works2 Version 1 Operating Manual Simple Project Intelligent GX Works2 Version 1 Operating Manual Intelligent Function Module 1 3 1 List of functions common to Simple project and Structured 3 project o 2D ram This se
112. ROM PROGRAMMABLE CONTROLLER CPU MONITORING ome 8 ar 0 t 5 YX Og Zy t p ENT APPENDIX SETTING OPTIONS INDEX 10 1 iS GX Works2 10 CONVERTING COMPILING PROGRAMS 10 1 Created Programs This section explains how to compile uncompiled program blocks among all program blocks that are registered to tasks Since this process compiles only uncompiled programs the compiling time can be reduced Compilation target Sequence Task program ga Converts compiles block uncompiled program blocks only The program blocks Program become one block sequence program after the compilation Program block Point Conversion and compilation The following explains the difference between conversion and compilation Conversion Confirms edited content of ladder SFC programs Compilation Assigns devices to labels and creates a code to execute the program in a programmable controller CPU Operating procedure 1 Select Compile Build The Confirm Build Method screen is displayed Confirm Build Method There is a program that has nat been compiled Please choose one of the Following actions f Convert the selected program Just converts the program in Ehe active window Does not compile Compiles the entire project The compile process may take several minutes to complete aa 10 2 10 1 Conver
113. Radian amp ngle 5 d Result Z7 55 Structured data type function block labels Qo Structured data type function block labels are displayed as label names even when the display format is changed 3 to the comment display Label format display Comment display Srilnsti Memberi Srtlnsti Member O berlC t pmber2 z Ennsi Diem tO otrinsti Strinstz nns CSitinst gt CE Brins n n UserFB2 Inputi Comment CUserFEZ JiComment Ser UserFB1 Constant type labels 2 When the display format is the device format constant type labels are displayed as constants set a label setting editor 2 5 lt Label format display gt lt Device format display gt COUNTER FB M 1 05s gt COUNTER FB 1 a COUNTER FB M ausos S 5 Input Coil ValueQut Qutputsal Coi Ya lueQut 012281 Preset Status B IT C K600 2 Preset Status S168 Input al Yalueln Va lueln Restrictions on operations when changing the display format Program editing and search replace functions are disabled in the device address format or comment display To operate these functions return the setting to Standard SETTING LABELS COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST lee PROGRAMS EDITING STRUCTURED N 5 e nc nc
114. Section 5 4 gt Chapter 8 Structured Data Types 50 Define structured data type Section 5 6 Local Device Comment a Device Memory le f d aoo d 3 Common ey Device Initial value Program configuration 1 For FXCPU this item is not displayed 2 For FXCPU no classification for program execution type Only one item Execution Program is displayed 4 2 Creating Program Files and Tasks 4 2 Creating Program Files and Tasks This section explains how to register program blocks executed on the programmable controller CPU and setting the executing conditions of programs using program files and tasks For details of program files and tasks refer to the following manual K gt MELSEC Q L F Structured Programming Manual Fundamentals 4 2 1 Procedure for creating program files and tasks The following explains the procedure for creating a program file and task 1 Creating a program file and task Procedure Reference Create a program file e Select Project gt Object New GX Works2 Version 1 Create a task Operating Manual Select the program file folder and perform the following operation Common Select Project gt Object New 2 Registering program blocks to the task Procedure Reference Display the Task Setting screen GX Works2 Version 1 e Select Project view Program Setting program setting program
115. Section 8 10 Change the input mode for drawing lines Guided Mode Line Mode in Guided editing I E 23 IF O D 2 Og Zo 0 0 D Instruction Help Display details of instructions Common I z l 1 Num indicates keys the numeric keypad gt SETTING OPTIONS APPENDIX INDEX Appendix 1 7 Toolbar icons and shortcut keys for program editors App 15 r GX Works2 APPENDIX B SFC toolbar icons and shortcut keys The following table shows the toolbar icons and the corresponding shortcut keys for the SFC editor pud Shortcut key Corresponding menu Reference FE 5 New Step Insert Ez at the cursor position B Block Start Step with EA F6 Fe END check Insert EZ at the cursor position 5 Block Start Step Shift FE6 without END check Insert at the cursor position FS JUMP Jump Insert E at the cursor position 7 END Step Insert gx at the cursor position Shift F5 DUMMY Dummy Step Insert at the cursor position am Transition Insert at the cursor position a F6 D Selection Divergence Insert a selection divergence D Simultaneous 7 Insert simultaneous divergence C Selection FS Insert a selection convergence C Simultaneous FQ Insert a simultaneous convergence Shift
116. Structure pp 5 6 2 Setting data type as Structure pp 5 6 3 Assigning devices to structured data type 5 6 4 Assigning devices to structure array type labels Setting Ranges for Devices Assigned Automatically 5 7 1 Precautions on automatically assigned devices pp Writing Reading Data to from CSV Files 6 COMMON OPERATIONS OF PROGRAM EDITORS 6 1 6 2 Types of Program Editor 6 1 1 Available programming languages pp 6 1 2 Available comment formats pp Common Operations of Program Editors 6 2 1 Using POUs Function Block Selection window 6 2 2 Using labels in the program pp 6 2 3 JIN OCANG NOOO Ar E 6 2 4 Changing display size of editing screen pp 6 2 5 Splitting editing screen pp 6 2 6 Opening label setting screen of program editor being edited 6 2 7 Displaying compilation result in list form 6 2 8 Setting display contents of tool 6 2 9 Opening label setting and program screens for selected POU 7 EDITING ST PROGRAMS 7 1 ST Editor 7 1 1 Wing L progr arn Sec ached ced E AE ATS 7 1 2 Automatic indention pp 9 1to5 32 9 2 9 3 9 9 7 1 3 mm 7 4 7 1 4 SII E 7 5 8 EDITING STRUCTURED LADDER FBD PROGRAMS 8 1to8 40 8 1 Cre
117. URED N 5 e nc Lu t m r GX Works2 8 EDITING STRUCTURED LADDER PROGRAMS Switching label comment display Select View View Mode gt Change Label Comment Mode The display is switched between label and comment by selecting the menu each time Change Label Comment Mode Entered format display Comment display Batch changing display of all program editors to device format display e Select View gt All Device Display The display of all program editors except for ST being opened is changed to the device format display Batch canceling device format display on all program editors e Select View Cancel All Device Display The device format display of all program editors is canceled and the display returns to the entered format 8 24 8 7 5 Changing display format of variable 8 Changing Display Format of Variables Point Displaying uncompiled labels and label comments An asterisk is prefixed to each label name of uncompiled labels to which devices are not assigned when the display format is changed to the device format or address format An asterisk is prefixed to each label name of labels to which label comments are not set when the display format is changed to the comment display OVERVIEW lt Device format display gt lt Comment display gt cos COS z EN ENO B D12285 87 5 d
118. Version 1 Operating Manual Common 2 Click the button When the Write to PLC function is executed the specified data are written to the target memory When the Read from PLC function is executed the specified data are read from the target memory O D 2 lt Z 0 0 D INDEX APPENDIX gt SETTING OPTIONS 11 3 r GX Works2 11 WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU Screen button system Image Displays the illustration of the connection channel list Parameter Program Selects the parameters and all programs displayed on the list e all Selects all data displayed on the list cancel all selections Cancels the selection status of all data displayed on the list elated Functions gt Related Functions lt lt Switches display hide of the Related functions button For details of the related functions refer to the following manual gt GX Works2 Version 1 Operating Manual Common cuire Symbolic Information Project Name Read from PLC Delete PLC Data only Displays the project name of the symbolic information in the Title Project Name column o Refresh Updates data list on the Online Data Operation screen For QCPU mode LCPU updates writing size free space volume and used space volume When multiple personal computers are connected to the programmable controller CPU update the target memory befor
119. abels and devices simultaneously Change the view mode to display the labels and devices simultaneously by setting the option Operating procedure SETTING LABELS 1 Select Tool gt Options Program Editor gt Structured Ladder FBD gt Label CD CD zu 2 Select Display labels and devices T The assigned devices are displayed 5 x 2 9 lt Display labels gt lt Display labels and devices gt za IO ES 15 1 3 m ee ee s s acs s ee oe dai pool MON M x amp 5 MON LO ee 4 7 E EMO gt gt E EN ENO PR ox 3 B intl int n intl 012287 8 dj intl D1228B EDITING ST lee PROGRAMS EDITING STRUCTURED N 5 e nc nc Lu e t m 8 7 1 Displaying variable names in multiple lines 8 21 r GX Works2 8 EDITING STRUCTURED LADDER PROGRAMS Point Devices not to be displayed The devices are not displayed in the following cases even the option is set When the program is never compiled When the labels are used for array element When structured data type labels are used Edit and find replace when the labels and devices are displayed simultaneously When the labels and devices are displayed simultaneously only labels can be the target of edit and find replace 8 7 3 Displaying instance names in multiple lines Display wrapped function block instanc
120. al EN ENO 6 m ie a Output IT B Changing display format before starting monitoring Change the current value display format by setting the option The monitoring starts with the set display format Operating procedure e Select Tool Options Monitor gt Structured Ladder FBD ST gt Display Format of Monitoring Value gt Decimal Hexadecimal Display Format of Monitoring value Decimal Hexadecimal Decimal Hexadecimal RE ENO E d r 5 d Output 1600000 5 12 4 12 3 1 Changing current value display format decimal hexadecimal of word type variable 12 3 Changing Operating Conditions of Monitoring 12 3 2 Setting the number of displaying characters for character strings Set the number of displaying characters for the monitoring result of character strings by setting the option on the structured ladder FBD and ST editors Operating procedure SPECIFIC POSITION or O LL O Z I O X lt N 1 Select Tool gt Options gt Monitor gt Structured Ladder FBD ST Character String Monitor Setting COMPILING PROGRAMS CONVERTING 2 Set the number of displaying characters within the range from 2 to 50 Character String Monitor Setting s Significant Characters 16 EN WRITING READING DATA TO FROM PROG
121. am files MAIN and SUB1 are modified SPECIFIC POSITION or O LL O Z I O X lt N Program configuration of the Structured project Compilation target Program file COMPILING PROGRAMS CONVERTING a mh Sequence program MAIN WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU Program block 3 J Sequence program SUB1 Program block2 ee l r Program Function 1 blocka a Function 1 is used in the program blocks 3 and 4 Function 1 is modified Device label automatic assign setting Devices in the range set on the Device Label Automatic Assign Setting screen automatically assigned devices cannot be used in the program If automatically assigned devices are used in a program a compilation error occurs For the device label automatic assign setting Section 5 7 MONITORING ome 8 TT 0 t YX Og Zy t p ENT Input arguments of function function block Data cannot be written to input arguments VAR INPUT of function function block If data are written to input arguments a compilation error occurs Compiling structured ladder FBD ST programs The code is not created when the program as shown below is compiled in the structured ladder FBD or ST program Example The same device is used for a contact and coil MO M10 La Mf MI The code is not created when L the progra
122. amage i Note that the NCAUTION level may lead to serious consequences according to the circumstances Always follow the precautions of both levels because they are important for personal safety Please save this manual to make it accessible when required and always forward it to the end user Design Instructions N WARNING When data change program change or status control is performed from a personal computer to a running programmable controller create an interlock circuit outside the programmable controller to ensure that the whole system always operates safely Furthermore for the online operations performed from a personal computer to a programmable controller CPU the corrective actions against a communication error due to such as a cable connection fault should be predetermined as a system Startup Maintenance Instructions N CAUTION The online operations performed from a personal computer to a running programmable controller CPU Program change when a programmable controller CPU is RUN operating status changes such as forced input output operation and RUN STOP switching and remote control operation must be executed after the manual has been carefully read and the safety has been ensured When changing a program while a programmable controller CPU is RUN it may cause a program corruption in some operating conditions Fully understand the precautions described in GX Works2 Version 1 Operating Manual Comm
123. ame Class Label Name 1 in data 1 in data 2 vidtat Cid _ 2 INPUT vndas 3 V R CONSTANT AL RENI 3 VAR vidal 4 x VAR CONSTANT data Point Adding rows The following settings can be set with the New Declaration After function Set whether to leave cells of added row blank Enter label names or data types automatically Select Tool Options Label Setting Editor Editor Setting Automatic copy and increment when inserting a row Iw Copy data typefcomment items 5 18 2 9 4 Editing rows 5 5 Common Operations for Setting Labels B Deleting rows Delete a row on the label setting screen Operation m Select Edit Delete Row gt Class Label Mame Class Label Mame 2 In data 1 vp 2 2 CUNSTANT v 3 VAR CONSTANT data2 3 VAR lt ae Displaying all lines or first line of comments and remarks 59 For the Comment and Remark columns data can be entered in multiple lines The all lines first line 3 display function switches the display between all lines and only the first line by double clicking or oo S Zy All lines display lt LL Display all lines of information in the Comment and Remark columns D n Double click in the row number cell of the table First line display Display only the first line of information in the
124. an be used in programming between GX Works2 MT Developer2 and GT Designer3 by using system labels System label data base A system label data base is a data base to manage system labels A system label data base is created in the workspace when the workspace is saved in MELSOFT Navigator System labels cannot be used in the workspace which does not contain a system label data base SCREEN CONFIGURATION lt De X A PROCEDURE Screen display Select Project view Global Label global label s Global Label Setting Global1 Class Label Name DataType Constant Device Address Comment Remark Relation with System System Label Attribute 4 Transport Complete Bit E M100 2 MD 100 VAR GLOBAL emargency Stop Switch Bit S b S VAR GLOBAL CONSTANT Temperature Control f TRUE PT VAR GLOBAL Product A Data Stuc Detail Setting DetalSeting Stuct VAR GLOBAL Labal daio 5 Dislse stabe 70 VAR GLOBAL zooa bu neo 36116 Browse global biti Link V R GLOBAL poabio Bit J JI MT7 global bit2 Link E 4 PROGRAM CONFIGURATIONS ies 2 3 4 5 6 Na o System Label Operation To reflect the changes of the table above to the Change Register Release system label database Notification Di gerh Devic
125. ancels all bookmarks 2 lt sa 50 Ot View function for editing in ST language Reference S 5 EO Display Compile Result Display the compilation result in a list form Section 6 2 7 Zoom 5 Set Zoom Factor Change the display size of the program Section 6 2 4 m Zoom S Open the label setting screen in the selected POU m Section 6 2 9 N Open the program editor in the selected POU Open Header Open the label setting screen for the program being edited Section 6 2 6 CD CD 5 5 d o Online function for editing in ST language Reference a Monitor zZ T Start monitoring with the split window format that displays o Start Monitoring l Ou monitor data of numeric value and character strings Section 12 4 OO Start Monitoring Bit Type only Start monitoring only bit type devices labels 7 EDITING ST PROGRAMS Q LL x te e x kK N 2 Q LLI LADDER PROGRAMS 1 3 5 List of functions for editing in ST language 15147 r GX Works2 1 OVERVIEW 1 3 6 List of functions for editing in structured ladder FBD language The following tables show the functions for editing with the structured ladder FBD editor Edit function for editing in structured ladder FBD language Reference Delete Delete the selected data Select Mode Change to the contact and coil input mode Section 8 4 1 Interconnect Mode Change to the line drawing mode Section 8 3 2 Auto Co
126. and parameters at the same time Reading data written to the programmable controller CPU by GX Developer or GX IEC Developer Using Open Other Project function SEARCHING FOR SPECIFIC POSITION When all programs are compiled devices are reassigned to labels in all POUs If all the compiled programs are written to the programmable controller CPU and run as they are the programs may be processed with the device values set before the program change After compiling all programs clear the device values set before the program change by the following procedure Note that by setting the following option device values in the range set in the device label automatic assign setting can be automatically cleared to O after writing programs to the programmable controller CPU Tool 2 Options When writing to PLC after a Rebuild All operation clear the device ranges set in the Device Label Auto Assign setting to 0 1 QCPU mode LCPU only COMPILING PROGRAMS CONVERTING S WRITINGREADING DATA TO FROM PROGRAMMABLE CONTROLLER CPU MONITORING ome 8 O D x Og Z 0 0 D INDEX APPENDIX gt SETTING OPTIONS 10 5 3 Precautions on Compilation 10 19 iS GX Works2 10 CONVERTING COMPILING PROGRAMS e QCPU mode LCPU 1 Switch the programmable controller CPU to STOP 2 Select Online Write to PLC and write programs to the programmable controller CPU 3 Switc
127. as the version B List of functions for setting labels The following table shows the functions for setting and editing labels Edit function for label setting Reference Delete Delete the selected data Select All Select all items New Declaration Before Add a row above the cursor position Section 5 5 4 New Declaration After Add a row below the cursor position Delete Row Delete a row at the cursor position Read from CSV File Read label settings from the CSV file Section 5 8 Write to CSV File Write label settings to the CSV file System Label Confirm Update of System Label Reflect system label information changed in another project Database on global labels Import System Label Import system label information and reflect it on global labels Redister Device N Svst Section 5 2 Register a selected global label as a system label Disable System Label Relation Disable the relation between a selected global label and a system label Execute Verification Synchronous with Resolve a mismatch when system label information contains _ System Label it 1 3 1 List of functions common to Simple project and Structured project 1 3 List of Functions B List of functions for editing device comments The following table shows functions for editing device comments Edit function for editing device comments Delete Delete the selected data Select All Import from Sample Comment Special Relay Sp
128. ating Ladder FBD Programs 8 2 8 1 1 Selecting editing modes Nt 8 3 8 2 Editing in Select Mode 8 4 8 2 1 ENtening ladder SYMON TT e 8 4 8 2 2 WASIUCHOM Gites 8 5 8 3 Drawing Lines 8 7 8 3 1 Connecting lines automatically when entering ladder symbols pp 8 7 8 3 2 Connecting ladder symbols with lines pp 8 8 8 3 3 Connecting lines 8 8 8 3 4 Overwriting input output variable with lines pp 8 9 8 3 5 Rearranging lines automatically 4 8 9 8 3 6 Inserting and deleting rows and columns pp 8 10 8 4 Operating Ladder Symbols 8 11 8 4 1 Movingdddder SyimiDOlSzcaceevesi vu Ana walter eda 8 11 8 4 2 Moving ladder symbols with lines connected pp 8 11 8 4 3 Copying ladder esame oops Mute RAUM LU m A 8 13 8 5 Changing Type of Contact and Coil 8 15 8 5 1 Setting the type of contact and coil pt 8 15 8 5 2 Changing contact and coil in predetermined order pp 8 17 8 6 Operating Functions and Function Blocks 8 18 8 6 1 Adding variables automatically when entering functions and function blocks 8 18 8 6 2 Editing variable names and instance names pp 8 19 8 6 3 Changing the number of arguments for functions and function blocks 8 20 8 7
129. ayed The monitoring values on tool hint are not displayed either In this case check monitoring values of array or structured data type on the Watch window Input cos _ EN ArraylN index a aArrayOUT O 0 0 MONITORING TT 0 t YX Og Zy t p ENT INDEX APPENDIX gt SETTING OPTIONS i NO 5 Works2 12 MONITORING 12 10 aN MELSOFT 13 USING USER LIBRARIES In Structured project user libraries are shared among multiple projects as program assets This chapter explains the user library operating methods 13 1 13 2 13 3 13 4 User Libraries 13 2 Procedure for Using User Library 13 3 Creating User Library 13 4 Using User Library 13 11 SPECIFIC POSITION or O LL O Z I O X lt N COMPILING PROGRAMS CONVERTING s WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU gt MONITORING QJ eme 8 T oi 14 Oc 2 Y 5 APPENDIX gt SETTING OPTIONS INDEX 13 1 r GX Works2 13 USING USER LIBRARIES 13 1 User Libraries User libraries are components which can be shared between multiple projects and can be used in Structured project only These libraries are created by the user Frequently used components are stored and reused for p
130. buffer memories and labels can be changed For forcing bit devices ON OFF and changing current values refer to the following manual K gt GX Works2 Version 1 Operating Manual Common Monitoring buffer memory and link memory To monitor the ON OFF status of the buffer memory and link memory example UOYGO 1 select Tool Options Monitor Structured Ladder FBD ST Operational Setting and check Monitor buffer memory and link memory Monitoring labels whose classes are set as a constant type For labels whose classes are set as VAR GLOBAL CONSTANT VAR CONSTANT the values are not displayed during monitoring To check the values select Constant Value under Tool Options Program Editor Structured Ladder FBD ST Tool Hint Tool Hint Display Items and check with tool hint 12 2 12 2 Starting and Stopping Monitoring of Function Blocks 12 2 Starting Stopping Monitoring of Function Blocks SPECIFIC POSITION x O LL 2 O X lt o This section explains how to monitor function block programs Open the function block program to be monitored in advance Starting monitoring of function blocks otart monitoring of the function block Operating procedure COMPILING PROGRAMS CONVERTING s 1 Select Online Monitor Change Instance Function Block The Change Instance Function Block screen is displayed Change Instance Fu
131. c Watch KE Start monitoring the current values of registered devices Start Watching labels and intelligent function module Stop monitoring the current values of registered devices CO Stop Watching labels and intelligent function module Common Register Watch Register the selected devices to the Watch window lt Read local device data from the programmable controller lt Local Device Batch Read Save CSV CPU and saves them to a personal computer in CSV format LL 25 m oO Debug common function Reference 5 Start Stop Simulation Start stop simulation Display a list of the instructions and devices used in the program unsupported by the simulation function For ladder and SFC Zoom programs change the ON OFF Common status and values of devices and labels used in the program Instructions Unsupported by Simulation SETTING LABELS Modify Value Forced Input Output Registration Register cancel the forced input output of the device X Y Cancellation Device Test with Execution Condition CD CD Register the device test with execution condition 5 5 Condition Check Disable Register Device Test Check disable the registration of device test with execution i A Common 2 with Execution Condition condition E Oo Sud Cancel the device test with execution condition in batch f Execution Condition Sampling Trace 7 O
132. compilation Offset values Minus values can be set for offset values SCREEN CONFIGURATION Setting data length of the character string data type lt De D O X PROCEDURE To change the data length of the character string data type directly edit the data length on each label setting screen The data length of the character string data type is set in the option setting Select Tool 2 Options Label Setting Editor Default Length of String Data Type and set the data length PROGRAM y CONFIGURATIONS Data Type Setting Default Length of String Data 32 SETTING LABELS COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST PROGRAMS Q ac D HP 2 2 HP wn Z Q LADDER PROGRAMS 5 5 3 Selecting data types 5 17 GX Works2 5 SETTING LABELS 5 5 4 Editing rows Edit rows on the label setting screen Adding rows Add a row on the label setting screen New Declaration Before Insert a row above the selected row e Select Edit New Declaration Before amp Class Label Mame Class Label Marne 1 VAR INFUT v in data Li m 2 VAR daal 2 INPUT w indata 3 WARLCONSTANT data2 3 VAR New Declaration After Insert a row below the selected row e Select Edit New Declaration After Class Label N
133. corresponding shortcut keys for the structured ladder FBD editor Shortcut key Corresponding menu Reference 5 Ctrl al Select Mode e IC UD format for positioning Section 8 4 Guided Mode Guided Change the input format for entry with Ctrl Shift Editing keyboard Section 8 10 LP Ec lem interconnect Node the input mode for drawing Guided Mode Auto Add a comment entry field at the start of Section mi Att Shift the ladder block added in Guided E 8 10 9 Section E JE ul E the 8 3 6 Insert a new ladder block in front of the mE New Ladder Block Before adder block being edited ection Insert a new ladder block in back of the i Alt New Ladder Block After ladder block being edited pU eee Display the Input Instruction screen Pl en pe ear Insert a horizontal line at the cursor Insert a coil at the cursor position Window window at pc MINER LC LR F G a EE T nell s io E fimose Day We Lables the Label Registration Selection vd App 14 Appendix 1 7 Toolbar icons and shortcut keys for program editors Appendix 7 List of Toolbars and Shortcut Keys 2 Toolbar Shortcut key Corresponding menu Description Reference Increment the number of arguments of Og functions function blocks Secti
134. cs CC Link Diagnostics Diagnose CC Link IE Controller Network Diagnose CC Link IE Field Network Diagnose MELSECNET 10 H Diagnose CC Link and CC Link LT Monitor the system status of the programmable controller System Monitor Online Module Change Change modules online 2 c Tool common function IC Memory Card Read IC Memory Card Write IC Memory Card Read data from the IC memory card Write data to the IC memory card Check programs of the project without labels and display Check Program Check Parameter Check parameters and display errors Options Set various options Key Customize Change the settings of the shortcut keys Device Label Automatic Assign Setting Set device range to be automatically assigned to a label Block Password Set a block password to data Calculate the size of files to be written to the programmable Confirm Memory Size controller CPU Set TEL Data Connect via Modem Register a modem between a personal computer and a serial communication module or a personal computer and an FXCPU Phone Book numbers of targets such as remote access LCPU Logging Configuration Tool Start the LCPU logging configuration tool AT Command Registration Ethernet Adapter Module Configuration Tool Start the Ethernet adapter module configuration tool 1 3 1 List of functions common to Simple project and Structured project Reference Common Common Reference
135. ction explains the functions common to Simple project and Structured project e o ror D o B List of common functions 0 2 The following tables show functions that are available regardless of the type of editing or setting target q lt 2 Project function Reference d 9 Z New Create a new project Q Open Open an existing project 5 Close Close an open project Save Save a project Save As Name and save a project a Compress Unpack B Delete Delete an existing project Verify Verify between two project data Project Revision i 2 Register the project change history lt Q Display the list of project change history a Change the programmable controller CPU type Common Change the project type from Simple project without labels Su Change Project Type to Simple project with labels or from Simple project with e labels to Structured project 7 Object 2 0 Specify data in selected connection target as a connection 8 target for regular use e Property Display the selected data properties Lu 2 5E ZO c CD o or zu RE 1 3 1 List of functions common to Simple project and Structured project 1 5 r GX Works2 1 OVERVIEW Project common function Intelligent Function Module New Module Delete Module Property Add new intelligent function module data
136. ctures refer to Section 5 6 13 4 2 Creating programs using user library 13 4 Using User Library 13 4 3 Editing user library Edit installed user library data B Enabling editing of user library data Enable the editing of user library data To edit user library data the library needs to be set in the editing status Screen display lt Editing disabled status gt lt Editing status gt Navigation Elaa lt ALL gt Program Programi Program Local Label Global Label StructuredDataTypes StructuredDataTypes2 ES Structured Data Types B3 structuredDataTypesi BS structuredDataTypes2 BE L E Connection Destination E Connection Destination Operating procedure 1 Select a user library to edit in the User Library view Multiple libraries can be selected 2 Select Project gt Library gt Open i The editing of the user library data is enabled Library password If the library is protected with a password the password needs to be entered to open the library for editing When the password entry screen is displayed enter the i library password Password cance Password Cancellation Change to Editable Library Mame Point Editing status when opening a project When a project is opened all libraries are in the editing disabled status Even if a project is closed with the editing status it is set in the editi
137. d of the existing ladder blocks e Edi I Displays an editing screen of the ladder block header e uk Copy Paste Delete Undo Reda Same functions as the buttons on program editors Find Searches for a ladder block based on the ladder block label i e Clase Closes the Ladder Block List screen 8 8 5 Editing listed ladder blocks 8 29 OVERVIEW SCREEN Gd CONFIGURATION lt De D O X A PROCEDURE PROGRAM Q1 CONFIGURATIONS SETTING LABELS COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST lee PROGRAMS EDITING STRUCTURED N 2 nc nc Lu e t m 5 Works2 8 EDITING STRUCTURED LADDER PROGRAMS 8 8 6 Setting ladder block labels titles Set a ladder block label title on the Ladder Block screen Operating procedure 1 Select Edit gt Ladder Symbol Ladder Block Label Ladder Block 2 Set the ladder block label and ladder block title and click the button 8 8 7 Switching to display hide left power rail Switch to display hide left power rail for each ladder block When using FBD switch the left power rail to hide Operating procedure Select a ladder block and select Edit gt Ladder Symbol Left Power Rail The left power rail of selected ladder block is switched to display hide lt Display left powe
138. d to a single task z Programming language of z2 9 Shee eee Maximum number of tasks that can be Maximum number of program blocks nim program Doek registered created in a single program file that can be registered to a single task ra to the first task J 9 Ladder 1 1 3 SFC 320 ST 124 320 2 Structured ladder FBD 22 1 For Basic model QCPU Q00UJ Q00U Q01U Q02U L02 the maximum number of SFC blocks is 128 OO EE Program block that can be registered to a single task 4 Applicable x Not Applicable o Program block that can be registered to a single task Programming language Structured gt ladder FBD z cO as ELEM NECEM T T ST 5 2 SETTING LABELS COMMON OPERATIONS J OF PROGRAM EDITORS EDITING ST PROGRAMS Q or D HP e D 2 N Z Q LLI LADDER PROGRAMS 4 2 2 Registering program blocks to tasks 4 5 iS GX Works2 4 PROGRAM CONFIGURATIONS Setting program names on the program selection screen Set a program block on the Task Setting screen using the Program Selection screen Screen display On the Task Setting screen click next to the Program Name entry field Program Selection Libraries Programs Cancel Operating procedure 1 Select the reference source of the program block from the Libraries field Libraries Description lt ALL gt Browse all program blocks defined in the project and librari
139. d within the editor 1 Hold down the Ctr key and click the ladder symbol T if Input3 2 Drag it to the desired position Ex uns Lew Input Inputs Aon x Impute Inputs Lom Copied ladder symbol Copying ladder symbols using the clipboard Ladder symbols can be copied within the same editor or to another structured ladder FBD editor by the basic menu options using a clipboard or shortcut keys 1 Select Edit Cut 26 Copy E3 2 Select Edit Paste 3 Click the desired position The upper left of the pasted position is the position to be clicked 8 4 3 Copying ladder symbols 8 13 OVERVIEW SCREEN CONFIGURATION lt De D O X A PROCEDURE PROGRAM Q1 CONFIGURATIONS SETTING LABELS COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST lee PROGRAMS EDITING STRUCTURED N 5 e nc nc Lu e lt m r GX Works2 8 EDITING STRUCTURED LADDER PROGRAMS Point Copying ladder symbols to other ladder blocks Ladder symbols cannot be copied or moved to other ladder blocks by the drag and drop operation when the Auto connect function is enabled In order to copy or move ladder symbols disable the Auto connect function or use the clipboard Select Edit Auto Connect to switch the Auto connect function ON OFF Copying ladder symbols by the drag and drop operat
140. dicate the function availability Icon QCPU Q mode FXCPU Normal icons indicate that the corresponding function Icons with asterisk symbol indicate that the Q CPU corresponding function is available with restrictions such as CPU types Icons with x symbol indicate that the corresponding function is not available This manual also uses the following columns Description x Point This explains notes for requiring attention or useful functions relating to the information given on the same page Restrictions This explains restrictions relating to the information given on the same page A 19 Symbols used in this manual The following shows the symbols used in this manual with descriptions and examples MELSOFT Series GX Works2 Unset Project PRG Write POU_01 1 Step 1 gt t Project Edit Find Replace Compile View Online Debug Diagnostics Tool Window Help 1 0 i 1 2 Ale E oe ER ER LU ER a ea 4 PLC Name PLC System PLCFile PLCRAS Boot File Program SFC Device 0 Assignment Multiple CPU Setting Timer Limit Setting Low Speed 100 ms ims 1000ms Common Pointer No P 2048 After 0 4095 High Speed 10 0 ms 0 1ms 100ms Points Occupied by Empty Slot 16 Points RUN PAUSE Contacts RUN X X0 X1FFF System Interrupt Setting Interrupt Counter Start No C 0 768 PALISE X XO X1FFF Fixed Scan Interval 128 100 0
141. diting intelligent function module data Toolbar icons for positioning monitor function The following table shows the toolbar icons for the positioning monitor function ec Shortcut key Corresponding menu Reference Monitor the operating status of positioning module Intelligent Start the positioning monitor i Alt Stop the positioning monitor SB GH GH er Toolbar icons and shortcut keys for editing predefined protocol support function data The following table shows the toolbar icons and the corresponding shortcut keys for editing predefined protocol support function data m n a 1 18 Intelligent a m iene m oa tomaron App 20 Appendix 1 9 Shortcut keys for operating intelligent function module NOI LISOd 215419945 SNIHOHV3S gt lt lt MELSOFT SAVJdooyd ONITIdNO9 ONILYSANOD q Ndo Y311041N09 FTEVWNWYOOUd IO83 O1 VIVO 9NIQYVIY ONILIYM NES co ONIYOLINOW q 5 ONISN SNOILdO ONILLAS m XIGNAddV Index 1 i GX Works2 INDEX A address ee ee ee ben 5 4 8 23 Application Instruction pp A 21 6 5 Clu c 5 16 iea nA i 8 8 8 11 B bit specification of word device 5 22 C Checking for Errors a
142. e A The selected global label will be registered to the system label 4 Click the _ button 5 2 Setting Global Labels 5 The following message is displayed MELSOFT Series GA Works OVERVIEW 6 Click the button uu For FXCPU this button is supported by FX3G and FX3uc only Disables the relation between a global label and system label After the relation with the system label is disabled the global label becomes a normal global label 1 Select a global label to disable its relation with a system label SCREEN CONFIGURATION Release 2 Click the Relation 3 The following message is displayed button MELSOFT Series GA Works lt De D O X A PROCEDURE The relation between the selected global label and system label will be disabled Another project may be referring the system label Do vou want to disable PROGRAM Sy CONFIGURATIONS 4 Click the s _ button 5 The following message is displayed MELSOFT Series GA Works SETTING LABELS 6 Click the button COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST PROGRAMS Q ac gt HP gt X HP N Z E Q LADDER PROGRAMS GX Works2 5 SETTING LABELS Point 9 Class setting When an item other than the class such as a label name or data type is set in a blank column VAR GLOB
143. e LCPU OLE MELSEC Structured MELSEC Q L Structured Purpose Programming Programming Manual All languages Using ladder language Using SFC language Using structured ladder FBD or ST language A 16 Manual Common Special Application Common PID Control Learning details of programmable controller CPU error codes special relays and special registers Learning the types and details of common instructions Learning the types and details of instructions for intelligent function modules Learning the types and details of instructions for network modules Learning the types and details of instructions for the PID control function Learning details of specifications functions and instructions of SFC MELSAP3 Learning the fundamentals for creating a Structured program Learning the types and details of common instructions Learning the types and details of instructions for intelligent function modules Learning the types and details of instructions for network modules Learning the types and details of instructions for the PID control function Learning the types and details of application functions 4 Details of instructions in each programming language for FXCPU MELSEC Structured FXCPU Structured Programming Manual FXCPU Programming Manual Programming Purpose Manual amp FXo FXos FX1s FX1N Fundamentals
144. e Name Relation please save the project after compiling SETTING LABELS COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST PROGRAMS a c gt HP HP N Z a LADDER PROGRAMS iS GX Works2 5 SETTING LABELS Operating procedure e Set the items on the screen m Maximum number of Item Description characters Select a label class from the list displayed by clicking Class 57 Section 5 5 1 Ladder ST SFC Label Name Enter a desired label name a FB instance name 16 Specify a data type from the Data Type Selection screen displayed by Data Type clicking L t Section 5 5 3 128 It can also be entered directly Enter a constant value when VAR GLOBAL CONSTANT is selected for Class and simple type is selected for Data Type ee Constant Set a specific device to be assigned to the label when Device VAR_GLOBAL is selected for Class When a device name is entered in either column the other column is displayed in the respective format automatically When the Device column is blank a device is automatically 50 assigned Address When the data type is Structure click the Detail Setting cell and set devices on the Structure Device Setting screen Section 5 6 3 Enter a label comment Comment 1 2 Comments can be displayed on the program editor by switching 1024 display hide of comments Section 8 7 5 ak Enter supplementary i
145. e name within the width of function block by setting the option Operating procedure 1 Select Tool Options Program Editor gt Structured Ladder FBD gt FB FUN 2 Select Wrap instance name for function block Single line Wrapping a line instancel2345b Instance 234567890 C0 E B 7 MEN E E T LOAD CY 7890 CTD E E BR 7 7 2 8 7 4 Specifying the number of displaying characters for variable names Change the number of displaying characters for variable names of functions and function blocks by setting the option Operating procedure 1 Select Tool Options Program Editor gt Structured Ladder FBD gt FB FUN 2 Select Specify the number of enable characters for label name comment 3 Set the number of characters 2 to 255 lt 16 characters gt lt 8 characters gt ABS ABS LocalVall 23456 7890 Localv ay TN M 8 22 8 7 3 Displaying instance names in multiple lines 8 Changing Display Format of Variables 8 7 5 Changing display format of variable Change the display format of variable to the device address comment format Entered format display Label comment display Input Input COS EN ENO H EN ENO RadianAngle dj Cosval Angle dj Result Device format display Address format display MB177 COS 6 MXD 8177 COS EN ENO EN ENO B
146. e reading data from the programmable controller CPU 11 4 11 1 Writing Reading Data to from Programmable Controller CPU B Symbolic information The symbolic information is data that store the program configuration such as structures and labels To restore these data included in the symbolic information when reading a program from the programmable controller CPU write read the symbolic information to from the programmable controller CPU Data such as structures and labels included in the symbolic information cannot be restored if only sequence programs are read Data are treated as the ladder in Structured projects SEARCHING FOR SPECIFIC POSITION CD 9 amp The following table shows the program data included the symbolic information e cc Item Included data x Global label vo 2 2 setting Task POU Program Symbolic information Local label Function block Function WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU Structure User library Point Compile status when the symbolic information is read When the symbolic information and parameters are read simultaneously and the data in the symbolic information match with parameters and programs program files in the programmable controller CPU the read data are in compiled status When only the symbolic information is read the read data are in uncompiled status When the symbolic information of GX
147. eating a ladder in parallel as shown below EDITING ST lee PROGRAMS EDITING STRUCTURED N 5 e nc nc Lu e t m 8 3 1 Connecting lines automatically when entering ladder symbols 8 7 iS GX Works2 8 EDITING STRUCTURED LADDER PROGRAMS 8 3 2 Connecting ladder symbols with lines Connect ladder symbols with a line Operating procedure 1 Select Edit Select Mode Interconnect Input 7 ABSE EN ENO Mode L LIN For the interconnect mode the cursor changes to F pu ABS E i 1 N 7 2 For the select mode click the start position of the line The cursor changes to a T i _ o Drag the line from the start position to the end position A line is drawn in a vertical or horizontal straight line 8 3 3 Connecting lines automatically Connect lines automatically by specifying the start and end points Operating procedure 1 Select Edit Auto Connect jr je For the interconnect mode the cursor changes from rd to An 2 Click the start position In For the interconnect mode the cursor changes to amp i L TEA 3 Click the end position N The line is automatically routed Input 8 8 8 3 2 Connecting ladder symbols with lines 8 3 Drawing Lines 8 3 4 Overwriting input output variable with lines Overwrite an input output variable of a f
148. ecial Register Intelligent Function Module Select all data being displayed Utilize sample comments of SM SD Utilize sample comments of intelligent function module device Clear All Delete all device comment data Read from CSV File Write to CSV File Read device comments from the CSV file Write device comments to the CSV file Hide the bit specified word device comment of the selected Hide Bit Specification Information row Display the bit specified word device comment of the Show Bit Specification Information selected row Cut The Range including Hidden Bit Specification Information Cut data including hidden bit specified comment Copy The Range including Hidden Bit Specification Information Copy data including hidden bit specified comment Paste The Range including Hidden Bit Specification Information Paste data including hidden bit specified comment B List of functions for setting device memory The following tables show the functions for setting device memory Edit function for setting device memory Find Replace function for setting device memory Find Device Cell Search for a device COMMON OPERATIONS View function for setting device memory Display Mode Binary Display data in binary Octal Decimal Display data in decimal a Display data in octal Register 16 bit Display data in units of words 32 bit Display data in units of double words 64 bit Display data in unit
149. eck box below Create function block program codes for each function block at compilation Codes are created to call function blocks for each location where instances are used To call function blocks use automatically assigned devices Section 5 7 Apply function block program codes using the MC MCR instruction to each location where instances are used at compilation Result Type Checked Use Macrocode Not checked Checked Use MC MCR 1 72 3 Apply function block program codes using the CJ instruction to each location where Not checked a instances are used at compilation Checked Become a function or function block with EN ENO EN ENO 1 2 USE iN Not checked Become a function or function block without EN ENO 1 This item cannot be selected when using ladder function blocks 2 This item cannot be selected when using ST function blocks in Simple project 3 This item can be selected only when the check boxes of both Use Macrocode and Use EN ENO items are checked 4 3 2 Setting properties of functions and function blocks 4 11 OVERVIEW SCREEN CONFIGURATION PROGRAMMING aN PROCEDURE PROGRAM 3 CONFIGURATIONS SETTING LABELS COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST PROGRAMS Q ac D HP 2 2 HP wn Z Q LADDER PROGRAMS GX Works2 4 PROGRAM CONFIGURATIONS Point Use MC MCR
150. ect and Structured project 1 3 List of Functions Online common function Reference Monitor Switch the mode of the open window to Monitor Mode Monitor Mode during monitoring Switch th de of th indow to Monitor Writ UD Monitor Write Mode witc mode of the open window to Moni or Write gt Mode during monitoring Start Monitoring All Windows Start monitoring of all open windows C Stop Monitoring All Windows Stop monitoring of all open windows 2 Start Monitoring Start monitoring of the open window TUN mE Section 12 1 gt Stop Monitoring Stop monitoring of the open window 6 Change Value Format Decimal Display the current device value in decimal in program 5 monitoring 5 Section 12 3 1 TES Change Value Format Hexadecimal Display the current device value in hexadecimal in program monitoring OO Device Buffer Memory Batch Monitor device buffer memory in batch Program List Monitor the processing time of programs being executed Common 3 Interrupt Program List Monitor the number executions of interrupt programs Change Instance Function Block Select an instance of the function block to be monitored Section 12 2 9 SFC All Block Batch Monitoring Batch monitor all blocks in the SFC program gt Scroll the screen to display active steps automatically when Simple co SFO Auto they are out of the screen during monitoring S
151. ecuting order according to the set execution type scan execution priority high low fixed scan execution or event execution in the task property setting 50 X X Task name Task executing condition Even Interval Priority 4 Task1 TRE 0 3 Scan execution priority low Task2 0 3 Event execution Task3 Fixed scan execution Task4 TRUE 0 30 Scan execution priority high PROGRAM CONFIGURATIONS k Executing order Task name Execution timing 1 Executed in every scan 2 Executed in every scan 3 When MO turned ON 4 In every 100ms SETTING LABELS COMMON OPERATIONS OF PROGRAM EDITORS EDITING ST PROGRAMS Q or D HP e D 2 N Z Q LLI LADDER PROGRAMS 4 2 3 Setting executing conditions 4 9 GX Works2 4 PROGRAM CONFIGURATIONS 4 3 Creating POUs This section explains how to create POUs A POU abbreviation for Program Organization Unit is a unit of program defined for each function 4 3 1 Procedure for creating POUs The following explains the procedure for creating a POU 1 Creating a new POU Procedure Create a POU e Select Project gt Object gt New 2 Setting local labels Procedure Display the Local Label Setting screen or Function FB Label Setting screen e Select Project view POU gt Program gt POU gt Local Label Set labels that are used only within the POU 3 Editing the program
152. ed E Completion Indicate the status sampling trace is Z Stop interrupted iT Indicate the status sampling trace has 7 E Gemsletten ended normally by acquiring trace data A to the specified total number of samplings after generation of a trigger Indicate the status a sampling trace error Error occurred during sampling trace x Displayed when the trace data have 100 Buffer Status been acquired up to the specified total number of samplings lt n Trigger Occurrence Displayed when a trigger is generated during sampling trace gt lt Q 2 Appendix 1 5 Toolbar icons and shortcut keys for verification result App 9 n GX Works2 APPENDIX Shortcut key Corresponding menu Reference Zoom the scale of timing chart Zoom the scale of trend graph Switch the trace result display on the Sampling Trace screen between the m enalipee timing chart graph and the detailed data value Appendix 1 7 Toolbar icons and shortcut keys for program editors The following explains the toolbar icons and the corresponding shortcut keys for program editors B Ladder toolbar icons and shortcut keys The following table shows the toolbar icons and the corresponding shortcut keys for the ladder editor cn Shortcut key Corresponding menu Description Reference Insert an open contact at the cursor 4r BS 5 Contact position Insert an open contact branch at the 7 s shift Open Bran
153. ed by clicking _ C7 Section 5 5 1 Ladder ST SFC mi Label Name Enter a desired label name See oo 5 16 Specify a data type from the Data Type Selection screen displayed by clicking Data Type gt Section 5 5 3 128 It can also be entered directly SETTING LABELS Enter a constant value when VAR_CONSTANT is selected for Class and simple 128 type is selected for Data Type Enter a comment Comment 2 Comments can be displayed on the program editor by switching display hide of 1024 comments gt Section 8 7 5 1 A new line can be inserted in a cell by pressing the cte Enter keys 2 The compilation is not needed after editing COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST PROGRAMS Q ac D HP 2 2 HP op Z Q LADDER PROGRAMS GX Works2 5 SETTING LABELS Point 9 Class setting When an item other than the class such as a label name or data type is set in a blank column VAR is automatically set for the Class Change it if necessary Characters that can be used for label names Any of the following label names causes an error at compilation A label name that includes a space A label name that begins with a numeral A label name which is same name as the one used for devices Lower case label names can be used by setting the option Section
154. ed with GX Works2 Sold separately 2 Structured Programming Manual name MELSEC Q L F Structured Programming Manual Fundamentals Explains the programming methods types of programming languages and other information required to create structured programs Sold separately MELSEC Q L Structured Programming Manual Common Instructions Explains the specifications and functions of common instructions such as sequence instructions basic instructions and application instructions that can be used in structured programs Sold separately MELSEC Q L Structured Programming Manual Application Functions Explains the specifications and functions of application functions that can be used in structured programs Sold separately MELSEC Q L Structured Programming Manual Special Instructions Explains the specifications and functions of special instructions such as module dedicated instruction PID control instruction and built in I O function dedicated instruction that can be used in structured programs Sold separately FXCPU Structured Programming Manual Device amp Common Explains the devices and parameters provided in GX Works2 for structured programming Sold separately FXCPU Structured Programming Manual Basic amp Applied Instruction Explains the sequence instructions provided in GX Works2 for structured programming Sold separately FXCPU Structured Programming Manual Application Functions Explains the application fu
155. een L GX Works2 Version 1 Operating Manual Common 8 6 8 2 2 Entering instructions 8 3 Drawing Lines 8 3 Drawing Lines This section explains how to create lines in a program OVERVIEW 8 3 1 Connecting lines automatically when entering ladder 2 symbols When entering ladder symbols of contacts coils jump return in the Select mode the line can be oa connected automatically 3 Operating procedure A c D 1 Select Edit gt Ladder Symbol ladder symbol to be entered zd A graphical image of the selected ladder symbol is appended to the mouse cursor d If a line can be connected to the left hand horizontal direction a line is displayed to the left hand direction PROGRAM Q1 CONFIGURATIONS 2 Click the position where the ladder symbol is entered If a lines can be connected to the left hand horizontal direction the following message is displayed MELSOFT Series GX Works Ladder symbole will be Auto Connected Or place ladder J symbols manually by pressing shitt key SETTING LABELS 3 Click the button The selected ladder symbol is entered and the line is connected automatically to the left hand horizontal direction COMMON OPERATIONS mj OF PROGRAM EDITORS Point Entering position of ladder symbols When entering the ladder symbols click and drag a ladder symbol moves the entering position of the ladder symbols This function is useful when cr
156. equence program PROGRAM Q1 CONFIGURATIONS SETTING LABELS Sampling trace starts when the Trace start command SM801 is executed after executing Register Trace Common ddp Enable to execute the sampling trace from the peripherals Display Trace Buffer Condition Display trace data storage status Export CSV Data Save the trace data trace settings results to a personal computer in CSV file format Read from PLC Read the sampling trace data trace settings results from the programmable controller CPU Write to PLC Write the trace data trace settings results to the programmable controller CPU COMMON OPERATIONS mj OF PROGRAM EDITORS Delete all information including the device data registered Delete All Data and the sampling trace result displayed on the Sampling 7 2 Trace screen os 2 FO O Y T CD a ZO Xg NA o Z Q nis 1 3 1 List of functions common to Simple project and Structured project 1 15 5 GX Works2 1 OVERVIEW 1 3 2 List of functions for editing in ladder language For the functions for editing in the ladder language refer to the following manual Ls Works2 Version 1 Operating Manual Simple Project 1 3 3 List of functions for editing SFC diagrams For the functions for editing SFC diagrams refer to the following manual K gt GX Works2 Version 1 Operating Manual Simple Project 1 3 4 List of funct
157. ered directly Enter a constant value when VAR CONSTANT is selected for Class and simple 1 Constant i 128 D type is selected for Data Type gt This item cannot be set for local labels E Device When the data type is Structure click the Detail Setting cell and set devices on the o Structure Device Setting screen j Address Lee Section 5 6 3 Enter a comment Comment 2 Comments can be displayed on the program editor by switching display hide of 1024 comments Section 8 7 5 1 A new line can be inserted in a cell by pressing the cte Enter keys 2 The compilation is not needed after editing COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST PROGRAMS Q ac D HP 2 2 HP op Z Q LADDER PROGRAMS GX Works2 5 SETTING LABELS Point 9 Class setting When an item other than the class such as a label name or data type is set in a blank column VAR is automatically set for the Class Change it if necessary Characters that can be used for label names Any of the following label names causes an error at compilation A label name that includes a space A label name that begins with a numeral A label name which is same name as the one used for devices Lower case label names can be used by setting the option Section 10 4 4 For details refer to the following manual s GX Works2 Version 1 Operating Manual Common Ass
158. es Browse structures function blocks defined in the project lt Project gt Not displayed when Simple Types is selected Browse function blocks of the application functions Standard Lib Not displayed when Simple Types or Structured Data Types is selected COMMON OPERATIONS mj OF PROGRAM EDITORS 3 In the Data Type field select the data type structure or function block name 4 Click the button when the setting is completed The settings are displayed in the Data Type column on the label setting screen EDITING ST PROGRAMS Q ac D HP 2 2 HP wn Z Q LADDER PROGRAMS 5 5 3 Selecting data types 5 15 GX Works2 5 SETTING LABELS Point Method for displaying the Data Type Selection screen The Data Type Selection screen can be opened by any of the following operations when is in the selected status Press the Enter key Press the Space key Press the 2 B Setting arrays for data type Define a data type as an array To define a data type as an array set the items in the Array Element field on the Data Type Selection screen 1 Click in the data type entry field on each label setting scree n Libraries Data Type z ord Signed 2 Check the check box in the Array Element field Double Wordlsoned Word Unsigned Bit Strina 16 bit ie n 3 Enter the number of elements in the Element field string
159. es lt Project gt Browse program blocks defined in the project Library name Browse program blocks defined in the specified library 2 Selecta program block from the Programs field 3 Click the button when the setting is completed The selected program block is displayed on the Task Setting screen 4 6 4 2 2 Registering program blocks to tasks 4 2 Creating Program Files and Tasks 4 2 3 Setting executing conditions Set executing conditions for program files and tasks Executing conditions for program files execution type The executing conditions for program files are set on the lt lt Program gt gt tab of PLC parameter This function is not supported by FXCPU Screen display Select Project view gt Parameter PLC Parameter gt lt lt Program gt gt eeooooooooeeeeeeeoooeeen Wo Program MAIN Insert EE Delete EN Sl File Usability Setting I O Refresh Setting For details of the program executing conditions refer to the following manual 4 2 3 Setting executing conditions lt gt User s Manual Function Explanation Program Fundamentals of the CPU module to be used OVERVIEW SCREEN Gd CONFIGURATION PROGRAMMING aN PROCEDURE PROGRAM CONFIGURATIONS SETTING LABELS COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST PROGRAMS Q ac D HP 2 2 HP wn Z Q LADDER PROGRAMS
160. es Add Disable Warning Codes Add o00c2600 o00c2600 C2055050 C2055050 Select gt BE D2508654 D2508654 TT 0 t YX Og Zy t p ENT Point Warning codes Warning codes and their content can be checked in the Output window when compiling programs Section 10 6 Maximum number of warnings to be invalidated A maximum number of warnings to be invalidated is 100 INDEX APPENDIX gt SETTING OPTIONS 10 4 2 Hiding warning messages N iS GX Works2 10 CONVERTING COMPILING PROGRAMS 10 4 3 Using same name for global label and local label Use the same name for a global label and a local label Operating procedure 1 Select Tool Options Compile gt Basic Setting 2 Check the Use the same label name in global label and local label check box f this check box is not checked an error occurs when compiling programs f this check box is checked a warning is displayed when compiling programs Same label names can be used 10 4 4 Using same lower case label name as device Use a label name for example mO x1F that contains a lower case of alphabetic part of the device Operating procedure 1 Select Tool gt Options Compile gt Structured Ladder FBD ST gt Compile Condition1 2 Check the Use lower case device names as labels check box f this check box is not checked an error occurs whe
161. ew Multiple libraries can be selected 2 Select Project Library Reload The data in the library file is read and the display contents in the User Library view are refreshed To apply the library file changes made in another project in the figure below to the current project the user library needs to be updated and in the figure below Navigation 4 Program Program i Program Local Label Global Label 3 Execute Reload H Local Label 4 Changed content is updated UserLib1 file D Content is changed in another project UserLib1 file Point Compilation status of POUs When a user library is updated all POUs using the updated user library become in the uncompiled status Editing status e Before using this function enable the editing of the user library data lt gt Section 13 4 3 When this function is completed the editing of the user library data is disabled 13 4 4 Updating user library SPECIFIC POSITION LL 2 E X lt o COMPILING PROGRAMS CONVERTING s WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU gt MONITORING QJ ome 8 T oi c Oc 2 Y 5 INDEX APPENDIX gt SETTING OPTIONS 13 15 r GX Works2 13 USING USER LIBRARIES 13 4 5 Displaying user library help Display a help set to a user library Specif
162. ex8n ocx stored in the folder of GX Works2 installation destination to C WINDOWS system32 for Windows XP and restart GX Works2 5 28 5 7 1 Precautions on automatically assigned devices 5 8 Writing Reading Data to from CSV Files 5 8 Writing Reading Data to from CSV Files This section explains how to write the label setting data to the CSV file and how to read the label setting data from the CSV file OVERVIEW 2 Writing label setting data E Write label setting data to CSV files m OQ Operating procedure E 1 Select Edit gt Write to CSV File The following message is displayed 9 MELSOFT Series GX 2 A Salata will be written D o Caution Structure device setting information will not be written 2 Click the button The Write to CSV File screen is displayed PROGRAM Sy CONFIGURATIONS Write to CSV File Save in GX W orks2 0 E3 ig Globali csv My Recent Documents Desktop SETTING LABELS Places My Network File name Save as type CSV tab delimited csv v Cancel COMMON OPERATIONS mj OF PROGRAM EDITORS 3 Enter the file name to be saved and click the 5 button The label setting data is saved in the save destination EDITING ST PROGRAMS X gt HP gt Y HP 2 2 O LADDER PROGRAMS
163. file Operating Manual task Common Set program blocks to be registered to the task Section 4 2 2 IL 3 Setting the executing condition Procedure Reference GX Works2 Version 1 Set the executing condition of the program file on the lt lt Program gt gt tab of PLC parameter Operating Manual Common Set the executing condition on the Property screen of the task e Select the task and perform the following operation Section 4 2 3 Select Project Object Property 4 2 1 Procedure for creating program files and tasks 4 3 OVERVIEW SCREEN CONFIGURATION PROGRAMMING aN PROCEDURE PROGRAM CONFIGURATIONS SETTING LABELS COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST PROGRAMS Q ac D HP 2 2 HP wn Z Q LADDER PROGRAMS r GX Works2 4 PROGRAM CONFIGURATIONS 4 2 2 Registering program blocks to tasks Register program blocks to a task and specify the executing order Only the program blocks that are registered to the task are compiled 7 Chapter 10 Operating procedure 1 Select Project view Program Setting program setting program file task 2 Right click and select Open Task Setting from the shortcut menu The Task Setting screen is displayed Task Setting Task 01 Program M ame Comment ES Pau m 3 Set the items on the screen Maximum Item De
164. g Project Common Setting Automatic Save Change History Save project after changes in TC setting values are written to PLC Save project after writing to PLC Save project after online change Program Editor Device Comment Editor Label Setting Editor Parameter Monitor PLC Read Write Online Change Automatic Save is available on projects with names set Except Symbolic Information read only and forcibly opened projects Compile Intelligent Function Module iQ Works Interaction Explanation System Label Setting Back to System Default Bac Set as User Default Operating procedure e Set the items on the screen When the cursor is placed on a setting item an explanation of the item is displayed on the Explanation field Details of the setting items gt Section 14 2 Screen button Backto System Default Restores the initial settings Back to User Default Restores the user default settings o Sek as User Default Stores the current settings as the user default and applies them to a new project 14 2 14 2 Option Setting List 14 2 Option Setting List SPECIFIC POSITION or O LL O Z I O X lt N The following table shows the option setting items Project K gt GX Works2 Version 1 Operating Manual Common Structured Tool Hint Display Items Select items displayed on tool hint Section Ladder Tool Hint 6
165. g mode Guided Declare new label name WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU Structured Ladder FBD MONITORING Program Editor Set the default at opening structured ladder FBD editor as guided mode USING USER LIBRARIES Double clicking opens Select whether a label editor is displayed when header function or function block is double clicked Section Open Structure Ladder i id li Section Allow hotkey repeater Select whether to display grid line ruling dialog at 8 40 drawing lines Enter label names after Select whether to input label names or devices after i contacts and coils entering contacts and coils Auto Comment Block Set the width of comment to be added in ladder block E Width with grid numbers when adding ladder block E Select whether to use the automatic indent when beginning a new line after entering ST control syntax Section m such as IF FOR when displaying template of 7 1 2 inline structured text A Select whether to display listed label names starting Instruction label name with the input character when a character is input Section prediction Structured text label name inline structured text 7 1 1 instruction and label name Set tab length Section o Teper sengi It is not available with inline structured text 7 1 3 A Ladder SFC 1 K gt GX Works2 Version 1 Operating Manual Common lt HERE gt GX Works2 Versi
166. g procedure 1 Select a ladder block by clicking the ladder block header z 2 Select Edit gt Cut Copy Ex ze OO 3 Selecta ladder block to which cut copied ladder block is pasted and select Edit gt p Paste 3 A cut copied ladder block is inserted above the selected ladder block B Z Zy Copying moving ladder blocks by the drag and drop operation Ladder blocks be copied moved by clicking the ladder block header drag and drop operation To cancel the copy move operation press the key during the drag and drop operation switch the copy move operations press the key during the drag and drop operation Different icons are displayed for the move operations de Copy Move ht 9 SETTING LABELS COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST lee PROGRAMS EDITING STRUCTURED N 5 e Lu t m 6 8 3 Cutting copying pasting and moving ladder blocks 8 27 GX Works2 8 EDITING STRUCTURED LADDER PROGRAMS 8 8 4 Editing ladder block headers A ladder block header is an area that displays information set for each ladder block Create a ladder block label and ladder block title Screen display Ladder block number Ladder block label abel data FLINT Ladder block title Input Dell Ladder block header Display content
167. ged and executed Build repeatedly the number of used devices is increased and that of assignable devices is decreased since the devices assigned once cannot be used Execute Rebuild All When D W R ZR are selected as automatically assigned device concurrently devices are assigned from D W If the number of D W is not enough devices are assigned from R ZR Note that the control timing may change depending on the program content since the operation processing times of D W and R differ from that of ZR For details of operation processing time refer to the following manual L gt MELSEC Q L Structured Programming Manual Common Instructions When ZR is added to automatically assigned device after compilation QCPU mode LCPU Temporary variable assigns only one type of devices however when ZR device is added to automatically assigned device after compilation ZR device is assigned by recompilation Operation processing time may differ depending on the program content Increase the device range other than ZR to avoid the change of operation processing time When array type labels are used When devices labels are used for indexes in array type labels the compilation result is created with the devices shown below Note that the device values may be overwritten when the following devices are used in user programs Basic model QCPU High Performance model QCPU ZO Z1 Universal model QCPU LCPU Z16 to 19 e FXCPU
168. gs calling function block from ladder to ST and from ST to ladder using inline ST in 1 Section Function Block Call ladder and reducing steps when using function block 44 4 Value of VAR IN OUT type input label always remains equal to the value of output label Check when program check is not needed after Build Program Check or Online Program Change It can reduce the compile time depending on the setting Basic Setting Select whether to use the same label name in global Operational Setting label and local label When the same label is selected local label will be given priority Compile creating cross reference information after compiling time to search cross reference can be Build Cross Reference reduced Also able to search cross reference Information information even before compiling In this case the specified Find condition will be used as filtering condition Stop Build Set the number of error and warning to stop the compile Section Output Result Register warning codes to invalidate The registered 10 4 Disable Warning Codes warning codes shall not be displayed in output window 14 4 14 2 Option Setting List Select whether to use device names typed with lower Use lower case device case as labels names as labels 2 Only the device name outside device range is valid for Inline Structured Text Funcion Select whether to connect directly from the objective 9 function outpu
169. h the programmable controller CPU to RESET It can also be reset by selecting Compile Remote Operation 4 Select Online PLC Memory Operation Clear PLC Memory to clear the memories If VAR RETAIN is used in the Device Label Automatic Assign Setting clear all device memories including latches If file registers are used in the Device Label Automatic Assign Setting clear all file registers e FXCPU 1 Switch the programmable controller CPU to STOP 2 Select Online Write to PLC and write programs to the programmable controller CPU Select Online PLC Memory Operation Clear PLC Memory to clear the device memories The remote RUN function when writing data to programmable controller CPU after compiling all programs can be disabled by setting the following option Check Turn PLC to STOP at time of PLC write after executing Rebuild All and do not execute remote RUN under Tool Options gt PLC Read Write 10 20 10 5 3 Precautions on Compilation 10 5 Compilation Modification of global labels and functions function blocks If global labels and or functions function blocks are modified multiple program blocks become the compile targets Write all program files of the compile targets to the programmable controller CPU to apply the modifications Example Compiling programs after modifying Function 1 in the following program configuration Program blocks 3 and 4 are compiled and the progr
170. he editing screen Ctrl turn mouse scroll Smaller Change the display size of text smaller wheel downward on the editing screen Ctrl Shift Tile the ladder editor and the function Enter d block program editor horizontally Open the SFC diagram corresponds to i eden the program on the Zoom editor window Shift 1 Moves up downileftiight Move a cursor toward up down left right of the SFC diagram El ct Display the Instruction Help Space Us Display the Find screen FT Instruction Help Display details of instructions Common Enter an assignment operator when Section J Ctr J Shift T MEER editing the inline structured text program 7 1 1 App 12 Appendix 1 7 Toolbar icons and shortcut keys for program editors Appendix 7 List of Toolbars and Shortcut Keys B ST toolbar icons and shortcut keys The following table shows the toolbar icons and the corresponding shortcut keys for the ST editor Lia Shortcut key Corresponding menu Reference Display the Label Registration Selection Section Insert a template corresponds to the J Ctr JAtt T r1 Display Template instruction function control syntax Set an argument of the template in the Cte Mark Template Left selected status from the left by selecting Section mm the menu each time T 1 4 SEARCHING FOR SPECIFIC POSITION
171. he number of devices is less than the number of devices required for one label devices are assigned in descending order of the next device s device range When the following label requires the devices which are within the above device range the previous devices which are not assigned yet are assigned Example 1 lt Device automatic assign setting gt oet the following device range D device 8000 to 8002 ZR device 0 to 1023 Label setting Class Label Mame ES E Data Type VAR Label Word Signed VAR Label BO Word Signed VAR FLOAT Double Precision YAR Labal D FLOAT Double Precision n lt Devices to be assigned to labels gt Example of devices to be Label_A Word signed D8002 Label B Word signed D8001 Label C Double precision real ZR1020 Label D Double precision real ZR1016 1 Since double precision real requires four devices one device of D8000 is not enough Therefore the next device ZR is assigned Definition Descending order Example 2 Device automatic assign setting oet the following device range D device 8000 to 8002 ZR device 0 to 1023 Label setting Class Label Mame Data Type 1 YAR Label Wornd Signed 2 VAR FLOAT Double Precision 3 VAR v Label word Signed 4 VAR FLOAT Double Precision Devices to be assigned to labels Example of devices to be 1 Since double precision real require
172. he screen aie Maximum number of Item Description characters Label Name Enter a desired label name 32 Enter the data type of label which can be set on the Data Type Selection screen displayed by clicking Section 5 5 3 Constant Display the constant value of the selected type 128 Enter comments Comment A new line can be inserted in a cell by pressing the Ctr Enter keys 1024 Data Type 128 To display comments on the program editor select Device Comment in Comment Display Item Point Creating new structured data Create structured data using the Project view L GX Works2 Version 1 Operation Manual Common 5 6 2 Setting data type as structure To define the data type of label as a structure set a structure in the data type entry field on each label setting screen In addition to direct text entry a structure can be selected on the Data Type Selection screen gt Section 5 5 3 5 20 9 6 1 Setting data type of structure 5 6 Setting Structured Data Type Labels 5 6 3 Assigning devices to structured data type labels Devices of the structured data type global labels are set on the Structure Device Setting screen If the structure is set for data type on the Global Label Setting screen Detail Setting is displayed in the Device and Address columns Click Detail Setting to display the Structure Device Setting screen Screen display Click Detail Setting on the label
173. heck and consistency paring check are not performed after the compilation MELSOFT Series GX Works Caution When executing Rebuild All automatically assigned devices will be re evaluated and devices may change In that case values From the previous program will remain in the previously assigned devices For safety ensure that device assignments match by clearing all device memory latched data and File registers v Check For duplicated coils perform consistency pair check and other ladder checks after Rebuild Allis complete Are you sure you want to Rebuild All 10 4 10 2 Compiling All Programs 2 Execute the compilation after reading and understanding the precaution described on the message All programs are converted compiled and the result is displayed on the Output window By double clicking the result the corresponding error location in the program is displayed For checking errors warnings refer to Section 10 6 SPECIFIC POSITION LL 2 O X lt o IE MELSOFT Series GX Works2 n Structured OpemaniStruct E Workspace Str10_1 POU 02 PRG Program Structured Ladder FBD DER ax i Project Edit Find Replace Compie View Online Debug Diagnostics Tool Window Help IDEALO 1 5 IB e ER ER SR n dn el AT LE aA a Ee E ILFTIXWSEMEBETEETUEERENOCONEIZUFETITITTITIIEETUSPDTITUA POU_02 PRG Program St Global Label Setting Globall 4 b Selection Y WW al
174. iagram X7 Program Display when editing in MELSAP L B SFC block list shortcut keys COMPILING PROGRAMS CONVERTING s WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU MONITORING TT 0 t D YX Og Zo 0 0 m ENT The following table shows the shortcut keys for the SFC block list Lid Shortcut key Corresponding menu Reference cui Jump to the specified block number data ce E Ctrl SFC Block List Comment Display comments of the SFC block list gt SETTING OPTIONS APPENDIX INDEX Appendix 1 7 Toolbar icons and shortcut keys for program editors App 17 GX Works2 APPENDIX Other shortcut keys The following table shows other shortcut keys for program editors Toolbar icon lve testa ssi oo em Move the cursor to its leftmost position in E BRENNEN did _ oo ise IE NE 5 I LA EA Set a ran ge ctr Snift Home Shortcut key Corresponding menu Description Reference Select the range from the current position up to the start of the program cert End Delete BEEN Delete the selected target Select the range from the current position down to the end of the program App 18 Appendix 1 7 Toolbar icons and shortcut keys for program editors Appendix 7 List of Toolbars and Shortcut Keys Appendix 1
175. ied files created in the following formats can be set as help data e Windows help file hlp HTML help file chm Text file txt For setting a help refer to Section 13 3 7 Screen display Select Project Library Help Windows help file hlp HTML help file chm Windows HELP EP LibraryHELP2 SEE File Edit Bookmark Options Help Print e Hide Back Forward Contents Index Search E Unitlnitial Operating procedure 1 Selecta library name to be displayed as a library help in the User Library view 2 Select Project gt Library Help A library help screen is displayed 13 16 13 4 5 Displaying user library help aN MELSOFT SPECIFIC POSITION or O LL O Z I O X lt N 14 SETTING OPTIONS This chapter explains the functions of options for setting screen display format or detailed operations of each function COMPILING PROGRAMS CONVERTING s WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU 14 1 Basic Operations 14 2 14 2 Option Setting List 14 3 MONITORING USING USER LIBRARIES APPENDIX SETTING OPTIONS INDEX 14 1 GX Works2 14 SETTING OPTIONS 14 1 Basic Operations This section explains how to set options Screen display Select Tool Options Options Unset Project Operational Settin
176. igning devices automatically Devices are automatically assigned to labels when a program is compiled The device assignment range can be changed on the Device Label Automatic Assign Setting screen Section 5 7 The assigned devices can be checked with the cross reference function L GX Works2 Version 1 Operating Manual Common 5 4 Setting Labels for Functions and Function Blocks 5 4 Setting Labels for Functions Function Blocks This section explains how to set local labels for each function or function block Create a new function or function block in advance For the method for creating new functions or function blocks refer to the following manual gt GX Works2 Version 1 Operating Manual Common OVERVIEW 2 s rr Screen display s i z Select Project view gt POU FB FUN gt function function block Local Label uc cz amp Function FB Label Setting FB 01 FB PRISES 28 Class LabelName Data Type Constant Comment 1 INPUT Input Bit 3 2 VAR x dss Tmen4 3 VAR CONSTANT px dss2 Bit SALE 4 VAR daa3 Smuc 3 Pf ray of Struct 9 VAR DUTPUT pk E 1 l1 JV zy dn OO OO G D n Operating procedure e Set the items on the screen CD 2 T Maximum number of O Item Description E characters 5 Class Select a label class from the list display
177. indow and utilize them to the program 3 Screen display S Select View Docking Window Function Block Selection Window it zu 2 POU type Selection d T OO Standard Lib OO C X D o 38 Standard Bitwise Boolean POU list Eh E E MOT E NOT E 0 E ORE 5 XOR E gt Type Conversion sY Standard Arithmetic EJ Standard Comparison Ot 9 Time Data Types 5 F Standard Functions of Numeric v Standard Selection Functions Standard Character String Functions 5 E Function Block Standard Edge Detection 8 Counter 18 Timer A lt Z z Screen display N Item Description 6 POU type Display POUs in categories 9 All Parts Display functions function blocks and operators Application Instruction Display functions function blocks of application functions Instructions 1 Display common instructions application instructions and special instructions User library name Display functions defined in the user library r Display functions function blocks defined in FB FUN o6 POU list Display POUs of the type selected for POU type Function block Display function blocks b EO 1 For FXCPU basic instructions and application instructions are displayed 2 For details of functions function blocks operators refer to the following manual 8 MELSEC Q L F Structured Programming Manual Fundamentals M a zO to
178. ing Replace a string Yi 9 Change an open contact to a closed contact or change a 5 Change Open Close Contact 9 i 9 nO closed contact to an open contact Device Batch Replace Batch replace devices with the specified device 3 Register to Device Batch Replace Register selected devices on the Device Batch Replace screen 5 gt E Compile function Reference e c Build Convert compile a program being edited Section 10 1 BE A Write sequence programs to a programmable controller CPU Online Program nange after the conversion compilation ommon Rebuild All Convert compile all programs in the project Section 10 2 0 O 3 lt View function Reference d Toolbar a o Toolbar name Display hide each toolbar 5 Statusbar Display hide the status bar Common Set the display color for characters such as labels device Color and Font comments on the work window a Docking Window 5 lt Navigation Window Display hide the Navigation window Common 2 Display hide the Function Block Selection window Function Block Selection Window Select a part such as FB or function on the window for Section 6 2 1 7 utilizing i to a program Display hide the Output window Output Window In the Output window the conversion compilation result is Section 10 6 displayed Display hide the Cross Reference window Cross Reference In the Cross Reference window devices labels used in the
179. ion To reflect the of the table above to the Change Register Release system label databa Oey Notification Import Oel Device Name Relation please save the after compiling Local Label Setting screen Define labels that can be used only for each POU program block lt gt Section 5 3 amp Local Label Setting POU_01 PRG Label Name Data Type Constant Device Address De v input it oa 5 Output poublewordSioned xppou deon datat Strinof32 BCP OSS EE Function FB Label Setting screen Define labels that can be used only for each POU function function block gt Section 5 4 Function FB Label Setting FB 01 FB Class Label Name Data Type Constant Comment RR ata2 pt 05 5 5 FASE O daa3 SSmo Array of Struct daas Structure Setting Screen Define structured data types to be used for labels Section 5 6 1 Structure Setting Struct Label Name Data Type Constant _ Comment 5 2 Setting Global Labels 5 2 Setting Global Labels This section explains how to set global labels Global labels can be used in iQ Works supported products GX Works2 MT Developer2 GT Designer3 by registering them as system labels For details of system labels refer to the following manual iQ Works Beginner s Manual OVERVIEW Point System labels Same label names c
180. ion instructions and data logging function instructions List format An input format to input mnemonic language in a ladder program MEMO aN MELSOFT 1 OVERVIEW This manual explains specific operating procedures using Structured project For the full product features and functions of GX Works2 refer to the following manual GX Works2 Version 1 Operating Manual Common 1 4 What is Structured Project 1 2 1 2 Features of Structured Project 1 3 List of Functions N OVERVIEW SCREEN CONFIGURATION lt De D O X A PROCEDURE PROGRAM Q1 CONFIGURATIONS SETTING LABELS COMMON OPERATIONS J OF PROGRAM EDITORS EDITING ST PROGRAMS Q ac D HP 2 2 HP wn Z Q LADDER PROGRAMS r GX Works2 1 OVERVIEW 1 1 What is Structured Project In Structured project programs can be created using the structured programming By segmenting the control functions and creating components from commonly used parts of programs this type of programming structured programming is easy to understand visually and created components are highly reusable to other programs 1 2 Features of Structured Project This section explains the features of Structured project Various programming languages are available Various programming languages are available for structured p
181. ion when the Auto connect function is enabled The line of the copied ladder symbol is connected automatically when the Auto connect function is activated If the line is not connected properly or ladder symbols are overlapped disable the Auto connect function by selecting Edit Auto Connect uncheck the item and correct the line Cutting copying ladder symbols using a clipboard When cutting or copying ladder symbols using a clipboard the selection range differs between left clicking and right clicking of a mouse Select the menu by left clicking on the ladder symbol to delete lines and a ladder symbol Select the menu by right clicking on the ladder symbol to leave the lines and delete the ladder symbol only Left click on the ladder 1 mE MEME For cutting function gt symbol andselect ETE Edit gt Cut ai A ladder symbol and lines are cut II o ES C Right click on the ladder md symbol and select Edit Cut Only a ladder symbol is cut 8 14 8 4 3 Copying ladder symbols 8 5 Changing Type of Contact and Coil 8 5 Type of Contact Coil This section explains how to change the type of contact and coil OVERVIEW 8 5 1 Setting the type of contact and coil z Y 2 0 The following table shows the types that can be set for contacts and coils n OQ Type Ladder symbol o 9 Ope
182. ions for editing SFC block list For the functions for editing SFC block list refer to the following manual L gt GX Works2 Version 1 Operating Manual Simple Project 1 16 1 3 2 List of functions for editing in ladder language 1 3 List of Functions 1 3 5 List of functions for editing in ST language The following tables show the functions for editing with the ST editor gt Edit function for editing ST language Reference m Delete Delete the selected data ic Operands Display the screen for inserting a label by selecting an Section 6 2 2 2 existing label Display Template Insert a template corresponds to the instruction function or gt control syntax lt Mark Template Left Set an argument of the template in the selected status from Section 7 1 4 the left by selecting the menu each time ZO LL Set an argument of the template the selected status from cz Ma the right by selecting the menu each time D Find Replace function for editing in ST language Reference Jump Jump to the specified row Section 9 1 1 2 2 2 Set a bookmark at the cursor row The bookmark is deleted OO Toggle Bookmark OO when one is already set at the cursor row Bookmark List Jump to the specified bookmark from the bookmark list Next Bookmark Display the next bookmark position Le Previous Bookmark Display the previous bookmark position 9 Delete All Bookmarks C
183. iting variable names and instance names Edit a variable name or function block instance name Operating procedure OVERVIEW 1 Click the entry field of a ladder symbol such as a contact coil or input output label The entry field is enabled for editing z E 2 Edit the variable name or instance name x Go Input variable Contact Function block C Cope m 3 gt E ENO e EN C 7 Co L3 LOAD cy PV PV 9 gt 5 EE Point z z Using set label names Right click the entry field when it is enabled for editing and select the label name on the Label Registration Selection screen Section 6 2 2 PROGRAM Q1 CONFIGURATIONS SETTING LABELS COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST lee PROGRAMS EDITING STRUCTURED N 2 e nc nc Lu e t m 8 6 2 Editing variable names and instance names 8 19 r GX Works2 8 EDITING STRUCTURED LADDER PROGRAMS 8 6 3 Changing the number of arguments for functions and function blocks Change the number of arguments of functions and function blocks in the application functions For details of functions whose number of arguments can be changed refer to the following manual s MELSEC Q L Structured Programming Manual Application Functions gt FXCPU Structured Programming Manual Application Functions
184. ject MODEL GXW2 VER1 O KP E 13JU65 SH NA 080781ENG K 1109 KWIX a MITSUBISHI ELECTRIC CORPORATION HEAD OFFICE TOKYO BUILDING 2 7 3 MARUNOUCHI CHIYODA KU TOKYO 100 8310 JAPAN NAGOYA WORKS 1 14 YADA MINAMI 5 CHOME HIGASHI KU NAGOYA JAPAN When exported from Japan this manual does not require application to the Ministry of Economy Trade and Industry for service transaction permission Specifications subject to change without notice
185. ject tree is enabled J Setthe library name Press the Enter key to confirm the new library name 13 3 3 Creating data Create data for the user library Adding data Add new data programs global labels functions function blocks structures to the user library For details of adding new data refer to the following manual GX Works2 Version 1 Operating Manual Common Point Global labels Labels defined by global labels in the User Library view can be used in programs in the Project view Labels defined by global labels in the Project view can also be used in programs in the User Library view System labels Global labels in the User Library view cannot be registered to the system label data base B Editing data Edit data programs global labels local labels functions function blocks structures For details of editing data refer to Chapter 5 through Chapter 8 13 3 2 Changing library name 13 5 SPECIFIC POSITION or O LL O Z I O X lt N COMPILING PROGRAMS CONVERTING s WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU gt MONITORING QJ ome 8 T oi 14 Oc 2 Y 5 MET INDEX APPENDIX gt SETTING OPTIONS r GX Works2 13 USING USER LIBRARIES 13 3 4 Saving library file Save a user library to a library file A library file can be also saved with a different library name B Saving user library under specified na
186. jo mec 13 16 library passwords 13 9 8 8 Bleu c A 21 6 14 List of Functions pp 1 5 local labels 5 9 5 11 M MENU erc M RR EMT 2 2 N Navigation windOW pp 2 2 izle e MR 8 15 O Open Contact pp 8 15 output variable 8 18 Output WindoW ppp 2 2 10 3 10 22 P POUS 4 10 4 14 TI 4 8 6 2 Program blocks pp 4 4 4 14 6 3 Program Configuration pp 4 2 Programi Edllor 6 2 program ES 4 3 programming language 1 2 6 3 PrOJECUVIEW em 4 2 Property 4 8 R reading symbolic information from programmable controller PD P 11 5 Pill P M 8 15 REUT 8 4 5 SElECE MOOS RT nn 8 4 Se 8 15 Setting Ranges for Devices Assigned Automatically 5 26 E PET A 6 3 SNOUCK CYS gt ed App 2 SImple DEFOJeCL nad 21 Special instruction 21 6 5 1 2 7 2 ST loe RR ETT 6 5 7 2 SU 5 20 Structure Setting 5 20
187. k list 1 Select Find Replace Bookmark Bookmark List 3 All registered bookmarks are displayed Bookmark List Program Content Var0l Var0l Var02 IF war03 lt 54321 THEN Delete All END_IF gt Close 2 Select a bookmark to which a cursor jumps 3 Click the Jump button or double click the selected line The cursor moves to the line where the bookmark is set Click the Delete All button to cancel all bookmarks e Moving to the next bookmark Select Find Replace Bookmark Next Bookmark The cursor moves to the start of the line where the next bookmark is placed e Moving to the previous bookmark Select Find Replace Bookmark Previous Bookmark 1 A The cursor moves to the start of the line where the preceding bookmark is placed Deleting all bookmarks Select Find Replace Bookmark Delete All Bookmarks All bookmarks are deleted 9 1 2 Using bookmarks SPECIFIC POSITION x o LL O X lt N COMPILING PROGRAMS CONVERTING s WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU MONITORING ome 8 T O 0 c Og 2 Y t INDEX APPENDIX gt SETTING OPTIONS 1 CD i GX Works2 9 SEARCHING FOR SPECIFIC POSITION 9 2 Searching for Specific Position in Structured Ladder FBD Program This section explains how to search f
188. l Parts 09 000 04 i FBIFuN COMPILING PROGRAMS CONVERTING E ADD TIME ADD TIME E E ADRSET ADRSETP E AND rip Class Global label check Output window WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU Point Assigning devices to labels when compiling all programs For assigning devices to labels when compiling all programs refer to Section 10 5 MONITORING T O 0 c Og Z t INDEX APPENDIX gt SETTING OPTIONS C1 iS GX Works2 10 CONVERTING COMPILING PROGRAMS 10 3 Executing Online Program Change Simultaneously with Conversion Compilation For the operation for executing the Online program change simultaneously with the conversion compilation refer to the following manual s GX Works2 Version 1 Operating Manual Common 10 4 Changing Operating Conditions of Compilation This section explains how to change the operating conditions of compilation 10 4 1 Changing the number of errors and warnings that stop compilation Change the number of errors and warnings that stop compilation If the number of errors and warnings that occurred during compilation reaches the specified value the compilation is aborted Screen display Select Tool Options gt Compile Output Result Stop Build
189. m is compiled Ie Meo INDEX APPENDIX gt SETTING OPTIONS 10 5 3 Precautions on Compilation 10 21 r GX Works2 10 CONVERTING COMPILING PROGRAMS 10 6 Checking for Errors and Warnings When the program check or the compilation is executed the target programs and label settings are checked and the results are displayed on the Output window The following explains how to check the errors displayed on the Output window Screen display Function type Rebuik Error Code No Result Class pe Error warning list 1 MAINI Program compile Wrong device or label Not declared Ladder Block No 2 F1001 2 Error Program compile BOOL type labels yalues are required for contacEs La C2016 Status E rar 2 Waning 0 Checkwaming 0 Display contents Item Description Function type Display the name of the executed function Error warning list Display the check results Display Error and Warning Display Check Warning for the duplicated coil check ladder check consistency check warnings Result Data Name Display project names with errors and warnings Class Display check types such as the compilation and program check Content Display descriptions of errors and warnings Error Code Display error code numbers Status Display the total number of errors and warnings 10 22 10 6 Checking for Errors
190. me Save the user library under a specified name Screen display Select Project Library Save As Save Library as UserLibrary Save In E My Documents tj Recent Ei Documents 9 Desktop My Documents Computer Network File name 01 aul hd Places Save as Iype User Library sul Cancel Operating procedure 1 Selecta library name to be saved in the User Library view Multiple libraries can be selected 2 Select Project gt Library Save As The Save Library as screen is displayed 3 Seta file name 4 Clickthe e button The user library data are saved to the library file 13 6 13 3 4 Saving library file 13 3 Creating User Library B Saving library files Save the user library in the library file Operating procedure SPECIFIC POSITION or O LL O Z I O X lt N 1 Selecta library name to be saved in the User Library view Multiple libraries can be selected 2 Select Project gt Library Save The user library data is saved in the library file COMPILING PROGRAMS CONVERTING Point Identifying the saved library file A saved library file is identified with the path and file name which are specified when the file was saved with a specified name previously or installed to the project Applying file changes to other projects To apply the changes to library files
191. ms can be easily structured by managing program components in a hierarchy 1 it Programs that are easy to maintain and highly reusable can be created efficiently by structuring i programs This is suitable for developing large programs Project 2 Program file 1 Program file 2 lt ii X zZ 6 MO 1 A program is created in units of POUs abbreviation for Program Organization Units such as program blocks PRGs functions FUNs and function blocks FBs Function blocks can be nested 22 hierarchy Created programs are registered to the tasks of program files vie OO x X D n Assets of programs are utilized as libraries In Structured project sequence program components can be saved as libraries which can be utilized as assets of programs in multiple projects PROGRAM Q1 CONFIGURATIONS f ge t Comi gem rine Debug lod updo tb nem X j ro mmu m Apis EE C wd zo c xn TIT og yrmeme onnzmxvyu V Ad Parts 4 0 pe 4 MO D tex em B ceo Drop pea N NO A NE B osa s B ox Sandy Progan 7 6 2 Fiod Scan Program ox n Type B v B os B osn B ose B oscar B osm u osme D oam B care Bon lt SETTING LABELS COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST P
192. n the read only screen is displayed vo P a ZO to B CD a Za s 5 6 4 Assigning devices to structure array type labels 5 23 iS GX Works2 5 SETTING LABELS B Entering device names automatically by setting offset values On the Structure Device setting screen device numbers to be entered automatically can be set in fixed spacing for each array element of the structure array Specify the difference in device numbers between the array elements as an offset value for the start device of the same data type 1 Click Detail Setting on the label setting screen The Structure Device Setting screen is displayed 2 Set the Structure Array Offset Value m Structure Array Offset value word Device 10 Bit Device Use Bit Designation 3 Set the device name for the start element data of the array Devices are set to the same data type of the array elements in the screen Offset value is not specified lt Array 0 gt Label Mame D ata Device Address Double W ord Unsigned Bit 326 it z MDU 1 Double w ord Unsigned Bit 32Bit p XMDD 3 Double Word Unsigned Bit s2B it Devices starting lt Array 1 gt from D7 are assigned Data Type S W ard Ll nsigned Bil seBit Offset value is 10 lt Array 0 gt Data Type Device Address ae W ard Ll nsigned Bit zMDL 1 Devices starting from D11 are assigned
193. n Contact L 3 Close Contact J H 5 Z Rising Pulse tF z Contact e m 2 Falling Pulse ny D o Rising Pulse Close Falling Pulse Close 5 IH gt lt cp Coil Ou E 8 Open Contact Label Label Bit type input output pin m Close Contact Label Label T Z Open Contact Label E Jump N Close Contact s Label Open Contact 4Retum gt Return Close Contact eq Return gt 1 These items cannot be used for FBD 2 Not supported by FXo FXos FXon FXu and FX2c 3 Supported by Universal model QCPU LCPU COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST fee PROGRAMS EDITING STRUCTURED N 2 e nc nc Lu e t m 8 5 1 Setting the type of contact and coil 8 15 iS GX Works2 8 EDITING STRUCTURED LADDER PROGRAMS Operating procedure 1 Select a contact or coil whose type is changed Select Edit gt Signal Configuration Configure 2 J Select the type on the Signal Configuration screen 4 Click the button The selected contact or coil is set Contact selected Coil selected Signal Configuration C Close Contact f Negation rese Rising Pulse d 5 Reset Cancel Falling Pulse d Close Contact Cancel Point Setting the type of contact and coil The type of contact or coil can be set by double clicking a contact or coil Bit type input
194. n compiling programs f this check box is checked a warning is displayed when compiling programs Label names that contain a same lower case as the device can be used 15 Global Label Setting Global Class Label Marne Data Type Constant Device Address 1 VAR_GLOBAL Motor Bit M1O0 XMD TOU 2 VAR GLOBAL Word Signed Joio POU 01 PRG Program Structured Ladder FBD Input Matar E oo si olx i3 Koy x ce e de oe SA Le m ENO E ae de de NE PU speed B d iml i i x i i 7 i i i i Example of lower case label name defined as global label mo is treated as a label name and compiled as assigned device D10 Point Label names which cannot be used When a device name is written in upper case and device number contains lower case in alphabetic part device whose device number is hexadecimal such as W device may cause a compilation error even Options is enabled For example W0a1 W1a are regarded as devices therefore a compilation error is caused Wa1 can be used as a label when no numbers exist between device name and device number even a device name is written in upper case and device number contains lower case in alphabetic part Inline structured text For inline structured text the devices within the range set on the lt lt Device g
195. nction Block FB Instance List WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU MAIN Instancez MAIMN Insbance3 EN N MONITORING cancel 2 Select the FB instance to be monitored 3 Click the button T 0 0 Og Z t 4 Select Online Monitor Start Monitoring EX The monitoring starts The display and executable operations during monitoring are the same as those of the program monitoring Screen button o Clear Cancels the selected status of the FB instance and stops monitoring Stopping monitoring of function blocks APPENDIX SETTING OPTIONS otop monitoring of the function block Operating procedure e Select Online Monitor Stop Monitoring 8 The monitoring stops INDEX 12 3 r GX Works2 12 MONITORING 12 3 Changing Operating Conditions of Monitoring This section explains how to change the operating conditions of monitoring 12 3 1 Changing current value display format decimal hexadecimal of word type variable Change the current value display format of word and double word type variable displayed during monitoring B Changing display format during monitoring Change the current value display format of word and double word type variable during monitoring Operating procedure e Select Online Monitor Change Value Format Decimal Change Value Format Hexadecimal Decimal Hexadecim
196. nctions provided in GX Works2 for structured programming Sold separately Manual number Model code SH 080779ENG 13JU63 SH 080780ENG 13JU64 SH 080921ENG 13JU69 SH 080787ENG 13JZ22 SH 080788ENG 13JZ23 Manual number Model code SH 080782ENG 13JW06 SH 080783ENG 13JW07 SH 080784ENG 13JW08 SH 080785ENG 13JW09 JY997D26001 09R925 JY997D34701 09R926 JY997D34801 09R927 3 Operation of iQ Works anual pare Manual number Model code iQ Works Beginner s Manual Explains fundamental operation methods such as managing the system using MELSOFT Navigator and using system labels for users inexperienced with GX Works2 Sold separately SH 080902ENG 13JZ44 Point The Operating Manuals are included on the CD ROM of the software package in a PDF file format Manuals in printed form are sold separately for single purchase Order a manual by quoting the manual number model code listed in the table above A 13 Purpose of this manual This manual explains the operations for creating Sequence programs in Structured project using the functions supported by GX Works2 Manuals for reference are listed in the following table according to their purpose For information such as the contents and number of each manual refer to the list of Related manuals 1 Operation of GX Works2 GX Works2 GX Works2 Version 1 GX Works2 Beginner s Manual Operating Manual Purpose In
197. nd Warnings 10 22 5 4 5 9 5 11 Sea S 8 15 DIE 8 4 8 15 comment pp 5 4 5 19 6 4 Compile condition S 14 5 Conditions of Monitoring pp 12 4 anala aiara ee dE EEUU 5 4 5 9 5 11 5 20 COntaC anesini uiae raient 8 15 5 29 current value display 12 4 CUrrent 7 0 rcm 12 2 D c 5 4 5 14 5 15 decimal and hexadecimal 12 4 esM 5 4 8 23 device Memory pp 11 3 display format Nt 8 23 Docking window pp 2 2 E editing MOUE E C 8 3 TO 10 6 executing conditions pp 4 7 F pee U 1 2 iU y ares aig E 4 14 6 3 6 5 8 18 function block 4 14 6 3 6 5 8 18 Function Block Selection Window 2 2 4 15 6 5 G Global label 7 5 3 oro EE 8 31 l indention ee 7 3 Index 2 input variable E n 8 18 EE RET 8 19 8 22 12 3 J 3o 8 4 9 2 9 4 L Label pp 5 4 5 9 5 11 label setting sees 5 2 5 13 We 5 2 EU 1 2 ladder block header pp 8 28 ladder block label pp 8 28 ladder block title 8 28 ladder SY INDO 8 4 Left power rail 4 8 2 Jeu di
198. nformation for label comments 12 Remark This item is not displayed on the program editor wes Display the relation between the global label and system label Class Description Relation with System Disclose The global label is disclosed as a system label Label 2 The global label refers the system label which is disclosed by another project Blank There is no relation with a system label System Label Name 2 Display the name of the system label which relates to the global label Display the attribute of the system label which relates to the global _ ttribute label 1 A new line can be inserted in a cell by pressing the cte Enter keys 2 The compilation is not needed after editing 3 For FXCPU these items are supported by FX3G FXau and FX3uc only 5 2 Setting Global Labels Screen button TA For FXCPU this button is supported by FX3G FX3U and FX3uc only Updates the system label information 1 Click the ius button The Change Contents of System Label Database screen is displayed OVERVIEW Change Contents of System Label Database 5 t Find Subject whole Display Find Characters Find Next c 2 Eo Import Contents System Label List Mame System Label Name Label Name Data Type Constant Name Project Name Device Attribute Comment Remark L Before Change List1 global_bit2 global_bit2 i QO6UDHCPU Simple 02 Jii cz After Change Li
199. ng disabled status when reopening the project 13 4 3 Editing user library 13 13 SPECIFIC POSITION LL 2 O X lt o COMPILING PROGRAMS CONVERTING s WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU gt MONITORING QJ pomme 8 T oi c gt 5 INDEX APPENDIX gt SETTING OPTIONS Er GX Works2 13 USING USER LIBRARIES Disabling editing of user library data Disable the editing of user library data Screen display lt Editing status gt lt Editing disabled status gt Navigation Navigation User Library E Program ub Programi Programi Program 1 8 Global Label Local Label 1 Global Label FeBIFun e gt ay E Structured Data Types ES StructuredDataTypes1 ES StructuredDataTypes2 User Library Program Program Local Label Structured Data Types B3 StructuredDataTypes1 B3 StructuredDataTypes2 Operating procedure 1 Select a user library to edit in the User Library view Multiple libraries can be selected 2 Select Project gt Library Close amp The editing of the user library data is disabled 13 14 13 4 3 Editing user library 13 4 Using User Library 13 4 4 Updating user library Update data in a user library file Operating procedure 1 Selecta library name to be updated in the User Library vi
200. ng label settings Display a label setting screen by right clicking a function or function block Selection Basic Instruction fal Data Conversion E Data Transfer Displays a label setting screen of the selected POU by clicking Open Header from the short cut menu Class 1 VAR_INPUT 8 AMTIE m 2 _ E DCMLP 3 VAR OUTPUT vid AE DFMOY 4 Es E B B pMOovP Point Operators Since label settings are not available for operators short cut menu is not displayed 6 2 1 Using POUs Function Block Selection window OVERVIEW SCREEN CONFIGURATION lt De D O X A PROCEDURE PROGRAM Q1 CONFIGURATIONS COMMON OPERATIONS ez SETTING LABELS EDITING ST PROGRAMS X gt HP gt Y HP 2 2 O LADDER PROGRAMS r GX Works2 6 COMMON OPERATIONS OF PROGRAM EDITORS 6 2 2 Using labels in the program Enter preset labels to program editor A new label can also be registered Screen display Select Edit List Operands Label Registration Selection Select from Registered Label Scope to Find lt ALL gt Label Setting Information Type Classification Simple Data Types Scope to Register Globali um ata ANY v Class VAR
201. nnect Specify and connect the start and end points to draw a line Section 8 3 3 Guided Mode Guided Editing Change to the keyboard input mode Overwrite the ladder symbol entered in Guided editing at the Overwrite Mode an cursor position Insert the ladder symbol entered in Guided editing at the cursor position Line Mode Change the input format to draw lines in Guided editing Aute Commen Add a comment entry field at the start of the ladder block added in Guided editing Recalculate Line Arrange a line automatically to redraw it Section 8 3 5 Insert Row Insert a row in a ladder being edited Section 8 3 6 Insert Column Insert a column in a ladder being edited New Ladder Block List Top Insert a new ladder block at the start of all ladder blocks Insert a new ladder block in front of a ladder block being Before edited Section 8 8 1 Insert a new ladder block after a ladder block being edited Insert a new ladder block at the end of all ladder blocks Input Instruction Open a Input Instruction screen Section 8 2 2 Ladder Symbol Open Contact Insert at the cursor position Close Contact Insert at the cursor position Coil Insert f at the cursor position Insert 7 at the cursor position Insert ass at the cursor position Insert at the cursor position genes Insert ATF at the cursor position Falling Pulse Close Insert at the cursor position Comment Insert a comment entry field at the cursor p
202. nstant i oz is selected for Class and simple type is selected for Data Type OF z Enter a label comment e Comments can be displayed on the program editor by switching display hide of og Comment comments Section 8 7 5 5 A new line cannot be inserted Edit a comment with a label setting editor to insert a new line as Minimize dialog after applying After clicking the button check to minimize the Label Registration 5 ee Selection screen to A ox d kK s 6 2 2 Using labels in the program 6 9 n GX Works2 6 COMMON OPERATIONS OF PROGRAM EDITORS 6 10 4 Click the button The label is registered and applied to the program editor B Changing registered label settings Change the settings of registered labels on the Label Registration Selection screen Label setting editor and data type of registered label can be changed Operating procedure 1 Select Edit List Operands The Label Registration Selection screen is displayed 2 Select the label from Registered Label List For items of Select from Registered Label refer to Entering registered labels Change the settings on Label Setting Information For items of Label Setting Information refer to Registering new labels 4 For changing the label setting editor check Move the selected labels to the Scope to Register 5 Click the button The label settings are changed 6 2 2 Using labels in the
203. ock created in the structured ladder FBD language is not used for the function block in the ST language Ladder program that calls the function block T PRG MAIN i counter lt Function block from structured ladder FBD program used in ST program gt amp i ST FUN FB Program ST IF LDP TRUE X10 OR LDP TRUE DO A THEN VarO1 00 counter ELSIF Var01 gt 22400 THEN Var01 Var01 Var02 MLD IOdata Control Var01 END IF 4 4 4 1 Using functions and function blocks lt Function block in structured ladder FBD program gt FB Program Structured Ladder FBD aN MELSOFT 5 SETTING LABELS This chapter explains how to set labels 5 1 5 2 5 3 5 4 5 5 5 6 5 7 5 8 Label Setting Screens 5 2 Setting Global Labels 5 3 Setting Local Labels for Program Blocks 5 9 Setting Labels for Functions and Function Blocks 5 11 Common Operations for Setting Labels 5 13 Setting Structured Data Type Labels 5 20 Setting Ranges for Devices Assigned Automatically 5 26 Writing Reading Data to from CSV Files 5 29 OVERVIEW CONFIGURATION SCREEN QJ lt De D O X A PROCEDURE PROGRAM Sy CONFIGURATIONS SETTING LABELS COMMON OPERATIONS mj OF PROGRAM EDITORS
204. of the analog Analog Module module App 4 Appendix 1 1 Common toolbars and shortcut keys Appendix 7 List of Toolbars and Shortcut Keys B Debug Function toolbar icons The following table shows the Debug Function toolbar icons Shortcut key Corresponding menu Reference Stop the step execution Cancel the step execution Break Execution Execute the break execution P Step Execution Execute the step execution Execution Option Display the Execution Option screen of the step execution SEARCHING FOR SPECIFIC POSITION Set Cancel Break Point Set a break point at the cursor position or cancel the set break point Enable Disable Break Enable disable the break point at the Point cursor position ig __ Cancer A Break Points Cancel al break pons p BreakPoint Window Display the Break Point window W Cancer Ar Break Devices Cancel all break devices BreskDewceWindow Display the Break Device window ee i Range cursor m 8 Range Window Display Skip Range window _ COMPILING PROGRAMS CONVERTING s WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU Other shortcut keys MONITORING The following table shows other shortcut keys that are available regardless of the editing target ecd Shortcut key Corresponding menu Reference Change the name of the selected data or 2 library in the Navigation window
205. omputer on which Windows operates Generic term for Q00J Q00 and Q01 Generic term for Q02 Q02H Q06H Q12H and Q25H Generic term for QOOUJ QOOU Q01U Q02U Q03UD QO3UDE Q04UDH QOAUDEH QO6UDH QO6UDEH Q10UDH Q10UDEH Q13UDH Q13UDEH Q20UDH Q20UDEH Q26UDH Q26UDEH Q50UDEH and Q100UDEH Generic term for Basic model QCPU High Performance model QCPU and Universal model QCPU Generic term for LO2 LO2 P L26 BT and L26 PBT Generic term for FXo FXos FXoN FX1 FXu FX2c FX1s FX1N FX1NC FX2N FX2Nc FX3u and FX3uc Abbreviation for SWOPC FXGP WIN E Abbreviation for the SFC function in MELSAP3 display format Generic term for the SFC function in MELSAP L instruction format and MELSAP L start conditions format Generic term for MELSAP3 MELSAP L and FX series SFC The following are the terms used in this manual Term Description Simple project Generic term for projects created by using the ladder SFC ST language Structured project Generic term for projects created by using the ladder SFC ST structured ladder FBD language Generic term for sequence instructions basic instructions application instructions data link Common instruction instructions multiple CPU dedicated instructions and multiple CPU high speed transmission dedicated instructions Special instruction Generic term for module dedicated instructions PID control instructions socket communication function instructions built in I O funct
206. on Delete the number of arguments of 8 6 3 co 1 Delete Pins functions and function blocks Tem nn Ctrl Num e Zoom in the screen one level schon a Num 111 Zoom out the screen one level Narrow and widen the width of ladder a BEEN block in the guided mode i Signal Configuration zo Ctrl TAR s Set the type of contact and coil gt A Change the type of contact and coil in 5 the order shown below _ l Section 8 5 _ Signal Configuration Contact Open Contact Close 1 1 Toggle Contact e Coil Normal gt Negation gt Set gt Sg Reset z d Jump to the specified ladder block Section S enl lel 921 Be Change Label Device Switch the display format in order label S 7 Ctri J Shift Address Mode device address ER ection 8 Shift Change Label Comment Switch the display between label and _ Zoom Header Body Open the label setting screen for the Section suc F2I Selected POU 529 Cut the selected data E E mi Shift Delete t Insert Paste MONITORING Paste the cut copied data at the cursor position I Cn d Connect the start and end points to draw Section a line 8 3 2 Switch the input mode between Overwrite Insert in the guided mode Auto Connect 1 g d Guided Overwrite Insert Mode
207. on before use The positioning test functions of JOG inching or positioning data for QD75 LD75 positioning module must be executed with the programmable controller set to STOP after the manual has been carefully read and the safety has been ensured Specially when executing the function on the network system ensure the safety thoroughly since the machinery whose operation cannot be checked by an operator may be activated The operation failure may cause the injury or machine damage A 1 O CONDITIONS OF USE FOR THE PRODUCT 1 Mitsubishi programmable controller the PRODUCT shall be used in conditions e i where any problem fault or failure occurring in the PRODUCT if any shall not lead to any major or serious accident and ii where the backup and fail safe function are systematically or automatically provided outside of the PRODUCT for the case of any problem fault or failure occurring in the PRODUCT The PRODUCT has been designed and manufactured for the purpose of being used in general industries MITSUBISHI SHALL HAVE NO RESPONSIBILITY OR LIABILITY INCLUDING BUT NOT LIMITED TO ANY AND ALL RESPONSIBILITY OR LIABILITY BASED ON CONTRACT WARRANTY TORT PRODUCT LIABILITY FOR ANY INJURY OR DEATH TO PERSONS OR LOSS OR DAMAGE TO PROPERTY CAUSED BY the PRODUCT THAT ARE OPERATED OR USED IN APPLICATION NOT INTENDED OR EXCLUDED BY INSTRUCTIONS PRECAUTIONS OR WARNING CONTAINED IN MITSUBISHI S USER INSTRUCTI
208. on 1 Operating Manual Simple Project SFC gt lt Q z 14 3 5 GX Works2 14 SETTING OPTIONS Device Comment Editor K gt GX Works2 Version 1 Operating Manual Common Automatic copy and increment when inserting Select whether to copy the texts in the upper row after incrementing it when inserting a row Section 5 5 4 a row Label Setting Editor Copy data type comment Select if the data type comment and remark shall be items object for auto copy Default Length of String Section Data Type Set the default string length for string data type 553 Parameter K gt GX Works2 Version 1 Operating Manual Common Display Format of Select whether to display monitored value in Decimal Section Monitoring Value or Hexadecimal 12 3 1 Monitor buffer memory and link memory Select whether to monitor buffer memory and link memory during monitoring Scan time of PLC will be ST Only applies to the Monitor QCPU LCPU FX3U C lengthened depending on the setting Set the number of displayable characters to monitor Section Significant Characters character string data 12 3 2 SFC K gt GX Works2 Version 1 Operating Manual Simple Project PLC Read Write K gt GX Works2 Version 1 Operating Manual Common Online Change K gt GX Works2 Version 1 Operating Manual Common Symbolic Information K gt GX Works2 Version 1 Operating Manual Common Enables the followin
209. onding shortcut keys Shortcut key Corresponding menu Reference Display Mode Binary Change display format to binary TI Display Mode Octal Change display format to octal in Display Mode Decimal Change display format to decimal Display Mode i 1 23 Le Display Mode Float Change display format to real numbers Ls Display Mode String Change display format to string Display Mode String ASCII only Change display format to ASCII Register 16 bit Display data in units of words pe Register 32 bit Display data in units of double words Common sa Register 64 bit Display data in units of 64 bits 16 bit d bit 64 bit m 596355 FILL Set the same value to continuous devices c Read Device Memory from Read data in device memory from a sly PLC programmable controller CPU Write Device Memory to Write data in device memory to a 19 programmable controller CPU F Read from Excel File Read data from an Excel file Ls Write to Excel File Write data to an Excel file Other shortcut key The following table shows other shortcut key for setting device memory ieee Shortcut key Corresponding menu Reference Insert Insert a row at the cursor position Common App 8 Appendix 1 4 Toolbar icons and shortcut keys for setting device memory Appendix 7 List of Toolbars and Shortcut Keys Appendix 1 5 Toolbar icons and shortcut keys for verification result The following table shows the toolbar ic
210. ons and the corresponding shortcut keys for the verification result y ses ralfu i Close the Detail Verify Result gt gt being zx Ctrl Deletel Close Detail Result displayed Common e Lem shit close All Detail Result SPECIFIC POSITION x O LL O Z I O X lt N COMPILING PROGRAMS CONVERTING s Close all lt lt Detail Verify Result gt gt m Write to CSV File Write verification result to a CSV file Appendix 1 6 Toolbar icons for executing sampling trace WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU The following table shows the toolbar icons for executing sampling trace res Shortcut key Corresponding menu Reference t BEBE Trace Setting Display the Trace Setting screen Start sampling trace To start sampling 2 Start Trace trace the trace ready signal SM800 must be ON Common MONITORING Stop Trace Stop sampling trace mn Display Trace Buffer Display the Trace Data Storage Status v Condition screen 0 0 D Monitor Status Display the current sampling trace status 5 zu Indicate the sampling trace stop status D e Execution Failed or the status sampling trace has not started Indicate the status sampling trace is Before Trigger N executed but a trigger is not generated 5 After Trigger Indicate the status sampling trace is E executed and a trigger is generat
211. or a specific position in the structured ladder FBD program For searching for devices and instructions refer to the following manual L gt GX Works2 Version 1 Operating Manual Common 9 2 1 Jumping to specified ladder block number A cursor jumps to the specified ladder block Screen display Select Find Replace gt Jump Jump E Ladder Block No 50 Exit Operating procedure 1 Setthe items on the screen Item Description Enter a ladder block number to which a cursor jumps Ladder Block No Click to select a ladder block from the list of previously searched ladder blocks 2 Click the button The cursor jumps to the specified ladder block 9 4 9 2 1 Jumping to specified ladder block number aN MELSOFT 10 CONVERTING COMPILING PROGRAMS This chapter explains how to convert compile created programs Programs are converted compiled to sequence programs that can be executed on the programmable controller CPU 10 1 Converting Compiling Created Programs 10 2 Compiling All Programs 10 3 Executing Online Program Change Simultaneously with Conversion Compilation Lee 10 4 Changing Operating Conditions of Compilation 10 5 Compilation 10 6 Checking for Errors and Warnings SPECIFIC POSITION 4 LL O Z I O X lt N COMPILING PROGRAMS CONVERTING a mh WRITINGREADING DATA TO F
212. ose the lt lt Detail Verify Result gt gt tab being displayed ormon Close All Detail Result Close all lt lt Detail Verify Result gt gt tabs being displayed Return to Result List 114 1 3 1 List of functions common to Simple project and Structured project 1 3 List of Functions B List of functions for executing sampling trace The following tables show the functions for executing sampling trace View function for executing sampling trace Reference Result Position Switching Display Items Display hide the display item titles Common Timing Chart Scale S Narrow Scale 1 ae Change the display width of the timing chart scale Common Wide Scale Trend Graph Scale Wide Scale Change the display width of the trend graph scale Common Initial Display Common Ney OVERVIEW SCREEN Gd CONFIGURATION 2 lt De D O 2 A PROCEDURE Additional Information Display hide the additional information Common Debug function for executing sampling trace Reference Sampling Trace Open Sampling Trace Display the Sampling Trace screen Trace Setting pee the screen on which the sampling trace conditions Start Trace Start sampling trace Stop Trace Suspend sampling trace Execute Manual Trigger Generate a trigger at any given timing Write trace settings to the programmable controller CPU Execute this to control the sampling trace start by a Register Trace s
213. osition Ladder Block Label Display the Ladder Block screen Left Power Rail Display hide the left power rail Section 8 8 7 1 18 1 3 6 List of functions for editing in structured ladder FBD language Edit function for editing in structured ladder FBD language List Operands Number of Pins 1 3 List of Functions Reference Display the screen for inserting a label by selecting an Section 6 2 2 existing label Increase the number of arguments of functions and function blocks l Section 8 6 3 Decrease the number of arguments of functions and function Delete blocks Ladder Block List Display a list of ladder blocks in a program Signal Configuration Set the type of a contact and a coil Change the contact and coil type per execution in the following order Section 8 5 99 Contact Open Contact Close Contact e Coil Normal Negation gt Set Reset Find Replace function for editing in structured ladder FBD language Reference Jump Jump to the specified ladder block number Section 9 2 1 View function for editing in structured ladder FBD language Reference View Mode Display a variable by its entered format Device Display a device address in device format The variable is displayed as an assigned device in device format Address Display a device address in address format The variable is displayed as an assigned device in address format Change Label Device Address Mode Switch the display fo
214. output pin For a bit type input pin and a bit type output pin connected to a POU such as an FB or function its contact type of open close can be changed To change the type of a contact double click on the position designated in the following figure or click on the position designated the following figure and select Edit Signal Configuration Configure AND 0 Me Mil For an input pin For an output pin double click here double click here 8 16 8 5 1 Setting the type of contact and coil 8 5 Changing Type of Contact and Coil 8 5 2 Changing contact and coil in predetermined order The following table shows the order when changing the type of contact and coil Type Change sequence Open Close i Rising Pulse Falling Pulse Contact Contact Rising Pulse gt Falling Pulse gt Glose 7 Close 4 Th HUE TRO EE OVERVIEW 2 il fi Normal Negation Set Reset m pU d FU ds od NE OO L A F dS HEB Bit type input Open Contact gt Close Contact 9 Label lt Label e lt OO T Open Contact gt Close Contact oo Jump Label lt amp Label Open Contact Close Contact Return Return gt PROGRAM Q1 CONFIGURATIONS 1 These items cannot be used for FBD 2 Not supported by FXo FXos FXoN FXu and FX2c
215. pen Sampling Trace Display the Sampling Trace screen Scan Time Measurement Measure the scan time of a desired section Step Execution Stop Stop the step execution D gt H Break Execution Execute the break execution Common a Step Execution Execute the step execution Execution Option Display the Execution Option screen of the step execution 8 e x2 PJ o a 5 0 Ee o Ow Z kK 85 1 3 1 List of functions to Simple project and Structured project 1 9 r GX Works2 1 OVERVIEW 1 10 Debug common function Break Setting Set Cancel Break Point ae pie point at the cursor position or cancel the set Enable Disable Break Point Cancel All Break Points Break Point Window Cancel All Break Devices Enable disable the break point at the cursor position Cancel all break points Display the Break Point window Cancel all break devices Break Device Window Skip Setting Set Cancel Skip Range Enable Disable Skip Range Cancel All Skip Ranges Display the Break Device window Set a skip range or cancel the set skip range Enable disable the skip range at the cursor position Cancel all skip ranges Skip Range Window Display the Skip Range window Diagnostics common function Diagnose the operating status of the programmable PLC Diagnostics controller CPU Ethernet Diagnostics Diagnose Ethernet CC IE Control Diagnostics CC IE Field Diagnostics MELSECNET Diagnosti
216. predefined protocol support function Language Selection Select a language used in a project Window common function Cascade Tile windows in overlapping display Tile Vertically Tile windows vertically Tile Horizontally Tile windows horizontally Arrange Icons Arrange the icons at the bottom of the window Close All Switch to other window Close all open windows Display the open window Display a list of open windows Window Also open or arrange specified windows 1 3 1 List of functions common to Simple project and Structured project Reference Common Common Intelligent Common Reference Common 1 11 No OVERVIEW SCREEN CONFIGURATION 2 2 lt D D O 2 A PROCEDURE PROGRAM Q1 CONFIGURATIONS SETTING LABELS COMMON OPERATIONS J OF PROGRAM EDITORS EDITING ST PROGRAMS Q D te e 2 a kK N Z Q LLI LADDER PROGRAMS r GX Works2 1 OVERVIEW 1 12 Help common function Reference GX Works2 Help Display the GX Works2 Help screen Common Operating Manual B GX Works2 Beginner s Manual Simple Project GX Works2 Beginner s Manual Structured Project Operating Manual Common Display the operating manuals Common Operating Manual Simple Project Operating Manual Structured Project Operating Manual Intelligent Function Module About Display product information such
217. r rail gt lt Hide left power rail gt e ee o gt o AND AND g_booll g_bool3 i 7 c g_booll g_bool3 g_bool2d le el el g_bool2a Restrictionsy Entering position of line when hiding left power rail When a vertical line is entered on the position of left power rail the vertical line is regarded as the left power rail When entering a vertical line avoid the left power rail position Regarded as left power rail If a line is entered on the position of left power rail as shown below a warning message Multiple ladders in one network C2034 is displayed on the Output window at compilation Compilation result when FBD is used When multiple ladder blocks are created for single ladder block a warning message Multiple ladders in one network C2034 is displayed on the Output window at compilation Disabling the warnings is recommended when FBD is used Set the warning code C2034 under Tool Options gt Compile Output Result Disable Warning Codes 7 Section 10 4 2 8 30 8 8 6 Setting ladder block labels titles 8 8 Editing Ladder Blocks 8 8 8 Displaying grid A grid indicates specific positions such as tab stop positions and the start end position of a line ona program editing area Switch the grid display on a program editing area Operating procedure OVERVIEW e Select View gt Grid lt
218. rary data Section 13 4 3 Update the user library data Section 13 4 4 ir x Oc ze 8 gt INDEX APPENDIX gt SETTING OPTIONS CD r GX Works2 13 USING USER LIBRARIES 13 3 Creating User Library This section explains how to create a user library 13 3 1 Creating user libraries Create a new user library Select the User Library view of the Navigation window and follow the operation below Screen display Select Project Library gt Create Create Library Library Mame 01 Operating procedure 7 Entera library name 2 Click the button A user library is created and displayed on the User Library view Point Maximum number of user libraries The maximum number of user libraries that can be created in a project is 800 Number of characters for a library name he maximum number of characters that can be entered for a library name is 32 Invalid characters for library names For invalid characters for library names refer to the following manual MELSEC Q L F Structured Programming Manual Fundamentals 13 4 13 3 1 Creating user libraries 13 3 Creating User Library 13 3 2 Changing library name Change the user library name Operating procedure 1 Selecta library name to be renamed in the User Library view 2 Select Project Library Rename The editing of the library name in the pro
219. reating a program Section 8 1 in the screen 9 9 Ladder symbols can be placed in the grid area A start position of the structured ladder program Section Lo Left i For FBD the display of left power rail can be switched to hide 8 8 8 Indi a Section e ndicate specific positions of tab stop and start end positions of lines 888 5 Q pai wa PLC Read Write Online Change A Automatic Save is avala DoY Intelligent Function Module pegas Er iQ Works Interaction System Label Setting EDITING STRUCTURED LADDER PROGRAMS Explanation Operating procedure Back to System Defaut Set as User Default Cancel Describes the operating Operating procedure procedure of the fu nction Set the items on the screen When the cursor is placed on a setting item an explanation of the item is displayed in the Explanation field lt gt Section 12 2 Screen button Reference location J Back to System Default ba leads to the refe rence Restores the initial settings location and reference manual e Ries Restores the user default settings as User Default Screen button Stores the current settings as the user default and applies them to a new project Describes the buttons in the screen Section title Clarifies the section of currently open page A 18 The following table explains the CPU module icons that in
220. red project For Common Simple and Intelligent indicated in the Reference column refer to the following manuals respectively Common GX Works2 Version 1 Operating Manual Common Simple GX Works2 Version 1 Operating Manual Simple Project Intelligent GX Works2 Version 1 Operating Manual Intelligent Function Module Appendix 1 1 Common toolbars and shortcut keys The following explains the toolbars that are available regardless of the editing target and the corresponding shortcut keys B Standard toolbar icons The following table shows the Standard toolbar icons and the corresponding shortcut keys Search for help items with an entered MEER PIOA RE pT A ANRA keyword on the GX Works2 Help screen App 2 7 Appendix 1 1 Common toolbars and shortcut keys Appendix 7 List of Toolbars and Shortcut Keys B Program Common toolbar icons The following table shows the Program Common toolbar icons and the corresponding shortcut keys pong Shortcut key Corresponding menu Reference SEARCHING FOR SPECIFIC POSITION x Ctrl Cut the selected data Paste the cut copied data at the cursor eo B m 7 the previous operation Y e Ct Section oO Perform the operation canceled by 6 2 3 r OO ER NENNEN Find Instruction Search for an instruction Common 1 1 Search for a contact or coil SR J shift A
221. rl Line Statement List Insert template corresponds to the crt T JAn Li Display Template instruction function control syntax Set an argument of the template in the 2 Ait Mark Template Left selected status from the left by selecting Section each time 7 1 4 Set an argument of the template in the Q selected status from the right by Mark Template Right Switch the mode of the open window to J Shift 21 MOUE Read Mode Switch the mode of the open window to 2 VM Write Mode Switch the mode of the open window to Monitor Mode Monitor Mode during monitoring shift Monitor Write Mode selecting the menu each time ar 0 t 5 YX Og Zy t p ENT Switch the mode of the open window to Monitor Write Mode during monitoring ee S5 S9 e Bate e inser cat Peel Connect Line to Right Side Connect a horizontal line to the ladder T J Shift T Symbol symbol at the right of the cursor position SETTING OPTIONS X a Connect Line to Left Side Connect a horizontal line to the ladder Ctri P J shift Symbol symbol at the left of the cursor position d Ed Enter Delete HLine Enter delete a line at the right of the eet El rightwar Enter Delete HLine Enter delete a line at the left of the J Ctr i Leftward cursor position Enter Delete VLine Enter dele
222. rmat in order label device address Change Label Comment Mode Switch the display between label and comment All Device Display Batch change all labels on the program editors to the device display Cancel the device display on the program editors and ance eMe Sp display data in the format at the time of data entry Show grid on the screen being edited to display the start Grid end positions of a line Section 8 8 8 Print Wrap Position Display the wrapping position for printing Section 8 11 Display Compile Result Display the compilation result in a list form Section 6 2 7 Zoom Set Zoom Factor Change the display size of the program Section 6 2 4 Zoom Header Body Open the label setting screen in the selected POU Section 6 2 9 Open the program editor in the selected POU Open Header Open the label setting screen for a program being edited Section 6 2 6 1 3 6 List of functions for editing in structured ladder FBD language 1 19 Ney OVERVIEW SCREEN Gd CONFIGURATION 2 lt De D O 2 A PROCEDURE PROGRAM Q1 CONFIGURATIONS SETTING LABELS COMMON OPERATIONS J OF PROGRAM EDITORS EDITING ST PROGRAMS Q LLI Qc D te e 2 a kK N Z Q LLI LADDER PROGRAMS 5 Works2 1 OVERVIEW 1 20 1 3 6 List of functions for editing in structured ladder FBD language SWVuDONd SIAVHSOSd H3OOV1 LS SNI LIO3 GSYyNLO
223. rogramming efficiency bray Library ize Global label Global label FB FUN Global label Program setting Library file Global label FB FUN FB FUN Global label Program setting Library components can be used Program block FB FUN The following data can be registered to user libraries e Global labels e Structured data e POUs program blocks functions function blocks 13 2 13 2 Procedure for Using User Library 13 2 Procedure for Using User Library SEARCHING FOR SPECIFIC POSITION This section explains how to create a user library POUS created in a user library can be shared among multiple projects The following explains how to utilize a created user library to other projects CD 1 Create a user library DA o Procedure Reference z Create new user library Section 13 3 1 Create data for user library Section 13 3 3 Save the user library under a specified name Section 13 3 4 1 1 IL 2 Utilize the library WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU Procedure Reference Utilize the user library to a project Section 13 4 1 Create a program using the user library Section 13 4 2 LL J Editthe user library and update the library file data E MONITORING QJ ome 2 Procedure Reference Change the setting to enable or disable editing of the utilized user lib
224. rograms Users can combine these languages by selecting the most appropriate programming language for each purpose to create programs Table 1 2 1 Programming languages supported by Structured project A graphic language using ladders composed of contacts and coils Ladder 1 Ladder diagram Can be operated in a similar way to existing GX Developer operation ST A high level structured text language with grammatical structure similar to C language SFC Sequential function chart A graphic language in which executing orders and executing conditions of programs are defined Sricd red ladder Ladder diagram A graphic language using ladders composed of contacts and coils which can be inserted flexibly FBD Function block diagram A graphic language using ladders by connecting functions and or function blocks with lines 1 Not supported by FXCPU program editors for each programmable controller CPU The program editors of Structured project can be used for any type of programmable controller CPU supported by GX Works2 Users can select the desired programming languages regardless of the target programmable controller CPU For details of the programmable controller CPUs supported by GX Works2 refer to the following manual K gt GX Works2 Version 1 Operating Manual Common 1 2 Features of Structured Project Creating large programs efficiently with structured programming In Structured project progra
225. roll automatically when they are out of the screen during monitoring Switch the mode of the open window to E 5 2 Read Mode Read Mode Switch the mode of the open window to s Switch the mode of the open window to Monitor MOGE Monitor Mode during monitoring Switch the mode of the open window to Monitor Write Mode during SEARCHING FOR SPECIFIC POSITION ix shift F3 Fs Monitor Write Mode monitoring Zoom Change the display magnification ratio of the SFC diagram Shift Shift Insert Insert a row at the cursor Insert a row at the cursor position Shift shift Delete Row _ a row at the cursor position Cte insert Insert Insert Column Insert a column at the cursor position Simple Ctrl ctr Delete Eeetel Delete Column Delete a column at the cursor position Move a cursor to the SFC step number ctr 6 6 transition number the specified block cui Move a cursor to the step of the jump Move a cursor to the SFC step number Numeric key transition number Cui SFC Step Transition Display the SFC step transition Ctrl Ctrl Open Zoom Start Display the Zoom editor window or the double click Destination Block start destination block 5 Back to Start SFC Block Display the start source block the start source block on the SFC d
226. roller CPU 1 Creating a new project Procedure Reference Start up GX Works2 GX Works2 Version 1 Create a new Structured project Operating Manual To reuse an existing Structured project open that Structured project Common 2 Setting parameters Procedure Reference Set parameters GX Works2 Version 1 Operating Manual Check parameters Common 3 Configuring programs Procedure Reference Create program files Create tasks Chapter 4 Create POUs Register POUs program blocks to the tasks 4 Setting labels Procedure Reference Define global labels Chapter 5 Define local labels IL To the next page 3 1 Creating Programs From the previous page 5 Editing programs Procedure Reference Chapter 6 Edit programs of each POU Chapter 7 Chapter 8 6 Compiling programs Procedure Reference Compile a program or compile all programs Chapter 10 IL ra Connecting a personal computer to the programmable controller CPU Reference GX Works2 Version 1 Operating Manual Procedure Connect a personal computer to the programmable controller CPU Set the connection target Common 8 Writing data to the programmable controller CPU Procedure Reference Write parameters to the programmable controller CPU Write sequence programs to the programmable controller CPU 9 Confirming the operation Procedure Reference Monitor the execution status of sequence programs Chapter 12 10 Ending
227. s Name Description Ladder block number A number automatically assigned from the start Enter a character string to be specified as the jump target when using the jump instruction Ladder block label A colon needs to be entered at the end of the character string A maximum number of characters that can be entered is 7 Enter a meaning of the program as a title when necessary SALOT POEK UE A maximum number of characters that can be entered is 20 Operating procedure 1 Double click the ladder block header The Ladder Block screen is displayed m POU 02 PRG Pragram Structured Ladder FBD Double click Or press Enter twice when the cursor is pointed at the ladder block header 2 Enter the ladder block label and Ladder Block ladder block title Label Titles Cancel amp POU 02 PRG Program Structured Ladder FBD as 8 28 8 8 4 Editing ladder block headers 8 8 5 8 8 Editing Ladder Blocks Editing listed ladder blocks Edit listed ladder blocks in the program The following information is displayed in the list Ladder block number Ladder block label Ladder block title Screen display Select Edit gt Ladder Block List Ladder Block List Screen button i o Insert Inserts a new ladder block in front of the selected ladder block e Add Inserts a new ladder block at the en
228. s four devices two device of 08000 to D8001 are not enough Therefore the next device ZR is assigned Definition order Descending order 2 Since word signed requires one device 08001 can be assigned Therefore return to the previous device D device and the device is assigned to the label 3 Since double precision real requires four devices one device of 08000 is not enough Therefore the next device ZR is assigned 10 5 2 Assigning devices 10 5 Compilation Assigning to temporary variable automatically assigned device to other than label Assign a device to temporary variable When the type of device to be assigned is one QCPU Q mode LCPU Devices are assigned in descending order assigned from higher number of a device number of device range set on the Device Label Automatic Assign Setting in the same manner as the assignment to a label defined in a label setting editor SPECIFIC POSITION or O LL O Z I O X lt N When the multiple types of devices are assigned automatically Select one device to be assigned from devices set on the Device Label Automatic Assign Setting with the order of ZR gt R gt W gt D B gt M Multiple device types are not assigned to temporary variable COMPILING PROGRAMS CONVERTING s Example 1 lt Device automatic assign setting gt Set the following device range e D device 8000 to 8191 e ZR device 0 to 1023 lt Device
229. s of 64 bits Setup Change the editor size EDITING STRUCTURED LADDER PROGRAMS 1 3 1 List of functions common to Simple project and Structured project Reference Common Reference Common Reference Common Reference Common Common 1 13 Ney OVERVIEW SCREEN Gd CONFIGURATION 2 lt De D O 2 A PROCEDURE PROGRAM Q1 CONFIGURATIONS SETTING LABELS J OF PROGRAM EDITORS EDITING ST PROGRAMS r GX Works2 1 OVERVIEW Tool function for setting device memory Reference Read Device Memory from PLC 0 device memory data from the programmable controller Write Device Memory to PLC Write device memory data to the programmable controller CPU Common Read from Excel File Read data from an Excel file Write to Excel File Write data to an Excel file B List of functions for verification result The following tables show the functions for verification result Edit function for verification result Reference Write to CSV File Write verification result to a CSV file Common Find Replace function for verification result Reference Next Unmatch Move to the next mismatched data z Common Previous Unmatch Move to the previous mismatched data View function for verification result Reference Return to the lt lt Verify Result List gt gt tab from the lt lt Detail Verify Result gt gt tab Close Detail Result Cl
230. scription number of characters Enter a program block name Program Name Click to set a program block name on the Program Selection 32 screen Enter comments for the program block Comment new line can be inserted in a cell by pressing the Ctrl Enter 1024 keys Point Program blocks that can be registered A single program block can be registered to any one of tasks for only once Only the program blocks that are not registered to any of the tasks are displayed on the Program Selection screen Executing order of program blocks registered to a task Structured ladder FBD or ST programs are executed in the order they are registered to a task SFC program is executed in the order of block number regardless of the order they are registered to the task 4 4 4 2 2 Registering program blocks to tasks 4 2 Creating Program Files and Tasks Registering tasks A maximum number of tasks that can be created in a single project is 124 A maximum number of program blocks that can be registered to tasks is 800 However the number of tasks that can be registered to a program file the number of program blocks that can be registered to a task and the type of program block that can be registered to a single task differ according to the selected programming language OVERVIEW Maximum number of tasks that can be created in a single program file and the maximum number of z program blocks that can be registere
231. setting screen OVERVIEW z 4 O Global Label Setting Global1 LabelName Data Constant Device Address Comment Remark Relation with System Label System Label Name Attribute ad 1 Struct Detail Setting Detail Setting Struct gt 2 8 0 1 31 nin Y z E OO System Label Operation To reflect the changes of the table above to the nO O gt Change en CJ al Register Release system label database Notification p Device Name Relation please save the project after compiling 3 Structure Device Setting g datal Struct1 O Z Label Data Device Address oO c OO OO X X aA Use Bit Designation Automatic Filling PROGRAM y CONFIGURATIONS Operating procedure o E tn Setthe items on the screen 5 2 Item Description Label Display label names defined as structure 7 Data Type Display data types set to data names Device Set device names to be assigned in the Device or Address column When a device name is entered in either column it is displayed the respective format automatically 6 O H p Check this to set devices automatically to cells in which devices not set with same Automatic Filling Ws data type os Use Bit Designation Check this to specify a bit device of word device OO Point
232. signed to devices first and then local labels are assigned to devices WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU Assigning only type of device automatically Assign the devices in top down order on the label setting editor Devices are assigned in descending order on the screen assigned from higher number of a device number of device range set on the Device Label Automatic Assign Setting For pointer P devices are assigned in ascending order assigned from lower number of a device number MONITORING ome 8 Example lt Device automatic assign setting gt Set the following device range D device 8000 to 8191 TT 0 t 5 X Og Zy t p ENT Label setting Class Label Mame Data Type 1 VAR A Word Signed 2 Wword Signed 3 VAR FLOAT Double Precision 4 VAR Labal D FLOAT Double Precision lt Devices to be assigned to labels gt Example of devices to be Definition Descending order INDEX APPENDIX gt SETTING OPTIONS 10 5 2 Assigning devices 10 15 r GX Works2 10 CONVERTING COMPILING PROGRAMS 10 16 Assigning multiple types of device automatically QCPU mode LCPU Assign the devices in top down order on the label setting editor Devices are assigned in descending order assigned from higher number of a device number of device range set on the Device Label Automatic Assign Setting When t
233. st1 global_bit2 global_bit2 i QO6UDHCPU Simple 02 214 11 SystemLabel2 OO List1 global_bit1 global_bit1 i QO6UDHCPU Simple 02 J1 x0 oo 4 AfterChange Listi global biti global bitl QO6UDHCPU 02 Jiixi10 SystemLabell 5 Q LLI 2 D oO C Relationship diagram between system label database 1 and project 2 e e n Function RO X Y Change Notification Function il Function oo Be O ER EDE Em 2 Click the __mert button The information on the changed system labels are applied to the project When the __ cancel button is clicked these changes will be updated at the next update 3 The following message is displayed PROGRAM y CONFIGURATIONS MELSOFT Series GX Works i The latest information of system label being referred was reflected to the global label The reflected global label changed into uncompiled Please compile again SETTING LABELS 4 Click the button COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST PROGRAMS X gt HP gt Y HP 2 2 O LADDER PROGRAMS r GX Works2 5 SETTING LABELS re For FXCPU this button is supported by FX3G FX3U and FX3uc only Imports system labels to the project 1 Click the mt button The Import System Labels to Project screen is displayed Import System Labels to Project System Label List Name All Refinement Options
234. stallation i Simple Structured Cannon Simple Structured Instructions Function Module Learning the operating environment and installation method Installation Learning a USB driver installation method Learning all functions of GX Works2 Learning the project types and available languages in GX Works2 Learning the basic operations and operating procedures when creating a simple project for the first time Learning the basic Operation of operations and operating GX Works2 procedures when creating a structured project for the first time Learning the operations of available functions regardless of project type Learning the functions and operation methods for programming Learning data setting methods for intelligent function module A 14 2 Operations in each programming language For details of instructions used in each programming language refer to the section 3 on the next page GX Works2 GX Works2 Version 1 Beginner s Manual Operating Manual Purpose Simple Structured Simple Structured Project Project Project Project Ladder Details Simple ST Details FC c e B Outline 1 B Structured Be Project Structured ladder FB D Details Outline Details 1 MELSAP3 and FX series SFC only A 15 3 Details of instructions in each programming language for QCPU Q mod
235. t gt tab of PLC parameter cannot be used as labels Use the devices out of range set on the lt lt Device gt gt tab of PLC parameter 10 8 10 4 3 Using same name for global label and local label 10 4 Changing Operating Conditions of Compilation 10 4 5 Connecting PLS PLF or ALT outputs directly to other inputs with lines Connect outputs of the selected function s PLS PLF or ALT 1 directly to other inputs with lines 1 Supported by FXCPU only Operating procedure 1 Select Tool gt Options gt Compile gt Structured Ladder FBD ST gt Compile Condition1 2 In Function Output Setting check the function s PLS and or PLF to be set f any of these check boxes are not checked an error occurs when compiling programs f any of these check boxes are checked errors and warnings are not displayed when compiling programs Example Creating a program using the PLS output Check box is not checked The output is required to be retained at the label or device PLS Input EMO F EG E Input EN ENG i N lt Check box is checked gt The output can be connected directly to another input with a line EQ E PLS Inputt EN ENO Input ENO Input oe d _IN 10 4 5 Connecting PLS PLF or ALT outputs directly to other inputs with lines SPECIFIC POSITION or O LL O Z I O X lt N COMPILING PROGRAMS CONVERTING
236. t Label Setting Editor gt ZO Titl e name ccc Class LabelName Data Type Constant Device Address Comment Remark 1 OO 2 ANN eo 3 3 5 6 lt CSV File gt Z u z Y A Fy G I Y Y amm ZR Titl e name m Glass Label Name Data Type Constant Device Address Comment Remark Q pee IM 7 B 4 VAR GLOBAL G LABELOOO02 BOOL X2 WX IX2 00002 RemarkOOO02 n 5 GLOBAL G LABELOOO03 BOOL X3 IX3 Commentoooo3 RemarkOOO03 6 GLOBAL CONSTANT GLABELOOO04 BOOL FALSE CommentOOO04 RemarkOOO04 7 GLOBAL G LABELOOO05 BOOL X4 RG Commentoooo5 RemarkOooo5 Restrictions When multi byte characters are used in the label name Do not use multi byte characters in a label name when using a CSV file created in Japanese version of GX Works2 in other language version of GX Works2 For GX Works2 with the language version other than Japanese this function supports multi byte characters however the compilation function does not support multi byte characters Therefore the program cannot be compiled properly when multi byte characters are used in a label name PROGRAM CONFIGURATIONS SETTING LABELS COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST PROGRAMS Q ac D HP 2 2 HP wn Z Q LADDER PROGRAMS 5 Works2 5 SETTING LABELS MEMO MELSOFT 6 COMMON OPERATIONS OF PROGRA
237. t function App 20 INDEX Index 1 to Index 3 E MANUALS Related manuals are separately issued according to the purpose of their functions in GX Works2 Related manuals The manuals related to this product are shown below Refer to the following tables when ordering required manuals A 12 1 Operation of GX Works2 Manual name GX Works2 Version 1 Operating Manual Common Explains the system configuration of GX Works2 and the functions common to Simple project and Structured project such as parameter setting operation method for the online function Sold separately GX Works2 Version 1 Operating Manual Simple Project Explains operation methods such as creating and monitoring programs in Simple project of GX Works2 Sold separately GX Works2 Version 1 Operating Manual Intelligent Function Module Explains operation methods of intelligent function module such as parameter setting monitoring programs and predefined protocol support function in GX Works2 Sold separately GX Works2 Beginner s Manual Simple Project Explains fundamental operation methods such as creating editing and monitoring programs in Simple project for users inexperienced with GX Works2 Sold separately GX Works2 Beginner s Manual Structured Project Explains fundamental operation methods such as creating editing and monitoring programs in Structured project for users inexperienc
238. t to other input 0 E DWORD TO BOOL E TIME TO BOOL E NOT E LIMITAION E MAXIMUM E Compile Condition 1 SEARCHING FOR SPECIFIC POSITION Select whether to generate a code to keep bit type output of objective function block MINIMUM E EQ E NE E GT E GE E LT E LE E COMPILING PROGRAMS CONVERTING s Compile Structured Condition2 AND E OR E E Section Z z Compile Ladder Select whether to generate a code which keeps bit 10 4 Sg FBD ST User Defined Function type output of the target function Codes keeping bit 5 with EN ENO type are generated if output is in bit type array or in structure array regardless of option setting g n Select whether to generate a code which keeps bit E User Defined Function Rebing bit type are generated output is in bit type Block with EN ENO pud p OI CYP array or in structure array regardless of option setting Automatically assign D i Z aysiem eMe is Select whether to assign each system device to output 2 output of functions that O functions of EN ENO Only functions enabled E use EN ENO z Compile Function block is disabled Condition 3 mansi esu Only checked functions at Generate Code That Holds pprop y the Output of the Following are enabled when the want to uncheck the box LA output is bit type because some programs
239. te is set to Common are not supported by LCPU System labels whose Attribute is set to Common or Link are not supported by FXCPU e Importing system labels with MELSOFT Navigator may cause an error at compilation with GX Works2 Check the corresponding error location and correct the error as instructed by the error message displayed on the output window 5 3 Setting Local Labels for Program Blocks 5 3 Setting Local Labels for Program Blocks This section explains how to set local labels used for each program block Screen display Select Project view gt POU gt program gt program block Local Label OVERVIEW z Local Label Setting POU 01 PRG gt Class LabelName DataType _ Constant Device Address Comment Bit 5 T viinput2 Jg Il nim DeubeWeiged ll xz 601 nO VAR CONSTANT gt daal Stina aaee vj CT L S 3 O LLI i zu Operating procedure za OO OO Set the items on the screen ae Maximum number of Item Description characters FB instance name 16 2 Glass Select a label class from the list displayed by clicking _ Section 5 5 1 Ladder ST SFC o Oi Label Name Enter a desired label name 25 Specify a data type from the Data Type Selection screen displayed by clicking 128 Data Type lt Section 5 5 3 It can also be ent
240. te a line at the downward of Ctr T the cursor position x lt LLI Q z Appendix 1 7 Toolbar icons and shortcut keys for program editors App 11 i GX Works2 APPENDIX Shortcut key Corresponding menu Description Reference Enter Delete VLine Enter delete a line at the upward of the ctr LL Upward cursor position _ Switch Open Close Switch a open contact to closed contact Ctrl Contact and vice versa Switch Statement Note Ctrl Change the type of a statement note Open the Enter Symbol screen in which s Ctrl Alt Enter Instruction Partial Edit the first argument is in the selected status EE Select a device label on the Enter Symbol screen Switches the device T label to be selected using the button Increment decrement a device label on Ait T BEEN the Enter Symbol screen Display options of instruction label on the FE IE 2 payne Move the cursor the editing screen while the Enter Symbol screen is 1 displayed Ctrl Display the specified row Ctr Jump to Next Ladder Block Jump a cursor from the current position PgDown to the start of the next ladder block Jump to Previous Ladder Jump a cursor from the current position Simple PgUp Block Start to the start of the previous ladder block Ctrl turn mouse scroll Bigger Change the display size of text larger on wheel upward t
241. the editing screen one above the other Operating procedure OVERVIEW Drag the split bar on the scroll bar of the editing screen A x 4 Split bar 2 lt fi X zZ OO nO Drag the split bar 3 a LL z Y 2 Z OO OO c c D n PROGRAM Q1 CONFIGURATIONS SETTING LABELS G OFFGAN EN ENO H100 Un Var ControlData fS COMMON OPERATIONS lt PROGRAM EDITORS EDITING ST PROGRAMS Q ac D HP 2 2 HP wn Z Q LADDER PROGRAMS 6 2 5 Splitting editing screen 6 13 5 Works2 6 COMMON OPERATIONS OF PROGRAM EDITORS 6 2 6 Opening label setting screen of program editor being edited Display the Local label Setting screen of the program editor being edited Operating procedure e Select View Open Header POU 01 PRG Program Structured Ladder FBD Address Comment Var Comment Data Type Constant Device Bit 6 2 7 Displaying compilation result in list form Display a compiled program in a list format A selected ladder block for structured ladder FBD or a whole editor currently opened for ST is the compilation target Operating procedure 1 For structured ladder FBD select a ladder block 2 Select View Display Compile Result
242. the label setting editor Used in the program Function Not used in the program Declared in the label setting editor Structure Not declared in the label setting editor 10 5 1 Compilation target data when compiling all programs 10 5 Compilation 10 5 2 Assigning devices Assign the devices set on the Device Label Automatic Assign Setting screen during compilation In structured ladder FBD and ST create actual programs with temporary variable during compilation Temporary variable is a device to retain the operation result of programs temporarily and assign the device within the range set on the Device Label Automatic Assign Setting Temporary variable is used for such as the following situations Ladders are branched in structured ladder FBD Over 3 items of four arithmetic operations are used in ST Other situations which require retaining the operation result temporarily Temporary variable can be checked by compilation result Section 6 2 7 SPECIFIC POSITION x O LL O Z I O X lt N COMPILING PROGRAMS CONVERTING Assigning devices defined on the label setting editor to the labels The following explains the device assignment to the labels defined on the label setting editor For global labels only labels whose Device Address are blank on the label setting editor can be assigned When both global labels and local labels are assigned global labels are as
243. the project Procedure Reference GX Works2 Version 1 Operating Manual Common Save the project Exit GX Works2 OVERVIEW SCREEN 8 CONFIGURATION PROGRAMMING PROCEDURE PROGRAM Q1 CONFIGURATIONS SETTING LABELS COMMON OPERATIONS mj OF PROGRAM EDITORS EDITING ST PROGRAMS Q D H e D 2 H N i9 2 Q LLI LADDER PROGRAMS 5 Works2 3 PROGRAMMING PROCEDURE MEMO MELSOFT 4 PROGRAM CONFIGURATIONS In Structured project sequence programs are configured by using tasks and POUs This chapter explains the program configurations of Structured project OVERVIEW CONFIGURATION SCREEN QJ Z z Y OO 4 1 Program Configurations of Structured Project 4 2 M 4 2 Creating Program Files and Tasks 4 3 4 3 Creating POUS 4 10 44 UsihgPOUS i RERBA xGORPXGixa eX 4 14 PROGRAM CONFIGURATIONS SETTING LABELS COMMON OPERATIONS mj OF PROGRAM EDITORS 2 0 FO Ow co Q ac D HP 2 2 HP wn Z Q LADDER PROGRAMS ic GX Works2 4 PROGRAM CONFIGURATIONS 4 1 Program Configurations of Structured Project This section explains the configurations of Structured project that are displayed in a tree format in the Project view For Common and
244. ting Compiling Created Programs 2 Select the Execute compile after conversion item and click button 2 Programs are compiled after the conversion and the result is displayed on the Output window E E o By double clicking the result the corresponding error location in the program is displayed o9 2 For checking errors warnings refer to Section 10 6 T m OFT Serie 0 ed Opema orkspace 0 POU_02 PRG Progra ed Ladder FBD i Project Edit FindiReplace Compile Online Debug Diagnostics Tool Window 8 Lui Oo 96 et A 1 ks EE oo HAARET ilohi eS SE BE EH Oe rae dT At REDE TI NS Navigation au 4 POU_02 PRG Program St Global Label Setting Globalt 4 b Selection Project er al parts B Rs i xO A P N18 Parameter BO cc 2 D 5 aah 1 io 2 Device mni B MOVP 245 B r 85 gram Setting 4 Program p Ta ou lt P e ap 1 Sa i Local Label A E ABS E enn e E HE B eom gt L User Library E eee e e B ADRSET E Connection Destination B Ric E 1 1 Output ax Rebuild All No Result Data Name Class Content Error Code 1 Error Globall Global label check The identical label name POPOO3 was declared
245. tion 6 4 2 Section 6 4 7 Section 8 1 Section 8 2 Section 8 5 Section 9 1 Section 12 1 Section 12 2 Appendix 1 1 Appendix 1 2 Appendix 1 6 Addition TERMS Section 5 5 1 Section 5 5 2 Section 6 2 5 Chapter 7 Chapter 8 Section 11 2 3 MANUALS GENERIC TERMS AND ABBREVIATIONS IN THIS MANUAL Section 1 2 Section 1 3 1 Section 2 1 Section 4 2 2 Section 4 2 3 Section 5 2 Section 5 3 Section 5 4 Section 5 5 Section 6 1 1 Section 6 2 1 Section 10 5 Section 11 1 Section 12 1 Section 12 2 Section 14 2 Appendix 1 Section 5 5 1 to 5 5 2 are changed to Section 5 5 3 to 5 5 4 Section 6 2 2 is changed to Section 7 1 4 Section 6 2 3 is changed to Section 6 2 2 Section 6 2 4 is changed to Section 8 8 Section 6 2 5 is changed to Section 6 2 3 Section 6 2 6 is changed to Section 8 8 7 Section 6 2 7 is changed to Section 8 11 Section 6 2 8 is changed to Section 6 2 4 Section 6 2 10 to 6 2 12 are changed to Section 6 2 6 to 6 2 8 Section 6 3 is changed to Chapter 7 Section 6 4 is changed to Chapter 8 Section 11 2 2 is changed to Section 13 3 1 Section 11 2 3 is changed to Section 13 2 5 Section 11 2 4 is changed to Section 13 3 4 Section 11 2 5 is changed to Section 13 2 2 Section 11 2 6 to Section 11 2 7 are changed to Section 13 3 3 Section 11 2 8 is changed to Section 13 2 6 Section 11 2 9 to Section 11 2 10 are changed to Section 13 2 4 Section 11 2 11 is changed to Section 13 3 5 Section 13 2 7 Chapter 7
246. tion blocks are used to create structured ladder 2 FBD programs Each ladder symbol is connected with a line The suitable editing mode can be selected according to the program entry method and editing target 5 n Section 8 1 1 3 Screen display 3 Select Project view gt POU gt Program program Program Ladder header Program editing area oo c za OO display Ladder block 1 EC Ceres Coil Ta Contact 4 Describes the screen display Ge a ee o rca rem g procedure Lan power S E n i ump a Follow the select p o _Jump to Label Comment oz menu to open the screen E FS 4 Screen display may depend on Pointer Ec E the CPU P Label In that case typical example is a oco oR Input label P g boolld g bool bool14 described z ETE 2 Grid IF una bool15 int1 IN m z bool gini H8 g bool11 i 6 wo Display contents 85 amp n Description Reference Q unit for creating a program Se Display conte nts Ladder block A ladder block consists of a ladder block header and a program editing area Section 9 8 8 Display information such as a title set for each ladder block and a label name of the jump Section Ladder block header target 884 7 Describes the display contents Program editing area An area for c
247. tt Fz Find Contact or Coil corresponding to a specified device Sg Write data to the programmable 5 Read data from th b weer es ead data from the programmable Ss mB _ Rees tom ruc controler CPU EE Start Monitoring All Start monitoring all windows being _ Windows opened zm Stop Monitoring All Stop monitoring all windows being _ R Windows opened Start monitoring the window being 2 ee Section 12 1 op monitoring the window being e Janje lEs Stop ou en Batch monitor device buffer memories For ladder and SFC Zoom programs Common Shift Enter Modify Value change the ON OFF and value of a device label used in a program Convert compile a sequence program zi Shift FA Online Program Change and write it to the programmable Common TT 0 t YX Og Ze o m m ENT controller CPU Shift Fa Compile convert all programs in the ay Start Stop Simulation Start stop simulation Common gt SETTING OPTIONS APPENDIX INDEX Appendix 1 1 Common toolbars and shortcut keys App 3 Ln GX Works2 APPENDIX B Docking Window toolbar icons The following table shows the Docking Window toolbar icons Toolbar icon Tea Navigation Window Display hide the Navigation window Common Function Block Selection Display hide the Function Block Section m Window
248. tus The compilation status can be checked in the Project view Items are displayed in red as shown below if the data are in uncompiled status Uncompiled data can be displayed on the Project view by right clicking on global label POU program file and selecting Open Uncompiled Data from the shortcut menu Uncompiled data status is displayed on the Project view Navigation 3 Intelligent Function Module Global Device Comment Global Label Globali Program Setting POU B Program s POU_O1 Pou_n02 W Program ig Local Label iy FBIFUN x Structured Data Types Items are displayed in red if the data are in uncompiled status 10 5 1 Compilation target data when compiling all programs 10 14 When compiling all programs compilation target data are determined according to the registration usage status of data type The following table shows the compilation target data O Compiled x Not compiled Registration usage status of Compilation target when compilation target data type compiling all programs Registered to any of the following programs Initial program Program program file Scan program O Compilation target data type Wait program Fixed interval program No execution type Task Registered in the program file Registered in the task Program Not registered in the task Declared in the label setting editor Function block Not declared in
249. ue position with the entered ladder symbol Moves the existing ladder symbol at the cursor Purole position to the right and inserts a ladder symbol For switching between overwrite and insert modes follow the operation below Operating procedure Insert Mode Select Edit Guided Mode Overwrite Mode Insert Mode The mode changes between overwrite and insert and the grid cursor color changes Point Switching Overwrite Mode and Insert Mode The mode can also be switched by pressing the Insert key 8 34 8 10 1 Overwrite mode and insert mode 8 10 Editing in Guided Mode 8 10 2 Entering ladder symbols The ladder symbol entry method in the Guided mode is the same as that of the Select mode For entering ladder symbols refer to the following section Section 8 2 1 Entering ladder symbols OVERVIEW 8 10 3 Entering instructions z c Zo The following explains how to enter instructions in the Guided mode The instruction entry method in the Guided mode is the same as that of the Select mode Bo For entering instructions refer to the following section 3 Section 8 2 2 Entering instructions 8 10 4 Connecting ladder symbols with lines 58 c X D o Connect the entered ladder symbols with a line Operating procedure 1 Select Edit gt Guided Mode gt Line Mode The thickness of grid cursor is doubled The normal grid in the Guided mode is divided
250. unction or function block with a line Operating procedure i 1 Select Tool Options Program Editor gt B M 2 Structured Ladder FBD FB FUN 2 O 2 Select Pin overwrites ii 3 Select Edit gt Auto Connect E Emo F 52 4 Draw a line over the input or output variable The existing input output variable is automatically overwritten with the line 0 Z C 8 3 5 Rearranging lines automatically E Rearrange and redraw a line when the Auto connect function is activated Operating procedure 1 Select the line to be rearranged PROGRAM Q1 CONFIGURATIONS 2 Select Edit Recalculate Line Before automatic arrangement execution Input Inputz Output L t 2 Qutputz SETTING LABELS H CD CD SP iu y F ES lt After automatic arrangement execution gt z ec LL OO Input Input Output 7 EDITING ST fee PROGRAMS EDITING STRUCTURED N 2 e nc Lu t m 8 3 4 Overwriting input output variable with lines 8 9 r GX Works2 8 EDITING STRUCTURED LADDER PROGRAMS 8 3 6 Inserting and deleting rows and columns Insert and delete rows and columns Inserting rows and columns Insert a row or a column Operating procedure 1 Select Edit gt Insert Row Insert Column 0 Process Pulse 1 The cursor changes to 1 Or
251. utput Inputs m AND E AND_E Input ENG Input EN ENO IN cs IN Output IN __ IN 10 10 10 4 6 Assigning common devices to outputs of function with EN ENO 10 4 Changing Operating Conditions of Compilation B Precautions when the check box is not checked Uncheck the option to save the number of automatically assigned devices to be used Take precautions when performing this operation The following are the program examples which require precautions Program examples which require precautions Uncheck the option to assign the same devices to 1 and as shown below However even M3 M4 are OFF B9 may be ON since AND instruction without EN ENO is executed without execution condition M8190 is assigned to M8188 is assigned to 2 in the following program example Example of ladder M0 EN ENO B0 IN _ 1 IN an EL MZ2 lEN ENO 2 B2 IN B3 N i ob oen 2 M3 EN ENO B5 IN B6 AND E O M4 EN ENO B7 IN 10 4 6 Assigning common devices to outputs of function with EN ENO L VIL 7 AIT MEls 9 10 Q 5 DT 1 AMT MALAR 7 7 28 818 29 RST M8190 lt Compilation result of ladder block 1 gt Step Compile Result 0 LD BO 1 AND B1 2 OUT M818 3 LD MD 4 AND Mala DE AND B3 11 OUT M8186 12 LD M2 13 AND MALS 18
252. vice Name Relation please save the project after compiling LLI 2 Structure Device Setting Structure Array g datal Structi 4 d Struct1 O 0 Label Name Data Type Device Address n 1 2 3 Structure Array Offset Value PROGRAM CONFIGURATIONS Cancel Operating procedure e Set the items on the screen Item Description SETTING LABELS Display elements of the structure array in tree format Structure Array The device setting of the element selected in the tree is displayed in the right area of the screen Address For the subsequent array elements device names offset from the device number set for the start element are automatically set Word Device Bit Specify the device offset value to be set to the same data type cells in the array Structure Array Offset Device element Value Use Bit Designation Check this to specify a bit device of word device CD CD Label Name Display label names defined as the structure 5 HL Data Type Display data types set to data names im EP Set device names to be assigned in the Device Address column When o Device device name is entered in either column it is displayed in the respective format 9 automatically zY Device names can be entered for the start array element only ae 25 3 EO Point a amp Display on the Local Label Setting screen 8 For the Structure Device Setting scree
253. with the latch range Device Setting Range Ex When D 0 to 12287 latch D 5000 to 6000 are set on the lt lt Device gt gt tab of PLC parameters display range of D 0 to 12287 range of latch D 5000 to 6000 5 7 Setting Ranges for Devices Assigned Automatically FXCPU Screen display Select Tool Device Label Automatic Assign Setting Device Label Automatic Assign Setting gt Word Range Bit Range n R fe M 2 512 ta 999 3840 m ta 7679 z Timers Pointer 100ms Ej t Ej 5 p 2048 Taj 4095 EM 2 ans E Step Fl 220 t m Retentive 2048 1 Un 4095 NN to 3 Counters 100 ta Q a LL o dn OO OO ro D n Operating procedure e Select the device type and set the start and end addresses to be assigned automatically 5 7 1 Precautions on automatically assigned devices PROGRAM Sy CONFIGURATIONS Precautions when changing automatically assigned devices All programs need to be compiled when the range of automatically assigned device is changed Compiling all programs changes the device assignment to labels Therefore device values set before the program change remain on the device assigned labels For QCPU Q mode LCPU reset the programmable controller CPU clear all device memories including latches clear all file registers then switch the programmable controller to RUN for a precautionary
Download Pdf Manuals
Related Search
Related Contents
POAB - optiCompo electronics "user manual" Manuel d`utilisation 3452 Tester d`isolation Dell 2124 Network Card User Manual 941648 sound manual 2014-3-19 Contents FT TANIN SR (ES) - Institut Oenologique de Champagne User Manual MP44E - Physik Instrumente Maisonnette 5 pers/4 lits - VILLAGE KER-AR-MOR Experience the Copyright © All rights reserved.
Failed to retrieve file