Home

GX Works2 Version 1 Operating Manual

image

Contents

1. 1 Input pete Output IT The check box is selected The output can be connected directly to another input with a line x Q PLS Input ENO TT Input EN Input _IN Output lt lt gt lt LLI 2 10 4 5 Connecting PLS PLF or ALT outputs directly to other inputs with lines 10 9 A GX Works2 WT 10 CONVERTING COMPILING PROGRAMS 10 4 6 Using VAR_OUTPUT for an argument of function block Use VAR_OUTPUT for an argument of function block in an ST program Operating procedure 1 Select Tool Options Compile gt Structured Ladder FBD ST gt Compile Condition1 2 Select Allow VAR OUTPUT at FB call ST If this check box is cleared an error occurs when compiling programs 10 4 7 Assigning temporary arguments for arguments when calling function block Assign temporary arguments for arguments input output and input output when calling function block To retain the value in the function block and perform Online program change change the settings to set the temporary value for the device connected to the function block output argument after executing the function block Operating procedure 1 Select Tool Options Compile gt Structured Ladder FBD ST gt Compile Condition1 2 Select Add t
2. 11 5 IT 2 X 2 LLI oO Index 3 Microsoft Windows are trademarks or registered trademarks of Microsoft Corporation in the United States and other countries Ethernet is a trademark or registered trademark of Xerox Corporation All other company names and product names used in this manual are trademarks or registered trademarks of their respective companies SH NA 080781ENG X 1503 KWIX MODEL GXW2 VER1 O KP E MODEL CODE 13JU65 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
3. 8 13 8 5 Changing Type of Contact and Coil 8 15 9 5 1 Selling the type of contact and 8 15 8 5 2 Changing contact and coil in predetermined 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 8 19 8 6 3 Changing the number of arguments for functions and function blocks 8 20 8 7 Changing Display Format of Variables 8 21 8 7 1 Displaying variable names in multiple lines 8 21 8 7 2 Displaying instance names in multiple lines eee 22 8 7 3 Specifying the number of displaying characters for variable names 8 22 8 7 4 Changing display format of variable acer mte acte gn mane oe eee cee nt 8 23 8 7 5 Displaying additional label items 8 26 8 8 Editing Ladder Blocks 8 27 8 8 1 DIDEKS 03 ww 9379 wq b sada aca out 8 27 8 8 2 Deleting ladder blocks 8 27 8 8 3 Cutting copying pasting and moving ladder 8 28 8 8
4. 28 Work naga 7 window ADD TIME E E ADRSET E ADRSETP AND Ail i Watch 1 Cross Reference Information Condition Setting Device Label x8 Bit 1 8 i All Device Label v Print Device Label Bit 20 Find In Entire project Browse Bit xIxB Device Instruction Ladder Symbol Position Word Sianed 21718 4 48 Word Signed 0 0 Bit 1 1 1 8 Status bar English Structured L26 L26 P Host Ni 2 1 Overview of Screen Configuration 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 parameter setting and monitoring OVERVIEW Work window GX Works2 Version 1 Operating Docking window sub screen to support operations performed on a work Manual Common gt window 2 Display contents of a project in tree format Section 4 1 i zn LL Display list of functions such as function blocks used for Section 6 2 1 n programming 55 Output Display compilation and check results errors and warnings Section 10 6 i Display cross reference results 3 Display the device usage list rn Operating Display assignments of refresh devices and link devi
5. SETTING LABELS OPERATIONS OF PROGRAM EDITORS QO COMMON 4 Clickthe button 0 oz Y The following message is displayed Zo EU ac MELSOFT Series GX Works2 ME Selected unused label will be deleted EN Are you sure you want to continue 8 Caution It may take several minutes to delete if many windows are open e Unable to restore the deleted labels D H ra CD Ine Boe ua 2 9 6 Deleting unused labels 5 21 s GX Works2 v 5 SETTING LABELS 5 Clickthe xs button The selected unused labels are deleted The program becomes uncompiled status after the unused labels are deleted however the operation to delete unused labels can be continued while the Unused label list screen is being displayed Point Considerations when deleting unused labels The following are the considerations when deleting unused labels e After unused labels are deleted programs related to the deleted unused labels become uncompiled status e he Undo Redo operation under Edit cannot be selected after unused labels are deleted e Labels in user libraries and functions function blocks are not displayed on the Unused label list screen e When Create cross reference information after completion compile is selected under Tool Options Compile Basic Setting the Unused label list screen cannot be displayed 5 22 2 9 6 Deleting unused l
6. APPENDIX INDEX Appendix 1 3 Toolbar icons and shortcut keys for program editors App sT t GX Works2 w APPENDIX B Other shortcut keys The following table shows other shortcut keys for program editors icon menu 1 El cursor in the arrow direction the cursor in the arrow direction ee ee T _ j Seelthesceentotele Scroll the screen to the right Scroll the screen to the right the screen to the right _ Move the cursor to its leftmost position in the row Move the cursor to its rightmost position in the row Move the cursor to the start of the program DEBER Move the cursor to the end of the program Af jSearmge 0 00000 Select the range from the current position up to the start of the program Select the range from the current position down to the end of the program Delete the selected target App 8 Appendix 1 3 Toolbar icons and shortcut keys for program editors NOILISOd 214193845 lt 8 INDEX MELSOFT waTiouinoo ONLLH3JANOO VLVG 9NIQV3N ONLLISM ONISHO LINOIN 43sn ONISN lt gt SNOILdO SNILI3S X XIGNAddV Index 1 t GX Works2 WT INDEX A aiesg ee a UD M D 5
7. ES Structured Data Types ES StructuredDataTypes1 ES StructuredDataTypes2 12 ta Program Programi 6 Global Label Local Label Structured Data Types BS StructuredDataTypes1 BS StructuredDataTypes2 I Connection Destination Operating procedure 1 Selecta user library to be edited on the User Library view Multiple libraries can be selected 2 Select Project Library Open 4 The editing of the user library data is enabled Library password Password Cancellation Change to Editable If the library is protected with a password the Library Mame password needs to be entered to open the library for m editing When the password entry screen is displayed enter the library password Password 13 3 3 Editing user library 13 13 SEARCHING FOR SPECIFIC POSITION CONVERTING COMPILING PROGRAMS TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER CPU NO MONITORING USING USER LIBRARIES gt gt SETTING OPTIONS APPENDIX INDEX s GX Works2 v 13 USING USER LIBRARIES 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 editing disabled status when reopening the project B Disabling editing of user library data Disable the editing of user
8. MONITORING Disable Warning and Notification Message Disable Warning and Notification Message Disable Warning Codes Add Disable Warning Codes Add 000 2880 000 2880 2055050 2055050 5 ct 02508654 02508654 USING USER LIBRARIES Point Warning codes Warning codes and their content can be checked on the Output window when compiling programs 2 Cs Section 10 6 2 e Maximum number of warnings to be invalidated o A maximum number of warnings to be invalidated is 100 E LLI CD X a 2 A A gt lt LLI zZ 10 4 2 Hiding warning messages 10 7 s GX Works2 v 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 gt Compile gt Basic Setting 2 Select Use the same label name in global label and local label f all check boxes are cleared an error occurs when compiling programs e f this check box is selected 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 Options Compile gt Structured Ladder FBD ST gt Compile Condition1 2 Select Use lowe
9. SEARCHING FOR SPECIFIC POSITION 2o zo gt lt 2 2 OOO 1 TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER CPU s No MONITORING USING USER LIBRARIES 14 SETTING OPTIONS INDEX APPENDIX D A GX Works2 14 SETTING OPTIONS Tree item Wem O Explanation Reference Display label name comment of contact or Set display lines and characters per line Section 8 7 1 coil in multiline Select whether to display the device which is assigned to the label or corresponding to address at the same time when Label is selected from Device View mode Users can neither edit the displayed device nor set them to the Find Replace target at the same time Select whether to display the address which is assigned to the label or corresponding to device at the same time when Label is selected from Address View mode Users can neither edit the displayed address nor set them to the Find Replace target at the same Label time Select whether to display the label comment which is assigned to the label at the same time when Label is selected from View mode Users can neither edit the displayed label comment nor set them to the Find Replace target at the same time Section 8 7 5 Label Comment Select whether to display device comment which is assigned to device or address when Label is Structured selected from View mode Cannot display device
10. are displayed in red when EI i Parameter the project is uncompiled EE l Intelligent Function Module 44 Intelligent Function Module Global Device Comment Global Device Comment Global Label Global Label Globalt Data before compilation and 05 data in which a compilation Program error occurs are displayed in red E Program POUOL POUOL 2 POUO2 M POLO2 Program 3404 a Local Label 2 Program 5 Pouos Data other than compilation ig Local Label Program 09 000 0104 2 ym target is displayed in blue dli FBIFUN 000 0104 ES Structured Data Types The characters on the title bar are displayed in white after compilation is completed Data other than compilation target is displayed in blue Compilation target data when compiling all programs 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 Initial program e Scan program Program program file Fixed interval program 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 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
11. sul Save as Iype User Library sul L ancel 1 Selecta library name to be saved on the User Library view Multiple libraries can be selected 2 Select Project Library Save As The Save Library as screen is displayed 3 Seta file name 4 Click the Sse button The user library data are saved to the library file 13 2 4 Saving library file 13 5 SEARCHING FOR SPECIFIC POSITION CONVERTING COMPILING PROGRAMS TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER CPU s No MONITORING CD USING USER LIBRARIES o SETTING OPTIONS APPENDIX INDEX t GX Works2 WT 13 USING USER LIBRARIES B Saving library files save the user library in the library file Operating procedure 1 Selecta library name to be saved on the User Library view Multiple libraries can be selected 2 Select Project Library Save The user library data is saved in the library file 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 Paths and file names can be checked in the property of user library Applying file changes to other projects To apply the changes to library files in other projects update the user libraries in each project in advance Section 13 3 4
12. 21 LD B5 22 AND B6 23 OUT M8187 24 LD M3 25 7 26 30 When M3 and M4 are OFF 31 8 ee the execution result is 34 AND MALSA not stored on M8190 2 SET m8188 M8188 ES M8188 37 38 39 D 190 40 AND M8188 B9 may turn ON even when and 4 are OFF OLIT B9 10 12 10 4 8 Assigning common devices to outputs of function with EN ENO 10 4 Changing Operating Conditions of Compilation Example of program which outputs the correct result Create a program as indicated below to output the correct operation result to B9 x e Use instruction AND_E with EN ENO to output instruction i Regard logical AND of input AND E s execution result as output s execution condition EN ro dO OW lt Example of ladder program gt lt Compilation result of ladder block 1 gt pu Step Compile Result 0 1080 M EN ENO 1 AND B1 Bo IN 2 OUT M8178 ra BEEN 4 s SET M8182 Z nn BEEN 6 LD 22 7 M8178 M2 ENO I B2 zz B3 _IN Pes Du 558 M 12 LD M2 OLONE 2 13 AND M8177 M3 EN ENO 14 SET M8180 1 B5 IN 15 LD M2 B6 IN 17 RSTM icO 18 LD MD LLI MUNDI 19 AND M2 xam TRE 20 OUT M8179 lt lt M4 ENO 22
13. Display hide the Navigation window Common it DEBER Element Selection Display hide the Element Selection window Section 6 2 1 Output Display hide the Output window Section 10 6 B Other shortcut keys SEARCHING FOR SPECIFIC POSITION CONVERTING COMPILING PROGRAMS The following table shows other shortcut keys that are available regardless of the editing target Shortcut key Corresponding menu Reference Rename Rename the name of the selected data or Common library on the Navigation window Section 13 2 2 Common TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER CPU d N MONITORING USING USER LIBRARIES JD SETTING OPTIONS APPENDIX INDEX Appendix 1 1 Common toolbars and shortcut keys App 3 A GX Works2 WT APPENDIX Appendix 1 2 Toolbar icons and shortcut keys for setting labels The following explains the toolbar icons and the corresponding shortcut keys used for setting labels B Label toolbar icons The following table shows the Label toolbar icons and the corresponding shortcut keys sni insert New Declaration Before Add a row above the cursor position co New Declaration After Add a row below the cursor position Section 5 5 5 Du x shift Delete Row Delete the row at the cursor position Read from CSV File Read label settings from the CSV file Section 5
14. GLOBAL Product Data Detail Setting Detail Setting Struct VAR BLO BAL Praduct Data 10 9 Detail Setting 5tructl Array Structure Device Setting Structure Array Product A Data Struct1 10 Label Name Data Type Device Address STRUCT1_datal Word Signed STRUCTI data2 WordSiged CT Cd TRUCT1_data3 TSS ISTRUCTI_data4 DoubeWordSioneed TC STRUCT1_data5 FLOAT Single Precision PROGRAMMING CONFIGURATIONS 4 PROCEDURE Structure Array Offset Value PROGRAM Cancel Operating procedure 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 from the tree is displayed on the right area of the screen Label Name Display label names defined in the structure 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 in the respective format automatically Address Device names can be entered for the start array element only For the subsequent array elements device names offset from the device number set for the start element are automatically set Structure Array Word Device Bit Device Specify the device offset value to be set in the array element Offset Value Use Bit Designa
15. 4 7 programming language ppp 1 2 6 3 PrOjeCT VIEW 2 3 4 2 egi eT 4 8 4 11 R reading symbolic information from programmable controller S CPU NOE PEE E A N 11 5 i 2 RE 8 15 IU M 8 4 O OM S 8 4 oc Mv ee 8 15 3 1 2 6 3 Zog Shortcut Key treten tte App 2 lr Simple A 22 elei InSrt cllOl A 22 6 5 c 1 2 7 2 1 IO 6 5 7 2 LM Structure Device 5 26 lt ILC DUP CG Elba 1 2 265 OX Structured Ladder FBD 2 8 2 Structured Ladder FBD editor 6 5 8 2 o Structured project 1 2 See T Eaa 1 4 D c p 4 3 ssa a H 2 3 App 2 ers HH 6 14 9 U n ROI 13 2 User Library VIEW ss 13 3 2 V 2 nao variable 8 19 8 21 8 39 W o EE T T 10 6 10 7 2 3 m writing symbolic information from programmable controller E s
16. 5 FO Ow WA H e m H CD c Z O LADDER FBD PROGRAMS t GX Works2 WwW 5 SETTING LABELS 5 1 The Type of Label Setting Editor This section shows label setting editors Labels are set on each screen below according to the type of label Global Label Setting screen Define labels that can be used for all POUs in the project Navigation E Project CA 5 2 Ah ia Global Label Setting Global BEE Class Label Name pa Type Constant Device Address Comment Remark Relation with System Label System Label Name Attribute VAR_GLOBAL TransportComplete it M100 2 100 VAR GLOBAL Emargency Stop Switch 5 L M101 2 MX0 101 Bit 9 van GLOBAL Poke A Daa Suc MM Bt a FE i VAR GLOBAL goba bio et S 10 pssese Intelligent Function Module Global Device Comment Global Label 4 Pragram Setting 3 POU DANO 4 CO Pho System label is reserved to be registered System label is reserved to be released 0 The system label is already registered to the system label database execute the Reservation to Register Release for the system label reflection to the system label database is required g Please execute Reflect to System Label Database Reservation to Release S
17. APPENDIX INDEX s GX Works2 WwW 10 CONVERTING COMPILING PROGRAMS 10 6 1 Correcting errors and warnings Check and correct errors warnings Operating procedure 1 Double click the error warning message displayed on the Output window The corresponding error location in the program is displayed Output Rebuild All Resuk Name Class content Error Code POU 01 Program compile Wrong device or label Not declared Ladder Black T 1001 Program compile mismatch on Black 1 C2017 Double click 2 Error Error 2 Waring Check aming gt EMO peed s d r HMoator al 2 Check the corresponding error location and correct the error as instructed by the error warning message 10 24 10 6 1 Correcting errors and warnings VAN MELSOFT SS 41 WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU This chapter explains how to write read sequence programs to from the programmable controller CPU or memory card or O LL O Z I O X lt 00 SPECIFIC POSITION CONVERTING COMPILING PROGRAMS Y Y For the overview of the data write read operation refer to the following manual 5 GX Works2 Version 1 Operating Manual Common TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER CPU 12 11 1 Wri
18. CONFIGURATIONS PROCEDURE 2 Click the element 3 Drag it to the desired position Inputl Output 1 rw J 0 LLI 8 4 2 Moving elements with lines connected lt 2 F Enable the Auto connect function and move an element with the lines connected 6 Operating procedure T 1 Select Edit gt Auto Connect 26 E The cursor changes from to h 255 Son 2 Click the element m gt 3 Drag it to the desired position The element moves with the lines connected l a ww Inputl Output l EDITING ST PROGRAMS EDITING STRUCTURED a CD LZ QO 32 Ta 8 4 1 Moving elements 8 17 s GX Works2 w 8 EDITING STRUCTURED LADDER FBD PROGRAMS Point Bend points of the line The bend points of the line when the element is moved are at the adjacent points of elements Bend point gt TO l gt bend point can be changed to any desired point by adding a bend point on line as shown below When adding a bend point select Edit Interconnect Mode Interconnect Mode Select Move the element xD a pr 4 m gt A x pA CO A bend point is added Added bend point Note that when deleting the added bend point delete not only the line but the bend point as well as shown below Select
19. Class setting When an item other than the class such as a label name and data type is set in a blank column VAR is automatically set for Class Change it if necessary Characters that cannot be used for label names Any of the following label names causes an error at compilation A label name that includes a space e A label name that begins with a numeral e A label name which is same as the one used for devices For Structured Ladder FBD and ST programs lower case device names can be used as labels by setting the option Section 10 4 4 OVERVIEW For details refer to the following manual 5 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 Cs Section 5 8 The assigned devices can be checked with the cross reference function I 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 necessary Data type set on Result Type can be used Example Set return value of function name FUN 01 to 0 Structured Ladder FBD SCREEN CONFIGURATION PROGRAMMING CONFIGURATIONS PROCEDURE ST
20. MITSUBISHI Ten A V ELECTRIC Engineering Software GX Works2 Version 1 Operating Manual Structured Project 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 WARNING and A CAUTION Indicates that incorrect handling may cause hazardous conditions resulting in WARNING death or severe injury Indicates that incorrect handling may cause hazardous conditions resulting in minor or moderate injury or property damage CAUTION 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 NWARNING When data change program change or status control is performed from a personal computer to a running programmable controller create an interlock circuit
21. 8 10 9 Inserting comment entry fields to ladder blocks to be 8 11 X Checking Wrapping Position for Printing SEARCHING FOR SPECIFIC POSITION 9 1 Searching for Specific Position in ST Program 9 1 1 Jumping to specified line 9 1 2 Using DOCKMOIKG apes ic e on 178 1 3 100 EEEE EEEE TEETE ERR EORR 9 2 Searching for Specific Position in Structured Ladder FBD Program 9 2 1 Jumping to specified ladder block CONVERTING COMPILING PROGRAMS 10 1 Converting Compiling Created Programs 10 2 Compiling All Programs 10 3 Executing Online Program Change Simultaneously with Conversion Compilation 10 4 Changing Operating Conditions of Compilation 10 4 1 Changing the number of errors and warnings that stop compilation 10 4 2 Hiding warning messages uusnddcdos lk owed ow SS dC EROR ed ee eee 10 4 3 Using same name for global label and local label 10 4 4 Using same lower case label name as 10 4 5 Connecting PLS PLF or ALT outputs directly to other inputs with lines 10 4 6 Using OUTPUT for an argument of function 10 4 7 Assigning temporary arguments for arguments when calling function block 10 4 8 Assigning c
22. a Display list of ladder blocks program of ladder blocks in a program Section 8 8 5 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 Toggle Contact Open Contact gt Close Contact Coil Normal Negation Set Reset Find Replace function for editing in Structured Ladder FBD Reference Jump Jump to the specified ladder block number Section 9 2 1 1 10 1 3 3 List of functions for editing in Structured Ladder FBD 1 3 List of Functions View function for editing in Structured Ladder FBD Reference View Mode Display variables by its entered format Display devices addresses in device format Devices assigned Device E to labels are displayed in device format x Display devices addresses in address format Devices assigned Address to labels are displayed in address format 2 Display devices addresses in device comment Labels are Comment displayed in label comment Change Label Device Address Switch the display format in order label device address 2 lt Change Label Comment Mode Switch the display between label and comment 5 i Section 8 7 4 eO Add Label Display Items mm X Display devices assigned to labels Display addresses assigned to labels 3 Label Comment Display label comments assigned to labels Display device co
23. wv 64 2047 RETAINRange Latch 1 Tlath 10 O El Retentive Timer VAR Range st 10 VAR RETAINRange Latch 1 STLatch 10 Counter VAR Range cju VAR RETAINRange Latch 1 CLatch 10 Latch 1 Able to clear the value by using a latch clear Latch 2 Unable to clear the value by using a latch clear Clearing will be executed by remote operation or program van Renge p ie v 200 09 0 0 0 0 CONFIGURATIONS 4 PROCEDURE 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 SETTING LABELS Operating procedure Setthe items on the screen Item Description Select latch 1 or latch 2 Latch selection field This item can be selected when the range of latch 1 latch 2 is set on the lt lt Device gt gt tab of PLC parameter Device Display the devices to be assigned automatically OPERATIONS OF PROGRAM EDITORS QO COMMON Digit Display whether the range of device assignment setting is in decimal or hexadecimal Assign Selection Select the devices
24. 13 6 13 2 4 Saving library file 13 2 Creating User Library 13 2 5 Deleting user library from project Delete a user library from the project SEARCHING FOR SPECIFIC POSITION Operating procedure 1 Selecta library name to be deleted on the User Library view Multiple libraries can be selected 2 Select Project Library Deinstall The selected data is deleted CONVERTING COMPILING PROGRAMS 6 1 Deleting user library lt a The saved library file is not deleted even if a user library is deleted zm All POUs using the deleted library file become in the uncompiled status Compile the program again GS za ESS 2 O H Z O gt CD USING USER LIBRARIES D SETTING OPTIONS APPENDIX INDEX 13 2 5 Deleting user library from project 13 7 t GX Works2 WT 13 USING USER LIBRARIES 13 2 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 Select Project Library Change Password Password of Library Setting Library Mame UserLib Password Setup Old Password pee Mew Password Confirm Password Cancel Operating procedure 1 Set the items on the screen Item Description Library Name Display a librar
25. 2 Click the button The selected library file data are installed and the library name is displayed on the User Library view The user library is in the editing disabled status after the data are installed Enable the editing status of the user library for editing Section 13 3 3 13 10 13 3 1 Installing user library data to project 13 3 Using User Library Point P e Maximum number of user libraries The maximum number of user libraries that can be created in a project is 800 When the data name of the global label is duplicated between the library file to be installed and project The following screen is displayed when installing user library and the data name of global label can be changed on the screen SEARCHING FOR SPECIFIC POSITION Change the Data Mame of Global Label Data name shown below overlaps with the one of the target project To change the data name of the library to install please enter new name for the project after installing this library Users are able to change the data name after installing the library Data Mame in Librar Data Mame after Installing Global OoOO O Globali Globali d CD 2 2 lt bee 220 OOL TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER CPU s No MONITORING 13 USING USER LIBRARIES D SETTING OPTIONS APPENDIX INDEX 13 3 1 Installing user library data to project 13 11 t GX Works2 WT 13 US
26. Appendix 1 3 Toolbar icons and shortcut keys for program editors App 5 A GX Works2 APPENDIX B Structured Ladder FBD toolbar icons and shortcut keys The following table shows the toolbar icons and the corresponding shortcut keys for the Structured Ladder FBD editor icu Shortcut key Corresponding menu Reference zi Change the input mode for positioning Select Mode EIE Section 8 4 LP Interconnect Mode Change the input mode for drawing lines Section 8 3 2 zi j Guided Mode Guided Change the input mode for entry with Editing keyboard Section 8 10 Guided Mode Auto Add a comment entry field at the start of the TIE r i A E ladder block added in Guided editing gy Connect the start and end points to draw a Auto Connect iactat calls Section 8 3 3 ws row in the ladder program being md Section 8 3 6 x Hou column in the ladder program being m New Ladder Block Insert a new ladder block in front of the 5 E ladder block being edited New Ladder Block Insert ladder block in back of th ew Ladder Bloc nsert a new ladder block in back of the r A 5 i ladder block being edited Input Instruction Open the Input Instruction screen Section 8 2 2 aa Power Rail Display hide the left power rail Section 8 8 7 m Open Contact Insert an open contact at the cursor position t a Close Contact Inser
27. CONDITIONS OF USE FOR THE PRODUCT 1 Mitsubishi programmable controller the PRODUCT shall be used in conditions 2 7 i where any problem fault or failure occurring in the PRODUCT if any shall not lead to any major 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 INSTRUCTION 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 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 e Railway companies or Public service purposes and or any other cases in which establishment of a special quality assurance
28. CONFIGURATIONS PROCEDURE TIMER 10 FB M 10ms timer TIMER CONT FB Retentive timer PROGRAM OPERATIONS OF PROGRAM EDITORS BS CN NS SES COMMON EDITING ST PROGRAMS H e m H CD c Z O LADDER FBD PROGRAMS 2 6 1 Considerations of automatically assigned devices 5 33 LE GX Works2 v 5 SETTING LABELS 5 9 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 B Writing label setting data Write label setting data to CSV files Operating procedure 1 Select Edit Write to CSV File amp The following message is displayed MELSOFT Series GA Works A Currently displayed label information will be written to CSV File Are vou sure vou want to continue Caution Structure device setting information will nat be writter 2 Clickthe s button The Write to CSV File screen is displayed Write to C5V File Save In GX works amp t Fe ip Global CSV Recent Documents Desktop Documents Computer Places save as type delimited Cancel 3 Enter the file name to be saved and click the Save button The label setting data is saved in the save destination 5 9 Writing Reading Data to from CSV Files B Reading lab
29. D device 8000 to 8191 ZR device 0 to 1023 Device to be assigned Assign ZR for temporary variable Example 2 Device automatic assign setting Set the following device range D device 8000 to 8191 e W device 0 to 1023 Device to be assigned Assign W for temporary variable B Checking usage of automatically assigned devices The usage of devices within the range set on the Device Label Automatic Assign Setting screen can be checked when compiling programs After programs are compiled the usage of device points and device assignment range are displayed on the Output window No Result DataName Class Error Code 1 Information Word device VAR range 75 points used Range D11061 D11135 30 2 Information Bit device VAR range 25 points used Range M8167 M8191 3 Information Pointer VAR range 1 points used Range P150 P150 4 Information Timer VAR range 1 points used Range T511 T511 5 Information Counter VAR range 1 points used Range C511 C511 Error 0 Waming 0 Displaying usage of device assignment range Assigned devices from the minimum number to the maximum number are displayed for the usage of device assignment range When Build is executed repeatedly after changing deleting labels the devices which are not used are included in the usage points Execute Rebuild All to display the correct usage of the device assignment range 10
30. Ladder Editor comment which is assigned to label while using label Users can neither edit the displayed device comment nor set them to the Find Replace target at the same time Device Comment FBD Dessen Select whether to display label registration Section 8 2 2 selection dialog when entering new labels Wrap instance name for Select whether to wrap function block instance Section 8 7 2 function block name at the function block width Specify the number of Specify the number of display characters of Section 8 7 3 enable characters for label name comment Automatic input output Select whether to add input output label when labels function block or function is pasted Automate ENO labas e IO ACE SINN ee eee Section 8 6 1 function block or function is pasted FB FUN Add Automatic Output Select whether to add output variable in Variable to VAR IN OUT VAR IN OUT when function block is pasted Select whether to overwrite I O label with a grid function or function block label Pin overwrites line when ruling a grid line over function or Section 8 3 2 function block Double clicking opens Select whether a label editor is displayed when header function or function block is double clicked D Section 6 2 9 Double clicking opens Select whether a program editor is displayed body when function or function block is double clicked 14 4 14 2 Option Setting List Tree item tem O Explan
31. PROGRAMMING CONFIGURATIONS PROCEDURE 6 2 4 Changing display size of editing screen Change the display size of editing screen Display size of all ST editors and Structured Ladder FBD editors is changed PROGRAM B Changing display size by specifying a magnification ratio Screen display Select View Zoom Set Zoom Factor Zoom Magnification C 200 C 150 10095 C 75 C gg Specify 87 5 OPERATIONS OF NGC Esse SETTING LABELS COMMON Operating procedure the items on the screen Item Description EDITING ST PROGRAMS 200 150 100 75 50 Change the display size of editing screen with a selected magnification Specify Set a magnification specified by every 12 5 H e m H CD c Z Lr O LADDER FBD PROGRAMS 6 2 3 Undo and redo 6 11 s GX Works2 v 6 COMMON OPERATIONS OF PROGRAM EDITORS B Changing display size Operating procedure Select View gt Zoom Increase Zoom amp Decrease Zoom The editing screen is zoomed in out in increments of 12 5 6 2 5 Splitting editing screen oplit the editing screen one above the other Operating procedure Drag the split bar on the scroll bar of the editing screen Split bar LDP EN ENO Var Flag 8 vor Drag the split bar LDF EN ENO
32. QO 39 Ta 8 3 4 Overwriting input output variable with lines 8 9 t GX Works2 WT 8 EDITING STRUCTURED LADDER FBD PROGRAMS 8 3 6 Inserting and deleting rows and columns Insert and delete rows and columns B Inserting rows and columns Insert a row or a column Operating procedure 1 Select Edit Insert Row Insert Column Process Pulse The cursor changes I to Process Pulse 2 Click the position where a row or column is inserted A row or column is inserted by each click Inserts a column by each click B Deleting rows and columns Delete a row or a column Operating procedure 1 Select Edit Insert Row Insert Column The cursor changes I to Shift click Process Pulse 1 2 Hold down the tt key and click the position where a row 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 Elements 1 8 4 Operating Elements if This section explains how to operate elements such as contacts and coils in the Select mode 2 8 4 1 Moving elements Disable the Auto connect function and move an element SCREEN CONFIGURATION Operating procedure 1 Select Edit gt Select Mode gt The cursor changes to PROGRAMMING
33. TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER CPU s N Program UserLib1 file rni 1 D Content is changed h Program 5 in another project Local Label Global Label Z z gt 3 Execute Reload 1 3 H Local Label 4 Changed content is updated UserLib1 file USING USER LIBRARIES 6 Point Compilation status of POUs 2 When user library is updated all POUs using the updated user library become uncompiled status Editing status m e Before using this function enable the editing of the user library data gt Section 13 3 3 When this function is completed the editing of the user library data is disabled X a 2 an A gt lt LLI zZ 13 3 4 Updating user library 13 15 s GX Works2 WwW 13 USING USER LIBRARIES 13 3 5 Displaying user library help Display a help set to a user library Specified files created in the following formats can be set as help data Windows help file hlp HTML help file chm Text file txt For setting a help refer to Section 13 2 7 Screen display Select Project Library Help HTML help file chm Windows help file hlp E LibraryHELP2 BR lt Windows HELP File Edit Bookmark Options Help gt Back Forward Contents Index Search Operating procedure 1 Selecta libr
34. The monitoring values of labels other than bit type labels and word devices are displayed to the right of the corresponding labels or devices Monitoring value of RadianAngle B Hadian amp ngle 0 55 6 d 0 8525 Displaying monitoring values e Monitoring values of FB I O arguments can be checked with the tooltip For the display method of the tooltip refer to Section 6 2 8 Monitoring value of CosVal 2358 INT Outi Out 1 MyFB 3 MyFB 4 SO415 0 IN1 INT M43 When the labels are used for array element or when the elements are not specified for array or structure the monitoring values are not displayed The monitoring values on tooltip are not displayed either In this case check monitoring values of array or structure on the Watch window Inputl COS gm EN ENO d Arraylhl index 0 0 12 10 12 6 Setting Monitoring Conditions 12 6 Setting Monitoring Conditions Set a monitoring condition of Structured Ladder FBD and ST editors Monitoring starts when the specified condition is satisfied Operating procedure 1 Select Online Monitor Monitor Condition Setting while the program is being monitored The Monitor Conditions Setting screen is displayed Monitor Conditions Setting Monitor value will be di
35. The selected element is entered and the line is connected automatically to the left hand horizontal PROGRAM EDITORS SETTING LABELS direction 02 E Om BO UON Oo Poin 72 Entering position of elements When entering an element dragging an element moves the entering position of the element This function is useful when creating a ladder in parallel as shown below EDITING ST PROGRAMS EDITING STRUCTURED a CD LZ QO 32 Ta 8 3 1 Connecting lines automatically when entering elements 8 7 24 GX Works2 8 EDITING STRUCTURED LADDER FBD PROGRAMS 8 3 2 Connecting elements with lines Connect elements with a line Operating procedure 1 Select Edit gt Select Mode i Interconnect Mode For the Interconnect mode the cursor changes gF 2 For the Select mode click the start position of the line ABS EN The cursor changes to OIN 2 ABS 3 Drag the line from start position to the end 2 E EM __ position A line is drawn in a vertical or horizontal straight line Input ABS EN ENO N 8 3 3 Connecting lines automatically Connect lines automatically by specifying the start and end points Operating procedure 1 Select Edit gt Auto Connect For the Interconnect mode the cursor changes from to T Ci je 2 Click the st
36. t GX Works2 w 8 EDITING STRUCTURED LADDER FBD PROGRAMS Copying elements to other ladder blocks Elements cannot be copied or moved to other ladder blocks with the drag and drop operation when the Auto connect function is enabled In order to copy or move elements execute one of the following operations e Dragging and dropping while holding down the key or Disable the Auto connect function Using a clipboard Select Edit Auto Connect to switch the Auto connect function ON OFF Copying elements with the drag and drop operation when the Auto connect function is enabled The line of the copied element is connected automatically when the Auto connect function is enabled If the line is not connected properly or elements are overlapped disable the Auto connect function by selecting Edit Auto Connect clear the check box and correct the line Copying elements without lines connected Even when the Auto connect function is enabled the selected element can be copied without lines connected by dragging and dropping the element while holding down the Cutting copying elements using a clipboard When cutting or copying elements using a clipboard the selection range differs between left clicking and right clicking of a mouse Select the menu by left clicking on the element to delete lines and the element Select the menu by right clicking on the element to leave the lines and delete
37. 1 Select Find Replace Bookmark Bookmark List 2 All registered bookmarks are displayed Bookmark List Program Content 1 var z war03 lt 54321 THEN Delete All END IF gt Close Select a bookmark to which the cursor jumps Click the Jump button or double click the selected line The cursor moves to the line where the bookmark is set Click the Delete ll button to cancel all bookmarks Moving to the next bookmark Select Find Replace Bookmark Next Bookmark Jh 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 The cursor moves to the start of the line where the preceding bookmark is placed Deleting all bookmarks Select Find Replace Bookmark Delete Bookmarks All bookmarks are deleted 9 1 2 Using bookmarks SEARCHING FOR SPECIFIC POSITION CONVERTING COMPILING PROGRAMS CONTROLLER CPU WRITING READING DATA TO FROM PROGRAMMABLE s No MONITORING USING USER LIBRARIES o SETTING OPTIONS APPENDIX INDEX s GX Works2 Z 9 SEARCHING FOR SPECIFIC POSITION 9 2 Searching for Specific Position in Structured Ladder FBD Program This section explains how to search for a specific position in the Structured Ladder FBD program For searching for devic
38. 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 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 PrgemName 0 Commen EEN US 1 bPHmS 93 3 EHE 3 A 3 M ER 3h J a w 3 Set the items the screen Maximum Item Description number of characters Enter a program block name Program Name Click to set a program block name on the Program Selection screen Enter comments for the program block Comment A new line can be inserted into a cell by pressing the Enter 1024 keys Point P 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
39. 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 5 GX Works2 Version 1 Operating Manual Common Point Global labels Labels defined in the global label setting on the User Library view can be used in the programs on the Project view Labels defined in the global label setting on the Project view can also be used in the programs on the User Library view The label names defined in the global label setting on the Project view and the User Library view cannot be overlapped System labels Global labels on the Users 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 4 13 2 2 Changing library name 13 2 4 Saving library file oave 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 name Save the user library under a specified name Screen display Select Project gt Library Save As Save Library UserLibrary id Music T Pictures sul Documents Desktop Documents Computer Places Operating procedure 13 2 Creating User Library Network File name
40. Cancel Device Display The device format display of all program editors is canceled and the display returns to the entered format 8 24 8 7 4 Changing display format of variable 8 7 Changing Display Format of Variables Point P 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 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 5 lt Device format display gt lt Comment display gt 2 cos ENO a D12286 87 s d Cas Val RadianAngle Result 9 Structure function block labels Structure function block labels are displayed as label names even when the display format is changed to the comment display SCREEN CONFIGURATION Label format display Comment display arinsti Memberi artinsti Member Einst lember Comment Srinsti LIserFE2 1 C serF amp Comment Ser PROGRAMMING CONFIGURATIONS PROCEDURE UserFB1 Outputi Constant type labels When the display format is device format constant type labels are displayed as constants set in a label setting editor When the display format is address f
41. Create a program file Select Project view Program Setting program setting and perform the following operation e Select Project gt Object New GX Works2 Version 1 Create a task Operating Manual Common Select Project view Program Setting program setting program file and perform the following operation e Select Project gt Object New IL 2 Registering program blocks to the task Procedure Reference Display the Task Setting screen GX Works2 Version 1 Select Project view Program Setting gt program setting gt program file gt task Operating Manual Common Set program blocks to be registered to the task Section 4 2 2 IL 9 Setting executing condition Procedure Reference Set the executing condition execution type of the program file Set the executing condition on the Property screen of the task Section 4 2 3 Select the task and perform the following operation e Select Project gt Object Property 4 2 1 Procedure for creating program files and tasks 4 3 COMMON H e m H CD Z Lr O PROCEDURE OVERVIEW SCREEN CONFIGURATION PROGRAMMING OPERATIONS OF PROGRAM EDITORS SETTING LABELS EDITING ST PROGRAMS LADDER FBD PROGRAMS s GX Works2 v 4 PROGRAM CONFIGURATIONS
42. OZ B IN 23 OUT M8176 zS B8 _IN 24 LD M8179 25 AND 8176 LU QC Lu 26 SET B4 27 LD M8179 292 Regard logical AND Use instruction RS E of input AND AND E with mE execution result as EN ENO uu 12 output s execution Compilation result of ladder block 2 CO n d iti O n Step Compile Result 3 LD B5 7 E 2 33 LD M3 34 AND M8178 35 SET M8182 36 LD M3 2 38 2 39 1087 gt 40 AND B8 41 OUT M8177 42 LD M4 43 AND M8177 44 SET M6180 45 LD M4 46 M8177 47 RST 8180 Store logical AND 49 50 of input AND_E s execution result on DE 53 7 2 5 SET B9 8179 o tn 57 2 1 gt Only when M3 and M4 are ON the operation result is stored on B9 D SETTING OPTIONS APPENDIX INDEX 10 4 8 Assigning common devices to outputs of function with 10 13 La GX Works2 WT 10 CONVERTING COMPILING PROGRAMS 10 4 9 Retaining bit type outputs of functions Retain bit type outputs of the target function s Operating procedure 1 Select Tool gt Options Compile gt Structured Ladder FBD ST gt Compile Condition2 2 Select the function s to be set e f all check boxes are cleared bit type outputs of function s are not retained An operation equivalent to the OUT instruction f the check box es is selected bit type outputs of
43. PRG Program ST ST FOR counter 0 TO 10 BY 2 DO 2 Select Auto Indention 7 MAIN ST PRG Program ST FOR counter z TO 19 Br 2 DO 3 Enter the ST control statement to the ST editor such as a FOR statement When a line feed is inserted the next line is indented based on the content of the statement OPERATIONS OF mul PROGRAM EDITORS SETTING LABELS COMMON EDITING ST sten IS H e m H CD c Z Lr O a eo LZ OF QO 7 1 1 Writing ST programs 3 GX Works2 EDITING ST PROGRAMS 7 1 3 Setting tab length oet a tab length in the option setting Operating procedure 1 Select Tool Options Program Editor gt ST 2 Set Tabulator Length in ST 7 4 7 1 3 Setting tab length 7 1 4 7 1 ST Editor Using templates Insert templates correspond to the instructions functions control syntax on the ST editor A template of argument is inserted when an instruction or function is entered from the Element oelection window with the drag and drop operation A template is an argument data type defined for each instruction function or a format of control syntax For details of data types and formats displayed in the templates refer to the following manual 5 MELSEC Q L F Structured Programming Manual Fundamentals Operating procedure 1 Move the cursor to the instruction function control syntax entered to the
44. WRITING READING DATA CONTROLLER CPU 12 13 1 Procedure for Using User Library 13 2 13 2 Creating User Library 13 3 _ 13 3 Using User Library 13 10 CD USING USER LIBRARIES D SETTING OPTIONS APPENDIX INDEX 13 1 t GX Works2 WT 13 USING USER LIBRARIES 13 1 Procedure for Using User Library 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 Operating procedure 1 Create a user library Procedure Reference Create a new user library Section 13 2 1 Create data for the user library Section 13 2 3 Save the user library under a specified name Section 13 2 4 2 Utilize the library Procedure Reference Utilize the user library to a project Section 13 3 1 Create a program using the user library Section 13 3 2 IL J Editthe user library and update the library file data Procedure Reference Change the setting to enable or disable editing of the utilized user library data Section 13 3 3 Update the user library data Section 13 3 4 13 2 13 2 Creating User Library 13 2 Creating User Library SEARCHING FOR SPECIFIC POSITION This section explains how to create a user library 13 2 1 Creating user libraries Create a new user library Select the User Library view of the Navigation window and follo
45. e LLI LADDER FBD PROGRAMS 2 6 4 Assigning devices to structure array labels 5 29 LE GX Works2 WwW 5 SETTING LABELS 5 7 Checking Duplications of Devices Assigned to Global Labels This section explains how to check duplications of devices assigned to global labels The result of the duplication check is displayed on the Output window B Checking duplications of device names Operating procedure 1 Select Tool Check Device Duplication of Global Label Duplications of device names set on the device columns of the Global Label Setting screen are checked The result is displayed on the Output window 2 Double click the result displayed on the Output window The corresponding error location in the program is displayed The duplicated devices are displayed in red For checking duplication results refer to Section 10 6 Check Device Duplication of Global Label Result Data Mame Class Content Error Code 1 Warning Globall duplication Duplication Found in devices Global1 Row 1 Transport_Complete M100 and Globali Row 2 Em Row 1 Error 0 Warning 1 Device names to be checked for duplications Character strings set on the device columns of the Global Label Setting screen are checked All global label data except for those of user libraries in a project are the target Note that however if the character strings set on the device columns are not support
46. 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 instructions Using Ladder Diagram Using Sequential Function Chart Using Structured Ladder FBD or Structured Text 5 Details of instructions in each programming language for FXCPU Learning the types and details of basic application instructions descriptions of devices and parameters Learning details of specifications functions and instructions of SFC Learning the fundamentals for creating a structured program Learning the descriptions of devices parameters and error codes Learning the types and details of sequence instructions Learning the types and details of application instructions Details ER Details Details 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 This section explains how to create ladder programs and functions for creating ladder programs on structured ladder FBD editor The structured ladder FBD editor is a language editor in graphic format for c
47. memory 2 X im fi a 2 11 3 s GX Works2 v 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 Select all Selects all data displayed on the list Cancel all selections Cancels the selection status of all data displayed on the list Related Functions gt gt Related Functions owitches display hide of the Related functions button For details of the related functions refer to the following manual 5 GX Works2 Version 1 Operating Manual Common Acquire Symbolic Information Project Read from PLC Delete PLC Data only Displays the project name of the symbolic information on the Title Project Name column Refresh Updates the file list on the Online Data Operation screen For QCPU Q 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 before 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
48. 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 Modification Section 8 7 2 to Section 8 7 4 Section 8 7 3 to Section 8 7 5 Section 8 8 7 Section 8 8 8 Appendix 1 2 to Appendix 1 8 Appendix 1 3 to Appendix 1 9 Sept 2011 SH NA 080781ENG K Correction Section 1 3 1 Nov 2011 SH NA 080781ENG L Correction MANUALS Section 1 3 1 Section 4 1 Section 4 2 1 Section 4 2 3 Section 4 3 2 Section 4 4 1 Section 5 2 Section 5 3 Section 5 4 Section 5 5 3 Section 5 5 4 Section 5 6 1 Section 5 6 3 Section 5 6 4 Section 6 2 1 Section 6 2 2 Section 6 2 4 Section 7 1 1 Section 8 3 5 Section 8 7 1 Section 8 7 4 Section 8 7 5 Section 8 8 3 Section 8 8 5 Section 8 9 2 Section 8 9 3 Section 10 1 Section 10 5 3 Section 10 6 Section 13 2 4 Section 13 3 1 Section 14 1 Section 14 2 Appendix 1 1 Appendix 1 3 Appendix 1 7 Modification Section 1 3 5 to Section 1 3 6 Section 1 3 2 to Section 1 3 3 Section 13 2 to Section 13 4 Section 13 4 to Section 13 3 Appendix 1 3 Appendix 1
49. 2 Creating User Library 13 3 1321 Creating oso 359093 eridi asipi eias iere ar eenn T shew ees 13 3 13 2 2 Changing library 13 4 7 EE auING eee ae eee eases 13 4 1324 Saving library ING nce scs EE ee St En ee eg n Ede Fu ARE REN Sd RE 13 5 13 25 Deleting user library from 13 7 13 2 6 Setting password to 13 8 19 2 7 Set help file to library exea rk Rer xr dore Sum mmo RE 13 9 13 3 Using User Library 13 10 13 3 1 Installing user library data to 13 10 13 3 2 Creating programs using 13 12 192949 CMG N oe Se beet Pot ee eae 13 13 13 3 4 Updating user library iow cer do cu cera be en Se dekh ae 13 15 13 3 5 Displaying user library help 13 16 SETTING OPTIONS 14 1 Basic Operations 14 2 14 2 Option Setting List 14 APPENDIX Appendix 1 List of Toolbars and Shortcut Keys App 2 Appendix 1 1 Common toolbars and shortcut keys App 2 Appendix 1 2 Toolbar icons and shortcut keys fo
50. 3B dy DU Class Global label check Output window Error 1 Warming 0 CheckWaming 0 10 2 10 1 Converting Compiling Created Programs Point P Compiling programs when adding changing labels For considerations for compiling programs when adding changing labels refer to Section 10 5 3 Saving project automatically after compiling programs A project can be saved automatically after compiling programs by setting the option Select Save project after compiling under Tool gt Options Project Automatic Save SEARCHING FOR SPECIFIC POSITION CONVERTING COMPILING PROGRAMS TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER CPU s No MONITORING USING USER LIBRARIES o SETTING OPTIONS APPENDIX INDEX 10 3 s GX Works2 v 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 Rebuild All 5 The following message is displayed Clear the check box if the duplicated coil check ladder check and consistency pairing check are not performed after the compilation MELSOFT Series GX Works Caution When executing Rebuild All automatically assigned devices will be re evaluated and d
51. 4 4 2 2 Registering program blocks to tasks 4 2 Creating Program Files and Tasks B 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 e Maximum number of tasks that can be created in a single program file and the maximum number of program blocks that can be registered to a single task lt 4 of Maximum number of tasks that can be Maximum number of program blocks program block registered to the created in a single program file that can be registered to a single task LL LL first task E Z Ladder Diagram 1 Sequential Function Chart 3201 3 Structured Text Structured Ladder FBD i e For Basic model QCPU Q00UJ Q00U QO0O1U Q02U LO2 the maximum number of SFC blocks is 128 124 320 PROGRAMMING Program block that can be registered to a single task O Applicable x Not applicable Program block that can be to a single task Programming language N PROCEDURE OPERATIONS OF PROGRAM EDITORS SETTING LABEL
52. 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 on the Project view Display contents differ depending on the programmable controller type The following shows an example of QCPU Q mode For Common and 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 Parameter w bb eid 37 Common Intelligent Function Module te eee eee ee eee eee Intelligent Global Device Comment 0 cett s Common K Geballabl eene Define labels shared among POUs Globall t Program Setting Define the program execution order and type gt E gi MAIN Program file Em Task 01 0 0 0 0 0 qe Task Mj POLI 01 Register program blocks to the task Program t3 Local Label f Scan Program if Standby Pragram nu Fixed Scan Pragram Execution Define 372 3 Program m PO Dj Program block Program j Write a program in the desired programming 9 Hd Local Label Define labels 5 3484 POLI 02 sr Program H Local Label ci gf 03 ab Program i Local
53. 9 a Write to CSV File Write label settings to the CSV file Confirm Update of System Apply system label information changed in Label Database another project to global labels ga Import System Label Import system label information and apply it to global labels Section 5 2 Reservation to Register Reserve the selected global label for System Label registration as a system label Reservation to Release Reserve the selected global label for System Label deregistration of system label B Other shortcut keys The following table shows other shortcut keys for setting labels Shortcut key Corresponding menu Reference Select Select all rows _ s Display all lines of comment and remark of Num 91 the selected line Section 5 5 5 _ Display only the first line of comment and Num remark of the selected line 1 Num indicates keys in the numeric keypad App 4 Appendix 1 2 Toolbar icons and shortcut keys for setting labels Appendix 1 List of Toolbars and Shortcut Keys Appendix 1 3 Toolbar icons and shortcut keys for program editors The following explains the toolbar icons and the corresponding shortcut keys for program editors SEARCHING FOR SPECIFIC POSITION B ST toolbar icons and shortcut keys The following table shows the toolbar icons and the corresponding shortcut keys for the ST editor D Shortcut key Corresponding menu Reference List Operands Display the L
54. Before Insert a row above the selected row Select Edit New Declaration Before amp PROGRAMMING CONFIGURATIONS 4 PROCEDURE Class Label M ame Class Label Mame E 1 data 1 D 2 widatat 2 INPUT w Indats 3 VARLCONSTANT 982 3 VAR a New Declaration After Insert a row below the selected row Select Edit gt New Declaration After Class Label Name Class Label Name 1 AR_INPUT in data 1 INPUT in data 2 vidtat 5 _ 2 INPUT vlindatat 3 CONSTANT vi data2 3 VAR VAR ata New Declaration After 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 OPERATIONS OF PROGRAM EDITORS 585 COMMON Editor Setting v Automatic copy and increment when inserting a row v Copy data type comment items EDITING ST PROGRAMS e When Automatic copy and increment when inserting a row is selected Copy the class and label name append a value after the label name and add a row with the copied data below the specified row If a value is already appended after the label name the data is copied with an incremented v
55. CONFIGURATION PROGRAMMING CONFIGURATIONS PROCEDURE 6 1 Types of Program Editor 6 2 6 2 Common Operations of Program Editors 6 5 PROGRAM OPERATIONS OF NGC Esse SETTING LABELS COMMON Ds of 5 FO Ow WA H e m H CD c Z O LADDER FBD PROGRAMS s GX Works2 v 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 Gaa ST editor 5 1 Parameter fi Intelligent Function Module Global Device Comment MB Global Label i Program Setting Si POU_01 PRG Program ST FOR counter 0 TO 10 BY 2 DO IF 2 lt 12345 THEN Var01 ar01 counter ELSIF Var01 gt 22400 THEN Var01 Var02 END IF END FOR 4 Pragram a POLI 01 Program Local Label 3 TI POLI 02 Program POU 02 PRG Program Structured Ladder FBD Local Label B jar POL 03 Program Local Label 2d 000 04 Program Lacal Label Structured Data Types Local Device Comment Ladder editor Device Memor Device Initial value For the operating method of the ladder editor refer to the following manual C s GX Works2 Version 1 Operating Manual Simple Project SFC editor For the operating
56. Coil Open contact branch Closed contact branch Input label a o Output label DECR Horizontal line DEBE Vertical line _ Rising pulse 2 Tk Falling pulse 72 Rising pulse close 3 Falling pulse close 3 eei Comment 1 These items cannot be used for E Not supported by FXo FXos FXON FXu FX2c 8 Supported by Universal model QCPU LCPU Operating procedure Select Edit gt Ladder Symbol gt element The shape of the mouse cursor changes according to the selected element Click the position where the element is entered in the program editing area The selected element is entered 8 2 1 Entering elements 8 2 Editing in Select Mode 8 2 2 Entering instructions 1 Enter an instruction in the Select mode z gt Operating procedure 1 Select Edit Input Instruction amp 2 The Input Instruction screen is displayed Input Instruction Exit Browse Manual SCREEN CONFIGURATION The following table shows display contents of the screen Element Instruction device selection field entry field Name Description Select an element Element selection field PROGRAMMING Clicking the button displays the list of elements Instruction device entry field Enter an instruction and or a device 2 Enteran instruction and device and click the button The shape of the curso
57. Device Label Automatic Assign Setting function 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 10 20 10 5 3 Considerations of Compilation 10 5 Compilation 3 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 Select Turn PLC to STOP at time of PLC write after executing Rebuild All and do not execute remote RUN under Tool Options PLC Read Write Compiling programs when adding changing labels SEARCHING FOR SPECIFIC POSITION When programs are compiled after adding changing labels devices are assigned only for added changed labels Device assignments of labels which are not added or changed do not change 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 CONVERTING COMPILING 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 TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER CPU 4 Ed
58. Display Compile Result Compile Result 1 Compile Result LD M8190 INC DO INC D1 LD M8190 DO D1 012287 LD M8190 OUT M6189 1012287 D1 02 OPERATIONS OF BING Esse SETTING LABELS COMMON View gt Display Compile Result The compilation result is not displayed when the compilation po target is an assignment command in which the source data a DS and the target data are the same Or Example in Structured Text MO MO Ead EO AY Point 8 Considerations of FXCPU For FXCPU when a block password with the validated setting for Read protect the execution program exists the compilation result cannot be displayed 3a She 6 2 6 Opening local label setting screen of program editor being edited 6 13 A GX Works2 6 COMMON OPERATIONS OF PROGRAM EDITORS 6 2 8 Setting display content of tooltip Content defined on the label setting editor is displayed as tooltip by placing the cursor on a label name on the program editor Content excluding label names displayed on the tooltips can be set by the following operation Operating procedure 1 Select Tool Options Program Editor Structured Ladder FBD ST Tool Hint 2 Set the following items Display a monitoring result When the labels are used for array element or Monitored Value when the elements are not sp
59. FUN 01 0 PROGRAM B Maximum number of input output labels The maximum number of input output labels can be used in a function a function block differs according to 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 Function Blocks Programming language Structured Text Including input output labels 1 to 24 1 1 to 241 2 O Ladder D dica NER Including input output labels Including input output labels zy gt Structured Ladder FBD 0 to 253 0 to 253 PROGRAM EDITORS ESI CN S ES 1 The input output label is counted that each of input output labels is one label EDITING ST PROGRAMS H e m H CD c Z O LADDER FBD PROGRAMS La GX Works2 WT 5 SETTING LABELS 5 5 Operations for Setting Labels This section explains the common operations for each label setting editor 5 5 1 Classes A label class indicates the POU applicability and the usage of label selectable classes differ according to the type of label setting editor The following table shows selectable classes for each label setting editor O Applicable x Not applicable Editor to set labels Local label Local label of Class Description Global of a Local label of a function label program a func
60. H e m H CD Z Lr O LADDER FBD PROGRAMS 1 3 1 List of functions common to Simple project and Structured project 1 5 GX Works2 WT 1 OVERVIEW Edit common function Reference Undo Restore the previous processing status Section 6 2 3 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 Compile common function Reference Build Convert compile a program being edited Section 10 1 Online Program Change Write sequence programs to a programmable controller CPU Common after the conversion compilation Rebuild All Convert compile all programs in the project Section 10 2 View common function Reference Docking Window Navigation Display hide the Navigation window Common Display hide the Element Selection window Select a part such as function block and function on the window Section 6 2 1 for utilizing it to a program Display hide the Output window Output The conversion compilation result is displayed Element Selection Online common function Reference Read from PLC Read data from the programmable controller CPU Section 11 1 Write to PLC Write data to the programmable controller CPU Monitor Start Monitoring All Windows Start monitoring the programs of all open windows C ommon Stop Monitoring All Windows Stop monitoring t
61. Label 3118 000 04 Program H Local Label FE FUN Map FEOL Function block FB Function FUN hi Program Write program desired programming language H Local Label Define labels 5 ES Structured Data Types Bm onn tree tebe rece 6 Define structures Lacal Device Comment Memory ce Common Initial value 10 Program configuration 1 ForFXCPU Special Module Intelligent Function Module is displayed 2 ForFXCPU no classification for program execution type Only one item Execution Program is displayed 3 Section 5 2 4 Section 4 2 5 KF Section 4 3 6 Chapter 6 Cs Chapter 7 Chapter 8 7 Section 5 3 s Section 5 4 9 5 Section 5 6 10 For FXCPU this item is not displayed 4 2 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 KL 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 Operating procedure 1 Creating a program file and task Procedure Reference
62. Label Registration Selection screen by right clicking the entry field and selecting List lt Section 6 2 2 Operands E amp from the shortcut menu 8 6 2 Editing variable names and instance names OVERVIEW SCREEN CONFIGURATION PROGRAMMING PROGRAM CONFIGURATIONS PROCEDURE OPERATIONS OF PROGRAM EDITORS SETTING LABELS COMMON EDITING ST PROGRAMS EDITING STRUCTURED a CD LZ OQO Qg Ta s GX Works2 v 8 EDITING STRUCTURED LADDER FBD 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 K MELSEC Q L Structured Programming Manual Application Functions 5 FXCPU Structured Programming Manual Application Functions To add or delete an argument select a function or a function block and proceed the following operation Adding an argument Select Edit Number of Pins gt Increment 2 Deleting an argument Select Edit gt Number of Pins gt Increment Increment pins OR E EN neg 4 d Added arguments Decrement pins Point Adding and deleting arguments Arguments can also be added or deleted using the following method Using the E
63. Local Label Setting MAIN PRG Class Label Name Data Type VAR CONSTANT InitialS ettingFlaa VAR VAR Bit VAR FB SYOKIKA VAR Word Signed VAR Word Signed Local Label Setting MAIN PRG Data Type Class Label Name SYOKIKA_ST FB SYOKIKA VAR CONSTANT VAR Word Signed VAR Word Sianed VAR Bit it 19 Cn n e vv bf w bl Sorting labels with label setting editor Labels can be also sorted by clicking a title name of label setting editor SETTING LABELS E SwitchB Bte Considerations for sorting labels The following are the considerations for sorting labels e After sorting labels the programs relating to the sorted labels are in the uncompiled status e After sorting labels Edit Undo Redo cannot be selected OPERATIONS OF PROGRAM EDITORS O COMMON EDITING ST PROGRAMS H e m H CD c Z Lr O LADDER FBD PROGRAMS 5 5 5 Editing rows 5 19 s GX Works2 Ww 5 SETTING LABELS B Displaying one last blank row only Display only one blank row under the label of last row on the label setting editor Applicable to only local labels of program and global labels Select Tool Options gt Label Setting Editor and select Display last blank row Only one blank row is displayed under th
64. Local Label Setting POU 01 PRG Seles __ Cas LabalName DataType Device Addess Comment 3 aR gt 2 van ie pih pn poubhewordsoned DEva e FBO tC C 5 CONSTANT w datal Stia ar ooo poo e xf LEE 4 Operating procedure the items on the screen nae Maximum number of Item Description characters Select a label class from the list displayed by clicking zl Cs Section 5 5 1 Class Ladder ST SFC Structured Label Name Enter a desired label name Ladder FBD 32 FB instance name 16 Specify a data type from the Data Type Selection screen displayed by licking Data B yp Section 5 5 3 It can also be entered directly Enter a constant value when VAR CONSTANT is selected for sonstani Class and simple type is selected for Data Type 23 Device This item cannot be set for local labels When the data type is structure click the Detail Setting cell and set _ Address devices on the Structure Device Setting screen Cs Section 5 6 3 Enter a comment Comment 2 Comments can be displayed on the program editor by switching 1024 display hide of comments Cs Section 8 7 4 1 A line can be inserted in a cell by pressing the Enter keys 2 The compilation is not necessary after editing 5 3 Setting Local Labels for Program Blocks Point P Class set
65. SWnDNC GXW2 E n version Product name for SWnD5C GPPW E SWnD5C GPPW EA SWnD5C GPPW EV and SWnD5C GPPW EVA n version Product name for SWnD5C MEDOC3 n version Product name for the integrated development environment included in SWnDNC IQWK MELSOFT iQ Works n version Abbreviation for MELSOFT iQ Works Generic term for personal computer on which Windows operates Generic term for Q00J Q00 Q01 Generic term for Q02 Q02H Q06H Q12H and Q25H Generic term for 2 Q06PH Q12PH and Q25PH Generic term for Q12PRH and Q25PRH Generic term for QOOUJ 010 2020 QOSUD QO3UDE QO3UDV Q04UDH QOAUDEH Q04UDV QOGUDH QO6UDEH QO6UDV Q10UDH Q10UDEH Q13UDH Q13UDEH Q13UDV Q20UDH Q20UDEH Q26UDH Q26UDEH Q26UDV Q50UDEH and Q100UDEH Generic term for QO3UDV QO4UDV QO6UDV Q13UDV and Q26UDV Generic term for Basic model QCPU High Performance model QCPU Process CPU Redundant CPU and Universal model QCPU Generic term for 1025 LO2S P 102 L02 P 106 LO6 P L26 L26 P L26 BT and L26 PBI Generic term for FXos FXo FXoN FX1 FX1S FX1N FX1NC FXu FX2C FX2N FX2NC FX3s FX3G FX3GC FX3U and 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 th
66. Setting Editor cannot be read to the CSV file e Columns order of the CSV file can be read even if it does not coincide in the columns order of Label Setting Editor lt Label Setting Editor gt Title name Class LabelName Data Type Constant Device Address Comment Remark Lii gems 2 3 ESI 4 T mE 8 E ni GENE CSV File Data Type Constant Device Address Comment Remark Title name WAR DA E 0 LI www me AT LL _4 GLOBA G_LABELOO002 BOOL X2 2 CommentOOO02 0002 _5 GLOBAL 00003 BOOL X3 IXS CommentOOO03 000 _6 VAR GLOBAL CONSTANT G_LABELOOO04 BOOL FALSE CommentO0004 0004 7 VAR GLOBAL LABELOO005 BOOL X4 KIKA CommentOOO05 0005 Restrictions When multi byte characters are used in label 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 When a CSV file which contains multi byte characters is read in GX Works2 with the language version other than Japanese the program cannot be compiled properly VAN MELSOFT V 6 COMMON OPERATIONS OF PROGRAM EDITORS This chapter explains the common operations of program editors used to edit sequence programs OVERVIEW SCREEN
67. The Structure Device Setting screen is displayed 2 Set the device name to the start element word device data of the array Devices are set for the same data type on the editing screen and in the subsequent array PROGRAMMING CONFIGURATIONS 4 PROCEDURE elements 3 Select Use Bit Designation lt Bit specified word devices are to the bit devices Label Mame Data Type Device Address STR Double w ard Signed STR Double word Signed XMDU0 3 STRE Bt 1 1060 50 STR D Bite STR Double Word Signed D6 SETTING LABELS Point Data for which device name can be entered For structure arrays 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 When the start element is a bit type the bit specified word device cannot be set as a device Offset values e An expression such as 1 0 or 0 2 can be specified for an incremental value of device such as UOXGO However the incremental values cannot be specified to the both sides of V such as 142 e 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 OPERATIONS OF PROGRAM EDITORS QO COMMON EDITING ST PROGRAMS e LU D O 02 CD E
68. Var Flag 8 G_OFFGAN EN ENO Var ControlData 5 LDP EN ENO Var Flag 8 ix OFFGAN H100 Un Var_ControlData 8 6 12 6 2 5 Splitting editing screen 6 2 Common Operations of Program Editors 6 2 6 Opening local label setting screen of program editor being edited Display the Local Label Setting screen of the program editor being edited OVERVIEW Select View Open Header 1 PRG Program Structured Ladder FBD gt le NO ini L EN t View 2 Open Header Es Local Labet Setting 01 PRG SCREEN CONFIGURATION Comment warD1 Comment Class Constant Device Address Label Name Data Type VAR i ar 1 Bit de Bit bool Bt into werd Signed PROGRAMMING CONFIGURATIONS PROCEDURE 6 2 7 Displaying compilation result in list format 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 PROGRAM Operating procedure 1 For Structured Ladder FBD select a ladder block 2 Select View gt
69. a range and press Delete AL 10 i f Moving elements without lines connected Even when the Auto connect function is enabled the selected element can be moved without lines connected by dragging and dropping the element while holding down the 5 key 8 12 8 4 2 Moving elements with lines connected 8 4 Operating Elements 8 4 3 Copying elements 1 Copy an element within the editor or to another Structured Ladder FBD editor Copying elements with drag and drop operation 7 gt Elements can be copied within the editor 2 1 Hold down the key and click the element T m e E 2 Dragitto the desired position SCREEN CONFIGURATION Input a Inputs _ H Input Inputz Inputs I Copied element Elements 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 Copy 85 2 Select Edit gt Paste 8 3 Click the desired position The upper left of the pasted position is the position to be clicked PROGRAMMING Copying elements using the clipboard PROGRAM CONFIGURATIONS PROCEDURE OPERATIONS OF PROGRAM EDITORS SETTING LABELS COMMON EDITING ST PROGRAMS EDITING STRUCTURED a CD LZ QO 39 ss 8 4 3 Copying elements 8 13
70. case in alphabetic part SEARCHING FOR SPECIFIC POSITION Inline structured text For inline structured text the devices within the range set on the lt lt Device gt gt tab of PLC parameter cannot be used as labels Use the devices out of range set on the lt lt gt gt tab of PLC parameter CONVERTING COMPILING PROGRAMS 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 TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER CPU Operating procedure s N 1 Select Tool Options gt Compile gt Structured Ladder FBD ST gt Compile Condition1 2 In Function Output Setting select the function s PLS PLF and or ALT to be set e f all check boxes are cleared an error occurs when compiling programs MONITORING e If any of these check boxes are selected errors and warnings are not displayed when compiling programs Example Creating a program using the PLS output The check boxes are cleared The output is required to be retained at the label or device T Ot X CD 2 5 3555 PLS Input ENG oo ene 5 A Eee cere
71. data using the Project view Works2 Version 1 Operating Manual Common When registering structure to the data type of system label Elements of the structure registered to the data type of system label cannot be edited p2 Elements of structure can be added and comments can be edited os However when the edited information is applied to the system label data base all references of the system labels EO which use the edited structure are deregistered Register the canceled system labels again E Q D E mo 2 oes DIE 5 6 1 Setting structures 5 23 LE GX Works2 WwW 5 SETTING LABELS 9 6 2 Defining data type of label 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 editor In addition to direct text entry a structure can be selected on the Data Type Selection screen Section 5 5 3 5 24 2 6 2 Defining data type of label as structure 5 6 Setting Structure Labels 5 6 3 Assigning devices to structure labels Devices of the structure global labels are set on the Structure Device Setting screen If a structure is set for data type on the Global Label Setting screen Detail Setting is displayed on the Device and Address columns Click Detail Setting to display the Structure Device Setting screen OVERVIEW Screen display n 2 Click Detail Setting labe
72. data written to the programmable controller CPU by GX Developer or GX IEC Developer Using Open Other Project function 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 function can be automatically cleared to O after writing programs to the programmable controller CPU e Tool Options PLC Read Write gt When writing to PLC after Rebuild All operation clear the device ranges set in the Device Label Auto Assign setting to 0 1 QCPU mode LCPU only 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 Switch the programmable controller CPU to RESET It can also be reset by selecting Compile Remote Operation 4 Select Online PLC Memory Operation gt Clear PLC Memory to clear the memories If VAR RETAIN is set with the Device Label Automatic Assign Setting function clear all device memories including latches If file registers are set with the
73. entry Screen display Click the data type entry field on each label setting editor Data Selection Libraries Data wWaord LInsigned Bit String 16 bit Double Word Unsigned Bit String 32 bit FLOAT Single Precision Type Class Simple Types f Structured Data Types Function Blocks Array Element ARRAY Element c Operating procedure 1 Selecta type for Type Class Item Description Simple Types Specify this to select a data type from basic types such as bit and word Specify this to select a data type from the defined structures Hata DS Grayed out for structure settings Specify this to select a data type from the defined function blocks Grayed out for structure settings Function Blocks 2 Onthe Libraries field select the reference source such as the defined structure that is used as the data type Item Description lt ALL gt Browse data types and structures function blocks defined in the project and all libraries Browse structures function blocks defined in the project Project 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 On 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 displaye
74. in the subsequent array elements Offset value is not specified lt Array 0 gt Label Mame Data Device Address STA_A Double ward Signed D1 MD 1 Double Word Signed XMDD 3 Double Word Signed Devices starting lt Array 1 gt from D7 are Label M ame Data Type Device Address SIm Double w ard Signed D z MD B SIRE D STALE Double Word Signed 011 zMDD 11 3 Set Structure Array Offset Value Structure Array Offset Value Word Device 10 Bit Device 5 use Bit Designation By setting an offset value devices to which the offset value is added are set to devices in the subsequent array elements 5 28 2 6 4 Assigning devices to structure array labels 5 6 Setting Structure Labels Offset value is 10 lt Array 0 gt Label Mame Data Device Address Double Word Signed D1 z MD STR 2 00 3 gt STRE Bit ZIKI STR D STRE Double w ard Signed 05 z MD Devices starting 2 Array 1 gt from D11 are Label Mame Data Type Device Address aeneo S Double w ard Signed 011 zMD T1 E STR amp MDD 13 STR BiB IKE STAD Double Word Signed 015 0 5 29 Using bit specification 3 Devices can be set by specifying a bit device of word device when entering devices automatically 1 Click Detail Setting on the label setting editor
75. library data Screen display Editing status Navigation User Library lt ALL gt Lg Program Programi Program Local Label Global Label ci i FB FUN FB1 Editing disabled status Navigation User Library ub Programi 6 Global Label FB FUN H FB1 E Structured Data Types StructuredDataTypes1 StructuredDataTypes2 Program Local Label 8 Structured Data Types B3 structuredDataTypesi BS structuredDataTypes2 Operating procedure 1 Select a user library to be edited on User Library view Multiple libraries can be selected 2 Select Project gt Library Close 5 The editing of the user library data is disabled 13 14 13 3 3 Editing user library 13 3 Using User Library 13 3 4 Updating user library Update data in a user library file SEARCHING FOR SPECIFIC POSITION Operating procedure 1 Selecta library name to be updated on the User Library view Multiple libraries can be selected 2 Select Project gt Library gt Reload The data in the library file is read and the display contents on the User Library view are refreshed CONVERTING COMPILING PROGRAMS 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
76. method of the SFC editor refer to the following manual K gt GX Works2 Version 1 Operating Manual Simple Project 1 K gt Chapter 7 2 K gt Chapter 8 Poi Creating new POU POUS are created on the Project view 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 eO NETS Structured Ladder Ladder Sequential FBD Diagram Function Chart 0 Oo 9 i Not supported by FXCPU OVERVIEW SCREEN CONFIGURATION Changing programming languages e Select a programming language when creating new POU For creating a new data refer to the following manual 5 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 PROGRAMMING CONFIGURATIONS PROCEDURE PROGRAM SETTING LABELS OPERATIONS OF PROGRAM EDITORS COMMON EDITING ST PROGRAMS H e m H CD c Z O LADDER FBD PROGRAMS 6 1 1 Available programming languages 6 3 s GX Works2 Ww 6 COMMON OP
77. 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 OVERVIEW If a line is entered the position of left power as shown below warning message Multiple ladders in one network C2034 is displayed on the Output window at compilation Q9 SCREEN CONFIGURATION Compilation result when 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 gt Options Compile Output Result Disable Warning and Notification Message Section 10 4 2 Connecting to left power rail As shown in the following figure a line cannot be connected to the left power rail directly when a line is branched with a line Place 5 400 before the branch point to always turn ON the input from the left power rail PROGRAMMING CONFIGURATIONS PROCEDURE AX Trl LINT 8 ResultINT3 gt z LINT BN ium eum m d ou TES e e w WM ow Go me S 4 uw cA d e er
78. personal computer to the programmable controller CPU GX Works2 Version 1 Set the connection destination Operating Manual Common PROGRAM IL 8 Writing data to the programmable controller CPU 0 Procedure Reference lt Write parameters to the programmable controller CPU 2 Chapter 11 E Write sequence programs to the programmable controller CPU m N CD un SE 9 Confirming the operation oti 205 Ot Procedure Reference c Monitor the execution status of sequence programs Chapter 12 alo 1 n Lo O Ending the project gt OF 5 Procedure Reference 0 Save the project GX Works2 Version 1 Exit GX Works2 Operating Manual Common 8 m nc E p oes EBS t GX Works2 w 3 PROGRAMMING PROCEDURE MEMO AAA MELSOFT V 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 SCREEN CONFIGURATION PROGRAMMING EE PROCEDURE 4 1 Program Configurations of Structured Project 4 2 4 2 Creating Program Files and Tasks 4 3 4 3 Creating POUs 4 10 4 4 Using POUs 4 14 OPERATIONS OF PROGRAM EDITORS SETTING LABELS COMMON Ds of 5 FO Ow WA H e m H CD Z Lr O LADDER FBD PROGRAMS s GX Works2 v
79. 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 Output Ei Function type Rebuild has Result DataMame Class Content Error Code lt Error warning list 1 POLI 01 Program compile Wrong device or label Not declared Ladder Block 1 Figg 2 Error POLI 02 Program compile mismatch an output variable Ladder Block Ma 1 C2017 ror 2 Warning 0 Check warming 0 Status Display contents Item Content 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 program check consistency check warnings Result Data Name Display data 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 23 SEARCHING FOR SPECIFIC POSITION CONVERTING COMPILING PROGRAMS TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER CPU NO O lt 2 gt USING USER LIBRARIES D SETTING OPTIONS
80. set in a blank column VAR GLOBAL is automatically set for Class Change it if necessary Characters that cannot be used for label names Any of the following label names causes an error at compilation A label name that includes a space e A label name that begins with a numeral e A label name which is same as the one used for devices For Structured Ladder FBD and ST programs lower case device names can be used as labels by setting the option Section 10 4 4 OVERVIEW For details refer to the following manual 5 GX Works2 Version 1 Operating Manual Common Specifying devices addresses The digit specified bit device 4 or bit specified word device 00 1 can be specified for devices addresses Using extended data registers D or extended link registers W When assigning a data register D or a link data register W to a global label set it not to overlap the border between the internal user device and the extended data register D extended link register W 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 scr
81. setting editor No execution type O Compiled x Not compiled Compilation target data type Registration usage status of compilation target Compilation target when compiling data type all programs Registered to any of the following programs O 10 5 1 Compilation target data when compiling all programs 10 15 SEARCHING FOR SPECIFIC POSITION CONVERTING COMPILING PROGRAMS TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER CPU EY N O Z c z gt USING USER LIBRARIES D SETTING OPTIONS APPENDIX INDEX A GX Works2 WT 10 CONVERTING COMPILING PROGRAMS 10 5 2 Assigning devices 10 16 Assign the devices set with the Device Label Automatic Assign Setting function 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 with the Device Label Automatic Assign Setting function Temporary variable is used for such as the following situations Lines 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 B Assigning devices defined on the label setting editor to
82. srs 7 3 7 1 3 Seting tab length se sre aco Ge tari he Sree irri Pre eee ER baat eee ee ne 7 4 7 1 4 USING 7 5 8 EDITING STRUCTURED LADDER FBD PROGRAMS 8 1 Creating Ladder FBD Programs 8 2 8 1 1 Selecting editing 8 3 8 2 Editing in Select Mode 8 4 8 2 1 Entering lt 8 4 8 2 2 INGIFUICIONS ou Ss dur saben bore os aas o ieu ee uar 8 5 8 3 Drawing Lines 8 7 8 3 1 Connecting lines automatically when entering elements 8 7 8 3 2 Connecting elements with lines 8 8 8 3 3 Connecting lines 8 8 8 3 4 Overwriting input output variable with lines 8 9 8 3 5 Rearranging lines automatically s s a uode tu rac a a RE ee m wes Ree 8 9 8 3 6 Inserting and deleting rows and 8 10 8 4 Operating Elements 8 11 8 4 1 WIOVING elelfiBlibs xx 29 Xue 9 Genet dp aes ida oid Od ROI OE CR oS bed OR US RE See see 8 11 8 4 2 Moving elements with lines connected llle eee 8 11 8 4 3 Copying lt
83. system is required by the Purchaser or End User 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 REVISIONS 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 Addition 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
84. the Label Registration Selection screen when an unregistered label is entered Select Declare new label name under Tool Options Program Editor gt Structured Ladder FBD gt Label lt Section 14 2 e Browse Manual button A detail of the instruction can be displayed by clicking the Browse Manual button on the Input Instruction screen Cs 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 elements When entering elements of contacts coils jump return in the Select mode the line can be connected automatically SCREEN CONFIGURATION Operating procedure 1 Select Edit Ladder Symbol gt element to be entered A graphical image of the selected element is appended to the mouse cursor If a line can be connected to the left hand horizontal direction a line is displayed to the left hand direction PROGRAMMING 2 Click the position where the element is entered PROGRAM CONFIGURATIONS PROCEDURE If a lines can be connected to the left hand horizontal direction the following message is displayed MELSOFT Series GX Works2 Ladder symbols will amp uto Connected Or place ladder 4 symbols manually by pressing shift key 3 Click the button
85. 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 assigned to devices first and then local labels are assigned to devices Assigning only one 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 the Device Label Automatic Assign Setting function For pointer P devices are assigned in ascending order assigned from lower number of a device number Example Device automatic assign setting oet the following device range D device 8000 to 8191 Label setting ass LablMame Data Type word Signed word Signed FLOAT Double Precision 4 VAR Label D FLOAT Double Precision lt Devices to be assigned to labels gt Example of devices to be Definition Descending order 10 5 2 Assigning devices 10 5 Compilation 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 s
86. the monitoring If the programs match the monitoring starts If the programs do not match the following confirmation message is displayed MELSOFT Series GA Works D Verifications in POUs 01 are not identical Are vou sure to start monitoring e When Not Always Verify with PLC is selected the monitoring starts without verifying programs e When Confirm whether to Verify with PLC is selected the screen for selecting whether to verify programs before starting the monitoring 1 For ST programs of Simple project with labels select the following Tool 2 Options Monitor gt ST 12 2 12 1 1 Starting monitoring programs 12 1 Starting and Stopping Monitoring Programs Point Verification results This function verifies the instructions and the number of steps of the program with those of the program on the programmable controller CPU For this reason the programs match even when any of the following modifications is performed in the program e Changing comments or layouts of Structured Ladder FBD program e Inserting blank rows or blank ladder blocks SEARCHING FOR SPECIFIC POSITION If any of the following operations is performed the programs may not match even when the program and the program on the programmable controller are the same Compiling all programs Changing the setting position of the POU on the Task Setting screen Editing the POU in the program file as same as the one fo
87. to be assigned automatically Multiple devices can be set j Start ASSON sat _ Enter the range of device points to be assigned automatically Range End lt 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 parameter When the latch range is set display the device point range with latch range PLC Parameter Device Setting Range Example When D 0 to 12287 latch D 5000 to 6000 are set on the 8 lt lt gt gt tab of PLC parameter display range of D 0 to 12287 a range of latch D 5000 to 6000 S Pee om 599 LU OL t GX Works2 w 5 SETTING LABELS E FXCPU Screen display Select Tool Device Label Automatic Assign Setting Device Label Automatic Assign Setting Word Range Range fm 512 to 999 m 3840 m to 7679 m Timers 1 Pointer 1 100ms E 2048 to 4095 100 to 199 m E 10ms m lt tep Flags 220 zd to 245 Retentive 2048 E to 4095 Counters 100 to 199 m cm Operating procedure Select the device type and set the start and end addresses to be assigned automatically 5 8 1 Considerations of automatically assigned devices Considerations when changing automatically assigned devices All programs need to be compiled wh
88. variable name is displayed according to the set number of lines and characters If all characters of the variable name cannot be displayed gt is appended after the last character 16 characters 8 characters ABS ABS LocalVall 234567890 Locaia IN 8 22 8 7 2 Displaying instance names in multiple lines 8 7 Changing Display Format of Variables 8 7 4 Changing display format of variable Change the display format of variable to the device address comment format Entered format display Comment format display Input COS COS EN ENO ENO RadianAngle d Angle 5 Device format display Address format display ES 6MXD 8177 m COS _ 1 E ENO D12275 76 5 d LD12273 74 2 WD 12275 76 8 d Displaying in the entered format Select View View Mode gt Label Variables are displayed in the format as they are entered Displaying the device format 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 Select View gt View Mode Address Devices are displayed in the address format As for labels the assigned devices are displayed in the address format Displaying in the comment format Select View gt View Mode gt C
89. when the multiple types of devices are assigned automatically QCPU Q 1 mode LCPU Refer to Considerations of compilation Section 10 5 3 Device types and setting ranges The types of automatically assigned devices differ by the type of CPU The setting ranges depend on the number of device points set in PLC parameter For details of PLC parameter refer to the following manual GX Works2 Version 1 Operating Manual Common Considerations when displaying the Device Label Automatic Assign Setting screen OVERVIEW When displaying the Automatic Assign Setting screen error message may be displayed In this case terminate GX Works2 copy vsflex8n ocx stored in the folder of GX Works2 installation destination to C WINDOWS system32 for Windows XP and restart GX Works2 SCREEN CONFIGURATION Timers of Device Label Automatic Assign Setting function for FXCPU 100ms 10ms retentive timer When a program created with FXCPU is compiled devices set to 100ms under Timers are automatically assigned to the timer type labels For assigning 10ms timer devices or retentive timer devices to the timer type labels define the global label and specify the device number directly Devices set to 10ms and Retentive under Timers are used respectively in the following function blocks of FXCPU Structured project in Structured Text or Structured Ladder PROGRAMMING
90. 00ms Common Pointer No 2048 After 0 4095 High Speed 19 0 ms D 1ms 100ms RUN PAUSE Contacts Points Occupied by Empty Slot 116 Points X X0 X1FFF System Interrupt Setting Interrupt Counter Start No C 0 768 PAUSE X X0 X1FFF P Fixed Scan Interval 128 100 0 ms 0 5ms 1000ms 129 40 0 ms D 5ms 1000ms Remote Reset I30 20 0 ms D 5ms 1000ms Allow I31 10 0 ms 0 5ms 1000ms High Speed Interrupt Setting Output Mode at STOP to RUN Interrupt Program Fixed Scan Program Setting Previous State Speed Execution C Recalculate Output is 1 scan later n Menu name on a menu bar name on a menu bar Project LL 1 _ Menunameonemensbar _ mem 000 High speed interrupt setting button 1990 0 0 B GENERIC TERMS AND ABBREVIATIONS IN THIS MANUAL The following are the generic terms abbreviations of such as software packages and programmable controller CPUs used in this manual 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 Process CPU Redundant CPU Universal model QCPU High speed Universal model QCPU QCPU Q mode LCPU FXCPU FXGP WIN MELSAP3 MELSAP L SFC TERMS Description Generic product name for
91. 18 10 5 2 Assigning devices 10 5 Compilation 10 5 3 Considerations of Compilation When the multiple types of devices are assigned automatically QCPU mode LCPU Since the devices assigned once cannot be used if a program or label is changed and executed Build repeatedly the number of used devices is increased and the number of assignable devices is decreased 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 since the operation processing times of D W and R differ from that of ZR the control timing may change depending on the program content For details of operation processing time refer to the following manual 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 SEARCHING FOR SPECIFIC POSITION CONVERTING COMPILING PROGRAMS The Device Label Automatic Assign Setting function TO FROM PROGRAMMABL
92. 2 Appendix 1 7 Appendix 1 3 Deletion Section 1 3 2 Section 1 3 3 Section 1 3 4 Section 13 1 Appendix 1 2 Appendix 1 4 Appendix 1 5 Appendix 1 6 Appendix 1 8 Appendix 1 9 Print date Manual number Revision Jan 2012 SH NA 080781ENG M Model Addition FX3GC Correction Section 1 3 1 Section 5 5 4 Section 11 1 Section 14 2 May 2012 SH NA 080781ENG N Model Addition 2 QO6PH Q12PH Q12PRH Q25PH Q25PRH Addition Section 5 5 4 Correction Section 1 3 1 Section 2 1 Section 3 1 Section 4 2 3 Section 4 4 1 Section 5 2 Section 5 5 3 Section 5 6 1 Section 5 6 3 Section 5 6 4 Section 5 7 1 Section 8 3 3 Section 8 8 7 Section 10 5 3 Section 14 2 Appendix 1 1 Appendix 1 2 Modification Section 5 5 4 Section 5 5 5 Sept 2012 SH NA 080781ENG O Addition Section 5 7 Section 10 4 6 Correction Section 1 3 1 Section 6 1 2 Section 6 2 8 Section 7 1 4 Section 10 1 Section 10 2 Section 10 5 2 Section 14 1 Section 14 2 Modification Section 5 7 to Section 5 8 Section 5 8 to Section 5 9 Section 10 4 6 to Section 10 4 7 Section 10 4 7 to Section 10 4 8 Feb 2013 SH NA 080781ENG P Model Addition QO3UDV QO4UDV QOGUDV Q13UDV Q26UDV 1025 106 126 Addition Section 5 5 6 Section 10 4 7 Section 12 6 Correction GENERIC TERMS AND ABBREVIATIONS IN THIS MANUAL Section 1 3 1 Section 2 1 Section 3 1 Section 4 3 2 Section 4 4 1 Section 6 2 1 Section 10 4 2 Section 12 1 1 Section 13 2 7 Se
93. 26 2009 9 29 06 Operating procedure Set the items the screen Task executing condition TRUE Execute the task in every scan Always FALSE Execute the task in the cycle specified in the Interval niena Event field Device or Execute the task when the specified device or label is Event label name TRUE Set the cycle time to execute the task in a constant cycle Enter FALSE in the Event field Attributes Set the cycle time in time type format Interval Ex T 100ms T 24d20h31m23s647ms For details of time type format refer to the following manual K 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 Priorit are executed by priority y Tasks of the same priority are executed in the alphabetical order of task data names Title Enter a title of the task The outputs and the current values of timers in the task are reset when the task is Selected not executed Timer Output Control The outputs and the current values of timers in the task are retained when the task Item Description is not executed 4 8 4 2 3 Setting executing conditions 4 2 Creating Program Files and Tasks Point Interruption start for QCPU mode LCPU To enable an interruption start set an interrupt pointer number 10 to 131 in the Event field In this case c
94. 3 1 3 MELSOFT uw La GX Works2 WT 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 on the programmable controller CPU Operating procedure 1 Creating a new project Procedure Reference Start up GX Works2 GX Works2 Version 1 Create a new Structured project Operating Manual Common To reuse an existing Structured project open that Structured project IL 2 Setting parameters Procedure Reference Set parameters GX Works2 Version 1 Check parameters Operating Manual Common 2 Configuring programs Procedure Reference Create program files Create tasks Create POUs Register POUs program blocks to the tasks Chapter 4 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 IL lt 1 PF gt 5 Editing programs Reference Chapter 6 2 Edit programs of each POU Chapter 7 Chapter 8 SCREEN S9 CONFIGURATION 6 Compiling programs Procedure Reference Compile a program or compile all programs Chapter 10 IL f Connecting a personal computer to the programmable controller CPU PROGRAMMING CONFIGURATIONS A 069580 Reference Connect a
95. 345 THEN sarl DO counter ELSIF gt 22400 THEN Warpi END IF ENMD_FOF E gt i counter 12 10 10 DU 0 counter 12 10 10 10 0 Split window B 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 FUN 01 FUN Bit Program ST FOR counter 0 TO 10 Br 2 DO IF ard1 12345 THEN counter ELSIF gt 22400 THEM sar IF END FORE 4 Monitoring value of counter counter 12 E 10 10 DIU 0 counter 12 10 10 1 10 0 Monitoring value of DO 12 7 SEARCHING FOR SPECIFIC POSITION CONVERTING COMPILING PROGRAMS TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER CPU NO MONITORING USING USER LIBRARIES E I D SETTING OPTIONS APPENDIX INDEX s GX Works2 v 12 MONITORING 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 X11 THEN IF EPI THEM IE Displaying monitoring values When the labels are used for array element or when the elements are
96. 4 8 23 5 15 AUO CONNECT 8 8 Automatic Assign sid Panes 5 31 B bit specification of word device 5 26 9 2 Gheck Warning 10 23 pg 5 12 Close 8 4 8 15 pm 8 4 8 15 comment 5 4 5 8 5 10 5 18 5 23 6 4 8 4 Common instruction pp A 22 6 5 ene reso MR DUE 14 7 OIC 8 15 5 34 current value display 12 5 current values 12 3 D Data eve ERE OE 5 4 5 13 5 14 decimal and hexadecimal 12 5 SWISS 8 23 device memory pp 11 3 Device 5 26 5 28 display format pt 8 23 Biciel i ae MER RU S 13 16 41 MERE 2 3 E editing mode 8 3 Element Selection Window 2 3 4 15 6 5 GlemlebllS se 8 4 10 6 10 23 executing conditions pp 4 7 F 4 2 gib 1 2 gab I 4 2 UNCION ep und euin cun 4 14 6 3 6 5 8 18 fu
97. 4 Editing ladder block headers 8 29 8 8 5 Editing listed ladder dee ee ECA CR ecd ed oci o ies ie dd s 8 30 8 8 6 Setting ladder block 8 32 10 8 8 7 Switching to display hide left 8 8 8 DIS DIA Heo P 8 9 Editing Comments 8 9 1 COMMENTS 2226 8 Bee ee A ded D fcu dod eek ee 8 9 2 Changing the size of comment entry field 8 9 3 Moving COMMEN kes auc dco sesde oe ede gee ira ES 8 10 Editing in Guided Mode 8 10 1 Overwrite mode and insert On Eneng elemes 2 dure 09 1ob 9 E IUS GE FERRE RUE d boomer wae 8 10 3 Entering instructions 8 10 4 Connecting elements with NOR MEE DIC RS LITTERE O 10 0 VVFaDDIHO NES ua cui enu Eu RE RS SCHERESG E RIDE Eat RUE 8 10 7 Setting Guided mode as the default editing 8 10 8 Entering variable names after contacts and coils
98. 5 Single line Multiple lines 5 Local AB Process z2 Lecal Flag MB8188 Sq io de 3 d h48188 6 x Local gt amp BCFrocess Flag comment En OS PROGRAM EDITORS SETTING LABELS EDITING ST PROGRAMS EDITING STRUCTURED a CD Co QO Qg Ta 8 7 1 Displaying variable names in multiple lines 8 21 A GX Works2 w 8 EDITING STRUCTURED LADDER FBD PROGRAMS 8 7 2 Displaying instance names in multiple lines Display wrapped function block instance 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 lt Single line gt lt Wrapping a line gt Instancel 23456 Instancel 23456 7890 rogi EN ENO 4 2 om ey LOAD cy RN PV 8 7 3 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 gt Options gt Program Editor gt Structured Ladder FBD gt FB FUN 2 Select Specify the number of enable characters for label name comment J Setthe number of characters 2 to 255 A
99. E WRITING READING DATA CONTROLLER CPU Devices in the range set with the Device Label Automatic Assign Setting function automatically assigned devices cannot be used in the program 12 If automatically assigned devices are used in a program a compilation error occurs For the Device Label Automatic Assign Setting function Section 5 8 When array labels are used 5 When devices labels are used for indexes in array labels the compilation result is created with the Z gt 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 20 Z1 Universal model QCPU LCPU Z16 to 19 e FXCPU 20 VO Projects which use devices labels for indexes in structure array labels USING USER LIBRARIES The accessible number of array elements differs between Works2 Version 1 98C or earlier and GX Works2 Version 1 492N or later according to the programmable controller type and the index CD modification Review the program where over 65 536 array elements are accessed because the program 3 operation may be changed if the project created in GX Works2 Version 1 98C or earlier is compiled 2 Checking labels used for arguments of instruction The label checking method differs according to the programming language A For Ladder Diagram and Sequential Function Chart Zoom check if the devices are applicabl
100. ERATIONS OF PROGRAM EDITORS 6 1 2 Available comment types The following explains comment types that can be used for each program editor Comments on ST editor On the ST editor comments are enclosed by and wr Tran01 TRUE comment gt Comments on the Structured Ladder FBD editor On the Structured Ladder FBD editor comments can be pasted anywhere in the same manner as elements L Section 8 9 amp POU 02 PRG Program Structured Ladder FBD In the Guided mode comments can be added at the start of a ladder block Section 8 10 9 B Label comments Label comments and remarks set at label setting can be displayed on tooltips Cs Section 6 2 8 B Device comments Global device comments or local device comments can be displayed on tooltips Cs Section 6 2 8 For details of device comments refer to the following manual K GX Works2 Version 1 Operating Manual Common 6 4 6 1 2 Available comment types 6 2 Common Operations of Program Editors 62 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 6 2 1 Using POUs Element Selection window SCREEN CONFIGURATION Select POUs such as functions and funct
101. Edit gt Cut Copy Ex J Select a ladder block to which cut copied ladder block is pasted and select Edit Paste A cut copied ladder block is inserted above the selected ladder block B Copying moving ladder blocks with the drag and drop operation To copy move ladder blocks click the ladder block header and drag and drop the ladder block Copy Click the ladder block header and drag and drop it while holding down the key The ladder block is copied Move e Click the ladder block header and drag and drop it The ladder block is moved The ladder block can be moved only within the same editor Point Operations when dragging and dropping ladder blocks 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 copy and move operations eu Copy Move ht 8 28 8 8 3 Cutting copying pasting and moving ladder blocks 8 8 Editing Ladder Blocks 8 8 4 Editing ladder block headers 1 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 OVERVIEW Ladder block number 1 Ladder block label abel data FLIRT Ladder block title Title L 020 SCREEN CON
102. FIGURATION Ladder block header Display contents 2 Description Ladder block number A number automatically assigned from the start E Enter character string to be specified the jump target when using 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 dex HUE 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 PROGRAM CONFIGURATIONS PROCEDURE 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 title Ladder Block Labeli Title1 Cancel OPERATIONS OF PROGRAM EDITORS SETTING LABELS COMMON EDITING ST PROGRAMS EDITING STRUCTURED a CD LZ alee OQO 39 Ta 8 8 4 Editing ladder block headers 8 29 s GX Works2 WwW 8 EDITING STRUCTURED LADDER FBD PROGRAMS 8 8 5 Editing listed ladder blocks Edit the listed ladder block header information Screen display Select Edit Ladder Block List Ladder Block List Tile Comment Label Titles Control 21525651 Label
103. IININVHOOSd NOININOO c lt Q LL Z Q N 0 A z gt lt o ru c prar em ur c c pus o0 d o c S Q X Mar Q 65 D C Overview of Screen Configuration SCREEN 2 1 2 MELSOFT uw s GX Works2 v 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 on which a work window and docked windows are displayed Screen display Title t Project Edit Find Replace Compile View Online Debug Diagnostics Tool Window Menu x dee en e BBB ipea vogue Element Selection window Docked window Navigation Element Selection p amat Toolbar Hem DE osancetieg Rak mure te B pe T a Initial Program DUE RD Ej Mov a C DENM Eh move fd task3 DE Navigation um QUUD O o 0 ca BEEN ooo oo ee ee ee a a d window loco ERBEN 9 99 B Scan progam CANNE fe 50 0 0 0 0 0 0 0 0 0 0005s HO e ooo oos _ Task 01
104. ING USER LIBRARIES 13 3 2 Creating programs using user library Use data in a user library to create programs in a project B 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 B 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 B Using user library data functions function blocks Use functions function blocks in a user library by selecting a user library for POU type on the Element Selection window For details of using functions function blocks refer to Section 5 4 B Using user library data structures Use structures in a user library by setting them in each label setting editor For details of using structures refer to Section 5 6 13 3 2 Creating programs using user library 13 12 13 3 Using User Library 13 3 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 Editing disabled status Editing status Navigation User Library Navigation User Library 21 M 2j h lt ALL gt Program Programi Program Local Label Global Label uj FB
105. LZ alee QO 39 Ta s GX Works2 v 8 EDITING STRUCTURED LADDER FBD PROGRAMS 8 10 Editing in Guided Mode 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 gt Guided Editing 253 amp Ladder PRG Program Structured Grid in Guided mode 8 10 1 Overwrite mode and insert mode Select either overwrite mode or insert mode in the Guided mode Overwrites the existing element at the cursor Blue position with the entered element incer oda Moves the existing element at the cursor position to Purple the right and inserts an element For switching between overwrite and insert modes follow the operation below Operating procedure 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 rset key 8 36 8 10 1 Overwrite mode and insert mode 8 10 Editing in Guided Mode 8 10 2 Entering elements The element entry method in the Guided mode is the same as that of the Select mode For entering elements refer to the following section K3 Section 8 2 1 Entering elements 8 10 3 Entering instructions The instruction entry method in the Guided mode is the s
106. N EDITING ST PROGRAMS H e m H CD c Z Lr O LADDER FBD PROGRAMS s GX Works2 WwW 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 B Various programming languages are available Various programming languages are available for structured programs Users can combine these languages by selecting the most appropriate programming language for each purpose to create programs Language Description A graphic language using ladders composed of contacts and coils 14 Ladder Diagram LD Can be operated in a similar way to existing GX Developer operation Structured Text ST A high level structured text language with grammatical structure similar to C language Sequential Function Chart A graphic language in which executing orders and executing conditions of programs are SFC defined A graphic language using ladders composed of contacts and coils which can be inserted Structured Ladder flexibly Function Block Diagram FBD 1 Not supported by FXCPU A graph
107. N3AO NOININOO EDITING ST PROGRAMS This chapter explains the functions of ST editor to edit ST programs g 2 7 1 7 MELSOFT uw Ls GX Works2 v 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 Structured Text 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 S MAIN ST PRG Program ST FOR counter 0 TO 10 BY 2 DO IF gt 12345 THEN Var counter ELSIF Yarl lt 22500 THEN Yarl var var2 ELSE FOR count 01 2 0 TO 123 DO FOR count 02 2 0 TO 223 DO IF count 01 100 THEN Yarl Varl 2 ELSE Yarl 3 END IF END FOR END FOR END IF END FOR Point P 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 CT g btno1 fRUE ELSE _btnO2 FALSE END IF FBO1finputl input XKT inputs lt lt c LUFBI Functionblock Syntax Blue Operator Black Comment Dark green Constant Black GString constant Black D
108. NG 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 KL GX Works2 Version 1 Operating Manual Common 9 1 1 Jumping to specified line The cursor jumps to the specified line Screen display Select Find Replace Jump Jump LineNo 50 Exi Operating procedure 1 Setthe item on the screen Item Description Enter a line number to which the cursor jumps Line No Click 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 fi 01 FUN Word Signed Program ST FOR counter 0 TO 10 BY 2 DO IF sVar 2 12345 THEN Ward lt 1 counter ELSIF varo 22400 THEN svart ariz Bookmark END IF END FOR 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 1 A new bookmark is set at or the existing bookmark is cleared from the line where the cursor is placed Jumping from bookmark list
109. Name labels are entered system label names are Setting determined based on this setting at the time of project save sampling Trace GX Works2 Version 1 Operating Manual Common 1 Not supported by FXCPU Not supported by Simple project 3 For FXCPU this item is supported by FX3s FX3G FX3GC FX3U and FX3uc only 14 8 X3QNI NOI LISOd C H3TIOHLNOO ONISHO LINOIN 5 SNOILdO 138 T XIaN3addv 21412385 ONI IIdINOO 3 319VANNVYJo90ydd ONISN O4 SNIHOHV3S ONILHJANOO V1VQ 9NIQV3S 9NLLISM App 2 List of Toolbars and Shortcut Keys Appendix 1 APPENDIX P ON MELSOFT uv La GX Works2 WT APPENDIX 1 List of Toolbars Shortcut Keys This section shows the list of toolbars and shortcut keys that can be used in Structured project For details of functions which are not described in this section refer to the following manual KL GX Works2 Version 1 Operating Manual Common For Common FB indicated in the Reference column refer to the following manuals respectively Common GX Works2 Version 1 Operating Manual Common FB GX Works2 Version 1 Operating Manual Simple Project Function Block Appendix 1 1 Common toolbars and shortcut keys The following explains the toolbars that are available regardless of the editing target and the corresponding s
110. OPERATIONS OF PROGRAM EDITORS SETTING LABELS EDITING ST PROGRAMS a CD Le QO Ta s GX Works2 w 8 EDITING STRUCTURED LADDER FBD PROGRAMS Operating procedure 1 Select a contact or coil whose type is changed Select Edit gt Signal Configuration Configure 2 3 Select the type on the Signal Configuration screen 4 Click the button The selected contact or coil is set lt Contact selected gt lt Coil selected gt Signal Configuration Signal Configuration C Close Contact Negation Rising Pulse d Reset Cancel C Falling Pulse fs SE Close Contact 9 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 output pin For a bit type input pin and a bit type output pin connected to a POU such as an FB and 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 in the following figure and select Edit Signal Configuration Configure AND MU 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 2 8 5 Changing Type of Contact and Coil Changing contact and coil in predetermined order The following table s
111. PU EY N GX Works2 Version 1 Operating Manual Common Device Memory Editor copy ane Select whether to copy the texts in the upper row increment when inserting me after incrementing it when inserting a row Section 5 5 5 Copy data type comment Select if the data type comment and remark shall items be object for auto copy Label Setting Editor i Set the default string length for string data type Section 5 5 3 Select whether to display last blank row This setting is valid for global label and local label except the local label of function block function and structured data type MONITORING Section 5 5 5 Display last blank row USING USER LIBRARIES Parameter 5 GX Works2 Version 1 Operating Manual Common LN SETTING OPTIONS gt aN APPENDIX INDEX 14 5 A GX Works2 w 14 SETTING OPTIONS Tree item O Explanation Reference GX Works2 Version 1 Operating Manual Common Display Format of Select whether to display monitored value in Section 12 3 1 Monitoring Value Decimal or Hexadecimal Monitor buffer memory and link direct device Select whether to monitor buffer memory and link direct device during monitoring Scan time of PLC will lengthened depending on the setting QCPU LCPU FX3U C Significant Characters se Section 12 3 2 monitor character string data When Alway
112. RARIES gt SETTING OPTIONS APPENDIX INDEX s GX Works2 WwW 10 CONVERTING COMPILING PROGRAMS 10 1 Converting Compiling 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 Sequence Compilation target program Converts compiles uncompiled program blocks only The program blocks become one sequence program after the compilation Program block 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 on a programmable controller CPU Operating procedure Select Compile Build Programs are compiled and the result is displayed on the Output window By double clicking the result errors warnings only the corresponding error location in the program is displayed For checking errors warnings refer to Section 10 6 MELSOFT Series GX Works2 n Structured OpemaniStruct E Workspace Str10_1 POU 02 PRG Program Structured Ladder FBD i Project Edit Find Replace Compile View Online Debug Diagnostics Tool Window inBBe SEE UAE B sun Ht Wt gt gt
113. S COMMON EDITING ST PROGRAMS H e m H CD c Z Lr O LADDER FBD PROGRAMS 4 2 2 Registering program blocks to tasks 4 5 LO GX Works2 v 4 PROGRAM CONFIGURATIONS B Setting program names on the program selection screen oet 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 libraries 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 oet executing conditions for program files and tasks B Executing conditions for program files execution type OVERVIEW Executing conditions for program files are set on lt lt Program gt gt tab of PLC parameter Executing conditions can also be set by dragging and dropping program
114. S OPERATIONS OF muli PROGRAM EDITORS OQ COMMON EDITING ST PROGRAMS H e m H CD Z Lr O LADDER FBD PROGRAMS 6 2 1 Using POUS Element Selection window 6 7 s GX Works2 v 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 Label Name Select from Registered Label Scope to Find lt ALL gt Label Setting Information Type Classification Simple Data Types Scope to Register Glob ata Lype v Class VAR_GLOBAL Data Bit Device i Registered Constant label list Comment Newly register labels to Globali and set it to the program Apply Minimize dialog after applying 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 C WM R
115. SITION CONVERTING COMPILING PROGRAMS TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER CPU EN NO MONITORING USING USER LIBRARIES N o SETTING OPTIONS APPENDIX INDEX s GX Works2 WwW 12 MONITORING Poi Monitoring condition setting he step number set for monitoring condition is the one displayed on the compilation result e A communication error may occur if the step specified when selecting start or end is not executed When an error occurs set the step number for Specify Step after checking the compilation result e When ST control syntax is used the start number may be larger than the end number e Since the function block where Use Macrocode is selected on the properties cannot calculate the range of target function block the applicable specification range of step is the target program file lt Applying function blocks to locations where instances are used Cs Section 4 3 2 When the last row of function block is selected the last step number indicates not the last step of function block but the last step of call source program 12 12 VAN MELSOFT V 43 USING USER LIBRARIES In Structured project user libraries are shared among multiple projects as program assets This chapter explains the user library operating methods or O LL O Z I O X lt 00 SPECIFIC POSITION CONVERTING COMPILING PROGRAMS TO FROM PROGRAMMABLE
116. ST editor 2 Select Edit gt Display Template A template is inserted Bi POU 01 PRG Program ST vara counter END 4 J Enter variables according to the inserted template POU 01 PRG Program ST IF g_booll AND THEM ar 1 caunter IF 7 1 4 Using templates Delete the data type name enclosed by and enter a label name or device that is equivalent to the data type COMMON H e m H CD c Z Lr O OVERVIEW SCREEN CONFIGURATION PROGRAMMING CONFIGURATIONS PROCEDURE PROGRAM OPERATIONS OF mul PROGRAM EDITORS SETTING LABELS EDITING ST sten IS LADDER FBD PROGRAMS s GX Works2 v 7 EDITING ST PROGRAMS Inserting templates A template can also be inserted by right clicking the instruction function control syntax entered to the ST editor and selecting Display Template 8 from the shortcut menu Editing arguments Select Edit Mark Template Left 4 Mark Template Right or press 4 8 keys to set an argument of the template in the selected status one by one a 01 PRG Program ST PANY THEN War var l counter END IF Considerations of argument when calling function blocks The output argument OUTPUT is not display
117. Section 5 8 Select Use Macrocode if the number of set pointers or more instances are required OVERVIEW Using instruction for EN control Z The following shows the example of codes when the following programs are compiled lt Note that devices are assigned as follows 29 e Input1 Yz Input2 X11 dies 3 e Output1 D10 lt The program at the location of use gt PROGRAMMING M40 EN ENO inputi Process Hours Due gt i ME Function block PROGRAM EM PROCEDURE Code to be created in program at the 0 Use MC MCR location of use m LD M40 1 OUT M41 9 MC NO M4096 MC MCR is used TT 7 The check box is selected AND X11 6 INCP D10 MCR NO X LO or 40 29 Oz OUT M41 ES LDI M40 CJ P2050 Sok The check box is cleared LD AND X11 7 INCP D10 P2050 z ow ac E du SEE maje 4 3 2 Setting properties of functions and function blocks 13 LO GX Works2 v 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 Section 4 2 2 e Functions and function blocks are used in program blocks Section 4 4 1 4 4 Using POUS 4 4 1 Using functions and function blocks 1 Select a function or function block fr
118. 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 Model Addition Q00J 200 901 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 Modification Section 6 3 4 Section 7 12 Section 6 4 3 to Section 6 4 12 Section 6 4 4 to Section 6 4 13 Chapter 7 to Chapter 11 Chapter 8 to Chapter 12 Oct 2009 SH NA 080781ENG D Correction 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 L02 L26 BT Addition 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 Sectio
119. U Simple 02 U3E1 G4 Common Global P co Import MELSOFT E GX E MT E GT Navigator 19 Works2 Fij Developer2 Designer3 SETTING LABELS 2 Select the check box es of Select of a system label to import to the project 3 Clickthe mew button OPERATIONS OF PROGRAM EDITORS QO COMMON 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 EDITING ST PROGRAMS 5 Click the button H e m H CD c Z Lr O LADDER FBD PROGRAMS s GX Works2 Ww 5 SETTING LABELS Reflect to System Label Database For FXCPU this button is supported by FX3Gc and FX3uc only Applies the registration reserved deregistration reserved system label information to the system label data base and confirm the registration deregistration Operating procedure Reflect to System Label Database 1 Click the The following message is displayed button MELSOFT Series GA Works The edited system label is reflected En the system label database When it is reflected the Following is executed When the global label is uncampiled Build operation is executed After the reflection the project is saved Are vou sure vou want to continu
120. abel Registration Selection Section 6 2 2 screen Displav Template Insert a template corresponds to the andi aus P instruction function control syntax Set an argument of the template in the Mark Template Left selected status from the left by selecting the CONVERTING COMPILING PROGRAMS Section 7 1 4 menu each time Set an argument of the template in the A Mark Template Right selected status from the right by selecting the menu each time TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER CPU Set a bookmark at the cursor line If a Toggle Bookmark bookmark has already been set delete the set bookmark s N z Bookmark List Jump to the specified bookmark from the bookmark list Section 9 1 2 f n a Section 6 2 4 Num l 1 Zoom out the screen one level T Jump to the specified line Section 9 1 1 _ Zoom Header Body Header e the label setting editor of the selected Section 6 2 9 MONITORING USING USER LIBRARIES Cut the selected data Paste the cut copied data the cursor _ Display the instruction help of GX Works2 m help or the help of the user library Section 13 3 5 Enter an assignment operator when editing the inline structured text program s Section 7 1 1 gt SETTING OPTIONS 1 Num indicates keys in the numeric keypad APPENDIX INDEX
121. abels 5 6 Setting Structure Labels 5 6 Setting Structure Labels This section explains how to set structure labels OVERVIEW 5 6 1 Setting structures oet the elements of the structure on the Structure Setting screen SCREEN CONFIGURATION Screen display Select Project view POU Structured Data Types structure Structure Setting Struct1 LabelName ata Type Constant Comment dee ernie 2 wordunsonedlBistnalttl Member 3 daaa na Member IES L 4 Operating procedure PROGRAMMING the items on the screen AES Maximum number of Item Description characters Label Name Enter a desired label name 32 CONFIGURATIONS PROCEDURE Set a data type from the Data Type Selection screen displayed Data Type clicking E Section 5 5 3 128 It can also be entered directly SETTING LABELS Constant Constant values are not displayed on the Structure Setting screen 128 Enter a comment comment 2 Comments can be displayed on the program editor by switching 1024 display hide of comments lt Section 8 7 4 6 1 Anew line can be inserted in a cell by pressing the Enter keys 2 compilation is necessary after editing Oti ee Sx 7 6 Point Ong Creating new structure data Create structure
122. alue When devices are set for global labels the data is copied with an incremented device number e When Copy data type comment items is selected Copy the data type comment and remark and add a row with the copied data below the specified row H e m H CD c Z O LADDER FBD PROGRAMS 2 9 4 Label comments 5 17 t GX Works2 w 5 SETTING LABELS B Deleting rows Delete a row on the label setting editor Select Edit Delete Row lt Class Label Class Label Mame 1 VAR IMPLIT data gt 1 MAR data 2 VAR ldaal 2 CONSTANT 3 CONSTANT dataz 3 B Displaying all lines or first line of comments and remarks For the Comment and Remark columns data can be entered in multiple lines The all lines first line display function switches the display between all lines and only the first line by double clicking or All lines display Display all lines of information on the Comment and Remark columns Double click on the row number cell of the table First line display Display only the first line of information on the Comment and Remark columns Double click on the row number cell of the table cya data3 ARRAY D 3 OF Struct x EMEND A Only the first line is displayed data3 of structure Struct element 0 group element 1 groupe ARRAY 0 3 OF Stru
123. ame as that of the Select mode For entering instructions refer to the following section L3 Section 8 2 2 Entering instructions 8 10 4 Connecting elements with lines Connect the entered elements with a line Operating procedure 1 Select Edit gt Guided Mode Line Mode The thickness of grid cursor is doubled The normal grid in the Guided mode is divided into 4x5 parts of smaller grids to specify a position 2 Move the cursor to the position where the line is to be SESTE In lt connected by pressing the L L key 3 Press the 5 button Horizontal line A horizontal line is drawn by the length of one divided grid 4 Press the 5 button Vertical line A vertical line is drawn by the length of one divided grid 8 10 2 Entering elements 8 37 COMMON EDITINGSTRUCTURED OVERVIEW SCREEN CONFIGURATION PROGRAMMING CONFIGURATIONS PROCEDURE OPERATIONS OF PROGRAM EDITORS SETTING LABELS EDITING ST PROGRAMS a CD LZ QO se 24 GX Works2 8 EDITING STRUCTURED LADDER FBD PROGRAMS 8 10 5 Drawing lines Draw a line Operating procedure 1 Select Tool Options gt 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 t
124. art position For the Select mode the cursor changes to g J Click the end position The line is automatically routed 8 8 8 3 2 Connecting elements with lines 8 3 Drawing Lines 8 3 4 Overwriting input output variable with lines 1 Overwrite an input output variable of a function or function block with a line gt Operating procedure 1 Select Tool gt Options Program Editor INTER 2 Structured Ladder FBD FB FUN TH gt 2 Select Pin overwrites ze 142 J Select Edit Auto Connect TELS EN Emo BO f 3 4 Draw line over the input or output variable The existing input output variable is automatically overwritten with the line PROGRAMMING 8 3 5 Rearranging lines automatically Rearrange and redraw a line when the Auto connect function is activated This function is enabled only when the Select mode is selected Operating procedure PROGRAM CONFIGURATIONS PROCEDURE 1 Select the line to be rearranged 2 Select Edit gt Recalculate Line Before automatic arrangement execution Input Inputz Output H C Qutoute OPERATIONS OF PROGRAM EDITORS SETTING LABELS COMMON After automatic arrangement execution LJ Input Input Output e H p N OF ZO Inputs utputz ag 8 EDITING STRUCTURED a CD LZ
125. ary Data type set on Result Type can be used Example Set return value of function name FUN 01 to 0 Structured Ladder FBD ST 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 e Input2 X11 Output1 010 The program at the location of use POUO2 PRG Program Structured Ladder FBD MEME FB 01 EB Process Hours Dulputl Sse x e EE Function block Use Macrocode CERE ded gresia Pro gramine Function block code location of use Applied None The check box is selected LD OUT M4096 P2048 LD X11 Not applied OUT M4097 e 12 The check box is cleared LD SM400 INCP D6144 CALL P2048 LD SM400 RET MOV D6144 D10 When Add temporary variables as arguments to use macrocode under Tool Options Compile gt Structured Ladder FBD ST Compile Condition1 is selected clear the check box 4 12 4 3 2 Setting properties of functions and function blocks 4 3 Creating POUS Point When Use Macrocode is cleared 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
126. ary name to be displayed as a library help on the User Library view 2 Select Project Library Help A library help screen is displayed 9 Displaying help from utilized function blocks The help set to the user library can be displayed from the utilized function blocks of the user library on the program Select a function block on the program and press the key 13 16 13 3 5 Displaying user library help VAN MELSOFT V7 14 SETTING OPTIONS This chapter explains the functions of options for setting screen display format or detailed operations of each function or O LL O Z I O X lt 00 SPECIFIC POSITION CONVERTING COMPILING PROGRAMS 12 14 1 Basic Operations 14 2 14 2 Option Setting List 14 3 0994 gt USING USER LIBRARIES SETTING OPTIONS gt aN APPENDIX INDEX 14 1 t GX Works2 v 14 SETTING OPTIONS 14 1 Basic Operations This section explains how to set options Screen display Select Tool gt Options Options Untitled Project Language Setting Automatically change language according to system Other Project Dedicated Instruction Setting Change History Use Dedicated Instruction For Developer G IEC Developer EE Program Editor Device Comment Editor Connection Destination Save Setting Device Memory Editor v Connect directly to PLC an creating new project Label Se
127. at the start of the ladder block added section 8 10 9 in Guided editing t Lu OO Recalculate Line Arrange a line automatically to redraw it Section 8 3 5 E Insert Row Insert a row in a ladder program being edited Section 8 3 6 Insert Column Insert a column in a ladder program being edited 4 New Ladder Block List 2 Insert a new ladder block at the start of all ladder blocks lt Insert new ladder block in front of a ladder block being edited e Section 8 8 1 Insert a new ladder block after ladder block being edited Ou Insert a new ladder block at the end of all ladder blocks ro Input Instruction Open the Input Instruction screen Section 8 2 2 5 OPERATIONS OF PROGRAM EDITORS SETTING LABELS COMMON EDITING ST PROGRAMS H e m H CD c Z Lr O LADDER FBD PROGRAMS 1 3 3 List of functions for editing in Structured Ladder FBD 1 9 La GX Works2 WT 1 OVERVIEW Edit function for editing in Structured Ladder FBD Reference Ladder Symbol Insert at the cursor position Section 8 2 1 List Oberafids vid the screen for inserting a label by selecting an existing Section 6 2 2 Number of Pins Increase the number of arguments of functions and function Increment blocks Section 8 6 3 Decrease the number of arguments of functions and function Delete Ladder Block List Display list of ladder blocks program
128. ation Reference Ladder Wrapping Select whether to wrap ladder The edited ladder Return Contacts shall be object after changing the setting pes Set the default at opening structured ladder FBD FBD Editor in guided editor as guided mode mode Structured Ladder Guided Allow hotkey repeater Select whether to display grid line ruling dialog at Section 8 10 FBD drawing lines SEARCHING FOR SPECIFIC POSITION Enter label names after Select whether to input label names or devices contacts and coils after entering contacts and coils Set the width of comment to be added in ladder block with grid numbers when adding ladder block Auto Comment Block Width Program Editor Select whether to use the automatic indent when beginning a new line after entering ST control puto lngenton syntax such as IF or FOR and when displaying SEENON tele template of inline structured text ST Select whether to display listed label names Instruction label name starting with the input character when a character Section 7 1 1 prediction n is input Set tabulator length is not available with inline structured text ete Ladder SFC GX Works2 Version 1 Operating Manual Common 5 GX Works2 Version 1 Operating Manual Simple Project Device Comment Editor CONVERTING COMPILING PROGRAMS TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER C
129. ces Manual Common specified for the CC Link parameter Device Reference GX Works2 Version 1 Display assignments of refresh devices and input output Operating Manual devices specified for the AnyWireASLINK parameter Intelligent Function Module PROGRAMMING CONFIGURATIONS PROCEDURE A screen used for monitoring and changing current device Watch 1 to 4 values Intelligent Function Module Monitor 1 to 10 A screen used for monitoring intelligent function modules GX Works2 Version 1 A screen used for searching and replacing character strings Operating Find Replace in the project Manual Common PROGRAM A screen used for setting the debug which uses the Debug simulation function Status bar Display information about a project being edited OPERATIONS OF PROGRAM EDITORS SETTING LABELS COMMON EDITING ST PROGRAMS H e m CD Z O LADDER FBD PROGRAMS t GX Works2 WT 2 SCREEN CONFIGURATION MEMO STS9V1 138 SYOLIGS JO SNOILVH3dO 15 SNILIO3 qaJ 43aav1 GAYNLONYLS ONILIGS St 4 SNOILVYNDISNOO NOILVYNDIANOD Keg N33HOS MAIANSAO NOININOO PROGRAMMING PROCEDURE This chapter explains how to create programs in Structured project Creating Programs
130. ct VAR B Selecting all rows All lines are displayed All rows can be selected by the following operation Select Edit gt Select All Es Function FB Label Setting FB 01 FB Label Name Class VAR INPLIT v i EET VAR CONSTANT data3 VAR OUTPUT CEELI Bit 5 18 5 5 5 Editing rows 5 5 Common Operations for Setting Labels B Sorting labels Sort the labels in ascending descending order by selecting a label item Applicable to only local labels of program and global labels 1 Select Edit Sort gt Class Label Name Data Type Constant Device Address Comment Remark The following confirmation message is displayed OVERVIEW MELSOFT Series GA Works Sort target item Project will be uncompiled after sorting Unable to back to the initial sorting order after this operation Unable to cancel sorting until completion of the operation It may take several minutes to complete if many labels were registered Unable to execute Undo Redo after this operation SCREEN CONFIGURATION Are vou sure you want to continue PROGRAMMING CONFIGURATIONS 4 PROCEDURE 2 Click the Yes button Sort the selected item in ascending order 15 displayed on the title name for ascending order For descending order select the same item again is displayed on the title name for descending order amp
131. ction 14 2 Appendix 1 1 Appendix 1 3 Modification Section 10 4 7 to Section 10 4 8 Section 10 4 8 to Section 10 4 9 Section 12 1 Section 12 1 1 to Section 12 1 2 May 2013 SH NA 080781ENG Q Model Addition LO2S P LO6 P L26 P FX3s Correction GENERIC TERMS AND ABBREVIATIONS IN THIS MANUAL Section 2 1 Section 5 5 2 Section 7 1 1 Section 8 2 2 Section 8 4 2 Section 8 4 3 Section 10 5 3 Section 12 6 Section 14 2 Sept 2013 SH NA 080781ENG R Addition Section 8 7 5 Correction Section 1 3 3 Section 5 5 6 Section 8 6 1 Section 14 2 Modification Section 8 7 3 to Section 8 7 5 gt Section 8 7 2 to Section 8 7 4 Deletion Section 8 7 2 Dec 2013 SH NA 080781ENG S Correction Section 4 1 Section 4 4 1 Section 5 6 4 Section 8 8 5 Section 10 5 3 Section 14 1 Section 14 2 2014 SH NA 080781ENG T Correction Section 4 4 1 Section 5 5 3 Section 5 6 4 Section 10 5 3 Jun 2014 SH NA 080781ENG U Correction Section 5 2 Section 5 5 1 Section 10 2 Section 14 1 Section 14 2 Sept 2014 SH NA 080781ENG V Correction Section 13 3 5 Appendix 1 Dec 2014 SH NA 080781ENG W Correction Section 10 1 Section 10 2 Mar 2015 SH NA 080781ENG X Correction Section 10 5 Section 12 1 2 Section 13 3 1 Section 14 2 1 The manual number is written at the bottom left of the back cover Japanese Manual Version SH 080732 AG This manual confers no industrial property rights or any rights of any other kind nor does it con
132. ction 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 KL GX Works2 Version 1 Operating Manual Common Screen display Select Project view gt POU gt FB FUN gt function function block Local Label Function FB Label Setting FB 01 FB PRISES DUE Class Label Name Comment 3 VAR INPUT Input s n EA B 5 _ k Operating procedure 4 the items on screen A Maximum number of Item Description characters Select a label class from the list displayed by clicking zl Cs Section 5 5 1 Class Ladder ST SFC Structured Label Name Enter a desired label name Ladder FBD 32 FB instance name 16 Specify a data type from the Data Type Selection screen displayed by licking Data p B yp E Section 5 5 3 It can also be entered directly Enter a constant value when VAR CONSTANT is selected for Class and simple type is selected for Data Type 28 Constant Enter a comment Comment 1 2 Comments can be displayed on the program editor by switching 1024 display hide of comments Section 8 7 4 1 A line can be inserted in a cell by pressing the Enter keys 2 The compilation is not necessary after editing 5 4 Setting Labels for Functions and Function Blocks Point
133. ctions to create programs using Structured Ladder FBD and Structured Text For all the functions of GX Works2 and the functions with Common indicated in the reference column refer to the following manual ho OVERVIEW Common GX Works2 Version 1 Operating Manual Common 2 2 Z 1 3 1 List of functions common to Simple project and Structured i BO 3 This section explains the functions common to Simple project and Structured project B List of common functions PROGRAMMING CONFIGURATIONS PROCEDURE The following tables show functions that are available regardless of the type of editing or setting target Project common function Reference Object Specify data in selected connection destination as a connection Set as Default Connection na destination for regular use Property Display the selected data properties Library Create a new library Section 13 2 1 Install Import a created library to the project Section 13 3 1 Deinstall Delete the library from the project Section 13 2 5 Update the library imported to the project Section 13 3 4 Rename the library Section 13 2 2 Section 13 3 3 Change Password Set a password for the library Section 13 2 6 Section 13 2 4 Display help information of the library Section 13 3 5 PROGRAM OPERATIONS OF PROGRAM EDITORS SETTING LABELS COMMON EDITING ST QO PROGRAMS
134. d on the Data Type column on the label setting editor 5 14 2 9 3 Selecting data types 5 5 Common Operations for Setting Labels Point P 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 key Press the key Press the key OVERVIEW B Setting arrays for data type Define a data type as an array To define a data type as an array set the items of Array Element on the Data Type Selection screen 1 Click on the data type entry field on each FESTER SCREEN CONFIGURATION e label setting editor 2 Libraries Data 2 Select ARRAY under Array Element 5 Word Signed d Double Wnord Signed 3 Enter the number of elements for Element Word Unsigned String 16 bit E Double Word Unsigned Bit String 32 bit FLOAT Single Precision 4 Set the data type of the array element in same manner as setting the normal data type Retentive Timer Type Class Pointer Simple Types f Structured Data Types C Function Blocks Array Element ARRAY Element c CONFIGURATIONS 4 PROCEDURE 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 declaration in text on each label setting e
135. ditor Des LabeName Data Type Bit 0 2 Word Lnsigned Bit 1 2 Struct 0 4 SETTING LABELS OPERATIONS OF PROGRAM EDITORS QO COMMON EDITING ST PROGRAMS H e m H CD c Z Lr O LADDER FBD PROGRAMS 5 5 3 Selecting data types 5 15 A GX Works2 w 5 SETTING LABELS To change the array to a two or three dimensional array Edit two or three dimensional array by directly entering the array declaration in text on each label setting editor For details on array declarations refer to the following manual MELSEC Q L F Structured Programming Manual Fundamentals o Cas LabelMame Data Type 2 0 4 word Lnsigned Bit 1bBit 4 D 0 1 2 Struct 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 compilation Offset values Minus values can be set for offset values Digit specification of labels In the Structured Ladder FBD program and the Structured Text program digit specification of labels K4label1 for example is applicable Define the data type of the labels to be digit specified as a bit type array However structure labels cannot be specified SDT1 K4label1 etc In addition the digit specified labels cannot be used in the following function
136. e Caution Executing Build operation disables Online Program Change When vou don t execute execute Build and Save operations separately 2 Clickthe xs __ button The build and the save functions are performed automatically 3 The Check before registering in system label database screen is displayed Check before registering in system label database Find Subject Whole Display Find Characters Find Next Registration Contents System Label List Name System Label Name Label Name Data CPU Name Project Name Attribute Comment Labell Storage Storage Word Signed GxW2 Pro2 U3E0 G10000 Common Relationship diagram between system label database 1 and project 2 Cancel Register ET The project is saved at the same time MELSOFT GX MT B GT with the registration to the system label database Navigator Works2 aj Developer2 Designer3 4 Confirm the registration information and click the button After the system label information is applied to the system label data base the icon displayed on the Global Label Setting screen is updated to indicate the number of items that are not updated and the updated results as shown below DRO rS 0 Not Reflected 1 Not Reflected 0 Total 1 Total 0 5 2 Setting Global Labels Point Class setting When an item other than the class such as a label name and data type is
137. e e o jon ADD E i cde B ou cw xw ww Oo chee oe LINT11 PIN Result INT13 Applicable 777 7 MNT DO AES LINT 88 Result gt LINT1 IN p mM 7 c7 gt gt Dd e o o e ADD oo oe L INT 1 8 Result INT13 Not applicable L_INT12 S 8 8 8 Displaying grid OPERATIONS OF PROGRAM EDITORS SETTING LABELS COMMON A grid indicates specific positions such as tab stop positions and the start end position of a line on a program editing area Switch the grid display on a program editing area Operating procedure EDITING ST PROGRAMS Select View gt Grid With grid Without grid EDITING STRUCTURED a CD LZ QO Qg ss 8 8 8 Displaying grid 8 33 24 GX Works2 8 EDITING STRUCTURED LADDER FBD PROGRAMS 8 9 Editing Comments This section explains how to edit comments Comments can be entered in same manner as elements Section 8 2 1 Operating procedure Select Edit Ladder Symbol gt Comment 8 9 1 Editing comments Edit a comment Operating procedure 1 Click the comment The comment entry field is enabled Click Comment entry field 2 Enter a comment EIL Pres
138. e according to their purpose For information such as the content and number of each manual refer to the list of Related manuals 1 Installation of GX Works2 and USB driver GX Works2 Version 1 Purpose GX Works2 Installation Instructions Operating Manual Common Learning the operating environment and installation method Learninga USB driver installation pa method Details 2 Operation of GX Works2 GX Works2 Beginner s GX Works2 Version 1 Manual Operating Manual Purpose Simple Project i Simple Structured Boon Structured car abe Project Project Function Project Module Learning all functions of GX lt a Learning the project types and available languages in GX Works2 Learning the basic operations and operating procedures when et creating a simple project for the an first time Learning the basic operations and operating 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 the operations and operating procedures when creating function blocks FB in Simple project Learning data setting methods for intelligent function module Details A 15 3 Operations in each programming language For details of instructions used in each programming language refer to the section 4 and the section 5 on the following pages GX Works2 Beginner
139. e label of last row Es Local Label Setting SUB1 PRG 5 Local Label Setting SUB1 PRG Label Name Class Label Name Da CompleteFlag05 CompleteFlag03 Bit 5112 5113 CompleteFlag04 Bit 5114 VAR CompleteFlag05 Bit 5115 VAR CompleteFlag06 Bit AE ICompleteFlag07 kI Operation for editing rows When the cursor is on the last blank row on the label setting editor Edit gt New Declaration Before New Declaration After Delete Line cannot be selected Select a row other than the last row for adding or deleting rows Adding rows under the last row where a label is set When Automatic copy and increment when inserting a row is not set under Tool Options gt Label Setting Editor executing the New Declaration After function on the last row where a label is set adds a row with class VAR GLOBAL for global label VAR for local label is set Change it if necessary 5 20 5 5 5 Editing rows 5 5 Common Operations for Setting Labels 5 5 6 Deleting unused labels Extract unused labels from the set labels on the label setting editor and delete them in batch Unused labels are searched from the cross reference information Target labels for this operation are local labels in programs of POU and global labels OVERVIEW Operating procedure 1 Select Edit Unused label list The following message is displayed MELSOFT Se
140. e terms used in this manual Term Simple project Structured project Common instruction Special instruction List format Description Generic term for projects created by using Ladder Diagram Sequential Function Chart Structured Text Generic term for projects created by using Ladder Diagram Sequential Function Chart Structured Text Structured Ladder FBD Generic term for sequence instructions basic instructions application instructions data link instructions multiple CPU dedicated instructions and multiple CPU high speed transmission dedicated instructions Generic term for module dedicated instructions PID control instructions socket communication function instructions built in function instructions and data logging function instructions An input format to input mnemonic language in a ladder program VAN MELSOFT A 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 KL GX Works2 Version 1 Operating Manual Common OVERVIEW SCREEN CONFIGURATION PROGRAMMING CONFIGURATIONS PROCEDURE 1 1 What is Structured Project 1 2 1 2 Features of Structured Project 1 2 z te gt _ gt _ c Q 1 3 List of Functions 1 5 OPERATIONS OF PROGRAM EDITORS SETTING LABELS COMMO
141. e to the instruction For Structured Ladder FBD and Structured Text check if the data types are applicable to the instruction Canceling compilation a lt x The compilation is canceled in a program file unit Therefore even when the button is clicked during the compilation the compilation will not be canceled until the compilation of one program file is completed Note that a large scale program file with multiple functions function blocks requires a longer time to cancel the compilation z 10 5 3 Considerations of Compilation 10 19 A GX Works2 WT 10 CONVERTING COMPILING PROGRAMS 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 e Common Pointer No and Timer Limit Setting on lt lt PLC System gt gt tab File Register and File for Local Device on the PLC File gt gt tab e Settings on the lt lt Device gt gt tab Changing the following option settings e Default Length of String Data in Label Setting Editor e Settings in Compile e Changing automatically assigned devices Updating instructions and application functions when opening Structured project Changing PLC type Changing project type Reading data from programmable controller CPU except for when reading symbolic information and parameters at the same time Reading
142. ecified for array or Displayed only during ae monitorin structure the monitoring values are not 9 displayed Class Display a label class VAR_GLOBAL Device Display a device or device assigned to the label in x1 the device format Display a device assigned to the label in the Tool Hint Display Items address format 1 1 Display a device comment Device comment Device comments of devices assigned to labels X1 comment are not displayed Data Type Display a data type of the label Bit Constant Value Display a constant value of the label FALSE Label comment Display label comments GLOBAL1 comment Remark Display a remark of the label GLOBAL1 remark global label only Single Line Display tooltips in a single line Tool Hint Display Format 3 Multi Line Display tooltips in multiple lines lt Single line gt InD1 VAR GLOBAL X1 95IX L Bit FALSE Comment of In01 Remark of 1101 Remak o M ot ot ot ot ot t ot t ot 7 6 14 6 2 8 Setting display content of tooltip 6 2 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 B Displaying a label setting editor OVERVIEW Select View gt Zoom Header Body Header SCREEN CONFIGURATION B Displaying a program editor Select Vie
143. ed by GX Works2 those devices are not checked Corresponding error location of duplication check When the duplication of device names is found between global labels in single global label file the device cell with lower row number is displayed 5 8 Setting Ranges for Devices Assigned Automatically 5 8 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 when a program is compiled Section 10 5 OVERVIEW QCPU Q mode LCPU SCREEN CONFIGURATION 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 5 Selection Stat End Device Setting Range L Word Device NCC or VAR Range pM 6144 e we 16 hn Ey am L E VAR_RETAIN Range Latch 10 n W Latch 16 js Latch Bit Device KEEN lecti E VAR Range v selection mmm VAR RETAIN Range f le d ras F Pointer Timer P VAR Range
144. ed on the template when Allow OUTPUT at FB call ST under Tool Options Compile Structured Ladder FBD ST gt Compile Condition1 is not selected 1 For Simple project with labels select the following Tool Options Compile ST 7 6 7 1 4 Using templates VAN MELSOFT V 8 EDITING STRUCTURED LADDER FBD PROGRAMS This chapter explains the functions of program editor to edit Structured Ladder FBD programs OVERVIEW SCREEN CONFIGURATION PROGRAMMING CONFIGURATIONS PROCEDURE 8 1 Creating Ladder FBD Programs 8 2 8 2 Editing in Select Mode 8 4 z VH MM MD CMM MM lt 8 3 Drawing Lines 8 7 8 4 Operating Elements 8 11 8 5 Changing Type of Contact and Coil 8 15 i 9 6 Operating Functions and Function Blocks 8 18 z 8 7 Changing Display Format of Variables 8 21 5 8 8 Editing Ladder Blocks 8 27 8 9 Editing Comments 8 34 NEM a _ 8 10 Editing in Guided Mode 8 36 d 8 11 Checking Wrapping Position for Printing 8 41 EDITING ST PROGRAMS EDITING STRUCTURED a CD LZ QO Qg se t GX Works2 WT 8 EDITING STRUCTURED LADDER FBD PROGRAMS 8 1 Creating Ladder FBD Programs This section explains how to create ladder programs and functions for creating ladder programs on the Structured Ladder FBD editor The Structured Ladder FBD editor is a language editor in graphic format for creatin
145. eded after and consistency pair Build or Online Program Change It can reduce check after Build or the compile time depending on the setting Online Program Change Compile Basic Setting dei Select whether to the SET instruction as Section 10 2 target for duplicated coil check check Use the same label Select whether to use the same label name in in global label and local global label and local label When the same label label is selected local label will be given priority Creating cross reference information after compiling enables to reduce find time The Create cross reference information can be found in uncompiled project information after Specified find condition is treated as filter Common completion compile condition The setting will be canceled if find mode is Fast Find 14 6 14 2 Option Setting List Tree item Mem O Explanation Reference Stop Build of error and warning to stop the 404 4 Register warning codes to invalidate The registered warning codes shall not be displayed in Section 10 4 2 output window Disable Warning and Notification Message Output Result SEARCHING FOR SPECIFIC POSITION Display the Use Status Notification of Automatic Assign Device in Output Result The use status of device automatic assign is displayed in output window Select whether to use device names typed with Use lower case device lower case a
146. een Section 5 8 The assigned devices can be checked with the cross reference function I Works2 Version 1 Operating Manual Common System label When performing Online program change perform the function by selecting Compile Online Program Change and then save the project SCREEN CONFIGURATION PROGRAMMING CONFIGURATIONS PROCEDURE Reflect to System Label Database PROGRAM When the button is clicked after registering deregistering or importing system labels Online program change cannot be performed e System labels whose Attribute is set to Common not supported by LCPU e System labels whose Attribute is set to Common or Link not supported by FXCPU 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 OPERATIONS OF PROGRAM EDITORS BSS eRe ES COMMON EDITING ST PROGRAMS H e m H CD Z Lr O LADDER FBD PROGRAMS LE GX Works2 v 5 SETTING LABELS 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 program block Local Label
147. egistering new labels Operating procedure 1 Select the argument to which a label is entered on a program editor is 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 Claseiicafian Select a type classification of data type Section 5 5 3 OVERVIEW Data Select a data type Display a list of labels existing in the label setting editor of the search destination Select a label to be entered When Function Blocks or Structured Data Types is selected for Type Classification labels are displayed by double clicking indicated in front of the function block name or structure Registered label label name p StructData 1 Minimize dialog after After clicking the button select this to minimize the Label Registration applying Selection screen 4 Click the button The selected label is applied to the program editor SCREEN CONFIGURATION list PROGRAMMING CONFIGURATIONS PROCEDURE B Registering new labels PROGRAM Select and enter the new labels on the Label Registration Selection screen Operating procedure 1 Select the argument to wh
148. el setting data Read label setting data from CSV files Operating procedure 1 Select Edit Read from CSV File The Read from CSV File screen is displayed OVERVIEW Read from CSV File SCREEN CONFIGURATION Recent Documents 2 Desktop Dacuments PROGRAMMING CONFIGURATIONS 4 PROCEDURE Computer My Network File name Places Files of type cswtab delirmited csv Cancel 2 Select the file name to be read and click the Bren button The following message is displayed PROGRAM MELSOFT Series GX Works Reading of Ehe specified File will start Do vou want to continue Caution The current header setting will be deleted IF many windows are open it may take more time to read Once reading is executed it cannot be undone SETTING LABELS 3 Clickthe vs button The label setting data is read to the project OPERATIONS OF PROGRAM EDITORS QO COMMON EDITING ST PROGRAMS H e m H CD c Z Lr O LADDER FBD PROGRAMS s GX Works2 v 5 SETTING LABELS B CSV file format The title name of Label Setting Editor links with the title name of the CSV file e Data of column which coincides in the title name of Label Setting Editor in the CSV file is read to Label Setting Editor e Data of column which does not coincide in the title name of Label
149. elect Online Monitor Stop Monitoring The monitoring stops 12 4 12 3 Changing Operating Conditions of Monitoring 12 3 Changing Operating Conditions of Monitoring SEARCHING FOR SPECIFIC POSITION 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 CONVERTING COMPILING PROGRAMS 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 TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER CPU Operating procedure Select Online Monitor Change Value Format Decimal Change Value Format Hexadecimal 2 Decimal Hexadecimal 5 Z OOOO c s d Outputl 75 d Outoutl 1680000 7 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 USING USER LIBRARIES N Operating procedure 2 Select Tool gt Options gt Monitor Structured Ladder FBD ST Displa a y G Format of Monitoring Value Decimal Hexadecimal Display Format of Monitoring value o Decimal C Hexadecima
150. emporary variables as arguments to use macrocode All programs need to be compiled after changing the option settings Section 10 5 3 Point P Number of steps for compilation result and scan time for programmable controller Since arguments are replaced to the temporary arguments according to each argument input output and input output when calling function block the number of steps for compilation result increases and the scan time for programmable controller is lengthened Target program types The table below shows the combination of target program and function block Since the temporary variables are not added to each argument when calling the function block in other than the following situations the values of arguments are not retained when the arguments of function block are changed by executing Online program change O Applicable x Not applicable Call destination function block Structured Ladder ji Structured Call source FBD 10 10 10 4 6 Using VAR OUTPUT for an argument of function block 10 4 Changing Operating Conditions of Compilation 10 4 8 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 SEARCHING FOR SPECIFIC POSITION Operating procedure 1 Se
151. en 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 Perform the following operation as a precautionary measure For QCPU mode LCPU After writing data to the programmable controller CPU reset the programmable controller CPU clear all device memories including latches clear all file registers then switch the programmable controller CPU to RUN For FXCPU After writing data to the programmable controller CPU clear the device memory of the programmable controller CPU with the PLC memory clear function then switch the programmable controller CPU to RUN Works2 Version 1 Operating Manual Common For considerations for compiling all programs refer to Section 10 5 3 Assigning devices with the Device Label Automatic Assign Setting function Assign devices to labels with the Device Label Automatic Assign Setting function when a program is compiled For details refer to Section 10 5 The assigned devices can be checked with the cross reference function I 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 5 32 5 8 1 Considerations of automatically assigned devices 5 8 Setting Ranges for Devices Assigned Automatically Considerations
152. er to the following section Class ha i K3 Section 6 2 2 Using labels the program mn Y wO Ot 6 Set an argument 2 i Oz Enter a device or label name for the argument defined 1 Ote yo in the function or function block Input Process EN opui zuo Input Pulse Co BRE Li Cy Inserting functions and function blocks Functions and function blocks can be also inserted following operation OF e Select a function or a function block from the Project view and drag and drop it to the desired position EO Cc D 2 oes DIA 4 4 1 Using functions and function blocks 4 15 t GX Works2 WT 4 PROGRAM CONFIGURATIONS B Using function blocks created in other programming languages Use function blocks created in other programming languages Call source program Call destination function block Example 1 Combination of Ladder Diagram and Structured EP instance Ladder first level Call source program Call destination function block Example 2 IF M10 THEN Output01 TRUE Combination of Structured at Output01 FALSE Ladder Ladder Diagram FB instance END IF IF Input01 THEN and Structured Text Output02 010 first and second levels END IF Call source function block Call destination function block The following table shows the
153. es and instructions refer to the following manual L GX Works2 Version 1 Operating Manual Common 9 2 1 Jumping to specified ladder block number The cursor jumps to the specified ladder block Screen display Select Find Replace Jump Jump Ladder Black No 50 Exit Operating procedure 1 Setthe item on the screen Item Description Enter a ladder block number to which the cursor jumps Ladder Block No Click gt 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 VAN MELSOFT 10 controller CPU 10 1 10 2 10 3 10 4 10 5 10 6 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 Converting Compiling Created Programs Compiling All Programs Executing Online Program Change Simultaneously with Conversion Compilation Changing Operating Conditions of Compilation Compilation Checking for Errors and Warnings 10 2 10 4 10 6 10 6 10 15 10 23 10 1 x O LL O Z I O X lt 00 SPECIFIC POSITION CONVERTING COMPILING PROGRAMS TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER CPU s N MONITORING USING USER LIB
154. es using the MC MCR instruction to each location where instances are used at compilation Cleared Selected Use 2 3 Apply function block program codes using the CJ instruction to each location where Cleared ped instances are used at compilation OPERATIONS OF PROGRAM EDITORS SETTING LABELS COMMON Selected Become a function or function block with EN ENO Use 2 Cleared 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 9 This item can be selected only when the check boxes of both Use Macrocode and Use EN ENO are selected EDITING ST PROGRAMS H e m H CD Z Lr O LADDER FBD PROGRAMS 4 3 2 Setting properties of functions and function blocks 4 11 s GX Works2 v 4 PROGRAM CONFIGURATIONS Use MC MCR This check box can be selected only if both Use EN ENO and Use Macrocode are selected 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 necess
155. et with the Device Label Automatic Assign Setting function When the 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 SEARCHING FOR SPECIFIC POSITION Example 1 Device automatic assign setting Set the following device range D device 8000 to 8002 ZR device 0 to 1023 CONVERTING COMPILING PROGRAMS lt Label setting gt Bas LablName O Data Type Word Signed oS _ 2 WAR babel B wordSigned 255 gt FLOAT Double Precision ng YAR FLOAT Double Precision S29 lt Devices to be assigned to labels gt 08 s No Example of devices to be 1 Since double precision real requires four devices one device of 08000 is not enough Therefore the next device ZR is assigned Definition order Descending order MONITORING Example 2 lt Device automatic assign setting gt Set the following device range e D device 8000 to 8002 ZR device 0 to 1023 USING USER LIBRARIES Label setting N 2 Llass Label Name Data Type 2 3 e gt N Definition Example of devices to be order assigned Label_A Word signed D8002 Label Double precision
156. evice Black Global label Magenta G Local label Magenta For details refer to the following manual K GX Works2 Version 1 Operating Manual Common 7 1 ST Editor 7 1 1 Writing ST programs 1 Write an ST program z For functions instructions used for ST program refer to the structured programming manuals 2 Operating procedure 2 Write a program in the text format using keyboard ST PRG Program S FOR counter z TO 10 BY 2 DO The colors of defined labels devices syntax operators constants string constants and comments change when they are entered oyntax entered in lower case characters are automatically changed to upper case characters SCREEN CONFIGURATION Point P Options of instructions labels displayed while typing a label Global labels and local labels of corresponding POU are displayed Select Tool Options Program Editor gt ST gt Instruction label name prediction Section 14 2 Entering assignment operators Press the 55 El keys to enter an assignment operator PROGRAMMING CONFIGURATIONS PROCEDURE 7 1 2 Automatic indention 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 PROGRAM Operating procedure 1 Select Tool Options Program Editor MAIN ST
157. evices may change In that case values From Ehe 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 vou want to Rebuild All 10 4 10 2 Compiling Programs 2 Execute the compilation after reading and understanding the considerations described on the message All programs are converted compiled and the result errors warnings only 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 SEARCHING FOR SPECIFIC POSITION i Project Edit Find Replace Compile Online Debug Diagnostics Tool Window Bi nma 06 ER 0 m ALES ELE LS I Luo P PETTCNPITUEEEXTITIPLUETTTATN PROGRAMS CONVERTING COMPILING 8 03 09 000 04 ADD TIME ADD TIME E Class Global label check Output window TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER CPU NO Assigning devices to labels when compiling all programs For assigning devices to labels when compiling all programs refer
158. f characters of input output labels is 16 or less Use is selected on the Property screen of function block e Use EN ENO is not selected in the Property screen of function block Application functions The application functions shown in Application functions which cannot be called are not applicable for the function block called from a ladder program Modify the program using the application function which can be called as necessary OVERVIEW SCREEN CONFIGURATION Application function name COUNTER FB M TRIG E RS R TRIG E SR E Application functions which can be called TIMER 100 FB M TIMER 10 FB M TIMER CONTHFB M TIMER CONT FB M TIMER HIGH FB M TIMER LOW FB M CTD E CTU E CTUD E TOF E TOF HIGH E TON E TON HIGH E TP E TP HIGH E PROGRAMMING Application functions which cannot be called For details of each application function refer to the following manual MELSEC Q L Structured Programming Manual Application Functions Number of program steps When using function blocks the number of steps of call destination function block is added to the number of steps of call source program PROGRAM EM PROCEDURE Online program change function Since the call destination function block itself is also the target of the operation when the Online program change is performed after changing the processin
159. fer 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 the product thoroughly read this manual to develop full familiarity with the functions and performance to ensure correct use CONTENTS SAFETY PRECAUTIONS 0 CONDITIONS OF USE FOR THE PRODUCT ix pm cR puto en EE um n n IN INTRODUCTION baka ae DUE Ge AU 1 OVERVIEW 1 1 What is Structured Project 1 2 Features of Structured Project 1 8 List of Functions 1 3 1 List of functions common to Simple project and Structured project 1 3 2 List of functions for editing in Structured Text 1 9 9 List of functions for editing in Structured Ladder FBD 2 SCREEN CONFIGURATION 2 1 Overview of Screen Configuration 3 PROGRAMMING PROCEDURE 3 1 Creating Programs 4 PROGRAM CONFIGURATIONS 4 1 Program Configurations of Structured Project 4 2 Creating Program Files and Tasks 4 2 1 Procedure for creating program files and tasks 4 2 2 Registering program blocks to tasks 4 2 3 Setting executin
160. files on the Project view For details refer to the following manual 5 GX Works2 Version 1 Operating Manual Common This function is not supported by FXCPU SCREEN CONFIGURATION Screen display Select Project view Parameter PLC Parameter lt lt gt gt E Program ProgramName Execute Type Fixed Scan Interval PROGRAMMING PROGRAM See SS PROCEDURE Insert Delete alada lela lele a la fa a 4 4 Refresh Setting File Usability Setting For details of the program executing conditions refer to the following manual User s Manual Function Explanation Program Fundamentals of the CPU module to be used OPERATIONS OF PROGRAM EDITORS SETTING LABELS COMMON EDITING ST PROGRAMS H e m H CD Z Lr O LADDER FBD PROGRAMS 4 2 3 Setting executing conditions Z 7 t GX Works2 WT 4 PROGRAM CONFIGURATIONS B Task executing condition 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 on the Project view in advance Screen display Select Project Object Property Property Details Comment Attributes Event Interval Priority Data Name Task 01 Title Control Last Change 46
161. function blocks that can be called from the program function block O Call function applicable x Call function inapplicable Call destination function block s meu wl s 15 TN only oun Call source function block maa 1 9 o lo 9 For FXCPU Ladder Diagram is not supported by Structured project 2 Function blocks can be called when Enable calling function block and using inline ST is selected under Tool gt Options gt Compile gt Basic Setting 8 X Function blocks in Ladder Diagram that can be called are function blocks in the first level 4 Function blocks of ladder program which are calling function blocks of ST program cannot be used in programs other than Ladder Diagram 4 16 4 4 1 Using functions and function blocks 4 4 Using POUS Point When using function block call or inline structured text The setting in Basic Setting under Tool Options Compile is required The program becomes uncompiled status when the option setting is changed Compile the program again When using function blocks created in Structured Ladder FBD or Structured Text in ladder programs The following conditions must be satisfied he data type of input output label is any of the following bit word signed double word signed single precision real double precision real string e he number of input output labels is 24 or less The number o
162. g 5 4 3 Creating POUs 4 3 1 Procedure for creating 4 3 2 Setting properties of functions and function blocks 4 11 4 4 Using POUs 4 14 4 4 1 Using functions and function blocks 4 4 15 SETTING LABELS 5 1 The Type of Label Setting Editor 5 2 5 2 Setting Global Labels 5 3 53 Setting Local Labels for Program Blocks 5 8 5 4 Setting Labels for Functions and Function Blocks 5 10 55 Operations for Setting Labels 5 12 5 5 SS 5 12 5 5 2 al 5 13 5 5 9 Selecting data types ck xd ace dox dnte SE E Rom RETRO dead Un Hee e RU B OR E dle f 5 14 5 5 4 Label comMentS eee ee ew ce 5 17 55 9 E MUNG VOWS a4 hee hae ed eee ER 5 17 5 5 6 Deleting unused 5 21 5 6 Setting Structure Labels 5 23 5 6 1 Sowing DO IET Seabee 5 23 5 6 2 Defining data type of label as structure 5 24 5 6 3 Assigning devices to structure 5 25 5 6 4 Assigning devices to structure array 5 5 27 5 7 Checking Duplications of Devices Assigned to Global Labels 5 30 5 8 Setting Ranges for Device
163. g of the front and back of FB instance that is used in the call source program function block the data size of call destination function block is added to that of the changed processing for the Online program change operation 1 When using function blocks created in Structured Ladder FBD or Structured Text in ladder programs the function blocks on which Use Macrocode is selected on the Property screen are the targets OPERATIONS OF PROGRAM EDITORS SETTING LABELS COMMON EDITING ST PROGRAMS H e m H CD Z O LADDER FBD PROGRAMS 4 4 1 Using functions and function blocks A 17 t GX Works2 4 PROGRAM CONFIGURATIONS MEMO VAN MELSOFT V B SETTING LABELS This chapter explains how to set labels 5 1 dz 5 3 5 4 2 9 56 5 7 5 8 9 9 The Type of Label Setting Editor Setting Global Labels Setting Structure Labels L abels Writing Reading Data to from CSV Files Setting Local Labels for Program Blocks Setting Labels for Functions and Function Blocks Common Operations for Setting Labels Checking Duplications of Devices Assigned to Global Setting Ranges for Devices Assigned Automatically OVERVIEW SCREEN CONFIGURATION PROGRAMMING PROGRAM CONFIGURATIONS 4 PROCEDURE OPERATIONS OF PROGRAM EDITORS BS CN NS SES COMMON Ds of
164. g programs in Structured Ladder FBD Elements such as contacts coils and functions function blocks are used to create Structured Ladder FBD programs Each element is connected with a line The suitable editing mode can be selected according to the program entry method and editing target Cs Section 8 1 1 Screen display Select Project view gt POU gt Program gt program gt Program Ladder block header Program editing area Ladder block Iz bool5 HN g 16 5 Ladder block label p Input label Grid Pointer Display contents ee A start position of the Structured Ladder program Section 8 8 7 For the display of left power can be switched to hide n Indicate specific positions of tab stop and start end positions of lines Section 8 8 8 A unit for creating a program A ladder block consists of a ladder block header and a program editing area Ladder biodk header Display information such as a title set for each ladder block and a label name Section 8 8 4 of the jump target Program editing area AMAGA OF program Section 8 1 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 elements such as contacts and coils in a ladder block Connect elements Select Mode with a line Sectio
165. he 5 Horizontal line or 51 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 divided grid width height as the unit of length A line of the specified length is displayed 8 10 6 Wrapping lines Wrap a line if it does not fit in a single rung Operating procedure 1 Select Tool Options gt Program Editor gt Structured Ladder FBD gt Guided 2 Select Ladder Wrapping Point Target of wrapping line to be displayed Ladder programs edited after setting the above option are wrapped The display of edited ladder programs before setting the above option is not changed 8 38 8 10 5 Drawing lines 8 10 Editing in Guided Mode 8 10 7 Setting Guided mode as default editing mode Set the Guided mode as the default editing mode of the Structured Ladder FBD editor Operating procedure 1 Select Tool Options gt Program Editor gt Structured Ladder FBD gt Guided 2 Select Open Structured Ladder FBD Editor in guided mode 8 10 8 Entering variable names after contacts and coils Enter variable names continuously after a contact or a coil is entered Operating procedure 1 Select Tool Options gt Program Editor gt Structured Ladder FBD gt Guided 2 Select Enter label names after contacts and coils 8 10 7 Setting Guided mode as the default edit
166. he following manual MELSEC Q L F Structured Programming Manual Fundamentals Ons 6 2 1 Using POUS Element Selection window 6 5 s GX Works2 WwW 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 Element Selection fan Farts BEXMRP E BKXOR n E Ej BMOW BMOWP E B DIMT E E BOOL DWORD E DwORD E BOOL TO IMT TO 5 E TO STR B TIME TO TIME E E BODL TO WORD WORD Dragging and dropping POUs from Element Selection window When utilizing POUs from the POU list activate the target program editor before performing the drag and drop operation When the programming languages of the POU to be utilized and the target program editor are different a POU cannot be dragged and dropped while changing the program editor B Searching for a 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 Inthe POU list field enter the initial letter of the POU to be searched for The cursor moves to the entered initia
167. he programs of all open windows Start Monitoring Start monitoring the program of the open window Section 12 1 1 Stop Monitoring Stop monitoring the program of the open window Section 12 1 2 Display the current device value in decimal in program Change Value Format Decimal monitoring Section 12 3 1 Display the current device value in hexadecimal in program Change Value Format Hexadecimal monitoring Change Instance Function Block Select an instance of the function block to be monitored Section 12 2 Tool common function Reference Check Devies Duplication Global Label Check duplications of devices assigned to global labels and Section 5 7 display the result Device Label Automatic Assign Setting Set device range to be automatically assigned to a label Section 5 8 Options Set various options Chapter 14 1 6 1 3 1 List of functions common to Simple project and Structured project 1 3 List of Functions B List of functions for setting labels The following table shows the functions for setting and editing labels E Edit function for label setting Reference gt Delete Delete the selected data Select All Select all items New Declaration Before Add a row above the cursor position 2 Section 5 5 5 New Declaration After Add a row below the cursor position gt Delete Row Delete the row at the cursor position E Read from CSV File Read label settings from the CSV fi
168. hortcut keys B Program Common toolbar icons The following table shows the Program Common toolbar icons and the corresponding shortcut keys Toolbar icon a6 uy a Shortcut key Corresponding menu Reference Paste the cut copied data the cursor Ctrl V cti Paste Bacon Cancel the previous operation Section 6 2 3 E Perform the operation canceled by Undo Write to PLC Write data to the programmable controller CPU Section 11 1 Read from PLC Read data from the programmable controller CPU Start Monitoring All BEEN Windows Start monitoring all windows being opened Stop Monit op Monitoring BEEN Windows Stop monitoring all windows being opened Start Monitoring Start monitoring the window being operated Section 12 1 al Stop Monitoring Stop monitoring the window being operated Convert compile the program being edited Section 10 1 Convert compile a sequence program and i FA m mm EIN Oden write it to the programmable controller CPU ommen sni Rebuild All Compile convert all programs in the project Section 10 2 App 2 Appendix 1 1 Common toolbars and shortcut keys Appendix 1 List of Toolbars and Shortcut Keys B Docking Window Switch Project Data toolbar icons The following table shows the Docking Window Switch Project Data toolbar icons Shortcut key Corresponding menu Reference p Navigation
169. hows the order when changing the type of contact and coil Type Change sequence Open Close Rising Pulse Falling Pulse gt Contact gt Rising Pulse gt Falling Pulse Close Close w 4 Rd b ATR ALE odi Normal Negation Reset d 4 Coil d JF 15 F AP Bit type Open Contact Close Contact input output pin Label Label Open Contact gt Close Contact Jump lt Open Contact gt Close Contact Return d Return b 1 These items cannot be used for EU Not supported by FXo FXos FXoN FXu FX2c 8 Supported by Universal model QCPU LCPU Operating procedure 1 Select a contact or coil 2 Select Edit Signal Configuration Toggle 8 5 2 Changing contact and coil in predetermined order OVERVIEW SCREEN CONFIGURATION PROGRAMMING PROGRAM CONFIGURATIONS PROCEDURE OPERATIONS OF PROGRAM EDITORS SETTING LABELS COMMON EDITING ST PROGRAMS EDITING STRUCTURED a CD LZ QO Qg se s GX Works2 v 8 EDITING STRUCTURED LADDER FBD PROGRAMS 8 6 Operating Functions and 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 optio
170. ic language using ladders by connecting functions and or function blocks with lines Common 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 5 GX Works2 Version 1 Operating Manual Common 1 2 Features of Structured Project B Creating large programs efficiently with structured programming In Structured project programs can be easily structured by managing program components in a hierarchy 1 Programs that are easy to maintain and highly reusable can be created efficiently by structuring programs This is suitable for developing large programs OVERVIEW Project Program file 1 Program file 2 SCREEN CONFIGURATION 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 in a hierarchy Created programs are registered to the tasks of program files PROGRAMMING CONFIGURATIONS PROCEDURE Assets of programs are utilized as libraries In Structured project sequence program components can be saved as libraries
171. ich a label is entered on a program editor is 2 Select Edit List Operands The Label Registration Selection screen is displayed OPERATIONS OF NGC Esse SETTING LABELS COMMON EDITING ST PROGRAMS H e m CD Z O LADDER FBD PROGRAMS 6 2 2 Using labels in the program 6 9 A GX Works2 WT 6 COMMON OPERATIONS OF PROGRAM EDITORS 3 Set the items on the screen Description Label Name Enter a label name Label Setting Information Scope to Select a label setting editor s name of registering destination Register Select a class name of label from the list displayed by clicking Cs Section 5 5 1 Class Set a data type from the Data Type Selection screen displayed by clicking Data Type Cs Section 5 5 3 It can also be entered directly Set a device to be assigned to the label when VAR GLOBAL is selected for Class e When the Device column is blank a device is automatically assigned Enter a constant value when VAR GLOBAL CONSTANT or VAR CONSTANT is selected for Class and simple type is selected for Data Type Device Constant Enter a label comment Comments can be displayed on the program editor by switching display hide of comments Cs Section 8 7 4 A new line cannot be inserted Edit a comment with a label setting editor to insert a new line Minimize dialog after After c
172. ing mode 8 39 OVERVIEW SCREEN CONFIGURATION PROGRAMMING PROGRAM CONFIGURATIONS PROCEDURE OPERATIONS OF PROGRAM EDITORS SETTING LABELS COMMON EDITING ST PROGRAMS EDITING STRUCTURED a CD LZ OQO Qg ss t GX Works2 w 8 EDITING STRUCTURED LADDER FBD 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 Guided Mode Auto Comment zz 2 Select Edit New Ladder Block List Before z 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 Guided and set Auto Comment Block Width Entering a comment in the desired grid Hold down the key and press the key and a comment can be entered to the grid at the cursor position cw 8 40 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 Select View Print Wrap Po
173. ion blocks from Element Selection window and utilize them to the program Screen display Select View gt Docking Window gt Element Selection PROGRAMMING CONFIGURATIONS PROCEDURE POU type Element Selection Standard Lib re POU list Standard Bitwise Boolean E AMD E MOT MOT E OR E E E Conversion Standard Arithmetic 9 Standard Comparison EJ Time Data Types Standard Functions of One Mumeric v Standard Selection Functions Standard Character String Functions Function Block 1 Standard Edge Detection 3 Counter Timer Display contents Item Description 5 POU type Display POUs in categories Parts Display functions function blocks and operators Application Instruction Display functions function blocks of application functions ein Instructions Display common instructions application instructions and special instructions BING Esse SETTING LABELS User library User library name Display functions defined in the user library Display functions function blocks defined in FB FUN 2 POU list Display POUs of the type selected for POU type EO Function Block Display function blocks 8 LU 1 For FXCPU basic instructions and application instructions are displayed 5 2 For details of functions function blocks operators refer to t
174. it the programs and select Compile Online Program Change s N 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 program files MAIN and SUB1 are modified MONITORING Program configuration of the Structured project Compilation target Program file USING USER LIBRARIES o 2 H A Laca O Program Sequence 2 Program block 1 program MAIN Oe N Program block 3 A Sequence program SUB1 gt lt a Program a blok2 ZS Function 1 is used in program blocks 3 and 4 Function 1 is modified gt lt LLI Q zZ 10 5 3 Considerations of Compilation 10 21 La GX Works2 WT 10 CONVERTING COMPILING PROGRAMS Arguments of function function block e Data cannot be written to input arguments VAR_INPUT of function function block If data are written to input arguments a compilation error occurs When utilizing function blocks constants can be used for the input side of I O argument VAR IN OUT However depending on the combination of
175. l A Decimal Hexadecimal EN EN 0 0 EN if Outputl 0 2 d Output 16 DDDD 7 lt fi 2 12 3 1 Changing current value display format decimal hexadecimal of word type variable 12 5 GX Works2 12 MONITORING 12 3 2 Setting the number of displaying characters for character strings oet 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 1 Select Tool gt Options Monitor gt Structured Ladder FBD ST gt Character String Monitor Setting 2 Set the number of displaying characters within the range from 2 to 50 Character String Monitor Setting Significant Characters 16 12 6 12 3 2 Setting the number of displaying characters for character strings Screen display 12 4 Monitoring Programs on ST Editor 124 Monitoring Programs ST Editor This section explains the display of the ST editor at the monitoring Select Online Monitor gt Start Monitoring FUN 01 FUN Bit Program ST oRKIH THEN lt TRUE END IF caunter 0 10 BW 2 Du IF 12345 THEM DO counter ELSIF Wari gt 22400 THEN sarl IF END S FUN 01 FUN Bit Program ST ORKTITHEN EE NE FOR counter 0 TO 10 2 DO IF lt 12
176. l letter of the POU If there is no POU with the entered initial letter the selection status does not change Element Selection Standard Lib 9 9 Function 2 9 Function Black Standard Edge Detection Element Selection Standard Lib 9 8 Function Function Black Standard Edge Detection E 0 B TRIG B FORIGE Press the S key TRIG E R TRIG E TRIG E E R_TRIG B8 TRIG E 1 8 Counter H E Timer Standard Bistable 5 BE RSE B SR E SRE 6 6 6 2 1 Using POUs Element Selection window 6 2 Common Operations of Program Editors B Displaying label settings Display a label setting editor by right clicking a function or function block Element Selection Displays a label setting screen of the selected POU by clicking El 7 in Data Transfer E Open from short cut menu OVERVIEW SCREEN CONFIGURATION Label Data Type il 1 Constant E VARINPUT fs INPUT I ANTE 2 MAR_INPUT oo E DCMLP OUTPUT vid an B prov 4 o n E DFMOVHILT I E By PROGRAMMING CONFIGURATIONS PROCEDURE Operators Since label settings are not available for operators short cut menu is not displayed PROGRAM SETTING LABEL
177. l or key e Changing the height of the element using the mouse 8 20 8 6 3 Changing the number of arguments for functions and function blocks 8 7 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 Change the view mode to display variable names of contacts and coils in multiple lines by setting the option SCREEN CONFIGURATION Operating procedure 1 Select Tool Options gt Program Editor gt Structured Ladder FBD gt Label PROGRAMMING CONFIGURATIONS PROCEDURE 2 Select Display label name comment of contact or coil in multiline 3 Set Display Lines and Visible Characters per Line A variable name is displayed according to the set number of lines and characters If all characters of the variable name cannot be displayed gt is appended after the last character gt Single line Multiple lines Lacalval 234567840 Point When additional label items have been set The Display Lines and Visible Characters per Line are reflected to the additional label items The variable names and the additional label items are displayed with the number of lines set to the Display Lines For details of the additional label items refer to Section 8 7
178. l setting editor lt L 7 Global Label Setting Globali Zo Class Label Mame Data Type Constant Device Address Comment 1 BL BAL Transport_ Complete _ Bit M100 100 29 2 GLOBAL Emergency Stop Switch et 3M TOT 2 3 VAH BL BAL CONSTANT Temperate Cento AT ECL DEW 3 4 VAR BLDBAL Product Data Struct Detail Setting Detai Setting Struct Structure Device Setting Product Data Struct1 Label Name Data Type Device Address Word Signed STRUCT data2 Word Sioned TRUCTI data3 SS STRUCT dataM DoubleWordSigeed STRUCTI1 data5 FLOAT Single Precision PROGRAMMING CONFIGURATIONS PROCEDURE Automatic Filing v Use Designation Cancel PROGRAM Operating procedure Set the items on the screen 2 E Item Description 5 Label Name Display label names defined in the structure H Data Type Display data types set to data names 7 Device Set device names to be assigned in the Device or Address column When a device name is Address entered in either column it is displayed in the respective format automatically m Select this to set devices automatically to cells in which devices are not set with the same data Automatic Filling type Use Bit Designation Select this to enter bit devices automatically with the bit specified word device OPERATIONS OF PROGRAM EDITORS QO COMMON P
179. ld Stop Build by Error 29 Warning 100 Operating procedure 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 SEARCHING FOR SPECIFIC POSITION Screen display Select Tool Options Compile Output Result Disable Warning and Notification Message Disable Warning Codes Add CONVERTING COMPILING PROGRAMS Delete Operating procedure Toregister the warnings enter the warning code and click the Add button TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER CPU The registered warnings are not displayed on the Output window Disable Warning and Notification Message Disable Warning and Notification Message Disable Warning Codes C2880 Disable Warning Codes i 000 2880 Enter Delete Delete To cancel the registration select the warning code and click the Delete button The unregistered warnings are displayed on the Output window N
180. le E Section 5 9 0 Write to CSV File Write label settings to the CSV file System Label 29 Reservation to Register System Label Reserve the selected global label for registration as a 3 system label Reservation to Release System Label Reserve the selected global label for deregistration of system label gt rt system label inf ti d ly it to global Import System Label mport system label information and apply it to globa 22 labels Apply the registration reserved deregistration reserved o Md global labels to the system label data base zm Confirm Update of System Label Database Apply system label information changed in another project 4 to global labels Execute Verification Synchronous with Resolve a mismatch when system label information 5 System Label contains it E S SH Label Name Data Type 5 Constant j j j i Constant Sort the labels in ascending descending order with the Section 5 5 5 Extract and display unused labels abe si Extracted unused labels can be deleted in batch OPERATIONS OF PROGRAM EDITORS SETTING LABELS COMMON EDITING ST PROGRAMS H e m H CD Z Lr O LADDER FBD PROGRAMS 1 3 1 List of functions common to Simple project and Structured project 1 7 A GX Works2 WT 1 OVERVIEW 1 3 2 List of functions for editing in Structured Text The following tables show the f
181. lect Tool gt Options Compile Structured Ladder FBD ST Compile Condition3 CONVERTING COMPILING PROGRAMS 2 Clear Automatically assign each system device to output of functions that use EN If check box is selected the individual devices are assigned to each function e If check box is cleared the same device is assigned to the outputs 228 Example Devices automatically assigned to outputs of function with EN ENO 39 lt The check box is selected gt 95g The individual devices are assigned 12 Input ENO Input EN ENG _IN Output 2 Input3 Inputd 2 M X gt AND AND Input Input IN Output Inputa Input4 isl T The check box is cleared 24 The same device is assigned 1 ANDE ANDE Input EN ENO EM Input IN Output Inputs Input CD Q Input ENO EM Input IN Dutput Inout IN 5 A A fi 2 10 4 8 Assigning common devices to ou
182. led igi 5062 2010 08 05 16 08 09 Uncompiled 2m ES PLC Network Remote Password Switch Setting 2010 08 05 16 05 57 iT c vd Necessary Setting Setting Already Set Set if itis needed Setting Already Set Writing Size Free Volume Use Volume Memory capacity OBytes 226 856 18 904Bytes Refresh Related Functions lt lt Execute Close P f Remote Set Clock PLC User Data Write Title Format PLC Clear PLC Memory X Arrange PLC Operation Memory Memory 11 2 11 1 Writing Reading Data to from Programmable Controller CPU Operating procedure or 1 Set the items on the screen END 252 Item Description STO OF Connection Channel List Display the information on the set connection destination lt i NNO Switch the setting target module 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 ROM Intelligent Function Module of the intelligent function module GX Works2 Version 1 Operating Manual Common Title Display the title of the target memory by clicking the Refresh button Option Display Size Select this to display Size and memory capacity in the file list Select the data to be written read Select the memory from the list by clicking the cell under Ta
183. licking the button select this to minimize the Label Registration applying Selection screen 4 Click the button The label is registered and applied to the program editor Comment 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 lt W Registering new labels 3 Change the settings on Label Setting Information For items of Label Setting Information refer to W Registering new labels 4 For changing the label setting editor select Move the selected labels to the Scope to Register 5 Click the button The label settings are changed 6 10 6 2 2 Using labels in the program 6 2 Common Operations of Program Editors 6 2 3 Undo and redo 1 Undo and redo the previous editing status B Undo OVERVIEW Operating procedure Select Edit gt Undo w after editing the ladder program The previous editing status is restored SCREEN CONFIGURATION B Redo Operating procedure Select Edit gt Redo ay after performing Undo The operation deleted by clicking the Undo button is restored
184. ment Outside the local device range global device comment Specify the Reference Reflection The behavior of each device will be as follows Reference reflect the 1 Global Local comment will be referred other when device 2 If comment does not exist the behavior will be comment is not set e specified to Global refer Local Comment e specified to Local refer Global Comment Device Editors eer Apply the current setting of reference reflection Common Apply to all programs target for device comment to all programs program files Set all reference reflection target to global for Global device comment of selected program program file name Set a all reference reflection target to local for Local device comment of selected program program file name Set all reference reflection targets for device comment of target device of the selected program PLC Parameter Setting program file name to PLC parameter setting PLC Parameter Setting Target Device Device can be specified within the local device range in the device setting of PLC parameter Program Editor Monitored Value Class Device Address Select display item in tool hint when mouse cursor is placed over label device Section 6 2 8 Structured Ladder Tool Hint Data Type FBD ST Constant Value Label Comment Remark Tool Hint Display Format Select display lines on tool hint CD
185. mments correspond to devices or addresses D Z j j All Device Display Batch change all labels on the program editors to the device zu display al Cancel the device display on program editors and display OO OO Sane data in the format at the time of data entry D Dc Grid Show a grid on the screen being edited to display the start end Section 8 8 8 4 positions of a line Print Wrap Position Display the wrapping position for printing Section 8 11 2 Display Compile Result Display the compilation result in a list format Section 6 2 7 lt Zoom 26 lt Set Zoom Factor Qu Change the display size of the program Section 6 2 4 ro 5 Zoom Open the label setting editor in the selected POU Section 6 2 9 Open program editor in the selected POU Open Header a Local Label Setting screen for the program being Section 6 2 6 OPERATIONS OF PROGRAM EDITORS SETTING LABELS COMMON EDITING ST PROGRAMS H e m H CD c Z Lr O LADDER FBD PROGRAMS 1 3 3 List of functions for editing in Structured Ladder FBD T a3 La GX Works2 WT 1 OVERVIEW MEMO STS9V1 138 SINVHOOMd JO SNOILVH3dO 15 SNILIO3 qaJ 43aav1 GAYNLONYLS ONILIGS SF SNOILVYNDISNOOD LO INVHOOMd NEEND KAN ON
186. n 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 Modification Section 6 2 11 Section 6 2 12 Apr 2010 SH NA 080781ENG F Model Addition Q50UDEH Q100UDEH LJ72GF15 T2 Correction 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 Sept 2010 SH NA 080781ENG G Addition 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 Section 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 Print date Manual number Revision Jan 2011 SH NA 080781ENG H Addition TERMS Section 5 5 1 Section 5 5 2 Section 6 2 5 Chapter 7 Chapter 8 Section 11 2 3 Correction 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 Modification Section 5 5 1
187. n 8 2 This mode is used for editing programs mainly with the mouse Interconnect mode Connect placed elements with a line Section 8 3 2 Place elements such as contacts coils and instructions within grid frames Guided mode q Section 8 10 This mode is used for editing programs mainly with the keyboard OVERVIEW SCREEN CONFIGURATION B Mouse cursor and grid The following table shows different appearances of the mouse cursor and grid according to the mode For connecting lines automatically refer to Section 8 3 3 Mode Menu and toolbar Auto connect Mouse cursor Grid display PROGRAMMING CONFIGURATIONS PROCEDURE Edit gt Select Mode Select mode gt lt T4 OFF Interconnect Edit gt Interconnect Mode x mode Edit Guided Mode Guided Editing s 4H Guided mode T OFF H 1881 OPERATIONS OF PROGRAM EDITORS SETTING LABELS COMMON EDITING ST PROGRAMS EDITING STRUCTURED a CD LZ QO Qg ss 8 1 1 Selecting editing modes 8 3 t GX Works2 WT 8 EDITING STRUCTURED LADDER FBD PROGRAMS 8 2 Editing in Select Mode This section explains how to enter instructions 8 2 1 Entering elements Enter elements such as contacts coils and application instructions 1 Element Shortcut key Open contact Closed contact
188. n Set the type of contact and coil Change the type of contact and coil in the Section 8 5 order shown below Contact Open Contact Close Contact Coil Normal Negation Set Reset Jump to the specified ladder block number Section 9 2 1 Change Label Device Switch the display format in order label shift t t Address Mode device address Ch Label C t Switch the display bet label and ange Label Commen witch the display between label an i K _ Zoom Header Body Header Eu the label setting editor of the selected Section 6 2 9 Es Paste the cut copied data the cursor l E i zm l Switch the input mode between Overwrite i Overwrite Insert Mode Insert in the guided mode m Section 8 10 ange input mode for drawing lines in Guided Mode Guided editing Scroll a ladder block to the right Scroll ladder block to the left i Display the instruction help of GX Works2 Common help or the help of the user library Section 13 3 5 1 Num indicates keys in the numeric keypad SEARCHING FOR SPECIFIC POSITION CONVERTING COMPILING PROGRAMS ei A Signal Configuration Toggle TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER CPU d N MONITORING USING USER LIBRARIES D SETTING OPTIONS
189. n 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 gt Options gt Program Editor gt Structured Ladder FBD gt FB FUN 2 Select Automatic input output labels To add an output variable to ENO VAR IN OUT select Automatic ENO labels Add Automatic Output Variable to VAR IN OUT J Select Edit Auto Connect Without adding input output variables Adding input output variables 1 ETE CTD E EN ENOFr EN ENO Qr CD Q LOAD LOAD CV PV 8 18 8 6 1 Adding variables automatically when entering functions and function blocks 8 6 2 8 6 Operating Functions and Function Blocks Editing variable names and instance names Edit a variable name or function block instance name Operating procedure 1 Click the entry field of an element such as a contact coil and input output label The entry field is enabled for editing 2 Edit the variable name or instance name Input variable D QH gt EH 1 Using set label names Contact Function block Cum E ENO B f LOAD CV BIIBATER STDSE EN ENO CD Q LOAD CY When the entry field is enabled for editing a label name can be selected on the
190. nction Ee 4 14 6 3 6 5 8 18 G Global label 5 3 Cc m 8 33 Csulded motde us cesset imt asco laete ettet reves tpa pU bcn 8 36 Index 2 cs esas tes esate bees eaters edad E 1 3 Input Label sseceetueswereractomnaarssnteutunts cascade 8 4 input variable pe 8 18 Instance ROTER 4 15 8 19 8 22 12 4 J JE 9 2 9 4 L Label pp 5 4 5 8 5 10 lapel SCI T 5 2 5 12 LS 5 2 ladder block header pp 8 29 Ladder block label pp 8 29 Ladder block title 8 29 Ladder Diagram 1 2 Ladder symbols 8 4 Left power rail NERO 8 2 help MT c E 13 9 IDG aeee E S 8 8 link direct deVvice ica sepu 14 6 List OMAT 22 6 13 Local label NER EM 5 8 5 10 2 3 N Navigation windOW pp 2 3 Negation MARRON RR ERN RR OE 8 15 O Open Contact 8 4 8 15 eod sor 6 5 Output Label 8 4 output variable Rc 8 18 Output WINGOW pp 2 3 10 2 10 23 P POUS eee 4 10 4 14 POON n e 4 8 Fra P 6 2 Program blocks pp 4 4 4 14 6 3 Program Configuration pp 4 2 POO ANE CURR E PUER 6 2 programi METEO 4 3 Program oe UU
191. nction bit type output of the target function Codes keeping bit type are generated if output is z with EN ENO um O in bit type array or in structure array regardless of L option setting Select whether to generate code which keeps 2 T User Defiried F nction bit type output of the target function block m Codes keeping bit type are generated if output is 0 Block with EN ENO in bit type array or in structure array regardless of option setting A Select whether to assign each system device to output functions of EN ENO Only functions Automatically assign Compie each system OEVICE Function block is disabled Section 10 4 8 Condition 3 output of functions that Q use EN ENO Only checked functions at Generate Code That Holds the Output of the Following are enabled when the output is bit type a Intelligent Function Module 1 GX Works2 Version 1 Operating Manual Intelligent Function Module IQ Works Interaction K GX Works2 Version 1 Operating Manual Common gt lt LLI Q 2 14 7 t GX Works2 WT 14 SETTING OPTIONS Tree item litem O Explanation Reference Checking this option enables use of the option Use MELSOFT Navigator setting of MELSOFT Navigator The option setting Option Information specified in MELSOFT Navigator at the time of opening this project is used System Label Setting Section 5 2 Set how to name system labels When system System Label
192. nd devices baall 0 Mov 8191 MD Mon al L inti 8 m ee g intl D200 dj L intl D12287 eve Point Switching to display hide the multiple additional label items The additional label items can be displayed hide in batch by setting the option Display hide can be switched by selecting the item in Tool Option gt Program Editor gt Structured Ladder FBD Label gt Add Label Display Items Items which can be displayed at the same time The items which can be displayed at the same time are different depending on the display format when the value is input O Displayable Undisplayable Format when a valuable is input Additional label items o ae a If the devices assigned to label are not displayed The devices are not displayed in the following cases even the option is set e When the program is never compiled When the labels are used for array element When structure labels are used Edit or search replace the additional label items The additional label items cannot be edited or searched replaced 8 26 8 7 5 Displaying additional label items 8 8 Editing Ladder Blocks 8 8 Editing Ladder Blocks This section explains how to edit ladder blocks OVERVIEW 8 8 1 Inserting ladder blocks Add or insert a new ladder block SCREEN CONFIGURATION Inserting ladder block at the start Select Edit Ne
193. not specified for array or structure the monitoring values are not displayed correctly The monitoring values on tooltip are not displayed correctly either Monitoring values of each element for array or structure can be checked on the Watch window COS Input 1 ArravInLindexT ArravOut index 0 0 0 12 8 12 5 Monitoring Programs in Structured Ladder FBD Editor 12 5 Monitoring Programs in Structured Ladder FBD Editor This section explains the display of the Structured Ladder FBD editor at the monitoring Screen display Select Online Monitor Start Monitoring cM ECT ce E EM EMG ou speed 100 8 d 100 B Monitoring contacts and coils The following shows the display of contacts and coils at the monitoring FALSE TRUE ET Cutout Output 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 9 SEARCHING FOR SPECIFIC POSITION CONVERTING COMPILING PROGRAMS TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER CPU A NO Z Z gt USING USER LIBRARIES o SETTING OPTIONS APPENDIX INDEX s GX Works2 WwW 12 MONITORING B Monitoring labels other than bit type labels and word devices
194. ock to be set on the Project view in advance OVERVIEW Screen display Select Project Object Property For function For function block Property Details Comment Details Comment SCREEN CONFIGURATION Data 01 Data Mame FUN 01 Title Title of Function Black Title Title of Function Use Macrocode Result Type Word Signed Ez Use MC MCR Use ENJENO Use Type Function Type Function Block Language ST Language Structured Ladder FED Last Change 6 26 2009 11 47 32 PROGRAMMING Last Change 6 28 2011 11 59 33 PM Operating procedure Set the items on the screen PROGRAM EM PROCEDURE 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 Selected 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 check box below Result Type Use 1 2 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 K Section 5 8 Apply function block program cod
195. oint Display on the Local Label Setting screen For the Structure Device Setting screen the read only screen is displayed Setting devices of global labels Devices assigned to structure are not cleared even when elements of structure are changed on the Structure Setting DE screen However devices of member whose data type is changed or devices of member whose data is changed to one 0 with different bit array are cleared cuiua Q LLI D H S oca riu OR Boe lt 2 6 3 Assigning devices to structure labels 5 25 A GX Works2 WT 5 SETTING LABELS B Entering device names automatically The Automatic filling function can be used when setting series of devices for the 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 editor 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 Name Data Type Device Address Double W ord Signed 01 ella E SIDE Double W ord Signed Label Mame Data Device Address Double W ord Signed zMLDU 1 SIR B E
196. om the Element Selection window and insert it into a program z Element Selection window lt Section 6 2 1 2 5 Operating procedure 2 1 Project view select gt POU Program gt program gt Program The program editor is displayed SCREEN CONFIGURATION 2 Select View Docking Window gt Element Selection The Element Selection window is displayed F Function ei Function Block 3 Select Project from the combo box PROGRAMMING The functions and function blocks defined in the project are displayed in tree format 4 Select a function or function block and then drag and drop it to the program editor The selected function or function block is inserted into the specified position on the 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 Sea NS PROCEDURE 5 Set an instance name Label Registration Selection For a function block set an instance name on the Label oa Label Setting Information LLI lt x l Registration Selection screen displayed when function cope to Register Labe function block is dropped For the method for setting the Label a rene ree m Registration Selection screen ref
197. omment For labels label comments are displayed As for devices addresses device comments are displayed 8 7 4 Changing display format of variable 1227 3 74 OVERVIEW SCREEN CONFIGURATION PROGRAMMING PROGRAM CONFIGURATIONS PROCEDURE OPERATIONS OF PROGRAM EDITORS SETTING LABELS COMMON EDITING ST PROGRAMS EDITING STRUCTURED a CD LZ OQO ss A GX Works2 w 8 EDITING STRUCTURED LADDER FBD PROGRAMS Switching label device address display Select View 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 Switching label comment display Select View View Mode 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 format display Batch changing display of all program editors to device format display 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 Select View
198. ommon devices to outputs of function with 10 4 9 Retaining bit type outputs 5 10 5 Compilation 10 5 1 Compilation target data when compiling all 10 95 27 ASSIGNING dHeVIEBS 223145 3 3 ee rires d a EU da 30 0 oe beh deere dU d AP dE 10 5 3 Considerations of 11 12 13 14 10 6 Checking for Errors and Warnings 10 6 1 Correcting errors and warnings WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU 11 1 Writing Reading Data to from Programmable Controller CPU 11 2 MONITORING 12 1 Starting and Stopping Monitoring Programs 12 2 12 1 1 Starting monitoring 12 2 12 1 2 Stopping monitoring programs 4 12 3 12 2 Starting and Stopping Monitoring Function Blocks 12 4 12 3 Changing Operating Conditions of Monitoring 12 5 12 3 1 Changing current value display format decimal hexadecimal of word type variable 12 5 12 3 2 Setting the number of displaying characters for character strings 12 6 12 4 Monitoring Programs on ST Editor 12 7 12 5 Monitoring Programs in Structured Ladder FBD Editor 12 9 12 6 Setting Monitoring Conditions 12 11 USING USER LIBRARIES 13 1 Procedure for Using User Library 13 2 13
199. oper2 GT Designer3 by registering them as system labels For details of system labels refer to the following manual Cs iQ Works Beginner s Manual OVERVIEW SCREEN CONFIGURATION System labels Same label names can 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 PROGRAMMING CONFIGURATIONS 4 PROCEDURE Screen display Select Project view Global Label global label Global Label Setting Global E ES Class Label Name Data Type Constant Device Address Comment Remark Relation with System Label System Label Name Attribute V R GLOBAL v TransportComplete Bit M100 0 100 VAR GLOBAL VAR GLOBAL CONSTANT Temperature_Control MM VAR GLOBAL 5 il Setti il Setti IEEE Bit spit Oo Diese sab ___ Diseose jgobalbil Link VAR GLOBAL grobal bit2 Link PROGRAM VAR GLOBAL arobal Bt VAR GLOBAL grobal_bit2 Bt DOO The system label is already registered to the sys
200. or FXCPU this button is supported by FX3Gc and FX3uc only Reserves the selected global label for registration as a system label For FXCPU this button is supported by and FX3uc only Reserves the selected global label for deregistration of system label After the deregistration of the system label is confirmed the global label becomes a normal global label OVERVIEW Import System Label For FXCPU this button is supported by FX3Gc FX3u and FX3uc only Imports system labels to the project SCREEN CONFIGURATION Operating procedure 1 Click the Import System Label button The Import System Labels to Project screen is displayed PROGRAMMING CONFIGURATIONS 4 PROCEDURE Import System Labels to Project The selection of label which i displ ti System Label List Name All Y Refinement Options None gas Display only system labels with no device assigned Refinement Characters Refinement Find Subject whole Display Find Characters PROGRAM Label mult Label mult Word Signed QO6UDHCPU Simple 02 Common Label mul2 Label mul2 Word Signed QO6UDHCPU Simple 02 U3E1 G1 Common Label_mul3 Label_mul3 Word Signed QO6UDHCPU Simple 02 U3E1 G2 Common Label mul4 Label mul4 Word Signed QO6UDHCPU Simple 02 U3E1 G3 Common Label mul5 Label mul5 Word Signed QO6UDHCP
201. oring Monitoring Programs on ST Editor Monitoring Programs in Structured Ladder FBD Editor Setting Monitoring Conditions 12 2 12 4 12 5 12 7 12 9 12 11 12 1 x O LL O Z I O X lt 00 SPECIFIC POSITION CONVERTING COMPILING PROGRAMS TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER CPU NERO NINE USING USER LIBRARIES gt SETTING OPTIONS APPENDIX INDEX s GX Works2 v 12 MONITORING 12 1 Starting and Stopping Monitoring Programs This section explains how to monitor a program on the program editor Open the program editor to be monitored in advance 12 1 1 Starting monitoring programs Start monitoring the program Operating procedure Select Online Monitor Start Monitoring The monitoring starts B Verifying the program with the program on the programmable controller CPU before starting the monitoring Set whether to verify the program with the program on the programmable controller CPU before starting the monitoring of the Structured Ladder FBD editor or the ST editor Operating procedure Select Always Verify with PLC Not Always Verify with PLC Confirm whether to Verify with PLC under Tool gt Options Monitor gt Structured Ladder FBD ST When Always Verify with PLC is selected the program is verified with the program on the programmable controller CPU before starting
202. ormat constant type labels are displayed as label names gt Label format display Device format display COUNTER_FB_M_1 COUNTER_FB_M_1 COUNTER FEM COUNTER FB M Input Coil ValueQut 18189 Coil ValueQut D12281 Preset Status Output Preset Status M8168 Yalueln DT valueln b Address format display COUNTER FB M 1 COUNTER FB M amp MXDLBTES Coil lt MW0 12281 Preset gt Preset Status 1 Pohl T2 8t v alualn 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 OPERATIONS OF PROGRAM EDITORS SETTING LABELS COMMON EDITING ST PROGRAMS EDITING STRUCTURED a CD LZ OQO 39 Ta 8 7 4 Changing display format of variable 8 25 A GX Works2 WT 8 EDITING STRUCTURED LADDER FBD PROGRAMS 8 7 5 Displaying additional label items When Label is selected in View Mode the labels and other format such as device can be displayed at the same time For details of changing display format refer to Section 8 7 4 Operating procedure Select View Add Label Display Items Device Address Label Comment Device Comment The selected item is displayed Display labels Display labels a
203. 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 NCAUTION 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 Common before use The positioning test functions of OPR 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
204. programs in Simple project for users inexperienced with GX Works2 Sold separately GX Works2 Beginner s Manual Structured Project Explains fundamental methods for such as creating editing and monitoring programs in Structured project for users inexperienced 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 MO 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 separatel
205. r Default Screen button Stores the current settings as the user default and applies them to a new project Describes the buttons on the MEME MM Section title Clarifies the section of currently open page The following table explains the CPU module icons that indicate the function availability Icon Description QCPU Q mode LCPU FXCPU Normal icons indicate that the corresponding function 1 Icons with asterisk symbol indicate that the Q CPU corresponding function is available with restrictions such as CPU types Icons with symbol x indicate that the corresponding CPU function is not available This manual also uses the following columns Point This indicates notes for requiring attention or useful functions relating to the information given on the same page Restrictions This indicates restrictions relating to the information given on the same page Symbols used in this manual The following shows the symbols used in this manual with descriptions and examples MELSOFT Series Works2 Unset Project PRG Write POU_01 1 Step ER t Project Edit Find Replace Compile view Online Debug Diagnostics Tool Window Hi ae mw ER ER ee ER M PLCSystem PLC File PLCRAS Bootrie Prooram sFC Device Assignment Multiple CPU Setting Timer Limit Setting LowSpeed 100 ms ims 10
206. r block A ladder block consists of a ladder block header and a program editing area section 88 5 ladder uo information such as a title set for each ladder block and a label name ofthe jump oos Describes the d isplay contents An area for creating a program Program editing area Section 8 1 on the screen Ladder symbols can be placed in the grid area start position ofthe structured ladder program Section For the display of left power can be switched to hide 8 8 8 di Section zc Indicate specific positions of tab stop and start end positions of lines 888 5 9 UR PLC Read Write Online Change Compile Automatic Save is avail ates Intelligent Function Module has been saved with a name 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 Hra Section 12 2 Reference location Screen button Backto System Default 3 leads to the reference location and reference manual eem Restores the user default settings Restores the initial settings Set as Use
207. r case device names as labels e f this check box is cleared an error occurs when compiling programs e f this check box is selected a warning is displayed when compiling programs Label names that contain a same lower case as the device can be used Global Label Setting Globali Class Label Hame Data Type Constant Device Address 1 VAR_GLOBAL Matar Bit zs M100 SMe0 100 2 VAR_GLOBAL Join POU 01 PRG Program Structured Ladder FBD MOS EM ENO BR TAS om cum ve VES a ec speed 6 d iml i i i i i 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 10 8 10 4 3 Using same name for global label and local label 10 4 Changing Operating Conditions of Compilation Point Label names which cannot be used When 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 WOa1 W1a are regarded as devices therefore a compilation error is caused can be used as 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
208. r changes according to the selected instruction 3 Click the desired position PROGRAM CONFIGURATIONS PROCEDURE The instruction is entered at the cursor position B Changing instruction Change entered operator function or function block Operating procedure 1 Select an operator function or function block to be changed 2 Enter the instruction with the operator function or function block being selected and click the button The operator function or function block is changed After changing the instruction adjust the arguments of the instruction if necessary OPERATIONS OF PROGRAM EDITORS SETTING LABELS COMMON EDITING ST PROGRAMS EDITING STRUCTURED a CD LZ QO 39 Ta 8 2 2 Entering instructions 8 5 s GX Works2 WwW 8 EDITING STRUCTURED LADDER FBD PROGRAMS Entering POUs Operators functions and function blocks can also be selected from the Element Selection window Cs Section 6 2 1 e When nothing is entered in the element selection field instruction space device label can be entered For example Id However when an instruction exists as an element such as JMP and RET is entered it is entered as an element For entering in functional description select re on the element selection field and enter an instruction such as JMP Entering unregistered labels By setting the option a new label setting can be added on
209. r setting labels App 4 Appendix 1 3 Toolbar icons and shortcut keys for program editors App 5 INDEX 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 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 methods for such as creating and monitoring programs in Simple project of GX Works2 Sold separately GX Works2 Version 1 Operating Manual Simple Project Function Block Explains methods for such as creating function blocks pasting function blocks to sequence programs and operating FB library in Simple project of GX Works2 Sold separately GX Works2 Version 1 Operating Manual Intelligent Function Module Explains methods of intelligent function module for 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 methods for such as creating editing and monitoring
210. r the program to be monitored Function block programs When verifying function blocks with Use Macrocode is selected on the Property screen the program in which the function blocks are utilized is verified Therefore if the program is changed the programs do not match even when the function block program is not changed Functions function blocks used at more than two locations in the program Only the first function function blocks used in the program are verified CONVERTING COMPILING PROGRAMS TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER CPU 12 1 2 Stopping monitoring programs otop monitoring program Operating procedure NERO NINE Select Online Monitor Stop Monitoring The monitoring stops Point Changing current values During monitoring bit devices can be forced ON OFF and the current values of devices buffer memories and labels can be changed For forcing bit devices ON OFF and changing current values refer to the following manual 5 GX Works2 Version 1 Operating Manual Common USING USER LIBRARIES Monitoring buffer memory and link direct device e To monitor the ON OFF status of the buffer memory and link direct device example UOYGO 1 select Tool Options gt Monitor Structured Ladder FBD ST Operational Setting and select Monitor buffer memory and O link direct device Monitoring label
211. real ZR1020 1 e orqer Label Word signed 0800172 lt Label D Double precision real ZR1016 3 1 Since double precision real requires four devices two device of 08000 to 08001 are not enough Therefore the next device ZR is assigned 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 X 2 10 5 2 Assigning devices 10 17 s GX Works2 v 10 CONVERTING COMPILING PROGRAMS B 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 mode LCPU Devices are assigned in descending order assigned from higher number of a device number of device range set with the Device Label Automatic Assign Setting function in the same manner as the assignment to a label defined in a label setting editor When the multiple types of devices are assigned automatically Select one device to be assigned from devices set with the Device Label Automatic Assign Setting function with the order of ZR gt R gt W gt gt M Multiple device types are not assigned to temporary variable Example 1 Device automatic assign setting Set the following device range
212. reate program using the basic instruction 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 1100 falling interruption 16010 to 18010 timer interruption 010 to 1060 counter interruption OVERVIEW 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 Ladder Diagram When the program block registered to the task is created in Ladder Diagram items of Attributes cannot be set When the program end instruction is used When the program end instruction such as the FEND instruction and GOEND instruction is used program blocks and or tasks following the program end instruction are not executed SCREEN CONFIGURATION The following tables show task executing order according to set execution type always priority high low interval or event in the task property setting PROGRAMMING Task attributes Task name Task executing condition Event Priority Task 1 TRUE Task 2 M Task 3 FALSE Task 4 TRUE 31 Always priority low 31 Event T 100ms 31 Interval 30 Always priority high if er PROGRAM EE PROCEDURE Executing order Execution timing 1 Executed in every scan 2 Executed in ever
213. reating 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 5 Section 8 1 1 Screen display Select Project view POU Program program Program OVERVIEW CONFIGURATION Ladder block header Program editing area 2 EE 4 T 58 end g boo g boo Screen display Ladder block 4 Coil EG SESS L NES i Contact 4 Describes the screen display Bis ag eo Function 2 cM 7 E i ump a 3 pa io Follow the and select E Sean menu to open the screen ENS z O Screen display may differ Pointer Jk depending on the CPU MEE LL MN In that case typical example is Ladder Block EN oR wo Input label t i g booli g bool described Output label 2 Grid gis bool15 g int IN bool11 EMT En 5 6 i 2g Display contents 65 ER s Name Description Reference Q A unit for creating a program Display conte nts ladde
214. rget Memory For details of the memory card application refer to the following manual User s Manual Hardware Design Maintenance and Inspection of the CPU module to be used Setting target module tab CONVERTING COMPILING PROGRAMS Y Y File list Target Memory TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER CPU No Memory capacity Writing Size Display the total size of written data selected in Target Display the free space volume of the target memory Display used space volume of the target memory O 14 5 Not supported by FXCPU 5 2 For FXCPU program size and symbolic information data size are displayed when executing Write to PLC E function Symbolic information size is displayed on the screen for projects with labels of FX3u FX3UC version 3 00 or later only When a program program file device comment or device memory is selected the range can be set by clicking the zr regir 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 Version 1 Operating Manual Common USING USER LIBRARIES CD 2 Click the button 5 H When the Write to PLC function is executed the specified data are written to the target memory 5 When the Read from PLC function is executed the specified data are read from the target
215. ries GX Works2 SCREEN CONFIGURATION Find unused label list From Cross reference information and display them Registered labels which have not been used in the program will be displayed at Unused label list Cross reference information will be changed ko the one that is Found based on the following conditions Device label gt Devices labels Find in gt Entire project Uncheck Auto tracking Uncheck Fast Find Uncheck Find label definition Uncheck Find constant Uncheck Find device other than the head Uncheck all items Are you sure you want to display Unused label list PROGRAMMING CONFIGURATIONS 4 PROCEDURE 2 Clickthe s button The unused labels are extracted 3 The Unused label list screen is displayed Select unused labels to be deleted under Label name Click the Select all button to select all unused labels Click the Sancel All Selections button to cancel the selection of all unused labels PROGRAM Unused label list gi Global label Globali O labeli VAR GLOBAL O label2 VAR GLOBAL O label3 VAR GLOBAL O label4 VAR GLOBAL labelS VAR GLOBAL O label VAR GLOBAL O label VAR GLOBAL O labels VAR GLOBAL O label9 VAR GLOBAL O labelt VAR GLOBAL Local label ilv 01 locali VAR Bit VAR Bit local3 VAR Bit local4 VAR Bit local5 VAR Bit Select all Cancel Selections
216. rogram Fundamentals of the CPU module to be used OVERVIEW Note that data types differ according to programming language Ladder Diagram Sequential Function Chart Structured Text Structured Ladder FBD The following table shows data types that can be used for each programming language O Applicable x Not applicable SCREEN CONFIGURATION Programming language Data Type MN Structured Text d Structured Ladder FBD Chart da Word signed Double word signed 0 Word unsigned 16 bit string Double word unsigned 32 bit string 0 LL Time z 1 For FXCPU this item is supported by FX2N FX2NC FX3S FX3GC 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 Ladder Diagram these items cannot be used for inline structured text For FXCPU this item is supported by FX1N FX1NC FX2N FX2NC FX3S FX3GC and FX3uc only SETTING LABELS OPERATIONS OF PROGRAM EDITORS QO COMMON EDITING ST PROGRAMS H e m CD Z Lr O LADDER FBD PROGRAMS 5 5 2 Data types 5 13 t GX Works2 w 5 SETTING LABELS 5 5 3 Selecting data types Select a data type A data type can be selected on the Data Type Selection screen other than direct data
217. s Cross reference e Find Replace device Device batch replace Device test with execution condition e Sampling trace B Setting data length of the character string data type To change the data length of the character string data type directly edit the data length on each label setting editor The initial value of data length of the character string data type 15 set on the option setting Changing data length on the label setting editor e Change data length on the Data Type column on the label setting editor Class Label Mame Data Type 1 VAR 1 EN 2 string 6 Change these values directly Changing initial value of data length Select Tool gt Options gt Label Setting Editor gt Default Length of String Data Type and set the data length Data Setting Default Length of String Data Type 32 5 16 5 5 3 Selecting data types 5 5 Common Operations for Setting Labels 5 5 4 Label comments Append a comment to a defined label Label comments can be displayed on the Structured Ladder editor Select View View Mode Comment to display label comments Label comments are not applied to device comments even when a program is compiled OVERVIEW 5 5 5 Editing rows SCREEN CONFIGURATION Edit rows on label setting editor B Adding rows Add a row on the label setting editor New Declaration
218. s Assigned Automatically 5 31 5 8 1 Considerations of automatically assigned 5 32 5 9 Writing Reading Data to from CSV Files 5 34 COMMON OPERATIONS OF PROGRAM EDITORS 6 1 Types of Program Editor 6 2 6 1 1 Available programming 6 3 6 1 2 Available comment acu ueteri duci Qd RR CE e eee de HC UE WE eas rueda ee Sad 6 4 6 2 Operations of Program Editors 6 5 6 2 1 Using POUs Element Selection window 6 5 6 2 2 Using labels in the 6 8 0 2 9 Lido Gnd OO 6 11 6 2 4 Changing display size of editing 5 6 11 6 2 5 Splitting editing 5 6 12 6 2 6 Opening local label setting screen of program editor being edited 6 13 6 2 7 Displaying compilation result in list 6 13 6 2 8 Setting display content of tooltip 6 14 6 2 9 Opening label setting and program screens for selected POU 6 15 7 EDITING ST PROGRAMS 7 1 ST Editor 7 2 7 1 1 ST PROGINS we d oan data a 7 3 7 1 2 s
219. s Manual moines were ous Operating Manual Purpose Simple Structured Simple Structured Project Project Project Project Outline Ladder Diagram Details ERI LIA Simple Sequential Project Function Chart Details Se ee Structured Text Details Ladder Diagram Sequential Function Chart Structured Project Structured Ladder FBD Details Structured Text Details guy 1 MELSAP3 and FX series SFC only A 16 languages Using Ladder Diagram Using Sequential Function Chart 4 Details of instructions in each programming language for QCPU Q mode LCPU Learning details of programmable controller CPU error codes special relays and special registers Details Learning the types and details of common instructions Learning the types and details of instructions for Details _ intelligent function modules Learning the types and details g 7 of instructions for Details network modules m Learning the types and details of instructions for the PID control function Learning details of specifications functions and instructions of SFC MELSAP3 Using Structured Ladder FBD or Structured Text A 18 Learning the fundamentals for creating a structured program Learning the types and details of common instructions Learning the types and details gt of instructions for i intelligent
220. s Verify with PLC is selected Verify with PLC before starting monitoring However do not verify if simulator is running selecting uncompiled program s POU or unchanged POU Last verification status is held while editor is open When Not Always Verify with PLC is selected Start monitoring without verifying with PLC When Confirm whether to Verify with PLC is Section 12 1 1 selected Show a confirmation box whether to verify with PLC before starting monitoring However the confirmation box will not be displayed and do not verify if simulator is running selecting uncompiled program s POU or unchanged POU Last verification status is held while editor 15 open Ladder SFC 5 GX Works2 Version 1 Operating Manual Common 5 GX Works2 Version 1 Operating Manual Simple Project SFC PLC Read Write Structured Ladder FBD ST Monitor Verify with PLC setting before starting monitoring Online Change 5 GX Works2 Version 1 Operating Manual Common Symbolic Information Save Destination of Device Comment Enable calling function block from ladder to ST or vice versa from ladder to Structured Ladder FBD Enable calling function or vice versa using inline ST in ladder reducing block and using inline ST steps when using function block Input label for VAR IN OUT remains equal to output label Do not execute duplicated coil check ladder Check when program check is not ne
221. s labels names as labels Only the device name outside device range is valid for Inline Structured Text Function Output Setting Se Section 10 4 5 objective function output to other input Select whether to allow OUTPUT at FB call Check Able to specify VAR OUTPUT as FB argument e g FBlnst FBVarOUT Variable Section 10 4 6 Uncheck Compile error C8015 returns if VAR OUTPUT is specified as FB argument Section 10 4 4 CONVERTING COMPILING PROGRAMS Compile Allow VAR_OUTPUT at Condition 1 FB call ST TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER CPU s N For FB call of ST or structured ladder from structured ladder set whether to add temporary variables to input I O or output argument to use macrocode Unable to add them depending on the programming language Please refer to the Compile appropriate manual DJINT_ TO_BOOL DWORD TO BOOL TIME TO BOOL E Add temporary variables as arguments to use macrocode Section 10 4 7 MONITORING Structured Ladder FBD ST LIMITAION E MAXIMUM E Check the box to generate code that holds the output SET When unchecked the instruction word output will be treated as a coil OUT MINIMUM E EQ E NE E GT E GE E LT E LE E AND E OR E XOR E USING USER LIBRARIES Compile Condition 2 Section 10 4 9 Select whether to generate a code which keeps 1 4 User Defined Fu
222. s the Enter keys to insert a line feed ES 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 Cs Section 8 1 1 Operating procedure 1 Click the position where the cursor changes to on Input E Comment yn the corner of the comment entry field 2 Drag the corner to adjust the size Input f Comment Input Comment 8 34 8 9 1 Editing comments 8 9 3 Moving comments Move a comment Comments can be moved only within the same ladder block Operating procedure 1 Click the position where the cursor changes to on the comment entry field 2 Drag it to the desired position 8 9 Editing Comments amp POU 03 PRG Program Structured Ladder FBD Input Comment 08 se E 1 1 04 05 HN Click and drag k POU 03 PRG Program Structured Ladder FBD 8 9 3 Moving comments Yar 08 o oe E 1 1 EN MM Var 04 ee ee eG 05 8 35 OVERVIEW SCREEN CONFIGURATION PROGRAMMING PROGRAM CONFIGURATIONS 4 PROCEDURE OPERATIONS OF PROGRAM EDITORS SETTING LABELS COMMON EDITING ST PROGRAMS EDITING STRUCTURED a CD
223. s 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 A To check the values select Constant Value under Tool Options Program Editor gt Structured Ladder FBD ST gt Tool Hint Tool Hint Display Items and check with tooltip X a 2 A A lt x gt lt LLI 12 1 2 Stopping monitoring programs 12 3 s GX Works2 v 12 MONITORING 12 2 Starting and Stopping Monitoring Function Blocks This section explains how to monitor function block programs Open the function block program to be monitored in advance B Starting monitoring function blocks Start monitoring the function block Operating procedure 1 Select Online gt Monitor Change Instance Function Block The Change Instance Function Block screen is displayed Change Instance Function Block FB Instance List MAIN Insbancez MAIN Insbance3 CNN 2 Select the FB instance to be monitored 3 Click the button 4 Select Online Monitor Start Monitoring The monitoring starts The display and executable operations during monitoring are the same as those of the program monitoring Screen button Clear Cancels selected status of the FB instance and stops monitoring B Stopping monitoring function blocks otop monitoring the function block Operating procedure S
224. s2 DY or reading label programs symbolic information of GX Works2 using the existing application refer to the following o manual 25 GX Works2 Version 1 Operating Manual Common dm For FXCPU 1 e The symbolic information data can be read from written to the programmable controller CPU in FX3U and FX3uc version 3 00 or later only 2 e When a memory cassette to which the symbolic information has been written is used FXCPU other than E FX3UC version 3 00 or later the symbolic information may be corrupted m Saving project automatically after writing data to programmable controller CPU project can be saved automatically after writing data to the programmable controller CPU by setting the option Select m Save project after writing to PLC under Tool Options Project Automatic Save e X a 2 A A gt lt LLI zZ 11 5 8 GX Works2 11 WRITING READING DATA TO FROM PROGRAMMABLE CONTROLLER CPU MEMO 11 6 aN MELSOFT 4 12 MONITORING This chapter explains how to monitor the program execution status of the programmable controller CPU using the program editor For the overview of monitoring refer to the following manual 5 GX Works2 Version 1 Operating Manual Common 12 1 12 2 12 3 12 4 12 5 12 6 Starting and Stopping Monitoring Programs Starting and Stopping Monitoring Function Blocks Changing Operating Conditions of Monit
225. screen is displayed Property Details Comment TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER CPU Data Mame Lib 1 Title Libol Title Library File CiDocuments and Settings 4dministrator My 1 2 Last Change 6 15 2009 10 48 05 Help File CiDocuments and Settings 4dmir Browse CD 2 2 cma gt CD 2 Click the button The Open a help file screen is displayed J Selecta 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 USING USER LIBRARIES D SETTING OPTIONS APPENDIX INDEX 13 2 7 Set help file to library 13 9 s GX Works2 v 13 USING USER LIBRARIES 13 3 Using User Library This section explains how to use a created user library 13 3 1 Installing user library data to project Install user library data from the existing library file to the project Screen display Select Project gt Library gt Install Install Library Library File Documents and Settings 4dministratoriMy Documents Library Mame UserLibD1l OK Operating procedure 1 Setthe items on the screen Item Description Set a path of the library file to be installed Library File Click the button and select a folder on the Open Library screen Library Name Enter a library name
226. sition The wrapping position for printing window is displayed Wrapping position 2 4 x7 M21 1 1 1 9 x10 x11 M22 H L x12 x13 M23 H ADD ADD ADD ADD ADD D30 Es _ p100 D31 D32 D33 D34 ADD D36 D377 Poi oint Wrapping positions When the paper size is changed by the print setting the wrapping positions are adjusted automatically OVERVIEW SCREEN CONFIGURATION PROGRAMMING PROGRAM CONFIGURATIONS PROCEDURE OPERATIONS OF PROGRAM EDITORS SETTING LABELS COMMON EDITING ST PROGRAMS EDITING STRUCTURED a CD Le alee QO Ta wi GX Works2 8 EDITING STRUCTURED LADDER FBD PROGRAMS MEMO MELSOFT ww 9 SEARCHING FOR SPECIFIC POSITION This chapter explains how to move to a specified position in the program 9 1 Searching for Specific Position in ST Program 9 2 9 2 Searching for Specific Position in Structured Ladder FBD Program 9 4 x LL Z X O x lt 00 SPECIFIC POSITION CONVERTING COMPILING PROGRAMS TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER CPU s No MONITORING USING USER LIBRARIES o SETTING OPTIONS APPENDIX INDEX s GX Works2 Z 9 SEARCHI
227. splayed when registered step is executed Ladder blocks 2 are selected in the Following POU MAIN Program File Selection Program setting in or FB MAIN E Step Selection set monitor conditions setting select Start to the start step of selected ladder block select End to the last step and select Specify Step to the specified step C Start B Step Ma Step Mo 4 C Specify Step 0 Step 4 Remark Communication errors may occur without reading Form monitor value when the specified steps are not executed cesi 2 Set the items on the screen Item Program File Selection Step Selection Select this to the condition with the start of the selection range End Select this to set the condition with the end of the selection range Description Select the POU to be set the monitoring condition when a function used in the two or more POUS or an FB instance declared in a global label exists Specify Step Select this to set the step number to be specified 3 Click the Register button The monitoring condition is registered and the monitoring stops The monitoring starts when the specified condition is satisfied Click the cancel i button before closing the Monitor Condition Setting screen Screen button e Cancel 5 Cancels the registered condition 1 Not supported by Basic model QCPU Q00UJ 2000 Q01U SEARCHING FOR SPECIFIC PO
228. t a closed contact at the cursor position Ly a Open Branch Insert an open contact branch at the cursor position Close Branch Insert a closed contact branch at the cursor position Input Label Insert an input variable at the cursor Section 8 2 1 position Output Label Insert an output variable at the cursor position Rising Pulse Insert a rising pulse at the cursor position Falling Pulse Insert a falling pulse at the cursor position Rising Pulse Close Insert a rising pulse close at the cursor position Falling Pulse Close Insert a falling pulse close at the cursor position BV sepe T tH gt ctn Insert a jump the cursor position lt Insert a return the cursor position Tp Insert a comment entry field I Ladder Block Label Display the Ladder Block screen Section 8 8 4 List Operands d the Label Registration Selection Section 6 2 2 App 6 Appendix 1 3 Toolbar icons and shortcut keys for program editors Appendix 1 List of Toolbars and Shortcut Keys EN Shortcut key Corresponding menu Reference Increment the number of arguments of functions and function blocks Section 8 6 3 Delete Pins Delete the number of arguments of d functions and function blocks etr Num E 1 Zoom in the screen one level Section 6 2 4 Num E 1 Zoom out the screen one level Narrow and widen the width of ladder block m eni
229. tem label database 4 L System label is reserved to be registered System label is reserved to be released execute the Reservation to Register Release for the system Reservation to Reaister System Label abel reflection to the system label database is required cry Reflect to lease execute Reflect to System Label Database Reservation to Release System Label System Label To execute Online Program Change execute Online Program 0 Change and save Tae gees ipie e SETTING LABELS OPERATIONS OF PROGRAM EDITORS QO COMMON EDITING ST PROGRAMS H e m H CD c Z Lr O LADDER FBD PROGRAMS A GX Works2 5 SETTING LABELS Operating procedure Set the items on the screen Item Class Label Name Data Type Constant Device Address comment 2 Remark 1 2 Relation with System Label System Label Name 3 Attribute 3 Maximum number of Description characters Select a label class from the list displayed by clicking zl Section 5 5 1 Ladder SFC 32 FB instance name 16 Structured Ladder FBD ST 32 Enter a desired label name Set a data type from the Data Type Selection screen displayed by clicking _ _ lt 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
230. the element only For cutting function and select Edi gt Cu Left click on the element nc TT ea ee w Ue lu de cue ve Dep tu HE THEE MOV see ans EN ENO m s i ss g intl 28 di ug int Right click on the element A xx TES and select Edit gt Cu ls lnk se bee Only the element is cut 8 14 8 4 3 Copying elements 8 5 Changing Type of Contact and 8 5 Changing of Contact Coil This section explains how to change type of contact and coil 8 5 1 Setting the type of contact and coil The following table shows the types that can be set for contacts and coils Type Symbol Open Contact Close Contact J H Rising Pulse Jtt Contact Falling Pulse J4 F Rising Pulse Close 3 J4 F Falling Pulse Close 3 Coil Set 45 Bit type Open Contact Label Label DUO pin Close Contact Label 4 Open Contact Label Jump Close Contact amp Label Open Contact 4Retum gt Return Close Contact q Return b 1 These items cannot be used for FBD 2 Not supported by FXo FXos FXu FX2c 8 Supported by Universal model QCPU LCPU 8 5 1 Setting the type of contact and coil COMMON EDITING STRUCTURED OVERVIEW SCREEN CONFIGURATION PROGRAMMING PROGRAM CONFIGURATIONS PROCEDURE
231. the function s are retained An operation equivalent to the SET instruction Generation of Code Keeping Output v DXNMT TO BOOL E D WORD TO E TIME E E v LIMITATION MAXIMUM E MINIMUM EQ E NE E GT E GE E LT E LE AND E OR E v User Defined Function with User Defined Function Block with EN EMO Example Retaining the INT TO BOOL E output INT TO BOOL E j EMO P _ iim The check boxes are cleared The check box is selected Start up condition EN d Ll Bit type output Return value 10 14 10 4 9 Retaining bit type outputs of functions 10 5 1 Checking compilation status The compilation status can be checked on the Project view 10 5 Compilation 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 Data before compilation and data in which a compilation error occurs are displayed in red After the compilation the data other than compilation target are displayed in blue 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 Navigation The characters on the title bar Project
232. the programming languages of call source program function block and call destination function block a compilation error may occur The applicability of the compilation is as follows O Applicable x Not applicable argument to which constant is input Programming language of Programming language of Do not use call source program call destination function I O argument Use I O argument Data type for output side function block block for output side in function block in function block Bit type O G O Ladder Other than bit x type Ladder SFC Structured Ladder FBD ST Other than bit x x type Bit type Structured Ladder FBD ST Structured Ladder FBD ST Other than bit x type When calling the function blocks created in other programming language refer to the following section gt Section 4 4 1 B Using function blocks created in other programming languages The structure with no elements cannot be specified as arguments of function function block 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 The code is not created when the program is compiled 10 22 10 5 3 Considerations of Compilation 10 6 Checking for Errors and Warnings 10 6 Checking for Errors and Warnings When the
233. the search target 2 Click the button Search the character strings after the selected line The cursor is moved to a line where the searched character string is partially matched e Close Closes the Ladder Block List screen PROGRAMMING PROGRAM CONFIGURATIONS PROCEDURE OPERATIONS OF PROGRAM EDITORS SETTING LABELS COMMON EDITING ST PROGRAMS EDITING STRUCTURED a CD LZ alee QO 39 Ta 8 8 5 Editing listed ladder blocks 8 31 24 GX Works2 8 EDITING STRUCTURED LADDER FBD PROGRAMS 8 8 6 Setting ladder block labels titles Set a ladder block label title Operating procedure 1 Select Edit Ladder Symbol Ladder Block Label Ladder Block Label Title 2 Setthe 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 Display left power rail Hide left power rail booll bool g bool2 je 8 32 8 8 6 Setting ladder block 5 8 8 Editing Ladder Blocks NA Entering position
234. 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 ladder programs in Structured projects SEARCHING FOR SPECIFIC POSITION The following table shows the program data included in the symbolic information zn 22 Item Included data im 200 Global label 89 Program setting Task 1 1 P uj Program a Symbolic information 2 ce Local label On oa Function block 2 Eis Function Structure 1 2 User library Point Compile status when the symbolic information is read e 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 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 Considerations for reading symbolic information Y For the considerations for reading label programs symbolic information of the existing application using GX Work
235. ting When an item other than the class such as a label name and data type is set in a blank column VAR is automatically set for Class Change it if necessary Characters that cannot be used for label names Any of the following label names causes an error at compilation A label name that includes a space e A label name that begins with a numeral e A label name which is same as the one used for devices For Structured Ladder FBD and ST programs lower case device names can be used as labels by setting the option Section 10 4 4 For details refer to the following manual 5 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 8 The assigned devices can be checked with the cross reference function I GX Works2 Version 1 Operating Manual Common OVERVIEW SCREEN CONFIGURATION PROGRAMMING CONFIGURATIONS 4 PROCEDURE OPERATIONS OF PROGRAM EDITORS ES COMMON EDITING ST PROGRAMS e LU D O 02 CD e LLI LADDER FBD PROGRAMS LE GX Works2 v 5 SETTING LABELS 5 4 Setting Labels for Functions and Function Blocks This section explains how to set local labels for each fun
236. ting Reading Data to from Programmable Controller CPU 11 2 E 6 USING USER LIBRARIES o SETTING OPTIONS APPENDIX INDEX 11 1 s GX Works2 WwW 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 For FXCPU projects with labels created project data can be read from FX3u FX3uc version 3 00 or later only Screen display Select Online Write to PLC 21 Read from PLC For QCPU mode LCPU FXCPU FX3u FX3uc version 3 00 or later symbolic information is displayed on the file list Online Data Operation r Connection Channel List Serial Port PLC Module Connection LISB System Image Read Write C Verify Delete Setting target B Pic Module Bl intelligent Function Module Execution Target No Yes module tab Title get Edit Data Parameter Program Select Cancel Selections Saien Iv Display Size Module Name Data Name Title Target Detail Last Change Target Memory Size Sur 3 Symbolic Information File list v igll MAIN 2010 08 05 16 08 09 Uncompiled 5181 2010 08 05 16 08 09 Uncompi
237. tion Select this to set bit devices with the bit specified word device OPERATIONS OF PROGRAM EDITORS QO COMMON EDITING ST PROGRAMS H e m CD Z Lr O LADDER FBD PROGRAMS 2 6 4 Assigning devices to structure array labels 5 27 A GX Works2 WT 5 SETTING LABELS Point Display on the Local Label Setting screen For the Structure Device Setting screen the read only screen is displayed Setting devices of global labels Devices assigned to structure are cleared when elements of structure are changed on the Structure Setting screen However devices of member whose data type is changed to the one with the same bit array are not cleared Considerations when using system labels Structure array global labels on which Structure Array Offset Value is set cannot be registered as a system label 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 1 Click Detail Setting on the label setting editor The Structure Device Setting screen is displayed 2 Setthe device name to the start element data of the array Devices are set to the data of the same data type on the editing screen and
238. tion block Select this class to make a label usable in VAR_GLOBAL the program blocks and function blocks x commonly in the project Select this class to make a label with a VAR_GLOBAL_ constant value usable in the program CONSTANT blocks and function blocks commonly in the project Select this class to make a label usable in VAR the program block or function function block Select this class to make a label with a VAR CONSTANT constant value usable the program block or function function block Select this class to make a latch type label VAR RETAIN usable in the program block or function block Select this class to make a label usable for input variables in the function function block Its value cannot be changed in a POU VAR OUTPUT Select this class to make a label usable for output variables in function block Select this class to make a label usable for VAR IN OUT both input and output variables in the O function block Its value can be changed in a POU TIS Not supported by FXCPU VAR INPUT 5 12 2 5 1 Classes 5 5 Common Operations for Setting Labels 5 5 2 Data types Data types of label are described in the following table For details such as value ranges of each data type refer to the following manuals 5 MELSEC Q L F Structured Programming Manual Fundamentals 5 MELSEC Q L Programming Manual Common Instruction User s Manual Function Explanation P
239. to 5 5 2 Section 5 5 3 to 5 5 4 Section 6 2 2 Section 7 1 4 Section 6 2 3 Section 6 2 2 Section 6 2 4 Section 8 8 Section 6 2 5 Section 6 2 3 Section 6 2 6 Section 8 8 7 Section 6 2 7 Section 8 11 Section 6 2 8 Section 6 2 4 Section 6 2 10 to 6 2 12 Section 6 2 6 to 6 2 8 Section 6 3 Chapter 7 Section 6 4 Chapter 8 Section 11 2 2 Section 13 3 1 Section 11 2 3 Section 13 2 5 Section 11 2 4 gt Section 13 3 4 Section 11 2 5 gt Section 13 2 2 Section 11 2 6 to Section 11 2 7 Section 13 3 3 Section 11 2 8 Section 13 2 6 Section 11 2 9 to Section 11 2 10 Section 13 2 4 Section 11 2 11 Section 13 3 5 Section 13 2 7 Chapter 7 to 12 Chapter 9 to 14 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 102 126 Addition Section 8 7 2 Section 8 8 7 Appendix 1 2 Correction MANUALS GENERIC TERMS AND ABBREVIATIONS IN THIS 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
240. to Section 10 5 When do not check duplicated coils for SET instruction By setting the following option SET instructions will not be detected as duplicated coils Select Do not target the SET instruction for duplicated coil check under Tool Options Compile Basic Setting Saving project automatically after compiling programs A project can be saved automatically after compiling programs by setting the option Select Save project after compiling under Tool gt Options Project Automatic Save MONITORING USING USER LIBRARIES o SETTING OPTIONS APPENDIX INDEX 10 5 s GX Works2 v 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 KL 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 gt Options gt Compile Output Result Stop Bui
241. tputs of function with EN ENO 10 11 s GX Works2 v 10 CONVERTING COMPILING PROGRAMS B Considerations when the check box is cleared Clear the check box of the option setting to save the number of automatically assigned devices to be used Considerations are taken into account when performing this operation The following are the program examples which require considerations Program examples which require considerations Clear the check box of the option setting to assign the same devices to 0 and 2 as shown below However since the AND instruction without EN ENO is executed without the execution condition B9 may turn ON even when M3 and M4 are OFF M8190 is assigned to D M8188 is assigned to in the following program example Example of ladder program Compilation result of ladder block 1 Step Compile Result MO0 ENO 0 LD B0 IN 1 1 B1 IN 2 OUT 8187 2 2 B x 3 LD MO E ll o IN b 4 TUB 9 n M2 ENO 52 LIN B3 IN 9 DT LL eee 10 AND B3 MEN 11 OUT 8186 M3 EN ENO 12 LD M2 B5 IN 13 D MALAE B6 IN Onn oe eee wee ee uum 1 Me ice m 17 18 DTT 595 ES EEE 19 AND M8188 B7 _IN SoM vum qe vis 20 OUT B4 Compilation result of ladder block 2 Step Compile Result
242. tting Editor Parameter H Monitor PLC Read Write online Change Symbolic Information Save Destination of Device Comment Explanation Compile H Intelligent Function Module iQ Works Interaction System Label Setting Sampling Trace Back to System Default Back to User Default Set as User Default Operating procedure e 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 Section 14 2 Screen button Back to System Default Restores the initial settings Back to User Default Restores the user default settings set 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 The following table shows the option setting items For the default setting of each item refer to the following manual 5 GX Works2 Version 1 Operating Manual Common Tree item ltem Explanation Reference Project K GX Works2 Version 1 Operating Manual Common Program Program File Set a reference reflection target of device Name comment of each program program file Set a reference reflection target according to the local device range of PLC parameter when set to PLC parameter setting Within the local device range local device com
243. type is selected for Data Type Set a specific device to be assigned to the label when VAR GLOBAL is selected for Class 128 When a device name is entered to either column the other column is displayed in the respective format automatically When the Device column is blank a device is automatically assigned When the data type is structure click the Detail Setting cell and set devices on the Structure Device Setting screen C Section 5 6 3 Enter a label comment Comments can be displayed on the program editor by switching 1024 display hide of comments Cs Section 8 7 4 Enter supplementary information for label comments 1024 This item is not displayed on the program editor Display the relation between the global label and system label Class Description Disclose The global label is disclosed as a system label The global label refers the system label which is PIOS disclosed by another project Blank There is no relation with a system label 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 _ label 1 line can be inserted into a cell by pressing the Enter keys 2 The compilation is not necessary after editing 797 For FXCPU these items are supported by FX3G FX3GC FX3uc only 5 2 Setting Global Labels Screen button Q Reservation to Register System Label F
244. u gt Double word Sgned 0 Automatically set data When not using bit specification Label Mame Data Type Device Address E Double w ard Signed i SIRE STRAE STR Double ward Signed Label Mame Data Type Device Address STR Double word Signedj XMDU 1 5TR_B Automatically STR D set data Double w ard 5igned 08 zMDJ 5 ES Point When not using bit specification When the bit specification is not used clear Use Bit Designation on the Structure Device Setting screen 5 26 2 6 3 Assigning devices to structure labels 5 6 Setting Structure Labels 5 6 4 Assigning devices to structure array labels oet devices for the structure array 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 on the Device and Address columns Click Detail Setting to display the Structure Device Setting screen OVERVIEW Screen display z Click Detail Setting on the label setting editor lt Zo 7 5 Global Label Setting Globalt ws Class Label Mame Data Type Constant Device Address Comment 1 VAR_GLOBAL Complete Bit 2 M100 0 100 2 VAR_GLOBAL Emergency Stop Switch Bt o _ 3 3 GLOBAL CONSTANT Temperature Control 4
245. unctions for editing with the ST editor Edit function for editing in Structured Text Delete Delete the selected data List Operands Display the screen for inserting a label by selecting an existing label Insert a template corresponds to the instruction function or Display Template control syntax Set an argument of the template in the selected status from the MATE FGA left by selecting the menu each time Set an argument of the template in the selected status from the arena LIGA right by selecting the menu each time Find Replace function for editing in Structured Text Jump Jump to the specified line Bookmark Set a bookmark at the cursor line The bookmark is deleted TOJI EOKA when one is already set at the cursor line Bookmark List Jump to the specified bookmark from the bookmark list Next Bookmark Display the next bookmark position Previous Bookmark Display the previous bookmark position Delete All Bookmarks Cancels all bookmarks View function for editing in Structured Text Display Compile Result Display the compilation result in a list format Zoom Set Zoom Factor Increase Zoom Change the display size of the program Decrease Zoom Zoom Header Body Header Body Open the label setting editor in the selected POU Open the program editor in the selected POU Open the Local Label Setting screen for the program being Open Header MS Online function for editing in Struct
246. ured Text Monitor Start monitoring with the split window format that displays monitor data of numeric value and character strings Start Monitor bit type only Start monitoring only bit type devices labels 1 3 2 List of functions for editing in Structured Text Reference Section 6 2 2 Section 7 1 4 Reference Section 9 1 1 Section 9 1 2 Reference Section 6 2 7 Section 6 2 4 Section 6 2 9 Section 6 2 6 Reference Section 12 4 1 3 List of Functions 1 3 3 List of functions for editing in Structured Ladder FBD The following tables show the functions for editing with the Structured Ladder FBD editor 12 Edit function for editing in Structured Reference Delete Delete the selected data x 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 Connect 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 Section 8 10 SCREEN CONFIGURATION Overwrite the element entered Guided editing at the cursor position Overwrite Mode Section 8 10 1 Insert the element entered in Guided editing at the cursor Insert Mode A position Line Mode Change the input format to draw lines in Guided editing Section 8 10 4 2 Add a comment entry field
247. w gt Zoom Header Body Body View gt Zoom Header Body Function FB Label Setting FUNO1 FUN Bit Header Class abel Name onstan INPUT y IN 01 VAR INPUT v 02 PROGRAMMING CONFIGURATIONS PROCEDURE wm POU 01 PRG Program Structured Ladder FBD PE VAR Var2 X BOOL TO INT BOOL 0 View Zoom Header Body Body 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 gt FB FUN and set Double clicking opens header or Double clicking opens body OPERATIONS OF BING Esse SETTING LABELS COMMON EDITING ST PROGRAMS H e m CD Z Lr O LADDER FBD PROGRAMS 6 2 9 Opening label setting and program screens for selected POU 6 15 8 GX Works2 6 COMMON OPERATIONS OF PROGRAM EDITORS MEMO STS9V1 138 iss JO SNOILVH3dO 15 ONILIGS qgJ3 43dQv1 1 1 ONILIGS SNOILVHAO9IJNOO LO NVH59oxyd 34naaooud ONIININVHOOMHd NOILVHAO9IJNOO N33HOS M3IA
248. w 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 Select Edit New Ladder Block List Before amp A new ladder block is inserted in front of the ladder block being edited PROGRAMMING Inserting a ladder block in front of the current ladder block Select Edit New Ladder Block List After A new ladder block is inserted in back of the ladder block being edited PROGRAM CONFIGURATIONS PROCEDURE Inserting a ladder block at the end Select Edit gt New Ladder Block List Bottom A new ladder block is inserted at the end of all ladder blocks 8 8 2 Deleting ladder blocks OPERATIONS OF PROGRAM EDITORS SETTING LABELS COMMON Delete a selected ladder block Operating procedure Select Edit Delete EDITING ST PROGRAMS EDITING STRUCTURED a CD Le QO Qg Ta 8 8 1 Inserting ladder blocks 8 27 A GX Works2 WT 8 EDITING STRUCTURED LADDER FBD PROGRAMS 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 Operating procedure 1 Select a ladder block by clicking the ladder block header 2 Select
249. w the operation below CONVERTING COMPILING PROGRAMS Screen display Select Project Library Create 21 Create Library TO FROM PROGRAMMABLE WRITING READING DATA CONTROLLER CPU Library Mame s No MONITORING Operating procedure 13 1 Entera library name 2 Click the button A user library is created and displayed on the User Library view USING USER LIBRARIES Point e Maximum number of user libraries The maximum number of user libraries that can be created in a project is 800 2 Number of characters for a library E The maximum number of characters that can be entered for a library name is 32 m Invalid characters for library names For invalid characters for library names refer to the following manual m 5 MELSEC Q L F Structured Programming Manual Fundamentals ud X a 2 LLI an gt lt LLI 2 13 2 1 Creating user libraries 13 3 t GX Works2 WT 13 USING USER LIBRARIES 13 2 2 Changing library name Change the user library name Operating procedure 1 Selecta library name to be renamed on the User Library view 2 Select Project Library Rename The editing of the library name on the project tree is enabled J Setthe library name Press the key to confirm the new library name 13 2 3 Creating data Create data for the user library B Adding data
250. which can be utilized as assets of programs in multiple projects PROGRAM OPERATIONS OF PROGRAM EDITORS SETTING LABELS COMMON EDITING ST PROGRAMS H e m H CD c Z Lr O LADDER FBD PROGRAMS s GX Works2 v 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 MELSOFT Series GX Works Unset Project MAINT PRG Program Structured Ladder FBD gi EriRepixe yew Qie Oey Qugnosks winkw i 38m v 2 proe H0 nl MELSOFT series 2 Project Edit Find Replace Convert View Online Diagnostics Tools Window Help 00 Project GX ILC Developer MAIN PRG LD PRG Dody LD gde lods Onine Deb Eras window teb s eee ale le O60 29019 Pom A A fe zig sul efe eden ep alee s eal 5151 ed esee EE RES SHH I m we seo 13 i up Hm zl 1 FAE aas man t 5 saja 3 5 F6 6 F8 9 9 9 10 sF8 aF7 aF5 5 caFl0 10 sF9 m sx Ready oz Host station 7 1 3 List of Functions 1 3 List of Functions This section shows the list of fun
251. y FXCPU Structured Programming Manual Basic amp Applied Instruction Explains the sequence instructions provided in GX Works2 for structured programming Sold separately Manual number Model code SH 080779ENG 13JU63 SH 080780ENG 13JU64 SH 080984ENG 13JU72 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 A 14 FXCPU Structured Programming Manual Application Functions Explains the application functions provided in GX Works2 for structured programming Sold separately JY997D34801 09R927 3 Operation of iQ Works Let s start iQ Works Version 2 Explains fundamental methods for such as managing the system using MELSOFT Navigator and using SH 081261ENG system labels for users inexperienced with GX Works2 1342779 Sold separately Poi 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 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 tabl
252. y name to which a password is set Password Setup Set a password Enter a previous password Ole rassword 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 Password Set a password within 14 characters using alphanumeric characters and symbols correspond to ASCII code 20H to TEH For details of ASCII code refer to the following manual K 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 Cs Section 13 3 3 13 8 13 2 6 Setting password to user library 13 2 Creating User Library 13 2 7 Set help file to library Set a help file to the library opecified files created in the following formats can be set as help data e Windows help file hlp HTML help file chm Text file txt The path to the help file can be changed regardless of the editing status of library SEARCHING FOR SPECIFIC POSITION Operating procedure CONVERTING COMPILING PROGRAMS 1 Select a user library to which a property is set and select Project Object Property The Property
253. y scan 3 When MO turned ON 4 In every 100ms OPERATIONS OF PROGRAM EDITORS SETTING LABELS COMMON EDITING ST PROGRAMS H e m H CD Z Lr O LADDER FBD PROGRAMS 4 2 3 Setting executing conditions 4 9 La GX Works2 WT PROGRAM CONFIGURATIONS 4 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 Operating procedure 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 gt POU gt Program gt POU gt Local Label Set labels that are used only within the POU IL 2 Editing the program Procedure Display the program editor e 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 oelect a function or function bl
254. ystem Label To execute Online Program Change execute Online Program Change and save Import System Label Not Rofected 0 Local Label Setting screen J A ARA Define labels that can be used only for each POU program an block LL57 2 Program Local Label Setting POU_01 PRG SEE Label Name Data Type Constant Device Address Comment bl ll Qupui jDowlewodSiged FB oni FBO VAR CONSTANT T FUN Di Program Lacal Device Comment HN Device Memory a Device Initial value Function FB Label Setting screen Define labels that can be used only for each POU function function block gt 3 Function FB Label Setting FB_01 FB Class Label Name Data Type Constant Commen _1 INPUT na daa ne VAR CONSTANT n data3 Struct Amy of Struct QUTPUT Structure Setting screen Define structures to be used for labels 4 Structure Setting Struct1 Label Name Data Type Constant Comment 1 K Section 5 2 2 Section 5 3 8 Section 5 4 4 Section 5 6 1 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 Devel
255. z Operation Preparation TitleB Auto Operation W aming alarm for 5 sec at Auko Operation Start Labels Initial Process Label4 Label Title Count Interruptions Display contents Item Description No Displays ladder block numbers Label Displays ladder block labels Title Displays ladder block titles Displays ladder block comments When multiple ladder block comments exist in the ladder block the comment placed on the upper left is displayed Comment Screen button Insert Inserts a new ladder block in front of the selected ladder block add Inserts a new ladder block the end of the existing ladder blocks Edit Displays an editing screen of the ladder block header Ladder block labels and ladder block titles can be edited Section 8 8 6 Ladder block comments be edited on the Structured Ladder FBD editor Section 8 9 e icut 1 Paste Delete Undo Reda oame functions as the buttons on program editors Cut copy paste delete operation can be performed in units of ladder block 8 30 8 8 5 Editing listed ladder blocks 8 8 Editing Ladder Blocks Find The Search Ladder Block screen is displayed The character strings in the ladder block list can be searched Search Ladder Block Find String Find Target v Label OVERVIEW Tite Comment SCREEN CONFIGURATION 1 Input the character string and select

Download Pdf Manuals

image

Related Search

Related Contents

499 - cdn-s3.myvirtualpaper.com    v8 manual imposed.indd  Actron CP9110 Automobile Accessories User Manual  HP AlphaStation DS15  Sharp LC40LE820UN  Manuel pour le calcul de l`énergie grise des bâtiments MINERGIE  Vertigo et Allegro  

Copyright © All rights reserved.
Failed to retrieve file