Home
Structured Text (ST) Programming Guide Book
Contents
1. 4 Inserted ST MAIN 25Row 5 Refer to the function argument type displayed in the tool tip format and enter the argument to complete the entry IF Initialization THEN good 0 Defective 0 Yield 0 0 ELSE IF Inspection THEN qood good 1 ELSE Defective Defective 1 END IF Yield DINT_TO_REAL good DINT_TO_REAL good Defective END_IF 5 Complete Entering a comment Comments do not affect the program behavior at all When program processings are described as comments they give the at a glance pictures of the processings First enter a comment on Line 1 of the program Le 3 5 x Enter a comment by enclosing it with IF Initialization THEN that represents the beginning of aT the comment and that represents zd an end IF Inspection THEN good HE qood T is ELSE Defective Defective 1 END_IF 3 ST PROGRAMMING MELSOFT Scam previous page 2 5 x Refer to the example given on the left IF Initialization THEN and enter comments good 0 Defective 0 Yield 0 0 List 2 ST MAIN 25Row 1 The normal operation is processed ELSE Is the inspection passing IF Inspection THEN qood good 1 The nunber of non defective articles is added The inspect
2. JDNT goods MAR OUTPUT w YELD OUT REALS The yield is calculated Jb To next page 8 ST PROGRAMMING APPLICATION PASTING FB LADDER PROGRAM ELCT previous page MEI SOFT Series GX Developer Click the button Check the redefine error of the label The time period for checking gets longer with increase in variables Registration is completed Click the button FB variable setting CALCULAT The yield is calculated E 3 x Edit operation insert Add Delete ____ Input Output Comment 1 VAR INPUT v GOOD IN PSII Number of quality items 2 INPUT IN JDNT Number of defective goods vam OUTPUT OUT The yield is calculated 4 A For details refer to the GX Developer Operating Manual Function Block given in Relevant Manuals 8 ST PROGRAMMING APPLICATION PASTING FB LADDER PROGRAM MELSOFT Creating an FB in ST language The operation to input the program in List 3 will be explained xj 1 Double click Body Unset project Function Block CALCULAT The yield is calculated Header The yield is calculated Body The yield is calculated Mi 1 Double click Project FB Structure MELSOFT series GX Developer Unset project FB ST CALCULAT
3. MEMO INTRODUCTION TO USEFUL FUNCTIONS FOR T PROGRAM EDITING This chapter introduces useful functions for editing ST programs For more information refer to the GX Developer Operating Manual Structured Text 1 Window division Every time it is desired to confirm the contents midway through editing of a large program it is troublesome to scroll the screen to see the program At such a time use Window division Choosing Window Divide into two in the menu displays the screen in vertically divided windows The divided windows can be scrolled edited individually 2 Bookmark When it is desired to jump to a specific line it is troublesome to search the program from the beginning At such a time use Bookmark Preset the bookmark by choosing Find Replace Bookmark setting release Find Replace Find Set bookmark the menu By choosing Find Replace Bookmark list in the menu any line can be selected from the Bookmark list dialog to make a jump to that line 3 Display of label information It is desired to know the device assigned to the label At such a time use Label information When the mouse pointer is placed on the label Label name gt Label type gt Label comment gt Device is displayed in the tool tip format for at a glance confirmation of the contents Note Applicable to converted compiled programs Confirmatio
4. 8 6 W What is a function block FB What is a function block 8 1 What is the ST language 1 1 Index 1 Index 2 Index 2 otructured Text ST Programming Guide Book ST GUIDE EL MODEL CODE IB NA 0800248E C 0310 MEE a MITSUBISHI ELECTRIC CORPORATION HEAD OFFICE 1 8 12 OFFICE TOWER 2 14F HARUMI CHUO KU 104 6212 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 opecifications subject to change without notice
5. 8 ST PROGRAMMING APPLICATION PASTING FB TO LADDER PROGRAM Sm previous page W inputting the input ladder section and output ladder section Refer to the following diagram and input the input ladder section and output ladder section x LD Edit mode MAIN 35 Step E nl Unset project Initialization Function Block DMOV good CALCULAT The yield is Header The yield is MELSOFT SD 0 K Defective 28 Body The yield is cal EMOV Yield RST Inspection Initialization Inspection Input ladder section Output ladder section o oon 3 CALCULAT FBl i good D GDOD IN 4 YIELD OUT R Yiela gt Defective Project FB structure 2 B Performing convert compile Click Convert gt Convert Compile in the menu to perform convert compile Convert compile is completed Click the button MELSOFT series GX Developer X AN Compile Completed Local label is re allocated Write the program to PLC or Compare with the program in PLC before execute RUN write function and change TC variable for PLC The comment of label wil overwrite on device comment All righty When convert compile is completed the number of steps is displayed on the title bar OS LD Edit mode MAIN 183 S
6. JL To next page 8 ST PROGRAMMING APPLICATION PASTING FB TO LADDER PROGRAM MELSOFT 2L From previous page i MELSOFT series GX Developer Unset project FB ST CALCULAT The yield is calculated 1Row 9 Project Edit Find Replace Convert View Online Diagnostics Tools Window 18 x 6 new data name CALCULAT IS 22 ci Eg 2 les fes e Global variable v Of added 2598 1299 8 eel sel e sus ppp ass gal exe sme ze We FEI x zi fl Unset project 51 58 Function Block CALCULAT The is calculated Header The l jeld ld is calculated eld is calculated Body The yield is calculated Project FB Structure Body The yield is calculated QO2 H Host station 8 ST PROGRAMMING APPLICATION PASTING FB LADDER PROGRAM MELSOFT Defining FB variables The labels used in the FB are called FB variables FB labels Displaying the FB variable FB labels setting screen Here the operation method to define FB variables FB labels will be explained EB Unset project 1 Double click Header in the lt lt FB gt gt Function Block tab CALCULAT The yield is calculated amp E Header The yield is calculated 188 Body The yield is calculated Project FB suucture MELSOFT series GX Developer Unset project
7. C Whale range 6 Range specification ZR Total free space Free space volume volume Bytes When performing write to PLC put the PLC CPU in a STOP status 1 Choose the Label program ST FB structure check button in the File selection gt gt tab f the check button is not chosen only the actual program is written 2 Click Param Prog 3 Click the button 3 Write to PLC is completed Reset the PLC CPU and put it in a RUN status If an error occurs choose Diagnostics gt PLC diagnostics in the menu of GX Developer and confirm the error definition 8 ST PROGRAMMING APPLICATION PASTING FB TO LADDER PROGRAM Monitoring the sequence program Monitor and confirm the sequence program The monitor start stop operation is as follows When starting monitor Online gt Monitor Monitor mode When stopping monitor Online Monitor Stop monitor When resuming monitor Online Monitor Start monitor Monitor display mode MAIN 183 Step Initialization Inspection 100 Ie rt he proc Inspecti mitializ ed Inspection El inspect on flag CALCULAT FE1 115 good D G0OD_IN YIELD OUT RH Yield Total of Number o The yiel Yield number f qualit d is cal of quali y items culated ty items Defective D DEFECTIVE Total of Mumber o number f def
8. 8 16 ECG 219 8 16 Monitoring the sequence quw red ey iu v v un d vun adus 8 17 Confirming the program behavior Vase rotes quot fusi utes eio cau rt 8 18 A 4 About Manuals The following manuals are also related to this product In necessary order them by quoting the details in the tables below Helated Manuals Manual Name Manual Number Model Code GX Developer Version8 Operating Manual Startup Explains the system configuration installation method and startup method of GX Developer 0800242 Option GX Developer Version8 Operating Manual Explains the program creation method printout method monitoring method debugging method etc IB 0800243E using GX Developer Option GX Developer Version8 Operating Manual Structured Text Explains the operation methods for creating structured text programs IB 0800247E GX Developer Version8 Operating Manual Function Block Explains the program creation method printout method etc using GX Developer IB 0800246E QCPU Q mode Programming Manual Structured Text SH 080366E Explains the programming methods in structured text language 13JF68 QCPU Q mode QnACPU Programming Manual Common Instructions Explains the methods of using the sequence instructions basic in
9. FB variable setting CALCULAT The yield is calculated 1 xi Project Edit Find Replace Convert View Online Diagnostics Tools Window Help 15 2 T h e F B variable F B labels setti ng Jaltal ar Gl lelte Global variable v x Sex Vo seus screen is displayed a exse alel oledd es epe sepe sente Ol 2151121 xl Edit operation c Unset project Register mm Add B f Function Block Close Delete CALCULAT The yield is calculated F5 Header The yield is calculated Body The yield is calculated Project FB Structure Ready QO2 H Host station 8 ST PROGRAMMING APPLICATION PASTING FB LADDER PROGRAM MELSOFT Setting the FB variables FB labels 1 Select the Input Output type Select the label type There are the following four types INPUT Variable input from FB outside VAR OUTPUT Variable output to FB outside IN OUT Variable having the input and output functions Blank Variable used in FB inside EH FB variable setting CALCULAT The yield is calculated E _ LIE g y Ee Register Insert Add Close Delete Label__ _Constent___ _Devies yee VAR INPUT vif Edi
10. E o x Edit operation Register Insert Add Display global variables Close Delete Aut Label Constat Comment 1 initialization 3 Enter a comment into the label Enter it within 64 characters The comment can be displayed in the tool tip format of the label information For the label information refer to CHAPTER 7 INTRODUCTION TO USEFUL FUNCTIONS FOR ST PROGRAM EDITING or GX Developer Operating Manual Structured Text E Local variable setting MAIN E x Edit operation Insert Add Display global variables Delete Label Constat Devicetype L initialization MI Register Close Jb To next page 3 5 3 5 3 ST PROGRAMMING MELSOFT 2L From previous page 4 When entering labels continuously click the or button under Edit operation to add a line The buttons under Edit operation have the following functions button Inserts a blank line into the current cell position button Inserts a blank line into the place one line below the current cell position button Deletes one line in the current cell position E Local variable setting MAIN Register Close Lusplasy global variables Show assigned device a MSN NN NN Comment Initialization He nracess is initialized Gan in xni niai lt gt 5 After input
11. The number of defective good Defective 0 END The yield calculated Yield DINT TO REAL dgood DINT REAL dood Defective Yield 0 000 good 0 Defective 0 END_IF The labels displayed on the ST edit screen are displayed on the same lines of the monitor screen 5 DEBUGGING THE PROGHAM MELSOFT 5 2 Device Test The value of the label bit device word device in the PLC CPU can be changed directly Here the bit device value is changed to confirm the program behavior Confirming the program behavior The operation to change the bit device value will be explained Online Diagnostics Tools Window Help 1 Click Online E Debug Device Transfer setup test the menu Read From Write to Verify with PLC Write to PLC Flash ROM Delete PLC data Change PLE data attributes PLE user data Monitor Device test Forced input output registrakian cancellatian Forcibly turn ON the label Inspection that represents the bit device Te Device test Bit device x 2 Input Inspection into the bit device Close 3 Click the FORCE ON button 2 Enter Inspection Device Hide history FORCE ON FORCE OFF Toggle force Wie Device C Buffer memory Module startl O Hex Address HEX setting value pec 16 bitinteger Set Frogram Label re
12. New Project a series QCPU Q mode PLC series Q02 H QCPU Gmode m Label setting Use label Program type ST Pus 3 Click the button Ladder SFC MELSAP L v ST Driver Path L SMELSEC Project name Browse Title i MELSOFT series GX Developer Unset project ST MAIN 1Row 05 Ioj Project Edit Find Replace Convert Online Diagnostics Tools Window Help m 8 x JE EE e 4 A new ST project is created ST edit screen opens and an ST program can be entered Unset project Hs Global variables Program Device comment of Parameter EL Device memory Device init Structure row ico 1 Host station Q02 H is set as the PLC type There are the following PLC CPU types that are applicable to ST programs QOOCPU QO2CPU Q12PHCPU Q00JCPU QO2HCPU Q25PHCPU Q01CPU QO6HCPU Q12HCPU Q25HCPU 3 ST PROGRAMMING MELSOFT Defining the labels Hafn nn the mean To use labels variables used as labels must be clarified This is he 006 called defining the labels If a program that uses undefined labels is converted com
13. gt gt Tab name of dialog box Select file gt gt Command button of dialog box Button 1 OVERVIEW MELSOFT stipulates the logic description system in open controllers The ST language supports operators control syntaxes and functions to permit the following descriptions 0 f language 4 The ST language is defined in the International Standard IEC61131 3 that f Control syntaxes such as conditional sentence dependent selective branch and repetitive sentence based repetition Expressions using operators 5 lt gt etc Call of user defined function blocks FB Call of functions MELSEC functions IEC functions Description of comments A ihe features following introduces the main features of ST programs in the MELSEC Q j ale series 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 Program change during system operation online change Part of a running program can be changed without the PLC CPU being stopped Connection with other language programs Since other languages than the ST are also supported the language adequate for pr
14. otructured Text ST MITSUBISHI Mitsubishi Programmable Logic Controller e SAFETY PRECAUTIONS e Always read these instructions before using this equipment Before using this product please read this manual and the relevant manuals introduced in this manual carefully and pay full attention to safety to handle the product correctly The instructions given in this manual are concerned with this product For the safety instructions of the programmable controller system please read the CPU module user s manual In this manual the safety instructions are ranked as DANGER and CAUTION Indicates that incorrect handling may cause hazardous conditions D DANGER resulting in death or severe injury Indicates that incorrect handling may cause hazardous conditions resulting in medium or slight personal injury or physical damage N CAUTION a lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt Cl Note that the
15. IB NA 0800248E B Section 5 3 Section 5 2 Japanese Manual Version SH 080365 D 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 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 sequencer thoroughly in advance to ensure correct use Please make this manual available to the end user CONTENTS SAFETY PRECAUTIONS statuta instet ouest outs ue cp fusce Rar E ue A 1 REMISSION oc A 2 wo aU gos 4 PROUD DNA 5 FIOW TO USE TS mE 6 About the Generic Terms and Abbreviations Used in This Guidebook A 7 2 ST PROGRAM CREATION PROCEDURE 2 1 to 2 2 3 ST PROGRAMMING 3 1 to 3 16 Creating a new ST project cccccsesesscecescccsceeeeeeeeccneneseseesccccescsceeceeeeeecensensedsesccccecssceeseeeeeeassennesesssscocesscnees 3 1 Brevi alate Big acie cM MCN 3 3
16. Unset project Local variable setting MAIN B x T Project Edit Find Replace Convert View Online Diagnostics Tools Window Help 8 x S x ase ee ele 191 CM PIE EUM 4 The Local variables setting screen is displayed Unset project Register Edit insert Display global variables Hz Global variables Program Close Delete Show assigned device 8 MAIN E Device comment Parameter Device memory Bl Device init Structure Host station Q02 H 3 ST PROGRAMMING MELSOFT Setting the local variables Header 1 Enter a label name Enter a label name within 16 characters The character strings that cannot be used as a label name are reserved words and actual devices Enter other labels For the reserved words refer to the GX Developer Operating Manual Local variable setting MAIN of x Edit operation Register Insert Add Display global variables Close Delete Show as sig ned device Label Constant Devietyp Comment Initialization i Sa 2 Enter a device type Enter it directly or make selection from the list box E Local variable setting MAIN
17. FB in ST language and paste it to a ladder program to create a program to be used The main items to be explained in this chapter are as follows 23 Adding a new FB 22 Defining FB variables 25 Creating an ST program 23 Creating an FB in ST language 25 Using the ST written FB in a main program 8 1 Creating an FB wna funcion block FB An FB where often used processings are predefined as parts can be used in the necessary area of each program Creating a new project Creating a new project The creation method of a new project to create a main program in ladder format will be explained Click Project New project in the menu to display the New project dialog 1 Enter as follows series QCPU Q mode PLC type QO2 H Label setting Use label Program type Ladder 2 Click the button series QCPU OG mode TH Program type Ladder C Do notluse label sre MELSARL Use label Select when using 5T program FB and strugtures is the same as program data s name created ET Project name 77772 Browse Title INN Jb To next page 8 ST PROGRAMMING APPLICATION PASTING FB LADDER PROGRAM MELSOFT Jb From previous page MELSOFT series GX Developer Unset project LD Edit mode MAIN 124 Ste Ioj x T Project Edit
18. Find Replace Convert View Online Diagnostics Tools Window Help 8 x oleja a Aala ee alel CE EL m fe 1 BE VETE elu 4 J 2 3 new project is created E Global variables Program Device comment Parameter EL Device memory Bl Device init Structure 02 Adding a new Adding an FB The operation method to add a new ST written FB will be explained 1 Right click Function Block in the lt lt FB gt gt tab to display the menu Application instruction Host station 1 8 en Unset project 8 mu Funckian Bla Project Jb To next page 8 ST PROGRAMMING APPLICATION PASTING FB LADDER PROGRAM SOFT Lb From previous page 3 98 Unset project Mew 2 Click New Delete Rename Ghange program type sart Sort data name ascending Sort data name descending Project FE 8 Set the New dialog 3 Enter as follows Data type Function Block Program type ST Function Block Iz Data name CALCULAT Program type Title The yield is calculated C Ladder C SFC MELSAP L 4 Click the button ST Date CALCU LAT Title The yield is calculated 5 Cllick the button
19. Host station Entering the characters Strain o o 2818 Enter IF IF f entered in lower case a control syntax is converted automatically into upper case 3 ST PROGRAMMING MELSOFT Entering a label To enter a label a label name may be entered directly or the label selection function be used To use the label selection function labels must have been entered in advance Here the input method using the label selection function will be explained Edit Find Replace Convert View Onlin 1 Click Edit Select label in the Undo Ctrl 2 menu Redo Etrit Gut Cobre Copy Paste Ctrl Auto device Global variable setting Select Function Shift F 11 Select label All select 2 Select the label to be entered 2 Select Initialization a Commen 3 Click the button Total of number af d Defective good DINT Total of number of Initialization BOOL The process is initia Inspection BOOL Inspection flag Yield REAL Yield omen MAIN 25Row 3 2 x 4 The label is inserted IF Initialization 4 Label name Initialization is inserted 3 ST PROGRAMMING MELSOFT ll Entering a function Enter a function in upper case To enter a function may be entered directly or the function selection function be used Here the input method using the function se
20. NOG FAN NN Uu T S 3 8 Converting compiling the ST Pogra ree eret Eee Desa qoc bust uetus aces estadios 3 14 4 READ WRITE FROM TO PLC CPU 4 1 to 4 2 5 DEBUGGING THE PROGRAM 5 1 to 5 7 5 1 Monitoring the Sequence 5 1 S 2 TOS eset da d oed 5 2 o3 ONNE ciao rtr ERU 5 4 6 SAVING THE PROGRAM INTO THE PERSONAL COMPUTER 6 1to 6 2 8 ST PROGRAMMING APPLICATION PASTING FB TO LADDER PROGRAM 8 1 to 8 20 sm ES Iuno TTE SPORTS 8 1 lt 8 1 ANEN F EH 8 2 DETINING FB 5 Ou vd CO EUN 8 5 creating FB NST 1216 5 sucesor av EE Epp UU UN ROUGE 8 9 8 2 the FB to Main Program eno EE RN ed 8 11 Deiiningibiedoeal Wal ADCS eerste Hide une amet uar 8 11 Grgaling AMan ee uh cm cau 8 13 BONITO a non eiii Ea nu aao oM CDD I
21. ST PROGRAMMING APPLICATION PASTING FB TO LADDER PROGRAM MELSOFT MEMO INDEX A POGING at 8 2 Alarm history display function 6 16 Alarm list display function System tet 6 19 S 6 18 C Convert compile Converting compiling the FB 8 10 Error indication mark 3 16 Performing convert compile 3 14 The compile error Detail 3 15 What is convert compile 3 14 D Device Test Confirming the program behavior 5 2 8 18 Displaying the FB definition screen 8 9 Inputting the program 8 10 Displaying the FB variable screen 8 5 Displaying the ST edit screen 3 9 E Editing BOOKITIA DK aidera ctp Dude cal t Qu e 7 1 Change 0 42 221 7 1 Change of display font 7 1 Display of label information 7 1 Select function 4 44221 7 1 Window 22 7 1 L Label What does defining the labels mean 3 3 Local variable Displaying the setting screen 3 3 8 11 Enter a comment into the label 3 5 Enter a device 3 5 Enter a
22. The yield is calculated 1Row 1 LT 25 1 2 The FB definition screen is displayed Project Edit Find Replace Convert View Online Diagnostics Tools Window 24 Global variable M M sel a sll eel sel 22 ES en en n es en am s eal 4 Sal sepe eed see zl 2 2121 2 el 5 mul Unset project Function Block CALCULAT The yield is calculated Header The yield is calculated 4 Body The yield is calculated C Project FB Structure Header The yield is calculated QO2 H Host station ico Insert 8 ST PROGRAMMING APPLICATION PASTING FB LADDER PROGRAM ll inputting the program Input the FB program body as in the method of inputting the main program described in Chapter 3 Input the program in List 3 EE FB ST CALCULAT The yield is calculated 1Row YIELD OUT DINT TO REAL GOOD IN DINT TO REAL GOOD IN DEFECTIVE Converting compiling the FB Click Convert Convert Compile in the menu to perform convert compile z E Compile processing is completed MELSOFT series GX Develope Click the button At normal completion of convert compile the number of steps is displayed on the title bar FB ST CALCULAT The yield is
23. calculated Row 15 8 YIELD OUT DINT TO REAL GOOD IN DINT TO REAL GUOD IN DEFECTIVE 8 ST PROGRAMMING APPLICATION PASTING FB TO LADDER PROGRAM 8 2 Pasting the FB to a Main Program MELSOFT Create a main program ladder using the FB created in Section 8 1 Defining the local variables A Define the labels used in the main program lll Displaying the Local variables setting screen Project Edit Find Replace Convert View Online Diagnostics Tools Window 5 8 Unset project H E Global variables Ef Program EHEE MAIN Je Header V m Body 1 Double click Device comment w Parameter Device memory l amp l x alltal ar l Iac Global variable v oela S 6 86 eel Ez eno alls 228 15 Falemi Fo pel 216 Fz Slo e x IE Proect Fe Structure 5 8 Unset project E Global variables Program MAIN Header Body 18 Device init Device comment Parameter Device memory Display global variables Edit operation Register Insert Add Close Delete Show assigned device Constant Device type Ready Host station INUM 2 Q02 H 1 Double click Header 255 2 Local variable
24. device test function 27 Monitoring the sequence program 27 Changing the bit device value and conducting a device test s Changing part of the sequence program and writing it to the PLC CPU in RUN status 5 1 Monitoring the Sequence Program This section explains the operation method to monitor the sequence program Displaying the monitor screen Online Diagnostics Tools Window Help 1 Click Online Monitor Start monitor in the menu Read from write fo PLC verify with PLC Write ta PLC Flash ROM k Delete PLC data Ghange PLE date attributes PLC user data am 1 Im Oe eh 4 aF ak aril Debug k Monitor Write modet Trace k Stark monitor windows Remote operation Alk 6 Stop monitor Al windows Stark monitor Password setup k Stop monitor lt sT Monitoring MAIN 25Row 143Step Clear memnrv Initialization is done Initialization THEN qood 0 Defective 0 Yield 0 0 The normal operati ST edit screen Is the inspect IF Inspection THEN Initialization 0 qood D Defective D Yield 0 000 Monitor screen Inspection 0 qood good 1 The number of non defective art qood The inspection is failing ELSE Defective Defective l
25. in the menu For details refer to the GX Developer Operating Manual Structured Text 3 13 3 13 3 ST PROGRAMMING MELSOFT Converting compiling the ST program or compile Changing the program created on the ST edit screen into a sequence N conve program that can be executed by the PLC CPU is called convert compile Performing convert compile The convert compile operation method will be explained using the created program Convert View Online Diagnostics Tools Window Help 1 Click Convert Convert Compile in the menu Convert Compile Convert Compile All programs being edited Convert Compile All programs Online change 1 At normal completion The following message is displayed MELSOFT series GX Developer E Convert compile is completed Compile Completed Since the confirmation screen shown on the left is displayed click the No button Local label is re allocated Write the program to PLC or Compare with the program in PLC before execute RUN write function and change TC variable for PLC If the button is clicked the Comment data to be referred to comment by program does not exist message may be displayed The comment of label wil overwrite on device comment All right ST MAIN 25Row 1438tep E At normal completion of convert InitializatNn is done 9 A compile the number of steps is d
26. label name 3 5 Setting the local variables 3 5 8 12 Index 1 IM Monitor Monitoring the Sequence Program 5 1 8 17 O Online earigessu adu cles cast 5 4 P Pasting the FB Te E a 8 14 Performing read from PLC 4 2 Performing write to PLC 4 1 8 16 Program Entering 3 12 Entering function 3 11 Entering a label ett 3 10 Entering the characters 3 9 Function 3 12 Function selection function 3 11 7 1 Inputting the input ladder section and output ladder 8 15 Inputting the program ladder format 8 14 What should be noted during input 3 8 Project Creating new 8 1 Creating a new ST project 3 1 Saving the project 6 1 8 19 S Enter a comment into the label 8 7 Enter the device type 8 7 Enter the label 8 6 Select the Input Output 8 6 Setting the FB variables
27. NCAUTION level may lead to a serious consequence according to the circumstances Always follow the instructions of both levels because they are important to personal safety Please save this manual to make it accessible when required and always forward it to the end user Designing Precautions 4 DANGER e For data change program change and status control to be performed for the running programmable logic controller from a personal computer configure interlock circuits in the outside of the PLC system so that the whole system will always operate safely Also for online operations to be performed from the personal computer to the PLC CPU predetermine as a system the corrective actions for communication errors that will occur due to poor cable connection etc Startup Maintenance Precautions N CAUTION e Before performing online operations program change during PLC CPU RUN forced I O operation RUN STOP or similar operating condition change remote operation with the personal computer connected to the running PLC CPU read the manual carefully and ensure safety fully Note that program change during PLC CPU RUN online change may cause such problems as program corruption depending on the operation condition Use the equipment after fully understanding the precautions given in the GX Developer Operating Manual REVISIONS The manual number is given on the bottom left of the back cover Manual Number Jul 2003
28. PU and the procedure to read the sequence program from the PLC CPU ll Performing write to PLC The operation method for write to PLC will be explained Display the Write to PLC dialog and write the program and parameters to the PLC CPU Online Diagnostics Tools Window Help When performing write to PLC put the PLC CPU ina STOP status Transfer setup Read From PLC Write ta PLC 1 Click Online Write to PLC in the with menu write to ROM b Delete PLC data 2 Select the Label program ST FB structure check button in the File selection gt gt tab When the check button is not selected only the actual program is written EN ERE Parami rog Coss Label ST FB Struct Target P Devi TE 7 Label pragram ructure rogram memo Device memory TEES 3 Click Param Prog Related functions Transfer setup 4 Click the button Keyword setup Remote operation Clear PLC memory Format PLC memory ROE TREE Arrange PLC memory 4 Bange specification A F Lreate title Total free space Device comment L COMMENT Parameter MI PLC Metwork RHemote password Reset the PLC CPU and put it in a RUN status MELSOFT series GX If an error occurs choose Diagnostics PLC diagnostics in the menu of GX Developer and confi
29. c operations from the input to convert compile of an ST program The following items will be explained in this chapter gt Creating a new ST project Defining the labels to be used an ST program K gt Creating an ST program lt Converting compiling the created ST program into an executable sequence program gt Correcting the program if a convert compile error occurs Creating a new ST project Creating a new ST project The operation method to create a new project will be explained 4 Click Project New project in the New project Ctrl N TA Open project close project 1 ym Save Gris IERI X T 1 7 2167 FIO ars 4 ge Fz ee 2 Hee menu Delete project Verify ee Copy Saye 85 2 FT pS c5 aF5 3F8 aF 576 F8 F7 sF5 F5 F6 E Fe c2 c8 4 Edit Data change PLC Eype Import file Export file Macro Function Block Printer setup Print se Newest File Start new GX Developer session Exit GX Developer Project eee S es ee tb To next page Creates new project 3 ST PROGRAMMING MELSOFT Jb From previous page Set the New project dialog 2 Enter as follows
30. curred Compile error Detail 1 Select the error definition with the Programname MAIN P mouse muss Resa DD nee DT 2 Click the button Aliprograms Aliprograms Jb To next page 3 ST PROGRAMMING MELSOFT Scam previous page 5 Track down the cause and correct the faulty part The error indication mark is displayed on the ST edit screen Confirm the error definition and program contents and correct the program mix Correct Line in List 2 ST MAIN 25Row Initialization is done F Initialization THEN qood 0 0 Defective 0 Yield 0 0 good 0 0 good 0 The normal operation is processed Click Convert Convert Compile in 1s added f the menu qood good 1 The number of non defective articles The inspection is failing ELSE Defective Defective l The number of defective goods is added The yield is calculated Yield DINT TO REAL dood DINT REAL dgood Defective END IF The error location and actually corrected part may be different Identify the faulty part from the error definition displayed in the Compile error Detail dialog and the program contents of the line where the error indication mark is displayed 4 READ WRITE FROM TO PLC CPU MELSOFT Chapter 4 explains the procedure to write the converted compiled sequence program to the PLC C
31. d Inspection Defective CALCULAT FE1 good D GOOD YIELD Yield Defective D DEFECTIVE IN ll Displaying the edit screen Double click Body in the lt lt Project gt gt tab to display the edit screen mode MAIN 35 5 st sample H E Global variables 2 88 Program MAIN Header 29 Body Device comment Parameter E Device memory B Device init Project FB structure El JL To next page 8 ST PROGRAMMING APPLICATION PASTING FB TO LADDER PROGRAM LL son previous page the program in ladder format Refer to the following diagram and input the program x li LD Edit mode MAIN 35 Step Unset project Global variables 2 88 Program EHE MAIN Body 1 Device comment Parameter E Device memory Pasting the FB cB st sample 5 8 Function Block SBSS CALCULAT The yield is Switch to lt lt FB gt gt tab and drag and drop the FB program to the target place calculated Fun Unset project ction Block Header i Body The yield is calculated Header The yield is calculated Body The yield is calculated M The FB is inserted into the main program X ted jeld is calcule The yield is calcula alim LD Edit mode Jb To next page MELSOFT lolx
32. ect of defec ive good tive qoo 148 El Defective Total of number of defec tiwe goo MELSOFT lol x good Total of number of quali ty items END The comments set on the Local variables setting screen can be displayed by choosing View Comment in the menu 8 ST PROGRAMMING APPLICATION PASTING FB TO LADDER PROGRAM Confirming the program behavior MELSOFT Change the value of the bit device in the PLC CPU and confirm the program behavior ll Conducting a device test Refer to Section 5 2 and change the value of the bit device Choose Online Debug Device test in the menu to display the Device test dialog x Close Inspection Yv Hide history FORCE ON _ FORCE OFF Toggle force Device test Bitdevice 1 Input Inspection Device 2 Click the FORCE ON button Device C Buffer memory Module start O Address Setting value 16 bitinteger Set Program Label reference program MAIN Execution history Setting condition Inspection Force ON FB variable setting CAL The yield is calculated im LD Monitor mode Monitoring MAIN 183 Step E E n x CO rrectly Initialization Inspection 100 he proc Inspec on fla good value increases is i hitializ ed confirm the program behavior I
33. ference program MAIN Execution history Setting condition Program name Find Inspection Force ON next Re seting gt Clear Jb To next page 5 DEBUGGING THE PROGHAM MELSOFT T pos previous page Make confirmation on the monitor screen ST Monitoring MAIN 25Row 14381 2 Initialization is done Initialization l good 503493 Defective 1 Yield Inspection good 503493 good value increases IF Initialization THEN good Of Detective 0 Yield 0 0 The normal operation processed ELSE the inspection passing 7 IF Inspection THEN good good 1 The number of non defective a gt The inspection is failing ELSE Defective Defective l The number of defective go Defective 1 END IF gt The yield is calculated Yield DINT REAL gaood DINT REAL dgood Defective Yield 1 000 good 503495 Defective END IF GX Developer supports the following debug functions for the programs created in ST language 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 For details refer to the relevant section in GX Developer Operating Manual Structured Text 5 DEBUGGING THE PROGHAM SOFT 5 3 Online C
34. hange When the PLC CPU is in a RUN status part of the sequence program can be changed This is called online change Actually change part of the sequence program and perform online change ll Changing part of the program and performing online change Change the calculation expression of Yield and perform online change 1 Change part of the program Yield DINT TO REAL good DINT TO REAL good Defective Yield DINT REAL good DINT TO REAL good Defective 100 0 Em ST Monitoring MAIN 25Row 148Step Initialization is done Initialization THEN Initialization good 2 0 Defective 0 Yield 0 0 good 2919230 Defective 1834337 Yield The normal operation is processed ELSE Is the inspection passing 7 IF Inspection THEN Inspection 1 good good 1 The number of non defective articl good 2919230 The inspection is failing ELSE Defective Defective 1 The number of defective goods i Defective 18331337 END The yield is calculated Yield i DINT TO BEAL dgood DINT REAL good Defective l00 Q0l 0 614 good 2919230 Defective Changed x indicating the line to be online changed is displayed on the indicator bar of the target line 2 Execute online change Convert View Online Diagnostics Tools Window Help Click Convert Convert Compile Online change in the menu Convert Compile Convert Com
35. ion is failing ELSE Defective Defective 1 The number of defective goods Defective END IF The yield is calculated Yield DINT TO REAL dgood DINT REAL dgood Defective 100 0 Yield 100 000 good 100 Defective Reflected x that indicates the online change target line disappears On the monitor screen confirm that the present value of Yield has changed 5 DEBUGGING THE PROGHAM MELSOFT MEMO 6 SAVING THE PROGRAM INTO THE PERSONAL COMPUTER e copy In Chapter 6 the completed project is saved with a name Saving the project Save the created project with a name Project Edit Find Replace Convert View 1 Click Project Save as in the Mew project menu Open project Close project Save 2 Input as follows Drive Path CAMELSEC Project name SAMPLE ST Title work check 3 Click the button 5 Dirree Path Cancel SAMPLE ST Project name work check Title The program created this time was saved as described below Drive Path CAMELSEC Project name SAMPLE_ST Title work check a This completes a series of operations from the creation of UN the new ST project to the input and online debugging of the program to the storage of the project Fully understand the operations performed until now and ida to Chapter 8 4d 6 SAVING THE PROGRAM INTO THE PERSONAL COMPUTER
36. ion is failing ELSE Defective Defective 1 The number of defective goods is added END IF The yield is calculated Yield DINT TO DINT_TO_REAL qood Defective END IF This completes program input Display of label information The label information can be displayed in the tool tip format Operation Place the mouse pointer in the label position Display Label name gt Label type gt Label comment gt Device x The device is displayed after convert compile is performed EE ST MAIN 25Row 1435 Initialization is done IF Initialization THEN good O Defective O Yield 0 0 The normal operation processed 3 ELSE ls the inspection passing Label information is displayed IF Inspection THEN good good 1 The number of fon defective articles qood gt LOCAL Total of number of quality items Dlzz8584 The 1nse Lo T ELSE Defective Defective 1 The number of defective goods is adc Change of display color Control syntax comment and label character string colors ST edit screen background color etc can be changed Operation Choose Tools Change display color in the menu Setting of auto indent Indentation at the time when the key is pressed and the Tab width at the time when the key is pressed can be set Operation Choose Tools ST editor settings
37. is complete click the button Local variable setting MAIN 1 1 Label Constat Devicetype Comment 1 initialization BOOL The process is initialized 2 Defective J DNT v Tetalof number of defective goods Ege gt Total of number of quality items 4 REAL Viele inspection soot Inspection flag MELSOFT Series GX Developer x Click the button Check the redefine error of the label The time period far checking gets longer with increase in variables tb To next page 3 ST PROGRAMMING MELSOFT Sciam previous page MELSOFT series GX Developer xl i Registration completed Registration is completed Click the button When registration is made displayed on the title bar disappears eS Local variable o GER E E dit E 5 x Insert Display global variables Delete Show assigned device Show assigned device device Po v The process is initialized Detective NT Total of number of defective goods PINT Total of number of quality items Yed 2 REAL Viele nspection Comment 7 inspection flag For details of the local variables refer to the GX Developer Operating Manual given in Relevant Manuals 3 ST PROGRAMMING MELSOFT Entering a program ing input A program can be input free
38. isplayed on the title bar IF Initialization THEN qood 0 Defective 0 Yield 0 0 The normal operation is processed ELSE Is the inspection passing IF Inspection THEN good good 1 The number of non defective articles is added 7 The inspection is failing ELSE Defective Defective 1 The number of defective goods is added END_IF The yield is calculated Yield DINT_TO_REAL good DINT_TO_REAL good Defective END_IF 3 ST PROGRAMMING MELSOFT 2 When error occurs The Compile error Detail dialog is displayed Now actually see the debugging operation at occurrence of a compile error 1 Change the program so that a error will occur Change Line 3 in List Initialization is done RYOUHIN 0 RYOUHIN 0 0 IF Initialization THEN good 0 b Defective The norma pur Ts tha inonanti an wes 2 Perform convert compile Convert View Online Diagnostics Tools Window Help Click Convert Convert Compile in Convert Compile the menu Convert Compile All programs being edited A Convert Compile programs Convert Compile Online change 3 A compile error occurs and the dialog is bii diu Compile error Detail E Confirm the error step line and error jis a Nasa definition 4 Error Type mismatch for lt lt C8030 All programs Amp 4 Confirm the line on which the error has oc
39. lection function will be explained Edit FindiReplace Convert View Onlin 1 Click Edit 5 Select function in the Undo Chrl 2 menu Reda Gut Paste bry Auto device 3 Global variable setting Select Function ShiFE4 F 1 1 F11 Select label All select Ctrl 4 2 Select the label to be entered IF Initialization THEN good 0 Defective 0 Yield 0 0 3 Click the button ELSE IF Inspection THEN good good Ls Defective Defective 1 Look in All DBPLUS 3 M DGRY M DLIMIT MD DBPLUS M 5 MD DTEST DCML_M DI M DDABCD 5 MD DINC M DDABIN 5 MD DINT E DDEC M DINT TO DEC M DINT TO t DECO M DINT TO INT DEG E MD DINT TO INT H DINT TO REAL DINT TO REAL E DSER_M DZONE DINT TO STR DSFL M EI M DINT TO STR DSFR_M EMOD_ DSORT_M DSTR 5 3 ST PROGRAMMING MELSOFT Sciam previous page I ST MAIN 3 5 x 4 The function name is inserted IF Initialization THEN qood 0 Defective 0 Yield 0 0 The function argument type is ELSE displayed in the tool tip format IF Inspection THEN good good ls ELSE Defective Defective 1 END IF Function argument type is displayed TisldisDINT TO READ jl oe oe oomen REAL DINT REAL DINT 51 j
40. ly in text format using the ST edit screen sou 6 te Qum Note the following points during input Use a space key or key to enter a blank When the defined label control syntax or comment is input the character color changes If it does not change the possible cause is an input mistake or undefined label Now actually input a program in List 1 List 1 Initialization THEN good 0 Defective 0 Yield 0 0 IF Inspection THEN good good 1 ELSE Defective Defective 1 END IF Yield DINT TO REAL good DINT REAL good Defective END IF 3 ST PROGRAMMING MELSOFT ll Displaying the ST edit screen x 1 Double click Body in the lt lt Project gt gt tab Unset project H H Global variables 1 58 Program SE Device memory BL Device init Structure Project MELSOFT series GX Developer Unset project ST MAIN 1Row Step m Oj x T Project Edit Find Replace Convert View Online Diagnostics Tools Window Help 81 x 2 The ST edit screen 15 displayed S AAL ael refe e ea 1 Global variables m lt F6 Unset project Global variables Program 3 MAIN Device comment Parameter Bl Device memory Bl Device init Structure IQ02 H
41. n can also be made by activating Show assigned device on the Local variables setting screen 4 Select function It is desired to input the function whose name has been forgotten At such a time use Select function Choosing Edit Select function displays the Select function dialog to allow the function name to be selected Also since the function argument type is displayed in the tool tip format when the function is inserted the argument can be input with reference to that argument type 5 Change of display color and font It is difficult to differentiate between the character strings on the edit screen since they have the same color or it is desired to change the character size At such times use Change display color or Font Choosing Tools gt Change display color in the menu displays the Change display color dialog to allow the comment control syntax character label and background colors to be selected Changing the display color improves readability Choosing Tools Font in the menu displays the Font dialog to allow the font type style and size to be selected Making easy to use setting improves operability INTRODUCTION TO USEFUL FUNCTIONS FOR ST PROGRAM EDITING cory MEMO 8 ST PROGRAMMING APPLICATION PASTING FB TO LADDER PROGRAM MELSOFT Chapters 1 to 7 explained the basic operation methods and functions for creating ST programs In Chapter 8 create a function block
42. nspection Defective Ej Inspecti Total of on flag number of defec tive goo CALCULAT FB1 115 good D GOOD IN YIELD OUT RH Yield 0 0 0 000 0 000 Total of Number o yiel Yield number f qualit d is cal of quali y items culated ty items Defective D DEFECTIVE IN 0 0 Total of Number o number f defect of defec ive good tive goo s 148 END 1 Input Inspection into the bit device 3 Check that the program is running Also change the other label values and 8 ST PROGRAMMING APPLICATION PASTING FB TO LADDER PROGRAM MELSOFT Saving the project Refer to Section 6 and save the created project with a name Click Project Save as in the menu to display the Save the project with a new name dialog Save the project with a new name EC x 1 as follows Drive Path CAMELSEC Pede m ES Project name SAMPLE FBST E Title FB is used and E3DNaviFlus Easysocket calculated E Gppw 2 Click the button Drive Path CAMELSEC Projectname FBST Cancel Title FE is used and calculated The program created this time was saved as described below Drive Path CAMELSEC Project name SAMPLE FBST Title FB is used and calculated This ends the explanation of a series of operation methods for program creation To further proceed to the next step it is recommended to sii to the manuals given in the section Relevant aes 6
43. ocessing can be used to increase the efficiency of program development For example write sequence control in a ladder program and operation processing in ST language Multiple languages support widespread application under optimum control A wealth of functions available The MELSEC functions compatible with various common instructions for the MELSEC Q series and the IEC functions defined in 61131 3 are available for ST programs 1 OVERVIEW MELSOFT MEMO a 2 ST PROGRAM CREATION PROCEDURE MELSOFT The following flowchart indicates the basic procedure from ST program creation to online debugging In the following example programming was performed using only an ST program Creation of new project Refer to Chapter 3 for details Define the local variables used in an ST program Refer to Chapter 3 for details Definition of labels Create a program in ST language Refer to Chapter 3 for details Creation of ST program Write to PLC CPU After performing change compile into a sequence program write it to the PLC CPU Refer to Chapter 4 for details Online debugging Confirm the program behavior by conducting a device test Refer to Chapter 5 for details For details of each operation refer to the GX Developer Operating Manual given in Relevant Manuals 2 ST PROGRAM CREATION PROCEDURE MELSOFT MEMO 3 ST PROGRAMMING MELSOFT Chapter 3 explains general basi
44. pile programs being edited Converti Compile prograrns Convert Compile Online change Shift F4 2L To next page 5 DEBUGGING THE PROGHAM MELSOFT previous page 3 The confirmation message is displayed MELSOFT series GX Developer Click the button N Caution PLC control has changed Make sure everything is safe then execute again The write destination is the program in the program memor Don t write to the same program from a plurality of place at the same Ensure the PLC program and the program to be converted match Ok Write destination program MAIN Jb To next page 5 DEBUGGING THE PROGHAM SOFT T pos previous page 4 Online change is completed Click the button MELSOFT series Developer E X RUN write processing has completed There are 499 RUN write maintenance steps remaining CAUTION The execute program and the label program may differ when label programi ST FB Structure exists in the Please execute PLC read in order to read correctly E ST Monitoring MAIN 25Row 148Step Initialization is done Initialization THEN Initialization 0 qood 2 0 Defective 0 Yield 0 qood 100 Defective l Yield t The normal operation is processed s the inspection passing IF Inspection THEN Inspection 1 qood qood 1 The number of non defective artic qood The inspect
45. piled an error occurs and a sequence program cannot be created There are two different labels global variables and local variables The global variables can be used in the whole project The local variables can be used in only the program where the labels have been defined Here the local variables used in the program example that will be entered later will be actually defined Displaying the Local variables setting screen The operation method to define local variables will be explained For the global variables refer to the GX Developer Operating Manual 8 1 Double click Program the lt lt Project gt gt tab El Unset project Global variables Device cammen Parameter ZA EN Device memory EY Device init Ve M 1 Double click Project Structure 2 Double click MAIN a Unset project H Global variables 1 Program HF Device comment 81 18 Parameter SE Device memory ZLI Device init 2 Double click Project Structure tb To next page 3 ST PROGRAMMING MELSOFT Jb From previous page project il Global variables Program MAIN m Hm ind Bu ae Device comment Parameter SE Device memory aL Device init 3 Double click Header 3 Double click Structure Project i MELSOFT series GX Developer
46. rm the error definition 4 READ WRITE FROM TO PLC CPU MELSOFT Performing read from PLC The operation method for read from PLC will be explained Display the Read from PLC dialog and read the program and parameters from the PLC CPU Online Diagnostics Transfer setup 1 Click Online Read from PLC in the menu Read from PLC Write to PLC MeriPy with l Write to PLC Flash ROM Delete PLC data Read from 2 Click Param Prog in the File selection gt gt tab 3 Click the Execute button File sele cm ur Comman Lacal Cancel all selections data E Close Related functions Label program ST FB Structure Q3z01 702 13 18 EH Parameter Transfer setu D PLE Network Remote password 02212725 14 Es Device memory Kemord setup Device data Remote operation Clear PLC memory Format PLC memory Arrange PLC memory _ view Bange speciication ZA fa 22767 Create tithe Total free space b 7 register If an error occurs choose Diagnostics PLC diagnostics in the menu of GX Developer and confirm the error definition 5 DEBUGGING THE PROGHAM MELSOFT Chapter 5 explains the online debugging operation of the sequence program written to the PLC CPU using the monitor function and
47. s who have the knowledge and programming experience of high level languages such as the C language Operating Manual The GX Developer Version 8 Operating Manual Structured Text is a commentary that gives in depth explanation of the operation methods for creating structured text programs using GX Developer Refer to the manual when information on operations details is necessary 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 About the Generic Terms and Abbreviations Used in This Guidebook In this guidebook the following generic terms and abbreviations are used to represent the GX Developer software package and PLC CPU The package name is given when the target model name must be pointed out explicitly Generic Terms and Abbreviations Description target unit Stands for structured text Stands for function block Generic product name for model names SWnD5C GPPW SWnD5C GPPW A GX Developer SWnD5C GPPW V and SWnD5C GPPW VA n means Version 8 or later Generic term for QOO J CPU Q01CPU Q02 H CPU QO6HCPU Q12HCPU CPU Q mod Q25HCPU Q12PHCPU and Q25PHCPU The following explains the symbols and information used in this guidebook Symbo Gives the section related knowledge and useful int information 1 Mennameofmenuba Project leon of toolbar lt lt
48. setting screen is displayed 8 ST PROGRAMMING APPLICATION PASTING FB LADDER PROGRAM ELS Setting the local variables headers Refer to Chapter 3 and make setting as follows EE Local variable setting MAIN d n x Register Inset Add Display global variables Close Delete E initialization COBO The process is initialized Defectwe JDN 4 07 8 Edit operation Shaw assigned dev ce 3 Yield did Inspection BOL Inspection flag After input is complete click the button The registration of the local variables is completed Click the button MELSOFT series GX Develop x When registration is made displayed on the title bar disappears 15 x Local variable setting Gay Edit Insert dd Display global variables Show assigned device Show assigned device device Label Constant 1 initialization BOOL The process is initialized 2 Defective 2 5 Inspection 7 Inspection flag 8 ST PROGRAMMING APPLICATION PASTING FB TO LADDER PROGRAM MELSOFT Creating a main program Display the main program edit screen and input the following program List 4 List 4 Initialization 99 Defective Inspection Initialization Inspection 100 goo
49. structions and application instructions penes Option Each Operating Manual is contained in the CD ROM together with the software package as a set The Programming Manual is available separately in printed form as an option Please place an order with the manual number model code in the above table How to Use This Manual This Guidebook This guidebook is a commentary written for those who will use the GX Developer Version 8 software package hereafter abbreviated to GX Developer to create structured text hereafter abbreviated to ST programs for the first time Chapter 1 introduces the overview of the ST language and the features of the ST language in the MELSEC Q series Chapter 2 to Chapter 6 introduce a series of basic operation methods such as the methods of creating debugging and saving programs in ST language through sample programs Chapter 7 introduces useful functions available from GX Developer Chapter 8 introduces the method of creating a program which uses an ST written function block FB in a ladder program from the main program created in ladder form as an application program Chapters 4 5 and 8 use the PLC CPU for explanation Programming Manual Use the QCPU Q mode 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 PLC ladder programs and for the user
50. t operation VAR INPUT VAR OUTPUT VAR IN OUT lt gt Enter the label name within 16 characters 2 Enter the label name FB variable setting CALCULAT The yield is calculated n x Register Insert Add Close Delete 1 Edit operation 1 INPUT GOOD Jb To next page 8 ST PROGRAMMING APPLICATION PASTING FB LADDER PROGRAM wri sory tb From previous page 3 Enter the device type Enter it directly or make selection from the list box Em FB variable setting GCALCULAT The yield is calculated m a n x Register Insert Add Close Delete i ee ___ InputfOutput Label Constat 1 INPUT GOOD IN PIT Edit operation 4 Enter a comment into the label Set it within 64 characters Em FB variable setting CALCULAT The yield is calculated E n x Edit operation Register Insert Add Close __ Inpu Ouput Label Constant Devicetype 1 VAR INPUT GOOD IN DINT Number of Comment lt gt 5 After input is complete click the button EE FB variable setting CALCULAT The yield is calculated Edit operation Comment INPUT v GOOD IN j Number quality items 2 INNUT v DEFECTVE
51. tep loj x E Initializatior 89 DMOV good DMO Defective EMOV EO Yield RST Inspection Initialization Inspection 100 Wf Kl good Inspection D Kl Defective CALCULAT FBl1 115 qood YIELD_OUT Ry Yield Defective D DEFECTIVE IN 8 ST PROGRAMMING APPLICATION PASTING FB LADDER PROGRAM 8 3 Online MELSOFT Write the sequence program to the PLC CPU and confirm the program behavior using the monitor function and device test function Writing to PLC CPU ll Performing write to PLC Refer to Chapter 4 and perform write to PLC Choose Online Write to PLC in the menu to display the Write to PLC dialog Connecting interface lt gt module PLC Connection NetworkNo Station No Host PLCtype 002 Target memory Program memory Device memory Title File selection Device data Program Common Local Cancel all selections gt X Target Program memory Device memory memory p 55 Close Password setup Param Prog Select all Program M MAIN Related functions Device comment COMMENT Transfer setup Parameter PLC Network Remote password Keyword setup Remote operation Clear PLC memory Format PLC memory Arrange PLC memory Create title
Download Pdf Manuals
Related Search
Related Contents
Guida dell`utente della fotocamera Quantum Scalar i2000 User's Guide DJM-400 - Pioneer EDC Series User`s Manual Operation of Version 2 SALT-POWERED ROBOT - 4M Industrial Development Limited Lennox International Inc. 4HP18LT User's Manual 取扱説明書 Navman Marine RCA RCR504BR remote control Copyright © All rights reserved.
Failed to retrieve file