Home

GX Developer Version 8 Operating Manual

image

Contents

1. 4 Diagnosis of the error part using the sequence program Operations 9 10 in the flowchart a Confirm the contents of the error code in the MELSEC Q L Programming Manual Common Instructions given in Related Manuals to identify the error cause There are the following causes for the occurrence of error code 4101 of the MIDW instruction MDW S1 D 82 i The value of S2 is greater than the number of characters of D ii The value of S2 1 is greater than the number of characters of S1 b Diagnose the part of the error cause in the ST program from the conversion result in the MELSEC Q L Programming Manual Structured Text given in Related Manuals and correct the ST program Excerpt from the MELSEC Q L Programming Manual Structured Text ST Program Conversion Result StrResult SM400 INSERT StrData1 StrData2 IData D11114 D11113 K1 D11113 D11125 D11113 D11114 D11114 D11125 K1 D11100 K1 D11102 D11100 D11101 D11102 D11102 D11101 D11100 D11100 c Confirm the corresponding devices by performing device monitor etc to identify the error cause 5 Write the program to the programmable controller CPU and confirm that the error has been corrected If the problem is not resolved repeat the operations in 1 to 10 to correct the error 4 10 4 ONLINE 4 4 Online Change MELSOFT Change part of the sequence program and write it to the p
2. 3 9 Select function eeeeesssssss 3 4 Convert Compile Conversion Compile 3 28 L Error part indication mark 3 29 Label COD i A Ee 3 11 3 26 Displaying the label information 3 17 Custom Entering a label 3 9 A ori a velia vicente 3 31 CA RR GU eei aum oti cas nues 3 6 Auto indent check box 3 31 Select Bel siete etie etes 3 6 Change display color 3 32 Label SCHING Es NE ti creed eret erga 3 2 Changing the tab width 3 31 Line jump qoi eee Ter ad 3 34 A A tom uc mete ear te mem 3 11 ST editor settings 3 31 Line setting edit box e 3 23 Tab width combo box 3 31 EE EER as 3 11 3 26 M Monitor D M nitor Screens 1 6 Device TOS PE 4 13 MONTON 1a FER 4 5 Debug function Debug function flowchart 4 15 O Starting Ending debug function 4 16 Online change eene 4 11 Setting Clearing break points 4 17 Break execution 1 line execution 4 19 P Break point list 4 20 B ET 3 11 3 26 Clearing all bre
3. xl Start conditions i TRUE P Bookmark End conditions FALSE Refer to Section 3 3 1 TA GID ANANE Operation of Line A is started Part A fl TRUE Eri Program ACCES MAIN Movement OF Parts A Function parameter BB Header IF Part A flag AND Start conditicns i Refer to Section 3 3 2 T Line A start TRUE E Body TIMER M peration lamp J HE Device comment D700 ABSI sl Parameter END IF El Ed NE Parts A AND Parts B are assembled Bl Device init IF TCO AND Part E flag THEM Num of products Num of products 1 FNTi TF END IF ab 2 Window division Parts A AND Parts B are assembled IF TCO AND Part B flag THEN Num of products Mum of products 1 END IF Num of products gt LOCAL gt D12287 Completion flag TRUE Label information Refer to Section 3 3 4 FE Structure Num of products 0 Project FB__ Structure END IF Ready OH Host station row 11co 1 g Package processing IF Num of products gt 10 THEN Other edit functions Find Replace Used to find replace the specified character string on the ST edit screen For details refer to 3 3 5 Find Replace e Line jump Used to move to any line on the ST edit screen For details refer to 3 3 6 Line jump Open Function Block Used to display the FB definitions used on the ST edit screen as a reference screen For details refer to 3 3 7 Open Function Block Copy Cut
4. Entering a label MH Refer to Section 3 2 2 Entering a function Refer to Section 3 2 1 target Refer to Section 4 3 La Device memory i Auto indent function Refer to Section 3 2 5 Creating a comment Num of products Refer to Section 3 2 3 END IF Package processing IF Num of products gt 10 THEN Completion_ flag TRUE Mum of products i DO END IF project FB__ Structure h Ready GOZ H Host station row lico g 3 ST PROGRAMMING MELSOFT 3 2 1 Entering a function Purpose A function can be entered directly If a function name is unknown the function selection function can be used for input Operating Procedure Choose Edit gt Select function or press Shift Dialog Box Select function P x 1 Lookin AI ud BAMD MD BECMP BE M BASIM MD BELMP GT M BATAM MD BELMP LE M BLD M BELMP LT M BLDDA 5 MD BELMP ME M BLOS MD BEMINLIS M BODE WM ERDF M BDSHH MD BEPLUS M BIN M BEAST M BINDA 5 MD BESNA M BINHA 5 MD BEDR M BEAMD M EMIMLIS 3 M BEBCO M BMINLUS HM BEBIN hd BMO hd BELMP EL M BHLILTI M H y A rd For Description 1 Function classification list box The following table indicates the classification of the functions that can be selected Classification All All MELSEC functions and IEC functions are displayed in the function list box in order ascending order of names All MELSEC functions are displayed in
5. O AU 3 23 955 7 Open FUNCION BIOCK sees ENTE E Em 3 24 3 2 0 COpy CUUF ASIC sito Lm 3 26 MD gore bis oe IOMA A o CN A NC ELE AE FAD EI 3 27 2 4 Perrorming Convent Compile a 3 28 3 5 CUSTOMIZING he ST GIT Cee laica 3 31 3 5 1 Changing the auto indent tab width ee ee RR EE ee ee ee EE ee ee ee ee ee Ee ee ee ee ee ee EE Ee 3 31 2 52 changirigthe disbDlay Colors MEE p oeste dies ardet epe Ur Dess Mab ee eee 3 32 3 2 GHANGING He display TONE ss Em 3 34 AT Read Tom A A amet onteladiel 4 1 A o eee 4 3 4 3 Monitoring te ST Program Le alerted cust etu etui cc reu oni serpere tese rule dg seno YF OF 4 5 4 3 1 Moritorindti ST Progr asii ia ii ea 4 5 4 3 2 Troubleshooting at error occurrence in ST DrograM ees esse ee ee EE Ee ee ee ee EE ee ee ee ee ee EE ee ee ee ee 4 7 44 Omne Charges ti SI Ee ED ae cd aestu beu HAD lc ant rate 4 11 4 5 Devi e TES mn E 4 13 O ee EE Ge ee 4 15 BOW ISU TUNIC MON TOW CIA st S P cis 4 15 2 6 2 olarning Ending debug TUPIGUOLDE soa es cete ER kee hk CU reu Pa ede i wed ede 4 16 4 6 3 Setting Clearing break POINtS ccccccssssssseececcccesesseececececcceeaasseceeecceeeauaaeeeeeesesseaasaeeeeessssaaaseeeeess 4 17 4 6 4 Break execution 1 line execution cccccoocnnnnccnnccccccononconnnnnnononancnnnnnnnnononannnnnnnnnononnnnnnnnnnonnnnananenass 4 19 4 6 5 Break DO INC ISG a ti oio inst Giao O du SO haute ale A eg ee o edis 4 20 4 6 6 Clearing all break pointSs oooonc
6. 4 button Makes the setting valid The default settings are as follows Font Courier New Font style Regular Size 9 ula MELSOFT 4 ONLINE This chapter explains the read of the ST program from the programmable controller CPU the write of the ST program to the programmable controller CPU and the confirmation of monitor and program behavior 4 1 Read from PLC Read the ST program from the programmable controller CPU Purpose Used to read the ST program from the programmable controller CPU Operating Procedure Choose Online Read from PLC or click l Dialog Box Read from PLC E x Connecting interface pow Ea PLC module PLE Connection Hetwork Ma fi Station Ma Host PLC type 602781 me File selection Device data Program Common Local xecule z tz ha Param Prog Cancel all selections Device data MAIN name Close Target memory IS fefe TA PI Te NI IR Ee E A Program La Related functions Label program ST FB Structure 030107 13 18 EH a Transfer sety AL PLU Network Remote password 02 12 25 14 i EI Device MPIRA keyword setup Device data Remote operation Clear PLU memory El Format PLC memory I Arrange PLE memory Refresh view C Range specification ZA fo E 2767 Lreate title Total free space lo Ed File register Setting procedure i Choose Online Transfer setup an
7. End MELSOFT series GX Developer X N Debug status will be cancelled and PLC status be changed to RUN OR Click button This displays a message telling that debug status is canceled Click button to end debug function 3 EUN MELSOFT 4 6 3 Setting Clearing break points Set Clear break points Purpose oet break points in order that the execution will be halted at the specified location in a program during brake execution Operating Procedure Choose Online Debug Break point setting cancellation and click S or press F9 button Dialog Box MELSOFT series GX Developer C Works INSPECTION ST Monitoring MAIN 26Row 143Step Bl x Z Project Edit FindfReplace Convert View Online Diagnostics Tools Window Help 8 xj 100 000ms STEP RUN Loca device monitor not executed y Initialization O good ix Parameter El Device memory IE Device init ae yield is calculated d t DINT TO PEAL good DINT TO REAL good Q12H Setting procedure Break point setting 1 Place the cursor in the line where a break point to be set 2 Choose Online Debug Break point setting cancellation and click if or press F9 button 3 la appears on the indicator bar Break point clear 1 Place the cursor in the line where a break point is set 2 Choose Online Debug Break point setting cancellation and click EU
8. This manual uses the generic terms and abbreviations listed in the following table to discuss the software packages and programmable controller CPUs Corresponding module models are also listed if needed Generic terms and abbreviations Abbreviation for structured text AD Generic product name for model names SW8D5C GPPW E SW8D5C GPPW E EA SW8D5C GPPW EV and SW8D5C GPPW EVA Abbreviation for function block Generic term for OOOJCPU QOOCPU and Q01CPU of function version B or Basic model QCPU Ei ater High Performance model QCPU Generic term for QO2 H CPU O06CPU O12HCPU and Q25HCPU Generic term for QQOUJCPU O00UCPU O01UCPU O02UCPU O03UDCPU QO3UDECPU O04UDHCPU O04UDEHCPU O06UDHCPU QO6UDEHCPU Universal model OCPU O10UDHCPU O10UDEHCPU O13UDHCPU O13UDEHCPU O20UDHCPU O20UDEHCPU O26UDHCPU and O26UDEHCPU Process CPU Generic term for QO2PHCPU O06PHCPU O12PHCPU and O25PHCPU Redundant CPU Generic term for Q12PRHCPU and O25PRHCPU Generic term for Q00J Q00UJ Q00 Q00U Q01 Q01U Q02 H QO2PH Q02U O03UD QO3UDE O04UDH Q04UDEH Q06H Q06PH O06UDH QCPU Q mode QO6UDEH Q10UDH Q10UDEH Q12H Q12PH Q12PRH Q13UDH Q13UDEH Q20UDH Q20UDEH Q25H Q25PH Q25PRH Q26UDH and Q26UDEHCPU LCPU Generic term for LO2CPU and L26CPU BT MEMO A 9 1 OVERVIEW MELSOFT 1 OVERVIEW This manual explains the editing operation for the structured text hereafter abbreviated to ST of the GX Developer Vers
9. IF Part flag AND Start conditions THEN Point e f characters are entered they are not recognized as comments in the following Cases lm ST MAIN 6Row 130Step E nl x Operation OF Line A is started Not recognized as a comment since there is a space between and d X X Movement OF Parts A Parts A AND Parts B are aSsewble Not recognized as a comment since there is a comment within a comment Comments differ from the statements notes and device comments used in ladder programs The comment display color can be changed For the changing of the display colors refer to 3 5 2 Changing the display colors For details refer to the MELSEC Q L Programming Manual Structured Text given in Related Manuals 3 ST PROGRAMMING MELSOFT 3 2 4 Control syntax upper case conversion function Purpose If a control syntax is entered in lower case on the ST edit screen it is converted into upper case automatically This function converts the target characters of the control syntax automatically to prevent input mistakes Dialog Box When entered zd 5T MAIN 1Row ERRE ep E if L After automatic conversion ST MAIN 1Rnw EEE BEFSERD E IF Target characters The control syntaxes that will be converted into upper case are as shown below IF THEN ELES ELSIF END IF CASE END CASE FOR TO BY DO END FOR WHILE END WHI
10. Operating Procedure Choose Tools Change display color Dialog Box x Color of the ST edit window Cursor color Character Chart color F DO verwrite E Comment 4 2 Ng Monitor data n Insert E Control spritas 5 Background color SFC saving step color ag SI 6 3 IN Normal window Unconverted El Conversion error BH Line statement color mg Text Background Device comment Label comment color nU Common Global E Each program Local 7 Default setting DR Cancel Device color m Safety device E S afety normal mixed device Here the parts related to the ST edit screen will be explained For the other parts refer to the GX Developer Operating Manual given in Related Manuals Description 1 Normal window Character Chart color opecify the color of the display characters such as the device names and operators 2 Monitor data Character Chart color opecify the color of the display characters on the monitor screen 3 Normal window Background color opecify the background color of the ST edit screen 4 Comment opecify the color of the display characters in the comment parts 5 Control syntax opecify the color of the display characters in the control syntax parts 6 Label opecify the color of the display characters in the label parts 3 ST PROGRAMMING MELSO
11. Package pro IF Mum of prod Completion A T XX END IF x SAS MELSOFT 2 When error has occurred The error definition is displayed and the processing stops After correcting the conversion error execute online change again Example of error display when d10 100 is input E sT Monitoring MAIN 19Row 130Step Function block call 1 FB Result D10 INPUT lt DLL Dl 0 I FB B A setup of structure data Y10 STR TEST Part A flag YlD 0 STR TEST Fe Result Dll Result 0 D11 d3 60 DA t Xx dl 100 DIO o IF D25 gt 100 THEN D25 O The result of Dz5 is greater than 100 z E im cts MAA MELSOFT series GX Developer E x d Cancelled because of the following conversion error s END_ Row 17 3 missing C5006 For details of the error display refer to the MELSEC Q L Programming Manual Structured Text given in Related Manuals 4 ONLINE 4 5 Device Test MELSOFT Forcibly turn on off the bit device of the programmable controller CPU or change the current value of the word device Purpose Used to change the value of the specified device variable label structure device Operating Procedure Choose Online Debug Device test click EZ or press 1 Dialog Box 3 4 Device test E zi Bit device A B5 1 Device BEEN TER FomtLrd 10 Hide history 2 FORCE ON FORCE
12. 6 7 Movement OF Parts A 8 IF Part A flag AND Start conditions THEN 9 Line A start TRUE 10 TIMER M Operation lamp TCO K30 11 END IF 12 13 Parts A AND Parts B are assembled 14 IF TCO AND Part B flag THEN 15 Num of products Num of products 1 16 END IF 17 18 Package processing 19 IF Num of products gt 10 THEN 20 Completion flag TRUE 21 Num of products 0 22 END IF Point The line numbers are printed in serial numbers f print cannot be performed midway through characters a line feed is executed in that position The line number is not provided for the part where the line feed was executed When the print range is specified print starts from the specified line number The number of characters on one line changes depending on the printer setting and font For the print of an FB program refer to the GX Developer Operating Manual Function Block given in Related Manuals 0 2 0 2 o I MELSOFT 2 Print preview Purpose Display the print image of the ST program whose print range has been set Operating Procedure Choose Project Print button click amp gt button or press P button Dialog Box slol x OO2 H Host station Z Description 1 button Prints the data displayed on the print preview screen 2 button Displays the print image of the next page 3 button Displays the print image of the previous pag
13. OFF Toggle force ford device buffer memory 9 Device v Buffer memory Module start 1 0 a Has Address 7 ux a DEC 16 bit integer Set 7 6 Setting value 8 Program Label reference program MAIN Execution history Setting cond Program name Firid FointEnd Force UFF AIN PointCnd Force ON MAIN Firid mest 9 Besetting Clear uiis MELSOFT Description 1 Device opecify the bit device to be forcibly turned on or off 2 button Forcibly turns on the specified bit device 3 FORCE OFF button Forcibly turns off the specified bit device 4 button Forcibly reverses the ON OFF of the specified bit device 5 Device opecify the word device whose current value will be changed 6 Setting value oet a new value of the word device 7 button Click after the setting is completed The current value of the word device is changed 8 Program opecify the program to be used in the device test 9 Execution history The device test setting history is displayed 10 Hide history Execution result Display The execution result of the device test is displayed hidden For details refer to the GX Developer Operating Manual given in Related Manuals d ONE MELSOFT 4 6 Debug Function GX Simulator is required to execute debug function Set break points within the program written in ST language and execute it according to the set break points line by line With
14. Paste For details refer to 3 3 8 Copy Cut Paste e Undo Redo For details refer to 3 3 9 Undo Redo 3 ST PROGRAMMING MELSOFT 3 3 1 Using the bookmark A bookmark is used to jump to a specific line This function is convenient when it is set as a mark to make a search in editing 1 Setting deletion of bookmark Purpose Used to mark the line of the ST program or to delete the provided mark Operating Procedure Move the cursor to the line where the bookmark is to be set deleted Choose Find Replace Bookmark setting release click Bi or press Ctrl F7 Display screen When set lm ST MAIN BRow 116Step IF DO lt 100 THEN DI ELSIF DO lt 200 THEN DI se ls ELSE IL ss 2 END IF When deleted EN ST MAIN BRow 116Step IF DO lt 100 THEN Dl DO ELSIF DO lt 200 THEN Dl 1 ELSE Dl 3 END IF By choosing Find Replace Find Set bookmark bookmarks can be set at once on all the lines that have the found character string For details refer to 3 3 5 Find Replace Up to 100 bookmarks can be set If more than 100 bookmarks are set the following error message is displayed MELSOFT series GX Developer 3 ST PROGRAMMING MELSOFT 2 Deletion of all bookmarks Purpose Used to delete all bookmarks set in the ST program at once Operating Procedure Choose Find Replace Release all bookmarks or click amp
15. button Displays Device test dialog box Fox details refer to Section 4 5 6 button Interrupts break execution or 1 line execution Point Break execution and 1 line execution can be performed by pressing L respectively This is available while ST debug execution dialog box is on the screen 3 EUN MELSOFT 4 6 5 Break point list A list that displays the set break points Purpose Use the break point list to jump to the other line Operating Procedure Choose Online Debug Break point list Dialog Box x CIF Initiaization HEM ad good good 1 The number of non defe 18 Defective Defective 1 The number of def 23 Ymld gt DINT TO FEAL good A DINT TO_REAL go af Setting Items 1 Break point list box This list box displays the line No and statements at which break points are set Select a line and double click it or then press to perform the same as button 2 button Click this button to move to the head of the line selected in the break point list box 4 6 6 Clearing all break points Clear all break points Purpose Clear all break points Operating Procedure Choose Online Debug Cancel all break points Dialog Box MELSOFT series GX Developer X N Do you want to cancel all the registered break points Click button to clear all break points AS MELSOFT 9 PRINT This chapter explains the me
16. cursor moves to the first one of the function names that include that initial The parameter can be displayed in the tool tip format For details refer to 3 3 2 Displaying a function parameter 3 ST PROGRAMMING MEL SOFT 3 2 2 Entering a label Purpose If a label name is unknown during creation of the ST program the label selection function can be used for input Operating Procedure Choose Edit Select label or press Dialog Box x Label Constant Device type Comment ES Completion flag BOOL The flag of corns Distance_B End conditions BOIL The conditions o Hour is INT Line INT The number af lir 1 _ gt Line_A_start BOOL The trigger of Num of praducts INT The number of th Operation lamp BOOL The signal of Fart A flag BOOL Fan B flag BOOL al cancer Set labels on the global variable label setting screen and local variable local label setting screen For details refer to the GX Developer Operating Manual given in Related Manuals Description 1 Label list The labels constants device types and comments set to the corresponding global variables and local variables are displayed on the ST edit screen The displayed labels are displayed in order of names 3 ST PROGRAMMING MELSOFT Setting procedure 1 Select the label to be entered ii Press the button to insert the character string of the label name into the cursor position on the ST edit screen E SI MA
17. FT 7 Default setting Returns to the standard The standard colors are as follows Normal window Character Chart color Black Monitor data Character Chart color Blue Normal window Background color White Comment Green Control syntax Blue Label Pink A display example on the ST edit screen is shown below Normal window Background color Em ST Monitoring MAIN 19Row 1303tep Function block call 1 FBi Besult DIU INPUT D11 l T FB Result Normal window Character Chart color IN A setup of structure data 10 STR TEST Part A flag 0 STER TEST Part_A flag Result Dll Oo Dll n DA 603 DT 400 IF D25 gt 100 THEN 102 The result nf D25 is greater than 100 Num of products Des Num of products Ius Das Control syntax ELSE The result of D25 is 100 or less 1 Di6 i Dap 3 END IF A 3 ST PROGRAMMING MEL SOFT 3 5 3 Changing the display font Purpose The font used on the ST edit screen or for monitoring can be changed Operating Procedure Choose Tools Font Dialog Box Font Fort style OUT Regular Itali Fisedsns Bald Lucida Console Bold Italic Terminal AaBhbYyzz Script wester Description 1 Font oet the font name of the display characters 2 Font style oet the style of the display characters 3 Size oet the size of the display characters
18. GX Developer Version 8 MITSUBISHI Structured Text ya S wu i rogramming Me intenance MELSOFT Integrated FA Software E SW8D5C GPPW E e SAFETY PRECAUTIONS e 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 N WARNING and yas CAUTION Y Y Y Y A Y M Y Sd Y Y Y d Y S d Y SEED Y Y 7 N N WARNING Indicates that incorrect handling may cause hazardous conditions resulting in death or severe injury J N CAUTION Indicates that incorrect handling may cause hazardous conditions resulting in minor or moderate injury or property damage j NS SS SS SS SS SS SS SS SN SS SS SS SS SS dN Note that the CAUTION 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 whe
19. IF 5 LEL TRUE THEN FEL IO TEST M0 END IF There is no on Line 5 Error part indication mark is displayed on Line 9 FB2 10_TEST M0 IF 5 LEL TRUE THEN MO TRUE END IF OUT MI MO Mlz EMINUS MiMO bla3 LABEL Compile error Detail Program name MAIM F 3 2 missing Cs006 For details related to errors refer to the MELSEC Q L Programming Manual Structured Text given in Related Manuals 3 ST PROGRAMMING 3 5 Customizing the ST Edit Screen Operation related data can be set on the ST edit screen 3 5 1 Changing the auto indent tab width Purpose Set the auto indent tab width 1 Auto indent This function performs an auto indent when the key is pressed during editing 2 Tab width This function sets the tab width at the time when the key is pressed Operating Procedure Choose Tools ST editor settings Dialog Box ST editor settings P X gt w Auto indent 2 ab width 4 Cancel Description 1 Auto indent check box Checked Auto indent valid Not checked Auto indent invalid 2 Tab width combo box Any of 4 8 and 12 can be selected 3 button Makes the setting valid MELSOFT 3 ST PROGRAMMING MELSOFT 3 5 2 Changing the display colors Purpose The background comments control syntaxes label character strings etc on the ST edit screen are displayed in the specified display colors
20. IN 10Row AIRES Tan Start conditions TRUE End conditions FALSE it Operation of Line A is started Part flag TRUE Movement UF Parts A IF Part flag AND Start conditions THEN Line A start Point A label name can also be inserted by a double click Example Line A start x Label Constant Device type Comment A Completion flag BOOL The flag of come Distance B INT End conditians BOOL The conditions o Haur C INT Line INT The number of Double click Line A start BOOL The tigger Num_of_products INT The number af th Operation lamp BOOL The signal of Part A flag BOOL Fan B flag BOOL gt canes A label name is also inserted when the ST edit screen is in the overwrite mode When the initial of a label name is entered from the keyboard with the Select label screen open the cursor moves to the first one of the label names that include that initial The label display color can be changed For the changing of the display colors refer to 3 5 2 Changing the display colors 3 ST PROGRAMMING MELSOFT 3 2 3 Creating a comment Purpose Program readability is improved by entering comments Enter a comment by enclosing it in and gt Dialog Box EE ST MAIN 10Row bEEbkSrep start conditions TRUE End conditions FALSE TE Gf Line E da started Recognized if line feed is executed Part flag TRUE ps Movement 0F Parts A
21. LE REPEAT UNTILL END REPEAT EXIT RETURN TRUE FALSE MOD AND XOR OR Non conversion condition When characters are entered within a comment sentence gt they are not converted Point Conversion is performed after the target characters have been entered or when any of the keys that separate characters space Enter Tab is pressed The control syntax display color can be changed For the changing of the display colors refer to 3 5 2 Changing the display colors 3 ST PROGRAMMING MEL SOFT 3 2 5 Auto indent function Purpose Used to make setting to place the beginning of characters in the same position at the time of line feed on the ST edit screen imi ST MAIN 44Row 1305tep IF Car Ad Pra AND Cart Ad End THEN Ext Ad Pro TRUE X X ll ST MAIN 44Row 1305tep IF Car Ad Pro AND Cart Ad End THEN Ext Ad Pro TRUE The target keys of auto indent are the Tab and space keys For the setting of auto indent refer to 3 5 1 Changing the auto indent tab width 3 ST PROGRAMMING MELSOFT 3 9 Useful Edit Functions This section explains the useful functions related to the display of the ST edit screen iP MELSOFT series GX Developer C MELSEC Project 3 11 ST MAIN 27Row B x TT Project Edit Find Replace Convert View Online Diagnostics Tools Window Help a x Slobalveicble A E Alta 20 Gl Em tete 4 3 pn Deja e aleja l aa siel 14 lel
22. LSOFT 1 4 Screen Display and Names for Creating ST Programs This section explains the basic information such as the screen display function list and key operations 1 4 1 ST edit screen 1 Screen display and part names of main window Toolbar Main menu i MELSOFT series GX Develop r C MELSEC Project 1 6 ST Monitoring MAIN 26Row 13 Project Edit Find Replace Convert View Online Diagnostics Tools Window Help Allaltol 10 Gl ER EB Lm be in civava y a v ra 0 300ms RUN Local device monitor not executed ENEE ajaja 14 ele lel ssl tart conditions TRUE Start conditions l nd ci onditions FALSE End conditions 0 j 1 6 E Global variables Operation of Line is started E T Program art A flag TRUE Part A flag 1 MAIN Movement OF Parts A EH Header F Part A flag AND Start conditions THEN Part A flag 1 Start conditions 1 E Body Line start TRUE Line start 1 TIMER M 0peration lamp TCO K30 Operation lamp 0 TCO 0 4 18 Device comment END IF t Parameter h E Device memory Parts A AND Parts B ST edit screen _ F TCO AND Part B flag Trem TCO 0 Part B flag D E Device init Num of products Num of products 1 Num of products 0 END IF Package processing F Num of products gt 10 THEN Num of products 0 Completion flag TRUE Completion fla
23. MAINP 2 B Close Detail up Jump Select the program name and click the button to display the error result of the corresponding program Compile error Detail E E x Program name MAIN F 15 Variable Result undefined C1028 N 22 Type mismatch at parameter Test C8013 All programs Jump iii How to jump to the error part Select the corresponding error in the error display list and click the button Select the corresponding error in the error display list and press the key or double click When the cursor jumps to the selected error line the error part indication mark is displayed on the indicator bar as shown below for identification of the error part EE ST Mu N Parts A AND Parts B are assembled IF TCO AND Part B flag THEN e Result Num of products 1 END IF Package processing IF Num of products gt 10 THEN Completion flag TRUE Num of products 0 FBl I Test X0 END IF Error part indication mark 3 ST PROGRAMMING MELSOFT Point The position of the error part indication mark may differ from the actual error part Locate the faulty part from the error definition displayed on the Compile error Detail screen and the program contents of the line where the error part indication mark is displayed Example of error part indication Example of error part indication ST MAIN 1dRnw Pc Gen HE
24. When Release all bookmarks is selected the following confirmation message is displayed Execute after confirmation MELSOFT series GX Developer 3 Finding the bookmark line Purpose Used to find the specified bookmark line in the ST program Operating Procedure The operation methods are as described below Search Direction Operating Procedure Downward from cursor position Choose Find Replace Find bookmark downward click Im or press F7 Upward from cursor position Choose Find Replace Find bookmark upward click fer or press F7 A jump is made to the nearest bookmark line from the cursor position in the search direction 3 ST PROGRAMMING MELSOFT 4 Bookmark list Purpose Used to select the jump target line from among all the registered bookmarks Operating Procedure Choose Find Replace Bookmark list or click Bl Display screen Bookmark list Selected line x OIF Part A flag AND Start conditions THEM Jump 2 10 TIMER MiOperation lamp TCO EU _ sure 15 Mum of praducts Hum of products 1 Close 19 1F Hum af products gt 10 THEN ell Completion flag TRUE Line number Description 1 List box Bookmark information is displayed in the form of line number registered contents When the bookmark list screen is displayed the fist line is being selected 2 button Select the jump target li
25. ag TRUE is displayed Num of products i 0 END IF The display format of the label information will be explained When convert compile has not been performed Label name gt Label type gt Label comment When convert compile has been performed Label name gt Label type gt Label comment gt Device The label type is displayed GLOBAL for a global variable or LOCAL for a local label Point A label comment that does not exist is not displayed Before convert compile the device information is not displayed since the device has not yet been assigned When the FB or structure is used the FB definition name or structure definition name is displayed 3 ST PROGRAMMING MELSOFT 3 3 5 Find Replace 1 Find Purpose Find the specified character string on the ST edit screen Operating Procedure Choose Find Replace Find or press F Dialog Box x 1 gt Find string T FB Find nest 5 Set bookmark 6 Close 2 Match case Search direction f Down from cursor 3 Match whale word only Up from cursor 4 IW Leave comments Description 1 Find string Input the character string to be found Alternatively the character string can be displayed and selected from the list box Point Specify the character string to be found within 256 characters In the Find string list box up to 10 character st
26. ak points 4 20 programmable controller CPU 1 9 Print PIE TU RR Yr E 5 1 Print pEeVIe Ws _ e A 5 3 Project Copying the project sssse 3 2 New project ee EE RR EE EE ee EE Ee 3 1 PLEG SEHOSS SE REDS la GE 3 1 A A A 3 2 Program VDE eu un da aes datae 3 2 Reading the project 3 2 Project WIndOW sesse Es EE VEE oe ee EE 1 6 R Read from PEG t cid 4 1 a eee 3 11 3 27 Replace mno Ne Er CP 3 21 Find What er edu ddeud ddo eves 3 21 Replace iss see ee Ee ee GE 3 11 3 21 ajere CT 3 21 Replace WIS ER 3 21 S ST edit screen Indicator bal prem S 1 6 Main MENU rasane 1 6 Shortcut Rey ia on 1 7 Status Dai culo cds 1 6 TOODA RO DE Sydd ce 1 6 1 7 ST Iangudde6 ea euo e EF UE EE 1 1 ST ProdranitmInd ses see NEE se 3 1 T Texto Matos tee bete ether Eel b ete twn 1 1 U UNGO e e a couse 3 11 3 27 W Window division 3 11 3 16 WIE OPLEES OR EG Ge ie 4 3 Index 2 Index 2 Microsoft Windows Windows NT Windows Vista are registered trademarks of Microsoft Corporation in the United States and other countries Pentium is a trademark of Intel Corporation in the United States and other countries All other company names and product names used in this manual are trademarks or registered trademarks of their respective companies SPREAD C
27. atus 2501 CAN T EXE PHG 2003 1 19 1 Confirm the error definition 2 Click the Error JUMP button i Error Jump Monitor run stop Start monitor Help Y Stop monitor Serial communication error OVverunning error Party error Framing error Clear r Error log Error log Clear log No mes E TO Message Year Month Da 2501 CAN T EXE PRG 2003 1 19 CAN T EXE PRG 2003 1 19 1 Error Jump RO Help 2 2 MELSOFT series GX Developer Unset project ST MAIN 1Row OStep Project Edit Find Replace Convert View Online Diagnostics Tools Window Help The error occurrence line IS displayed DI 8 aj 14 ala ale Global variables d di Din Al Fd UA E Es e Ed Ie fe gt i X StrDatal 0001234543210 XX StrData2 ClZ3EFGHIJE X IData 1 Global variables E Program X StrResult INSERT StrDatal StrData2 IData Device comment sil Parameter El Device memory Bl Device init 2 Diagnosis of the error part using the ST program Operations 3 4 in the flowchart Diagnose what should be corrected from the error occurrence line and error code and make correction For details refer to the MELSEC Q L Programming Manual Structured Text given in Related Manuals Since the cause of error code 4101 cannot be identified perform the operations describe
28. c Terms in This Manual Section 1 2 Section 1 5 1 Section 3 1 Section 3 2 1 Section 3 2 3 Section 3 3 2 Section 4 3 2 Section 4 4 Japanese Manual Version SH 080364 H This manual confers no industrial property rights or any rights of any other kind nor does it confer any patent licenses Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property rights which may occur as a result of using the contents noted in this manual O 2003 MITSUBISHI ELECTRIC CORPORATION INTRODUCTION Thank you for choosing the Mitsubishi MELSOFT series Integrated FA software Read this manual and make sure you understand the functions and performance of MELSEC series programmable controller thoroughly in advance to ensure correct use CONTENTS SAFEETIPISECAUTIOINS tacui EG EE o PM I P dE A 1 CONDITIONS OF USE FOR THE PRODUCT onmi o petia donated iacet bete ies A 2 REVISION cM PES A 3 INTRODUE HON ss OC cm A 4 CONTENTS atari A 4 ADGULTI GLAIS cn A GAS OR FR A A RC OU A 6 HOW TO Use TPIS Ian Ual e e s et Na dn o FO OU ie enna tato du a YNO ie cn A 7 Abbreviations and Generic Terms in This Manual oocccccccccccoccnnccnnnncccnononncnnnnnnnnnonancnnnnncnononannnnnnnnnonnnnnnns A 8 Tet What sine ST Language ee aaa lust oes in ai cade 1 1 A EE a EE ai aM I iie 1 3 AAA E PP a e EE 1 4 1 lmstallauonaethod a Im 1 4 1 3 2 Operating enviFontTielib sss ta 1 5 1 4 Screen Display and Names fo
29. case of copy Operating Procedure Choose Edit gt Copy click Es or press C i Specify the range of the character strings to be copied ii The character strings in the specified range are copied In the case of cut Operating Procedure Choose Edit Cut click 4 or press Xx i Specify the range of the character strings to be cut ii The character strings in the specified range are cut In the case of paste Operating Procedure Choose Edit Paste click El or press vv i Move the cursor to the position where the character strings will be pasted ii The character strings copied or cut are pasted 3 ST PROGRAMMING MELSOFT 3 3 9 Undo Redo Purpose The editing operation performed immediately before can be undone or the undoing operation can be redone Operating Procedure Undo Choose Edit Undo click or press 12 Redo Choose Edit Redo click or press Y Point Number of operation times enabled for Undo Redo Operation disabled for Undo Redo lt r Cursor movement Bookmark setting deletion Convert compile Project storage 3 ST PROGRAMMING MELSOFT 3 4 Performing Convert Compile Purpose The created ST program is converted compiled into a program that can be executed by the programmable controller CPU Operating Procedure When the program currently being edited is converted com
30. cocnccccccoonnconnnnnnocononcnnnnnnnnnnnnnncnnnnnononnnnnnnnnnnnnnnnnnnnnnnnnnnnnnonananenass 4 20 9 PRINT 5 1to5 3 INDEX Index 1 to Index 2 About Manuals The manuals related to this product are shown below Refer to the following table when ordering required manuals Related Manuals Manual Name Manual Number Model Code GX Developer Version 8 Operating Manual Startup SH 080372E Explains the system configuration installation method and startup procedure of GX Developer 13JU40 Sold separately GX Developer Version 8 Operating Manual Explains operation methods such as creating printing monitoring and debugging programs using GX SH 080373E Developer 13JU41 Sold separately GX Developer Version 8 Operating Manual Function Block SH 080376E Explains the editing and monitoring operations of the function blocks using GX Developer 13 JU44 Sold separately Structured Text ST Programming Guide Book Intended for beginners i e those who will create structured text ST programs for the first time SH 080368E Explains basic operations and functions using sample programs 13JF69 Sold separately MELSEC Q L Programming Manual Structured Text SH 080366E Explains the programming methods in structured text language 13JF68 Sold separately MELSEC Q L Programming Manual Common Instructions SH 080809ENG Explains the methods of using the sequence instructions basic instructions and appl
31. corresponding character strings on the target ST edit screen 3 21 3 21 3 ST PROGRAMMING MELSOFT Point As the replacement processing target range select either Current window or Selected range If the range has not been selected Current window is the replacement target If the button is pressed without a character string being set in Replace with the character string in Find what on the ST edit screen is deleted When the character string to be replaced is found for Replace all The following message is displayed When the character string to be replaced is not found The following message is displayed The cursor does not move MELSOFT series GX Developer X Could not Find the string even though it searched up to the end of the program DO vou want continue search From the beginning 3 ST PROGRAMMING MEL SOFT 3 3 6 Line jump Purpose Used to move the cursor to the specified line on the ST edit screen Operating Procedure Choose Find Replace Line jump click 4 or press J Dialog Box Description 1 Line setting edit box Input the line to which the cursor will jump 2 button Causes the cursor to jump to the specified line Point If the specified line is beyond the program being edited the cursor moves to the last line of the program If the following error message is displayed a line jump cannot be made Confirm the error definition and
32. d in 3 Display the sequence program where the error has occurred 4 8 4 8 SAS MELSOFT 3 Display the sequence program where the error has occurred Operations 5 to 8 in the flowchart To display the sequence program where the error has occurred read the sequence program from the programmable controller 2 MELSOFT series GX Developer Unset project ST MAIN 5Row Step E Project Edit Find Replace Convert View Online Diagnostics Tools Window Help 5 Start GX Developer anew New project Ctrl N AE a EIE _ Open project Ctr O e a 2 e Gi Close project Bir a Mal Lal tal i in 6 G Em Save Ctrl s K gt ms ENE io a ES e TE sel AR L a E Vere Pie Fa lero lie die Edit Data gt StrDatal 0001234543210 StrData2 Cl23EFGHIJEK E Change PLC type Mata se 1 Import File Export file gt StrResult INSERT StrDatal 51 Macro Function Block gt Printer setup Print Ctrl P 1 FAST OPE ENG 2 F ST_OPE_3 3F ST_1 4 F ST_OPE_2 Start new GX Developer session Exit GX Developer iP MELSOFT series GX Developer Unset project List R Edit mode MAINI 172 Step Project Edit Find Replace Convert View Online Diagnostics Tools Window Help 6 Perform read from PLC oem S xele eee sil e a a a Global variables y Ad El sal alta gr Ga BR Jae tee e JE H e we re cess Level ed Fa sle
33. d set the connection target ii Choose Online Read from PLC to display the Read from PLC screen iii Select the corresponding item in the File selection tab When Parameter Prog is selected The parameters and program are selected When the Cancel all selections button is selected All are deselected iv Click Execute uiis MELSOFT Point When the ST program is to be read from the programmable controller the read range cannot be specified When the label program is to be read from the programmable controller read from PLC is started after the project where Use label was selected in the label setting is created or read When there is no label program in the CPU Label program is not displayed in the data list of the Read from PLC dialog For details refer to the GX Developer Operating Manual given in Related Manuals ula MELSOFT 4 2 Write to PLC Write the already converted compiled ST program to the programmable controller CPU Purpose Used to write the converted compiled program to the programmable controller CPU Operating Procedure Choose Online Write to PLC or click Dialog Box Connecting interface pon a PLC module PLE Connection Network Ma la Station Mo Host PLC type 602 H Target memory Program memory Device memory Title File selection Device data Program Common Local Select all Cancel all selecti
34. de downward starting from the cursor position Find upward Choose Find Replace Find upward or press F5 A search is made upward starting from the cursor position Q When the character string to be found is not found The following message is displayed MELSOFT series GX Developer X N Could nat Find the string even though it searched up to the end of the program dh DO vou want continue search From the beginning 3 ST PROGRAMMING MELSOFT li When making a search using bookmark setting Input the character string to be set in Find string and click the Set bookmark button Bookmarks are set on all the lines on the ST edit screen that have the character string to be found FEE _ m x p zl HA IF D cl THEN Dl 0 ELSIF D c z THEN Dl 1 Find string ELSE y M Match case Search direction Set bookmark Match whole word only C Down from cursar Close Wp from cursor i W Leave comments IF D25 gt 100 THEN In case of LOO or more D TEST 100 ELSE In case of LOO or less D TEST 2150 END IF BS ST MAIN 29Row x oioikgrep p IF DD lt l0D THEN 0 Do 200 THEN IF DO gt 100 THEN D1 D0 ELSE IF x THEN D1 10 ELSE Dl 2z20 END IF END IF IF D25 gt 100 THEM In case of 100 nr more D TEST 1 00 ELSE In case of 100 or less Db TEST 150 END IF 3 ST PROGRAMMING MELSOFT 2 Replace Purpo
35. dow Divide into two When returning to one window Choose Window Divide into two Display screen WN ST MAIN 23Row 130Step start conditions TRUE End conditions FALSE Operation of Line A is started Part A flag TRUE Movement OF Parts A IF Part flag AND Start conditions THEN Line A start TRUE TIMER MiUperation lamp TCO E30 END IF Parts A AND Parts B are assembled IF TCO AND Part B flag THEN Num of products Num of products 1 END IF IF TCO AND Part B flag THEN Num of products Num of products 1 END IF Package processing IF Mum of products gt 10 THEN Completion flag TRUE Num of products i DO END IF The program can be edited in either window 3 ST PROGRAMMING MELSOFT 3 3 4 Displaying the label information Purpose Used to confirm the device assigned to the label after the ST program has been converted compiled Operating Procedure Choose View Label information and check Label information When the mouse pointer is moved over the label on the ST edit screen the label information is displayed in the tool tip format Display screen WE ST MAIN 23Row 130Step END IF Parts A AND Parts B are assembled IF TCO AND Part B flag THEN Num of products Num of products 1 END IF Num of products L CAL Dlzz87 Package processing IF Num of products gt 10 THEN abel information Completion fl
36. e 4 button Selects whether the print image will be displayed on a one page basis or two page basis 5 button Displays an enlarged print image on the screen The display can be switched in three stages 6 button Displays a reduced print image on the screen INDEX Index 1 A F Auto indent function 1 3 3 10 EE CC HOMO a T T MI TM 2 1 FB screen B Open Function Block 3 11 3 24 Bookmark FB variable definition 2 1 Bookmark list sssseeessssss 3 14 Find Deletion of all bookmarks 3 13 minio ER EG Se T 3 11 3 18 Finding the bookmark line 3 13 A A OH YTT 3 18 Setting deletion of bookmark 3 12 Leave comments eie ee ee ee 3 19 Using the bookmark 3 12 Maten CASS sustancia 3 18 Match whole word only 3 18 C Set book mter ette ducebat 3 20 Comment Function Creating a comment 3 3 3 8 Displaying a function parameter 3 15 Control syntax upper case conversion function Entering a function 3 3 3 4 Control syntax upper case conversion function Function classification list box 3 4 meom 3 3 3 9 Function list BOX ee ee ee ee ee de D Target characters
37. e cea ro E El at ce ceo TO 5E9 al ft Al AE iol zi da E b 21 A rscil sed ts error amp 0 Thi program is the one generated automatically 27 by the label program Unset project 40 When the label program is compiled even if the B Global variables 65 real program is edited directly ELE Program 2 it is overwrited B MAIN 32 LD 3M400 E Fe MAINI 34 MO 0001224567 DLLLES ER Header P 7 Body 102 mon C123 4EPUGHIK Dilli4 111 Mog xl D11114 Ez Device comment nag H ne Er amp uf Parameter np am IEL Device memory Xux ME xi er EL Device init i mal ex 124 MIT niii niii DLE 125 Mog xl D11114 120 LEN DLizz3 niii 133 BID niii niii D11114 To next page 4 ONLINE MELSOFT gt gt iP MELSOFT series GX Developer Unset project From previous page Project Edit Find Replace Convert View Online Diagnostics Tools Window Help T osm S sael eee dis ajaj ajaj Global variables A El jee dI gr Gal BR i le te A are pue lle lee Qi HG E 8 Click the Error JUMP button on the PLC diagnostics screen to display the corresponding step in the list Unset project Global variables E E Program MAIN PE ER Header eu Body Device comment His Parameter El Device memory Bl Device init
38. e identical variable on one line the first one is displayed and the second and later are not displayed faut FALSE Input FALSE Real Resut 340282338 Result 3 403e 005 S o Character string Str1 ABCDEFGH Str1 16961 Decimal The first one word of a character string is displayed in decimal 6 characters Str1 H4241 Hexadecimal The first one word of a character string is displayed in hexadecimal 5 characters Label 0 80 Label 0 80 Only the value that begins with 0 is Label 1 100 Label 0 80 displayed Label 3 160 Label 0 80 The display format changes depending on the type of the selected data Structure STR A name ABCDEFGHIJ STR A name 16961 The display format changes STR_A point 40 STR_A point 40 depending on the type of the selected data Point Switching between decimal and hexadecimal can be performed by choosing Online Monitor Change current value monitor Decimal or Change current value monitor Hexadecimal The background color is the same as that of the ST edit screen The display color selected by choosing Tools Change display color Monitor data is used d ONE MELSOFT 4 3 2 Troubleshooting at error occurrence in ST program This section explains troubleshooting to be performed when the ST program written to the programmable controller CPU has resulted in an error Troubleshooting to be p
39. eading and copying the project will be explained Reading the project If the project that includes the ST program is read using GX Developer Version 7 or earlier where the ST language function is not installed the following message is displayed and the project cannot be read MELSOFT series GX Developer E X A Cannot open the project because of the existence of data that cannot be edited A To edit this project it is necessary to select the Following Function and reinstall Structured Text ST language programming Function Copying the project When the project is copied the copied ST program and FB are in a not yet converted not yet compiled condition After copying perform convert compile again For details refer to the GX Developer Operating Manual given in Related Manuals 3 ST PROGRAMMING MELSOFT 3 2 Entering an ST Program The ST edit screen allows free editing operation to be performed like a general text editor This section introduces the functions useful for input le x Oral el Eed se 14 ee sel ele s ds daa xps p ale al spes es ral gtart conditions TRUE Control syntax upper End conditions FALSE case conversion function Refer to Section 3 2 4 Operation of Line A is started Part A flag TRUE 2 4 Program eee Eg MAIN Movement OF Parts A IF Part A flag AND Start conditions THEN Line start TRUE TIMER MiUperation lamp TCO KS3UmT D700 ABS
40. ed Please execute again after converting compiling the program f the Label program ST FB structure check button was not checked for write to PLC the following error message is displayed When Yes is selected only the execution program is written to the programmable controller and the label program cannot be read MELSOFT series GX Developer E X AN Is it OK to execute PLC write CAUTION Execute PLC write only execute program because label program has not been selected And cannot read label program ST FB Structure From PLC For details refer to the GX Developer Operating Manual given in Related Manuals ula MELSOFT 4 3 Monitoring the ST Program Monitor the ST program written to the programmable controller CPU to confirm the operation status of the programmable controller CPU 4 3 1 Monitoring the ST program Purpose Used to monitor the ST program to confirm the operation status of the programmable controller CPU Operating Procedure When starting monitor Choose Online Monitor Monitor click 2 or press F3 When stopping monitor Choose Online gt Monitor Stop monitor click or press F3 Display screen The following monitor screen is displayed ini x x E MELSOFT series GX Developer C MELSEC Project 1 6 ST Monitoring MAIN 26Row 13 Z Project Edit Find Replace Convert View Online Diagnostics Tools window Help 44 la
41. edited Convert Compile Shift F4 Online change Start monitor Ctrl F3 all windows za PA all windows Startmonitor Fs Stopmonior aters Devicetest date A BO O Remote operation _ at e ____ 1 OVERVIEW MELSOFT 1 5 Specifications This section explains the specifications for use of ST programs on GX Developer 1 5 1 Corresponding programmable controller CPUs The following models of programmable controller CPU are applicable to ST programs High Performance Universal model Basic model QCPU Process CPU Redundant CPU LCPU model QCPU QCPU O00JCPU O02CPU O00UJCPU O02PHCPU Q12PRHCPU LO2CPU QOOCPU Q02HCPU O00UCPU QO6PHCPU Q25PRHCPU L26CPU BT Q01CPU QO6HCPU Q01UCPU Q12PHCPU Q12HCPU O02UCPU O25PHCPU O25HCPU QO3UDCPU QOSUDECPU Q04UDHCPU Q04UDEHCPU QOGUDHCPU QOGUDEHCPU Q10UDHCPU Q10UDEHCPU Q13UDHCPU Q13UDEHCPU Q20UDHCPU Q20UDEHCPU Q26UDHCPU Q26UDEHCPU 1 5 2 Specifications and precautions for ST edit screen There are the following restrictions on the character input of the ST edit screen Maximum number of 839680 characters Two characters are used as the line feed characters code Maximum number of columns 999 characters display region Maximum number of lines 65535 lines 2 ST PROGRAM CREATION PROCEDURE MELSOFT 2 ST PROGRAM CREATION PROCEDURE The following flowchart indicates the general procedure of ST programming In the following example parts were created wit
42. erformed when an error has occurred in the programmable controller CPU for the ST program Error occurrence Start PLC diagnostics and confirm the error definition 2 Click the Error JUMP button on the PLC diagnostics screen to display the error occurrence line of the ST text 3 Check the error occurrence line and correct the problem 4 Has the problem been ves resolved No End 5 Start GX Developer anew Perform read from PLC to read the parameters program 7 Start PLC diagnostics and confirm the error definition O o If the error part cannot be identified read the sequence program from Click the Error JUMP button on the PLC diagnostics the programmable controller CPU 8 screen to display the error occurrence line of the and check it sequence program 9 Check the error occurrence line and identify the cause 10 Correct the ST program according to the ST program conversion result and error occurrence cause End 4 ONLINE MELSOFT The operating procedure to be performed when an error occurred in the programmable controller CPU for the ST program will be explained using the actual screen as an example 1 Display the ST program where the error has occurred Operations 1 2 in the flowchart Perform PLC diagnostics to display the error occurrence line PLC diagnostics E PLC status m PLC operation status PLC operation STOP switch RUN Error st
43. g O Num of products 0 Num of products 0 Project FB Structure TP Ready QO2 H Host station row 12 col Insert P Project window Indicator bar Status bar 2 Part names and functions Status bar 1 OVERVIEW MELSOFT 3 About the shortcut keys and toolbar 1 Shortcut keys The shortcut keys are assigned to enable menu item selection and instruction input from the keyboard 2 Toolbar Displays the menu items with icons Whether the toolbar is displayed or hidden can be specified by choosing View Toolbar List of shortcut keys and toolbar icons used mainly on ST edit screen Movetofirstline Cm Home Movetolastline ci End J Aliseleet lien l Ctrl P Ctrl X copy lar C Pase Cti v Ctrl Z Bop o Redo Cti Y WiigtoPLC Registered device j v monitor Checkparameter Selectfunction Shif F11 o Seetlbe FM co Pojctdaaist AO 0 Find leier alo Finddownward 5 BE _ Findupward Sers fa Replace m H Y cc Linejump etd E Bookmark seting Cer BE o Bookmarkist B Bookmark downward F7 S me Bookmark upward Shit F7 fte _ swm M Convert compile F S e e i 1 OVERVIEW MELSOFT Shortcut Keys Mouse Right click Convert Compile All Ctrl Alt FA programs being
44. h the function block function and a main program was then created in ST language Creation of new project FB variable definition FB definition Program label definition ST programming Convert compile Write to PLC Online debugging End int Refer to Section 3 1 for details Define the variables used in FB definition For details refer to the GX Developer Operating Manual Function Block Define the FB For details refer to the GX Developer Operating Manual Function Block Define the global variables and local labels in a program For details refer to the GX Developer Operating Manual Create the ST program that will call the FB Refer to Section 3 2 for details Convert compile the ST program into a program that can be executed by the programmable controller CPU Refer to Section 3 4 for details Perform write to PLC For details refer to Chapter 4 and GX Developer Operating Manual Confirm the program behavior by conducting a device test Refer to Chapter 4 for details This general procedure is for reference Each operation can be performed in any order FB definition can be described in ST language or ladder form 2 ST PROGRAM CREATION PROCEDURE MELSOFT MEMO 3 ST PROGRAMMING MELSOFT 3 ST PROGRAMMING This chapter explains the creation and editing methods to create a project using an ST program 3 1 Creating a New Project This section explains
45. ication instructions 13JW10 Sold separately GX Simulator Version 6 Operating Manual Explains the setting and operating methods for monitoring the device memory and simulating the SH 080169 machine side operations using GX Simulator 13JU17 Sold separately The Operating Manuals and Structured Text ST Programming Guide Book 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 How to Use This Manual This Manual This manual is a commentary that gives in depth explanation of the operation methods to create structured text ST programs using GX Developer Refer to this manual when information on operation details is necessary Chapter 1 Overview describes the outline of the structured text ST language the installation method the screen display and names for creating structured text ST programs the corresponding programmable controller CPUs and others Chapter 2 ST Program Creation Procedure describes a structured text ST program creation procedure in a flowchart Chapter 3 ST Programming describes how to create a new structured text ST program how to perform operations of editing functions useful for input and others Chapter 4 Online describes the procedure for writing the created structured text ST program to the programmable con
46. in IEC61131 3 are available for ST programs in the QCPU Q mode LCPU For more information refer to the MELSEC Q L Programming Manual Structured Text given in Related Manuals 1 OVERVIEW MELSOFT 1 3 Installation This section explains the installation method and operation environment necessary for creating ST programs 1 3 1 Installation method For programming in structured text ST language install GX Developer in the following procedure 1 Select Start Explorer on Windows to start 2 Click the drive where the CD ROM has been inserted Double click Setup exe 3 Make setting and selection in the procedure of the installation wizard 4 Check the ST Structured Text language programming function check box and execute installation Select Components E x Please select install following function ST Language iz a structurizing text language that iz defined by IECBT131 3 standard lt Back Cancel For details refer to the GX Developer Operating Manual Startup given in Related Manuals 1 OVERVIEW MELSOFT 1 3 2 Operating environment For operating environment when using the ST language programming function refer to GX Developer Operating Manual Startup listed in Related Manuals while pay attention to the items shown in POINT below Point The ST language function is not supported on Windows 95 A CPU of Pentium Il 450MHz or more is required 1 OVERVIEW ME
47. ion 8 software package hereafter abbreviated to GX Developer For the explanation of the functions in other than ST refer to the corresponding manuals given in Related Manuals 1 1 What Is the ST Language The ST language is defined in the International Standard 1EC61131 3 that stipulates the logic description system in open controllers The ST language supports operators control syntaxes and functions to permit the following descriptions Control syntaxes such as conditional sentence dependent selective branch and repetitive sentence based repetition Expressions using operators gt etc Call of user defined function blocks FB Call of functions MELSEC functions IEC functions Description of comments The main features of the ST language are as described below 1 Free description in text format The ST language allows the description of alphanumeric characters comments and labels in text format lm ST MAIN 9Row 105Step E 5l x valve is closed when the limit switch of a tank turns on valve is opened when turned off IF Limit switch TRUE THEN Valve FALSE valve is closed when a limit switch turns on ELSE Valve TRUE A valve is opened when a limit switch turns off END IF 2 Programming on the same level as those of the C and other high level languages Like the high level languages such as C the ST language can describe control with control
48. ltal ar ql Eg les tea Global variable y y El Ed 0 300ms RUN Local device monitor nat executed LA alo r GEES EE ER ops e al sse Ie 214 eie siel El ele 2 ree sie 7131 el gt TRUE Wt X start conditions start conditions End conditions FALSE End conditions ES 1 6 61 83 Global variables E rg Program ERES MAIN EH Header a EE Body HF Device comment amp w Parameter El Device memory Project Fe Structure Operation of Line A is started Part A flag TRUE Movement OF Parts A IF Part flag AND Start conditions THEN Line A start TRUE TIMER M peration lamp TCO K30 END IF Parts AND Parts B are assembled IF TCO AND Part B flag THEN Num of products Num of products 1 END IF Package processing IF Mum of products gt 10 THEN Completion flag TRUE Mum of products 0 END IF QOZ H Host station row lacol Insert 4 Part A flag 1 Part flag 1 Start conditions 1 Line A start 1 Operation lamp 0 TCO Monitor screen TCO 0 Part B flag O Num of products DO Num of products DO Completion flag O Num of products uiis MELSOFT The monitor screen displays the variable label structure device which is used on each line of the ST edit screen on the same line of the monitor screen in a label monitor value format When there are more than on
49. make setting again When the button is clicked with the specified line set to line 65536 or more or to other than an integer MELSOFT series GX Develope xj GU 1 Please set with in the range of 1 655535 3 ST PROGRAMMING MELSOFT 3 3 7 Open Function Block Purpose The FB window is used to confirm the contents of the FB definition program used in the ST program Operating Procedure Select the FB name Choose View Open Function Block or right click and choose Open Function Block FB name T FB eloper F 5T OPE ENG 7 Convert View Online Diagnostics Tools Window Help w Label information Jeje del ta ses fe lero E FE v Function parameter Open Function Black said E iss e o cad DE 7 Li Li F Li r Li F a Toolbar t F w Status bar w Project data list Project data display Format Elapsed time FB Calling Hi INPUT D1 The FB window is displayed The contents of the T_FB program are displayed Im FB ST Read MAIN T_FB 6Row 22 Step E xj IF INFUT lt 0 THEN Result ABS INPUT ELSE Result IMPUT END IF 3 ST PROGRAMMING MELSOFT If either of the following error messages is displayed the FB window cannot be opened Confirm the error definition and make setting again When the FB definition is not yet converted compiled MELSOFT series Gx Developer 3 ST PROGRAMMING MELSOFT 3 3 8 Copy Cut Paste In the
50. n reguired and always forward it to the end user Designing Precautions N WARNING e When data change program change or status control is performed from a personal computer to a running programmable controller create an interlock circuit outside the programmable controller to ensure that the whole system always operates safely Furthermore for the online operations performed from a personal computer to a programmable controller CPU the corrective actions against a communication error due to such as a cable connection fault should be predetermined as a system Startup Maintenance Precautions N CAUTION e The online operations performed from a personal computer to a running programmable controller CPU program change when a programmable controller CPU is RUN forced I O operation operating status change such as RUN STOP switching and remote control operation have to 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 Online program change it may cause a program corruption in some operating conditions Fully understand the precautions described in GX Developer Operating Manual before use 1 2 e CONDITIONS OF USE FOR THE PRODUCT e Mitsubishi programmable controller the PRODUCT shall be used in conditions i where any problem fault or failure occurring in the PRODUCT if any shall not lead to any majo
51. nd 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 The manual number is given on the bottom left of the back cover Print Date_ _ Manual Number Feb 2003 SH NA 080367E A First printing Oct 2003 SH NA 080367E B Section 3 5 5 Section 4 6 Jun 2004 SH NA 080367E C Abbreviations and Generic Terms in This Manual Section 1 5 1 May 2008 SH NA 080367E D Correction Abbreviations and Generic Terms in This Manual Section 1 5 1 Dec 2008 SH NA 080367E E Correction About Manuals Abbreviations and Generic Terms in This Manual Section 1 5 1 Section 4 3 2 Jan 2010 SH NA 080367E F Addition CONDITIONS OF USE FOR THE PRODUCT SAFETY PRECAUTIONS INTRODUCTION About Manuals How to Use This Manual Abbreviations and Generi
52. ne in the list box and click the button to move the cursor to the line that has the preset bookmark Point The cursor can also be moved by a double click Bookmark list GIF Part A flag AND Start conditions THEN 10 TIMER M Operation lamp TCO K30 15 Num of products Num of products 1 19 1F Num of products gt 10 THEN 20 Completion flag TRUE Double click 3 ST PROGRAMMING MELSOFT 3 3 2 Displaying a function parameter Purpose When a parameter is unknown during input of a function the function parameter can be displayed for reference Operating Procedure Choose View Function parameter and check Function parameter Make selection from the Select function screen to input the function or enter the function from the keyboard up to This displays the function parameter in the tool tip format Dialog Box E ST MAIN 1Row OStep X IF DO 100 THEN E re TIMER Mi EOOL TIMER Mi BOOL EW BOOL TUoil ANY16 TValue Function type function name and parameter type are displayed Point For details of the function types refer to the MELSEC Q L Programming Manual Structured Text given in Related Manuals 3 ST PROGRAMMING MELSOFT 3 3 9 Window division Purpose When it is desired to confirm the program area that cannot be displayed on the screen during editing divide the window into top and bottom areas Operating Procedure When dividing the window Choose Win
53. ng ST programs using GX Developer enables efficient programming to be performed in excellent operation environment The following provides the main features of ST programs in the QCPU Q mode LCPU 1 Design efficiency improved by defining processings as parts With often used processings defined as parts in the form of function blocks FB in ST language they can be used in necessary areas of each program This not only enhances the efficiency of program development but also reduces program mistakes improving program quality For more information refer to the GX Developer Operating Manual Function Block given in Related Manuals 2 Program change during system operation online change Part of a running program can be changed without the programmable controller CPU being stopped 3 Connection with other language programs Since the QCPU Q mode LCPU also supports languages other than the ST the language adequate for processing can be used to increase the efficiency of program development The High Performance model QCPU Universal model QCPU Process CPU Redundant CPU LCPU allow execution conditions to be set on a file basis and multiple program files to be written to a single programmable controller CPU Multiple languages support widespread application under optimum control 4 A wealth of functions available The MELSEC functions compatible with various common instructions for the QCPU Q mode LCPU and the IEC functions defined
54. ons Close w Label program ST FB Structure Target Program memory Device memory WENU Password setup Related functions Transfer setup KeyWord setup Remote operation Clear PLE mermar Format PLE mermar Arrange PLC memos C Whole range Range specification FR jo 22767 Create title Total free space DU o a E 4 Device comment PO Re COMMENT Es Parameter a PLC Metwark Riemate password File register Setting procedure i Choose Online Transfer setup and set the connection target ii Choose Online Write to PLC to display the Write to PLC screen iii Select the corresponding item in the File selection tab When the Label program ST FB structure button is selected The label program can be written When is selected The parameters and program are selected When the Select all button is selected All are selected When the Cancel all selections button is selected All are deselected iv Click Execute SAS MELSOFT Point When the ST program is to be written to the programmable controller the write range cannot be specified If the program specified for write to PLC is not yet converted compiled the following error message is displayed and writing that program to the programmable controller is suspended MELSOFT series GX Developer LE X r1 Some programs have not been converted compil
55. opyright C 1998 Farpoint Technologies Inc SH NA 080367E F GX Developer Version 8 Operating Manual Structured Text GXDEV8 O ST E 13JU37 SH NA 080367E F 1001 MEE a MITSUBISHI ELECTRIC CORPORATION HEAD OFFICE TOKYO BUILDING 2 7 3 MARUNOUCHI CHIYODA KU TOKYO 100 8310 JAPAN NAGOYA WORKS 1 14 YADA MINAMI 5 CHOME HIGASHI KU NAGOYA JAPAN When exported from Japan this manual does not require application to the Ministry of Economy Trade and Industry for service transaction permission Specifications subject to change without notice
56. or press F9 button 3 le appears on the indicator bar Point Up to 8 break points can be set within one program uiis MELSOFT The following table shows the statements and the relevant restrictions on break point settings Control statement Break point setting O Available X N A The e trat nudes END IF 2 The line that includes END IF CASE WHILE REPEAT The line that includes OF 2 The line that includes colon right after an optional value 1 The line that includes END CASE The line that includes DO 1 The line that includes FOR The line that includes END FOR The line that includes DO 1 The line that includes END WHILE The line that includes UNTIL 1 The line that includes REPEAT The line that includes END REPEAT The line that includes EXIT The line that includes END WHILE The line that includes RETURN The line that includes REPEAT The line that includes END REPEAT The line that includes semicolon 3 at the end of a sentence RETURN Operation sentence ENE ds FB utilization The line that includes semicolon at the end of the control statement FUNCTION The line that includes semicolon at the end of the control statement MAG E E 1 Break point setting is available even when sentences within the control statement are all blank 2 Break point setting is available However if
57. piled Choose Conversion Convert Compile press F4 or click amp When all the programs not yet converted compiled are batch converted compiled Choose Conversion Convert Compile All programs being edited click E or press Alt F4 When all programs are batch converted compiled Choose Conversion Convert Compile All programs Point When Convert Compile All programs is selected the programs already converted compiled are also converted compiled again By performing convert compile again the devices assigned to the programs whose devices have not been changed may be changed 1 When operation is completed normally The on the title bar that indicates the programs are not yet converted compiled disappears and the number of steps is displayed 2 When error has occurred i When an error has occurred in one program When an error has occurred Step that indicates the program is not yet converted compiled is displayed in the window title The following screen is displayed Compile error Detail x Program name MAIN P i Variable Result undefined C1028 Type mismatch at parameter Test C8013 All programs Jump 3 ST PROGRAMMING MELSOFT 11 When an error has occurred in more than one program The following screen is displayed Compile error All programs Program name Program na Error items
58. r Creating ST ProgramMS cccccccccocnccnnncccccnnonnccnnnnononnnnnncnnnnnnnnnnannnnnnnnnnnnnnos 1 6 LAMAS SOI Schee ME SR NR IM 1 6 1 5 SOC CIC AO GA tud NL EL nM cee ER ee ee ee 1 9 1 5 1 Corresponding programmable controller CPUS ooooccccnnccccocccnncconocononononccnnnnnnnnnoannnnnnnnonononanenons 1 9 1 5 2 Specifications and precautions for ST edit screen ee Ee ee RE Ee ee LL ee ee nenne 1 9 2 ST PROGRAM CREATION PROCEDURE 2 1t02 2 3 ST PROGRAMMING 3 1to 3 34 lees did a New Proo l EE DET 3 1 9 2 Ehieriiigan e citroen 3 3 42 LENENG a BIPIR Te DENM ELO TRE TIS 3 4 a 2 Ehterng sjlabeld scusa tac imu bas A DM M M ANM MM IM DM Na Eie mu Ea tu canes OLI Rat tU S CAPE 3 6 2 29 Creating a GONE s EE e a e da CHIN NN REN oe Ee 3 8 3 2 4 Control syntax upper case conversion function cccccccccccconcccnnnccccnonnnccnnnnnnnnnnnnnnnnnnnononnnnnnnnnnnnnnnnnos 3 9 92 S AUIO dent URC HOI A antes oc GR a O Y GE GY O A Le eee 3 10 3 9 UST EC IE ION S APA Ad istos toutes locant totns O EE tenue tor ntu tenes AN Pa 3 11 2 2 Using nie BOOkmarK si EE s 3 12 3 3 2 Displaying a function parameter ascris iaci ee ee EE EE Re ee ee ee EE T ee ee RE EE Re ee ee ee rnnt Ee LL ee ee ee EE ia 3 15 2 2 VVINGOW dIVISIOD ce RA Dm 3 16 3 3 4 Displaying the label informatiON ee ee EE ee EE EE Re ee ee RE EE Ee ee ee ee ee Ee ee ee ee ee EE EE LL LL ee ee ee nnns 3 17 A 4 A 4 OIG NOP ACO ou A LUN UEM a EN WR LA ER 3 18
59. r or serious accident and li 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 Railway companies or Public service purposes and or any other cases in which establishment of a special quality assurance system is required by the Purchaser or End User Aircraft or Aerospace Medical applications Train equipment transport equipment such as Elevator and Escalator Incineration and Fuel devices Vehicles Manned transportation Equipment for Recreation a
60. rings found in the past are displayed in the order from most to least recent 2 Match case Select whether a distinction between upper case and lower case will be made or not 3 Match whole word only oelect whether a search will be made in a word unit or not The character string to be found is a collection of only alphabets or a collection of only numerals A tab space _ under bar etc are recognized as separating characters Example When a search is made for abc Character string Search result Character string Search result abdet x bolder o abide O aosa O ac dt o lom o O as o 2 X Not searched for O Searched for 3 ST PROGRAMMING MELSOFT 4 Leave comments Select whether a search will be made within comment sentences or not 5 button Starts a search 6 button Searches the ST program on the ST edit screen for the character string to be found and sets bookmarks on all the lines where the character string has matched Setting procedure i When making a search for the next Input the character string to be found and click the button When the character string to be found is found The found character string is displayed in a range selected status The cursor moves to the found position To further continue a search perform either of the following operations Find downward Choose Find Replace Find downward or press F5 A search is ma
61. rogrammable controller CPU in a RUN status Purpose Used to perform write to PLC in a RUN status To indicate the online change target line is displayed on the indicator bar Operating Procedure Choose Convert gt Convert Compile Online change or press FA4 When online change is executed the following online change confirmation message is displayed Execute online change after confirming the message MELSOFT series GX Developer E x Caution PLE control has changed Make sure everything is safe then execute again The write destination is the program in the program memor Don t write Ea Ehe same program From a plurality of place at the same time Ensure the PLC program and the pragram to be converted match OIE Write destination program MAIM 1 When operation is completed normally The displayed on the indicator bar on the target line disappears when the button is clicked EN ST MAIN 21Row 119Step End conditions FALSE Operation of Line is started Part flag TRUE Movement OF zm IF Part A flag MA II a og Line sta i TIMER MOn z RUN write processing has completed END IF aid There are 489 RUN write maintenance steps remaining Parts AND IF TCO AND Par CAUTION Num of pro The execute program and the label program may END IF differ when label program ST FB structure sa Iq ne ELE Please execute PLE read in order to read erem ese me
62. se oearch for a character string on the ST edit screen and replace it with the specified character string Operating Procedure Choose Find Replace Replace or press H Dialog Box 1 gt Findwhat DO 4 2 Replace with D10 Heplace 5 rhet el Match case dd Replace all 6 Match whole word only f Curent Window Close an lw Leave comments Selected lange Description 1 Find what Input the character string to be replaced Alternatively the character string can be selected from the list box 2 Replace with Input the character string to replace the one to be replaced Alternatively the character string can be selected from the list box Point In each of Find what and Replace with specify the character strings within 256 characters In each of the Find what and Replace with list boxes up to 10 character strings replaced in the past are displayed in the order from most to least recent 3 Find in When Current window is selected Replacement is made in the program currently being edited When Selected range is selected Replacement is made in the range selected by dragging the mouse When the replacement range is selected on the ST edit screen Selected range on the Replace screen can be selected 4 button Starts a search 5 button Replaces only the character string found first 6 Replace all button Replaces all the
63. syntaxes such as conditional sentence dependent selective branches and repetitive sentence based repetitions Hence easy to read programs can be written briefly ST MAIN 17Row 1465tep Lines A B and C are controlled CASE Line OF l Start switch a Start switch 3 Scart SwWLtoh Warning lamp END CASE TRUE Conveyer operation start FALSE Conveyer stop 1 TRUE Warning nf a conveyer stop TRUE IF Start switch TRUE THEN It processes 100 times FOR Hum of process 0 TU 100 BY 1 DO Parts A Parts 4 1 END FOR END IF 1 OVERVIEW MELSOFT 3 Ease of describing operation processings Capable of briefly describing easy to read operation processings that are difficult to describe in lists or ladders the ST language has a high level of program readability and is suitable for the fields where complex arithmetic operations comparison operations etc are performed EN ST MAIN 11Row 157 Step CASE Line OF l Speed i Distance B Hour C 3600 FB call FBl I Test DD 0 Test Dl 10 Test p100 ar M Pie EI EIAU DU Dl Des Da Result When the execution conditions XU turn on it judges whether the order of the value of DO to D3 is right Valve FALSE ST programs assume that labels will be used Please understand how to use labels in advance 1 OVERVIEW MELSOFT 1 2 Features ST programs are described in ST language Creati
64. the function list box in order ascending order of names All IEC functions are displayed in the function list box in order ascending order of names MELSEC functions IEC functions For the MELSEC functions and IEC functions refer to the MELSEC Q L Programming Manual Structured Text 3 ST PROGRAMMING MELSOFT 2 Function list box The function list selected in the function classification list box is displayed 3 button The function selected in the function list box is inserted into the ST edit screen Setting procedure 1 Select the function to be used from the function list box ii Press the button or key to insert the function into the cursor position on the ST edit screen After it has been inserted enter its parameter to complete the function ST MAIN SRow 130Step B olx IF DU 100 THEN X Result TIMER Hil X BOOL TIMER Mi BOOL EH BOOL TCoil ANY16 Tvwalue Point A function can also be inserted by a double click Example TIMER_M Select function Look in All w SRT SUBE SOET E c4 hd SAMD M SWAP MD STOF M TAIN SIR S MD TAM E STA TEL BOUL TAM E Mo SIF TO BOOLE TEST MD SIF TO DINT TIMER H M a a TIMER_M STR TE INT TO M SIF TO INT E UNI MI VD Double click A function is also inserted when the ST edit screen is in the overwrite mode When the initial of a function name is entered from the keyboard with the Select function screen open the
65. the method of creating a new project Purpose oet the PLC series PLC type label setting program type and project name required to create a new project Operating Procedure Choose Project New project click i or press N Dialog Box Mew Project E x 1 PLC series LILPLI Llnnode Lancel 2 PLL Type 00214 Frogram type Ladder SFC HMELSAPA ie ST 4 Label setting C Da not use label Use label Select when using 57 program FB and structures Device memory data which is the same as program data s name is created Setup project name Drive Fath LAMELSECAG PAP Project name Browse Title Po Description 1 PLC series Select the PLC series 3 ST PROGRAMMING MELSOFT 2 PLC Type Select the programmable controller CPU type to be used 3 Label setting Make this setting when creating a label program 4 Program type oet the program type to be created To select ST Use label must be set in the label setting Setting procedure i As the PLC series set the QCPU Q mode or LCPU li As the PLC type set the programmable controller CPU to be used iii As the label setting set Use label iv As the program type set ST v Set Setup project name and click the button to create a new project Setup project name can either be set before or after program creation The precautions for r
66. the same variables device label are used for the integer expression within CASE Integer expression OF the break is executed in the line that includes colon right after the first optional value instead of the line that includes OF 3 Break point setting is not available when sentences within the control statement are all blank semicolon only ula MELSOFT 4 6 4 Break execution 1 Line execution Perform break execution l line execution of programs Purpose Break execution debugs programs by halting the program execution at the location specified by break point 1 line execution debugs programs by halting the program execution line by line Operating Procedure Choose Online Debug ST debug execution and click A or press button Dialog Box ST debug execution MAIN Stop line 3 Device Test Execute canditian Execute from beginning 3 9 E Execute from stop position Execute from current cursor position Setting Items 1 button otarts program execution from the location selected as Execution condition to the preset break point 2 button Starts program execution line by line from the location selected as Execution condition 3 Execution condition opecify the line from which to start debugging 4 Stop line Displays the line No at which the program execution is being halted during break execution or 1 line execution 5
67. this execution the system operation can be monitored and checked 4 6 1 Debug function flowchart The following flowchart shows an example for using debug function on GX Developer START Start GX Simulater Choose Tools Start ladder logic test Start debug function Refer to Section 4 6 2 Set a break point in the line that corresponds Refer to Section 4 6 3 to the operation to be checked HONOR Select Break execution program Select 1 Line execution to check the Jupes Cn EN operation while monitoring the program Apte i to execute the Refer to Section 4 6 4 Problem revealed YES End debug function Refer to Section 4 6 2 Modify the program Check the operation Problem solved YES End GX Simulator End Choose Tools End ladder logic test 3 NHWF MELSOFT Point GX Simulator Ver6 16S or later is required to use debug function For details of GX Simulator refer to GX Simulator Operating Manual Debug is disabled when connected to programmable controller CPU 4 6 2 Starting Ending debug function Purpose Start End debug of the ST program Operating Procedure Choose Online Debug Debug Dialog Box Start MELSOFT series GX Developer X Change PLC status to STEP RUM Debug can be operated when changed to STEP RLIM Click button to start debug function
68. thod of printing the ST program For other printing methods refer to the GX Developer Operating Manual given in Related Manuals 1 PRINT Purpose Print the ST program Operating Procedure Choose Project Print click amp or press P Dialog Box x PLE parameters Network parameters Device comment Device memor Device init TEI Cross reference list List of used device TU setting Project conteste list Product information list Tile MELSAP23 MELSAP L Ladder Instruction list ST Label FB Structure Program selection cot Clear dein select selection MAIN Print range AJ Specified line 2 line Frinter setup Page setup Multiple printing Prnt Print preview ar NW MELSOFT Description 1 lt lt ST gt gt tab Switches to the screen where print details will be set 2 Print range Specify the print range of the ST program Entire range The ST program is printed from the first line to the last line Range specification The ST program is printed in the specified range 3 button Prints the ST program 4 button Displays the preview screen Setting procedure After setting the information required for Print click the Print button to start printing Print Example 1 Start_conditions TRUE 2 End conditions FALSE 3 4 Operation of Line A is started 5 Part A flag TRUE
69. troller CPU the device test operation method and others Chapters 5 Print describes the printing operation procedure etc The following explains the symbols and information used in this manual Symbo Point Gives the section related knowledge and useful information a 2 name Menu name of menu bar o menu bar Projet ei Icon Icon of toolbar ol toolbar E Tab name of dialog box lt lt Select file gt gt Command button of dialog box Button Programming Manual Use the MELSEC Q L Programming Manual Structured Text to perform structured text ST programming with GX Developer It is suitable for the users who have the knowledge and programming experience of programmable controller ladder programs and for the users who have the knowledge and programming experience of high level languages such as the C language When using the structured text language for the first time Refer to the Structured Text ST Programming Guidebook which describes the outline of the structured text ST language the procedures for creating a structured text ST program using GX Developer and writing it to the programmable controller CPU the information necessary for that purpose and others When information on other than structured text programming is necessary Refer to the GX Developer Version 8 Operating Manual or GX Developer Version 8 Operating Manual Startup Abbreviations and Generic Terms in This Manual

Download Pdf Manuals

image

Related Search

Related Contents

do manual de instruções  Firex COZ-1 Owner's Manual  Fujitsu CELSIUS W510    SETTING UP the Sun StorEdgeTM 5310 NAS  Allegati  2009 Spanish SFS Pool Manual.indd  Manual del usuario del Aquabeat v2.0  Descripción: Entretenimiento Asiento Trasero Touareg  

Copyright © All rights reserved.
Failed to retrieve file