Instruction/ maintenance manual of the product GFK-0804B GE
Go to page of 160
GE F anuc Automation Programmable Control Pr oducts GE F anuc Micr o PLC Pr ogrammer’s Guide GFK -0804B April 1994.
GFL–002 W arnings, Cautions, and Notes as Used in this P ublication W ar ning W arning notices are used in this publication to emphasize that hazardous voltages, currents, temperatures, or other conditions that could cause personal injury e xist in this equipment or may be associated with its use.
iii GFK-0804 Pr eface This book is the reference guide to programming the GE F anuc Micro PLC. Content of this Manual Chapter 1. Programming for the Micro PLC: describes programming basics, the Micro PLC instr uction set, programming devices and formats, memor y types and addresses, constants and register values in a program, and special coils.
Pr eface iv Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK–0804B T echnical Assistance If you should have a problem installing or programming your GE F anuc Micro PLC, and the information you need is not in this book or the Micro PLC User ’s Guide , you can call GE F anuc F ield Ser vice at 1-800-828-5747.
Contents v GFK -0804B Micro PLC Programmer ’s Guide - April 1994 Chapter 1 P r ogramming for the Micro PLC 1-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Programming Basics 1-2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents vi GFK -0804B Micro PLC Programmer ’s Guide - April 1994 Coils 4-11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Output Coil 4-12 . . . . . . . . . . . . . . . . . . . . .
Contents vii GFK -0804B Micro PLC Programmer ’s Guide - April 1994 Appendix A Using Directories A-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Appendix B Micro PLC P rotocol B -1 . . . . . . . . . . . . . . .
Contents viii GFK -0804B Micro PLC Programmer ’s Guide - April 1994 Appendix E Data Acquisition, Logging, and Display P rogram E-1 . . . . . . . . . . . . . . F eatures E-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1 restart lowapp ARestart oddapp: ARestarts for autonumbers that do not restart in each chapter . figure bi level 1, reset table_big level 1, reset chap_big level 1, reset1 Lowapp Alwbox restart evena.
1 1-2 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Programming Basics The most important ingredients in creating a successful PLC program are a thorough understanding of the application itself , and a good measure of common sense. The first step in creating a PLC application program is planning.
1 1-3 GFK-0804B Chapter 1 Programming for the Micro PLC PLC Programs A typical PLC application pr ogram is created in a format called ladder logic . 1 2 3 Input 1 Input 2 Input 3 Input 4 Input 5 Output 3 Output 2 Output 1 46101 Each symbol in the ladder logic represents a type of input, output, or other program action.
1 1-4 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B The Micro PLC Instr uction Set P rograms for a PLC are created from the elements provided in its Instr uction Set.
1 1-5 GFK-0804B Chapter 1 Programming for the Micro PLC Programming Devices and F ormats P rograms for the Micro PLC can be created using a computer that is equipped with the programming software, or using a Hand-held Programmer .
1 1-6 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Memory T ypes and Addresses Memor y Map T ype T otal Non R etentive Retentive Use for T imer or Counter Coil? General P urpose Internal.
1 1-7 GFK-0804B Chapter 1 Programming for the Micro PLC Special Coils The Micro PLC provides three special-purpose coils: 0.1 sec clock start–up scan coil hold output coil 0.1 Sec Clock (C1018) Coil C1018 is a pulse generator . The pulse width is shown below .
1 1-8 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Programming for an Analog Expander Unit Analog Scaling The Analog Expander Unit provides two 8-bit analog inputs and one 8-bit analog output. Scaling for an analog input or output is: Minimum: 0 volts = 0mA = 0 bits Maximum: 9.
1 1-9 GFK-0804B Chapter 1 Programming for the Micro PLC Programming Examples T wo simple programming examples are shown below . Example #1: F or an analog input, the program might read the input value and tur n on a discrete output when the analog input reaches a specific value.
2 section level 1 1 figure bi level 1 table_big level 1 2-1 GFK-0804B Chapter 2 Programming with the Programming Softwar e This chapter e xplains how to create and edit a program using the Micro PLC programming software.
2 2-2 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Using the Programming F unctions When you select Offline (F3) from the Main menu, the application program currently in the computer ’s RAM memory appears.
2 2-3 GFK-0804B Chapter 2 Programming with the Programming Software Programming Functions OFFLINE RUNG CREA TE LABEL DISPLAY RUNG MOVE SEARCH RUNG DELETE EDIT RUNG COPY SEARCH CHECK RUNG REF REF " " # # ON TIMER OFF TIMER UP COUNTER DOWN COUNTER .
2 2-4 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Cr eating a Program Rung Select R ung Create (F1) to create a new program r ung. If there are already rungs in the program, the new r ung will appear at the top of the page. Y ou can now enter a program element in the highlighted location.
2 2-5 GFK-0804B Chapter 2 Programming with the Programming Software Running the Programming Sof twar e The programming software can be r un from disk ette, or installed on a hard disk. F or installation instr uctions and infor mation about the files on the software diskette, refer to the Micro PLC User ’s Guide (GFK -0803).
2 2-6 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Editing Basics A fter selecting R ung Create (F1) : use the function k eys to create an element and enter a reference value. F or example, “I2”. (Note that the element reference cannot be entered as “2I”).
2 2-7 GFK-0804B Chapter 2 Programming with the Programming Software Horizontal and V ertical Lines in a Rung Horizontal and vertical lines are used to connect elements of a multi-line rung. If a rung has more than one line of logic, move the highlight box down to the start of the next line.
2 2-8 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Element Labels and Rung L abels Element labels and rung labels are text that can be added to a program and viewed in Offline mode by selecting the Label Display function. Element and r ung labels will also appear in their entirety in a hard copy printout or a print to disk.
2 2-9 GFK-0804B Chapter 2 Programming with the Programming Software Editing a Completed Rung A fter using the A ccept (F10) k ey to save a r ung, the r ung can be changed by selecting Edit (F4 ) with the Offline function keys. The same basic programming features are available in both Create mode and Edit mode.
2 2-10 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Adding a Contact to a R ung T o add a contact to a r ung, move the highlight box to the location for the new contact. A dd the contact using its function key . Enter a reference for the contact and press the Enter key , or use the cursor keys to move to a new position.
2 2-1 1 GFK-0804B Chapter 2 Programming with the Programming Software Replacing a Rung Element with a Similar Element T o replace a rung element with a similar element (for example, to replace a normally - open contact with a normally -closed contact), select the element with the highlight box.
2 2-12 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Replacing a Rung Element with a Dissimilar Element T o replace an element with an element of a different type (for example, to change a nor mally - open contact to an Equals function), select the element with the highlight box.
2 2-13 GFK-0804B Chapter 2 Programming with the Programming Software Deleting Rungs T o delete one or more r ungs, use the R ung Delete (F2) key . The software prompts: The first number that appears is the number of the rung that is now at the top of the screen.
2 2-14 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Copying Rungs Y ou might want to copy r ungs and then make simple changes to the r ungs rather than enter new rungs.
2 2-15 GFK-0804B Chapter 2 Programming with the Programming Software Searching for a Rung or Program Element Y ou can search for a specific program r ung, contact or coil, reference address, number , or program function. Select Search (F3) in Offline mode, then use the function keys described below to select the target of the search.
3 section level 1 1 figure bi level 1 table_big level 1 3-1 GFK-0804B Chapter 3 Programming with a Hand-held Programmer This chapter e xplains how use a Hand-held P rogrammer for programming the GE F anuc Micro PLC.
3 3-2 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Program Listing T o display the program listing, press the ENTER k ey from the powerup screen. PROGRAM ST ART Empty location Program T ransfer T o transfer a program, press the XFER k ey from the program listing screen.
3 3-3 GFK-0804B Chapter 3 Programming with a Hand-held Programmer Entering Program Logic The steps below show how to create a simple e xample program. Example Pr ogram I0001 I0002 C0001 I0003 C0001 O0030 4601 1 Hand-Held Programmer Key Operation and Displays use the ENTER k ey to accept a command.
3 3-4 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Inserting a Rung Element The steps below show how to insert an element in a simple e xample program.
3 3-5 GFK-0804B Chapter 3 Programming with a Hand-held Programmer Deleting a Rung Element, Rung or Program In Memory The steps below show how to use the HHP ’s delete function key to delete a program or part of a program in memory . Hand-Held Programmer Key Operation and Displays use the SRCH k ey to locate the ladder logic rung to be edited.
3 3-6 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Deleting a Rung Element The steps below show how to delete an element of a simple example program.
3 3-7 GFK-0804B Chapter 3 Programming with a Hand-held Programmer Searching Use the SRCH key to locate a rung, element, or operand in a program. The steps below show how to search for an operand, element, or rung umber , or the start or end of the program.
3 3-8 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Programming Examples Using the HHP Example 1 Ladder Diagram Key Operations C1 I3 I1 ST AR T AND ST AR T AND OR ST AR T AND OR OUT I5 I4.
3 3-9 GFK-0804B Chapter 3 Programming with a Hand-held Programmer Example 4 Ladder Diagram Key Operations C2 I6 I1 ST AR T OR ST AR T OR AND ST AR T OR AND OR ST AR T OR OR AND AND OUT I9 I7 I2 F1 (PT.
4 section level 1 1 figure bi level 1 table_big level 1 4-1 GFK-0804B Chapter 4 The Micro PLC Instr uction Set This chapter defines the individual logic elements that can be combined to make a program for the Micro PLC.
4 4-2 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Instruction Set Summar y Operation Ladder Symbol Description Contact / " # SET RST MCR SKIP END Normally-open contact Normally-clo.
4 4-3 GFK-0804B Chapter 4 The Micro PLC Instruction Set Operation Ladder Symbol Description Compare Function [S1 = S2] [S1 > S2] [S1 < S2] [S1 > S2] [S1 < S2] [S1 0 S2] Continue when S1 = .
4 4-4 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Contacts The Micro PLC instruction set includes the following contacts: –| |– Nor mally- open contact. P asses power flow to the right when its associated reference is = 1. –| " |– P ositive transition contact .
4 4-5 GFK-0804B Chapter 4 The Micro PLC Instruction Set Normally- Open Contact A Normally - Open contact passes power flow to the right when the associated reference is equal to 1. Programming Software Instructions If you are using the programming software, refer to the instructions on the opposite page.
4 4-6 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Programming a Normally- Open Contact in Series When a Normally - Open contact is not the first element of the r ung, program an AND with the HHP , as shown below . The example shows how to use the HHP to program a Nor mally - Open contact at the first and second positions in a r ung.
4 4-7 GFK-0804B Chapter 4 The Micro PLC Instruction Set Normally- Closed Contact A Normally - Closed contact passes power flow to the right when the associated reference is equal to 0. Programming Software Instructions If you are using the programming software, refer to the instructions on page 4-4.
4 4-8 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Programming a Normally- Closed Contact in Series When a Normally - Closed contact is not the first element of the r ung, program an AND NOT with the HHP , as shown below .
4 4-9 GFK-0804B Chapter 4 The Micro PLC Instruction Set Positive T ransition Contact The P ositive T ransition contact passes power flow to the right for one program cycle when its reference changes from 0 to 1. Programming Software Instructions If you are using the programming software, refer to the instructions on page 4-4.
4 4-10 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Negative T ransition Contact The Negative T ransition contact passes power flow to the right for one program cycle when its reference changes from 1 to 0. Programming Software Instructions If you are using the programming software, refer to the instructions on page 4-4.
4 4-1 1 GFK-0804B Chapter 4 The Micro PLC Instruction Set Coils The Micro PLC instruction set includes the following coils: –( )– Coil. The basic type of program output. –(SET)– Set coil. Used to set a specified reference to 1. –(RST)– R eset coil.
4 4-12 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Output Coil The basic type of output coil is controlled by conditional logic within the same rung. When the coil receives power flow from logic to its left in the rung, the reference associated with that coil is set to 1.
4 4-13 GFK-0804B Chapter 4 The Micro PLC Instruction Set Set/R eset Coil P air The Set/Reset coil pair can be used to control the state of an associated reference. The Set coil sets the reference to 1. The reference (O17 in the example below) ST A YS set to 1 until it is reset to 0 by the Reset coil.
4 4-14 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Master Control R elay/End Coil Pair The MCR/End coil pair can be used to turn off one or more outputs in the program, r egar dless of the state of any inputs or other conditional logic to those outputs .
4 4-15 GFK-0804B Chapter 4 The Micro PLC Instruction Set Skip/End Coil P air The Skip/End coil pair can be used to cause one or more outputs in the program to stay in their cur rent state (1 or 0), r egar dless of the state of any inputs or other conditional logic to those outputs .
4 4-16 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B T imers The Micro PLC instruction set provides two T imers: On T imer Sets an output to 1 after a specified time period. See page 4-17. Off T imer Sets an output to 0 after a specified time period.
4 4-17 GFK-0804B Chapter 4 The Micro PLC Instruction Set On Timer The On Timer tur ns ON an output after a specified time period. The time period can be from 0 to 6553.5 seconds. However , if a constant is used for the Preset value, the time period can be from 0 to 3276.
4 4-18 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Off Timer The Off T imer tur ns OFF an output after a specified time period. The time period can be from 0 to 6553.5 seconds. However , if a constant is used for the Preset value, the time period can be from 0 to 3276.
4 4-19 GFK-0804B Chapter 4 The Micro PLC Instruction Set Counters The Micro PLC instr uction set includes two Counters: Up Counter Sets an output to 1 when the counter is equal to a specified value. See page 4-20. Down Counter Sets an output to 1 when the counter reaches 0.
4 4-20 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Up Counter The Up Counter turns on an output when the count reaches a specified value (from 0 to 65535 if a register is used to load the counter , or 0 to 32676 if a constant is used). The output remains on only as long as the count is equal to the specified value.
4 4-21 GFK-0804B Chapter 4 The Micro PLC Instruction Set Down Counter The Down Counter tur ns on an output when the count reaches zero (from 65535 to 0 if a register is used to load the counter , or 32767 to 0 if a constant is used).
4 4-22 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Math F unctions The Micro PLC instruction set includes these Math functions: A ddition A dds together two numbers and places the total in a specified register . Subtraction The Subtraction function subtracts one number from another and places the result in a specified register .
4 4-23 GFK-0804B Chapter 4 The Micro PLC Instruction Set Programming Software Instructions 1. Select Math/Move (F5). 2. Select +ADD (F1) from the Math/Move function k eys . 3. Enter the first number to be added. This can be either a constant, or a register location that will contain the number to be added.
4 4-24 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Subtraction (SUB) The Subtraction function subtracts one number from another and places the result in a specified register .
4 4-25 GFK-0804B Chapter 4 The Micro PLC Instruction Set Examples and HHP Instructions Ladder Diagram Hand-held Programmer I1 ST AR T MA TH OUT ST AR T MA TH OUT F2 F1 F2 F1 I1 R1 5 R2 R3 R4 R5 ".
4 4-26 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Multiplication (MUL) The Multiply function multiplies one number by another and places the result in two consecutive registers. R1 x R2 = R3 R4 46134 T wo registers are needed to accommodate the larger numbers that might possibly result from the multiplication.
4 4-27 GFK-0804B Chapter 4 The Micro PLC Instruction Set Example and HHP Instructions Ladder Diagram Hand-held Programmer I1 ST AR T MA TH OUT F1 F3 F1 I1 R1 R2 R3 " [R1 x R2 ! R3] 46135 In the example above, the P ositive T ransition contact I1 is used as conditional logic to the Multiplication function.
4 4-28 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Division (DIV) The Division function divides one number by another , and places the result in two consecutive registers . R1 B R2 = R3 R4 R5 R1 B = R3 R4 46136 The numbers can be either constants or the contents of register locations.
4 4-29 GFK-0804B Chapter 4 The Micro PLC Instruction Set Using Division and Multiplication Functions T ogether If a Multiplication produces a result that is too large to use easily (the results are greater than 65535, and occupy two registers), you can divide the Multiplication result to scale the result to use smaller numbers.
4 4-30 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Move F unctions The Micro PLC instruction set includes these Math functions: Move The Move function copies 1 word (16 bits) of data to a speci- fied memory location. Block Move The Block Move function copies a selectable amount of data to a specified memory location.
4 4-31 GFK-0804B Chapter 4 The Micro PLC Instruction Set Examples and HHP Instructions Ladder Diagram Hand-held Programmer I1 ST AR T MOVE OUT ST AR T MOVE OUT F1 F1 F1 F1 F1 I1 R1 R2 I1R3 " [R1 ! R2] [I1 ! R3] 46138 In the first example r ung above, a transitional contact controls ex ecution of a Move function.
4 4-32 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Block Move The Block Move function copies a selectable amount of data to a specified memory location. It works lik e a Move function, e xcept that it copies more than 16 bits at a time.
4 4-33 GFK-0804B Chapter 4 The Micro PLC Instruction Set Examples and HHP Instructions Ladder Diagram Hand-held Programmer I1 ST AR T MOVE OUT ST AR T MOVE OUT F2 F1 F2 F1 I1 R1 5 R10 O9 8 O17 " .
4 4-34 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Indirect Move The Indirect Move function copies a constant or the content of register to a variable register location. The first part of this function specifies the data to be copied. The second part is a register that points to the actual register where the data will be placed.
4 4-35 GFK-0804B Chapter 4 The Micro PLC Instruction Set Examples and HHP Instructions Ladder Diagram Hand-held Programmer I1 ST AR T MOVE OUT ST AR T MOVE OUT F1 F3 F1 F3 F1 I1 5 R1 R2 R3 " [ 5 ! @R1] [R2 ! @R3] 46141 In the first example r ung above, an Indirect Move function copies the constant 5 into a register pointed to by R1.
4 4-36 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Compar e F unctions The Compare functions are used to compare the contents of two registers.
4 4-37 GFK-0804B Chapter 4 The Micro PLC Instruction Set Programming Software Instructions Select Compare (F6) , then use the assigned function k ey(s) to select a Compare function: = .EQ. (F1) Equal , .NE. (F2) Not Equal > .GT . (F3) Greater Than < .
4 4-38 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Logic Operations The Micro PLC Instruction Set includes these Logic operations: W ord AND The AND function compares each bit in one register against each bit in another . If both bits are 1, it places a 1 in the cor re- sponding bit of a third register .
4 4-39 GFK-0804B Chapter 4 The Micro PLC Instruction Set Word AND The AND function compares each bit in the first specified register against each corresponding bit in the second specified register . If both bits are 1, it places a 1 in the corresponding bit of the third register .
4 4-40 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Inclusive OR (IOR) The Inclusive OR function compares each bit in the first specified register against each corresponding bit in the second specified register . If either or both bits are 1, it places a 1 in the cor responding bit of the third register .
4 4-41 GFK-0804B Chapter 4 The Micro PLC Instruction Set Exclusive OR (XOR) The X OR function compares each bit in the first specified register against each corresponding bit in the second specified register . If both bits are the same (1 or 0), it places a 0 in the corresponding bit of the third register .
4 4-42 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Shift Register Right Each scan that power flow is received, the Shift Register Right function shifts all the bits in a register to the right (toward the least significant bits).
4 4-43 GFK-0804B Chapter 4 The Micro PLC Instruction Set Shift Register L eft Each scan, the Shift Register Left function shifts all the bits in a register to the left (that is, toward the most significant bit). The number of positions to be shifted is provided in the function’s second register (R2 in the example above).
4 4-44 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B NOT The NOT function takes the opposite state of each bit in the first specified register and places it into the second register . Example: 0000000011101010 R1 (234) NOT 1111111100010101 R2 (65301) 46153 Programming Software Instructions 1.
A A-1 GFK-0804B Appendix A Using Directories This section gives some advice on organizing the Micro PLC programming directory structure on your hard disk. If you installed the programming software using the default values, the programming files are in a directory named MICRO on your disk.
A A-2 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Using the Change Director y Function Most of the time, you won’t need to use the Change Directory function. The Change Directory function is nor mally used to change the default director y for Load and Save file commands.
A A-3 GFK-0804B Appendix A Using Directories Hints for an Advanced Application If you plan to create a large number of Micro PLC programs, it makes sense to create separate directories with a separate program or group of related programs in each. This is a convenient way to keep track of your files.
B section level 1 1 figure_ap level 1 table_ap level 1 B- 1 GFK-0804B Appendix B Micro PLC Protocol The infor mation in this appendix is pr ovided only for advanced users requiring communications between the Micro PLC and a host system.
B B-2 Micro PLC Pr ogrammer ’ s Guide – Aptil 1994 GFK-0804B Communications F iles The programming software diskette contains the following communications drivers and demonstration programs.
B B-3 GFK–0804B Appendix B Micro PLC Protocol Communications Memory T ypes and Addresses I/O Memory Addresses T ype Code Max A ddress Range (he x) Discrete Input I 256 0000 – 00FF Discrete Output .
B B-4 Micro PLC Pr ogrammer ’ s Guide – Aptil 1994 GFK-0804B Communications Protocol This is the low level definition of the serial communications P rotocol. A driver for the most commonly used portions of the protocol has already been written for C, and compiler Basic.
B B-5 GFK–0804B Appendix B Micro PLC Protocol Read Analogs ID 02 count addr_high addr_low R eply: ID 02 count addr_high addr_low data1 data2 ... ID – PLC ID number count – number of words (regis.
B B-6 Micro PLC Pr ogrammer ’ s Guide – Aptil 1994 GFK-0804B Write Program Memory ID 06 count addr_high addr_low data1 data2 ... R eply: ID 06 count addr_high addr_low ID – PLC ID number count .
B B-7 GFK–0804B Appendix B Micro PLC Protocol Star t Program ID 08 R eply: ID 08 stat_high stat_low stat_high – High byte of status word stat_low – Low byte of status word Status W ord: bits 0 .
B B-8 Micro PLC Pr ogrammer ’ s Guide – Aptil 1994 GFK-0804B Communications F unctions The MCROCOMM.C file contains a driver that implements the following functions. Note that a driver function is not available for every feature supported by the underlying protocol.
B B-9 GFK–0804B Appendix B Micro PLC Protocol Microsoft C (Small Model: Compile w/ -AS Option) F unction : Read Register Call : int MCS_Rreg (port, memtype, addr , count, buf); Inputs : int port; /* 0–COM1, 1–COM2 */ int memtype; /* 0–IR , 1–OR , 2–R */ int addr; /* Adrs.
B B-10 Micro PLC Pr ogrammer ’ s Guide – Aptil 1994 GFK-0804B T urbo C (Large Model: Compile w/ -ml Option) F unction : Read Register Call : int TCL_Rreg (port, memtype, addr , count, buf); Inputs : int port; /* 0–COM1, 1–COM2 */ int memtype; /* 0–IR , 1–OR , 2–R */ int addr; /* Adrs.
B B-1 1 GFK–0804B Appendix B Micro PLC Protocol T urbo C (Small Model: Compile w/ -ms Option) F unction : Read Register Call : int TCS_Rreg (port, memtype, addr , count, buf); Inputs : int port; /* 0–COM1, 1–COM2 */ int memtype; /* 0–IR , 1–OR , 2–R */ int addr; /* Adrs.
B B-12 Micro PLC Pr ogrammer ’ s Guide – Aptil 1994 GFK-0804B IBM Compiler BASIC F unction : Read Register Call : int BASRreg (port%, memtype%, addr%, count%, buf%(0), status%); Inputs : int port; /* 0–COM1, 1–COM2 */ int memtype; /* 0–IR , 1–OR , 2–R */ int addr; /* Adrs.
B B-13 GFK–0804B Appendix B Micro PLC Protocol Sample Programs Sample C P rogram for T urbo C/C++ DEMO1.C This pr ogram is provided “ as-is ” . Do not call for technical support for this fr ee program. #include <dos.h> #include <stdio.h> #include “MCROCOMM.
B B-14 Micro PLC Pr ogrammer ’ s Guide – Aptil 1994 GFK-0804B Sample BASIC P rogram 100 DIM BUF% (16) 200 PORT% = 1 REM Port–COM2 210 MEMTYPE% = 0 REM Analog Input 220 ADDR% =49 REM Start Addres.
C section level 1 1 figure_ap level 1 table_ap level 1 C- 1 GFK-0804B Appendix C R TU Protocol This appendix describes the Remote T er minal Unit (R TU) serial communications protocol, which can be used to provide communications between the Micro PLC or other remote device and a host computer .
C C-2 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Message T ypes There are four message types: query , nor mal response, error response, and br oadcast . Query The master sends a message addressed to a single slave, such as a Micro PLC.
C C-3 GFK–0804B Appendix C RTU Protocol Message Fields A typical message has the fields shown below: Information FRAME Station Address Function Code Error Check Station Address The station address is the address of the slave selected for the data transfer .
C C-4 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Character F ormat A message is sent as a series of characters. Each byte in a message is transmitted as a character . The illustration below shows the character for mat. A character consists of a start bit (0), eight data bits, an optional parity bit, and one stop bit (1).
C C-5 GFK–0804B Appendix C RTU Protocol Cyclic R edundancy Check (CRC) The Cyclic Redundancy Check (CRC) consists of 2 check characters generated at the transmitter and added at the end of the transmitted data characters.
C C-6 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Hardware Implementation of CRC -16 CRC-16 can be implemented using a multi–section shift register (which is based on the generating p.
1 Remember , the receiver processes incoming data the same way as the transmitter . The example for the receiver begins when all data bits but not the transmitted CRC have been received correctly . Therefore, the receiver CRC should be equal to the transmitted CRC at this point.
C C-8 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B RTU Message Length T o generate the CRC–16 for any message, the message length must be known.
C C-9 GFK–0804B Appendix C RTU Protocol Message Descriptions The following pages explain the format and fields for each R TU message. Message (01): R ead Output T able F ormat: Address Func Error Check 01 Query Address Func Error Check 01 Normal Response Point No.
C C-10 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Message (02): R ead Input T able F ormat: Address Func Error Check 02 Query Address Func Error Check 02 Normal Response Point No. Points Starting Number of Data Hi Lo Hi Lo Byte Count Query: An address of 0 is not allowed as this cannot be a broadcast request.
C C-1 1 GFK–0804B Appendix C RTU Protocol Message (03): R ead R egisters F ormat: Address Func Error Check 03 Query Address Func Error Check 03 Normal Response Register No. Registers Starting Number of Data Hi Lo Hi Lo Byte Count Register First Hi L o Hi L o Query: An address of 0 is not allowed as this request cannot be a broadcast request.
C C-12 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Message (04): R ead Analog Inputs F ormat: Address Func Error Check 04 Query Address Func Error Check 04 Normal Response Analog Input No.
C C-13 GFK–0804B Appendix C R TU Protocol Message (05): Force Single Output F ormat: Address Func Error Check 05 Query Normal Response Number Point Hi Lo Hi Lo Data Address Func Error Check 05 Number Point Hi L o Hi L o Data 00H 00H Query: An address of 0 indicates a broadcast request.
C C-14 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Message (06): Preset Single R egister F ormat: Address Func Error Check 06 Query Normal Response Number Register Hi Lo Hi Lo Data Address Func Error Check 06 Number Register Hi L o Hi L o Data Query: An address 0 indicates a broadcast request.
C C-15 GFK–0804B Appendix C R TU Protocol Message (07): R ead Exception Status F ormat: Address Func Error Check 07 Query Normal Response Address Func Error Check 07 Data Query: This quer y is a short for m of request for the purpose of reading the first eight output points.
C C-16 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Message (16): Preset Multiple Registers F ormat: Address Func 16 Query Address Func Error Check 16 Normal Response Register No. Registers Starting Number of Count Data Error Check Byte Register No.
C C-17 GFK–0804B Appendix C R TU Protocol Message (17): R eport Device T ype F ormat: Address Func 17 Normal Response T ype Device Count Data Error Check Byte Address Func 17 Error Check Query 66 Sl.
C C-18 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Communication Errors Communication errors are divided into three groups: Invalid Query Message Serial Link T ime Outs Invalid T ransac.
C C-19 GFK–0804B Appendix C R TU Protocol 5. The register number field specifies a register not available in theMicro PLC (retur ned for function code 6). 6. The analog input number field specifies an analog input number not available in the Micro PLC (retur ned for function code 3).
D section level 1 1 figure_ap level 1 table_ap level 1 D-1 GFK-0804B Appendix D Communications Using W indows DDE This appendix explains how to use the demonstration program MICROWIN.
D D-2 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B F eatures of the Micro PLC DDE Driver Software The software product, called the Micro PLC DDE Driver , allows linking real-time data from the plant floor into applications for display , logging, or trending.
D D-3 GFK-080B4 Appendix D Communications Using W indows DDE Simple Demonstration using Microsoft W ord The Micro PLC software includes a Microsoft W ord document named WORD.DOC. It can be used to read data links provided by the demonstration software.
D D-4 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Viewing PLC Data in Windows F ollow these steps: 1. First, use the Micro PLC programming software to download the file DDE1.LAD from the MICRODDE subdirectory to the Micro PLC. 2. Retur n to DOS and call up W indows.
D D-5 GFK-080B4 Appendix D Communications Using W indows DDE Viewing PLC Data in another DDE-compliant Application Y ou can view the PLC data in another DDE-compliant application by copying the data link to the W indow ’s clipboard and then pasting the link into the application.
E section level 1 1 figure_ap level 1 table_ap level 1 E-1 GFK-0804B Appendix E Da ta A c quisit ion, Logg ing, and Display Program This appendix describes the R TU-based Data Acquisition, Logging, and Display P rogram software, which is provided on the Micro PLC software diskettes.
E E-2 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Over view DISPLA Y is an easy to use program that r uns on an IBM PC, XT , or A T -c ompati bl e compute r . It al l ows mon i tori ng of Mi c ro PL Cs usi ng the R TU proto c ol. Y ou don’t nee d to know how to use R TU protocol to us e th e Dis pl ay software .
E E-3 GFK-0804B Appendix E Data Acquisition, Logging, and Display Program A bilit y to d ow n lo a d re g ist e r d a t a s uc h as r e cip e s t o a M icr o P LC . C om m e n t s ca n b e used in th e fil e , as in the foll owing exampl e , to descr i be th e data being download e d.
E E-4 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Equipment R equired Computer: IBM PC/XT or A T or equivalent. Micro PLC CPU: MDR014C, MDR114C, MDR028B, MDR128B, MA A014B, MDD016A. Micro PLC Cable P rogramming Software (optional): V ersion 2.
E E-5 GFK-0804B Appendix E Data Acquisition, Logging, and Display Program Star tup The DOS files COMMAND.COM and MODE.COM (or MODE.EXE) need to be in the search path. If you are unsure how to set up your path, you may copy these files to the same director y where Display is located.
E E-6 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B The Display Software Menus Main Menu A = Auto Operation M = Manual Operation S = Set up Colors R = Set up Message Register H = Help Esc.
E E-7 GFK-0804B Appendix E Data Acquisition, Logging, and Display Program Changing the Screen Colors If you want to change the screen colors for using the Display software, select S from the Main menu. (Colors for the A uto -polling screens are set up separately; see page E-18).
E E-8 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Editing Summary Basic editi ng fun cti ons for th e sc ree n, message, and regis ter fi l e s are li ste d be l ow . Aborting a F unction: Use the ESC k ey to stop most functions. P ressing ESC with no function started exits the editor .
E E-9 GFK-0804B Appendix E Data Acquisition, Logging, and Display Program Manual Mode This section explains how to use Manual mode to manually poll the selected Micro PLC: Reading one word of input, o.
E E-10 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Entering Manual Mode T o go to Manual mode, press the M key at the main menu. The menu of Manual mode selections appears to the right of the Main menu. Y ou can press ESC to return to the main menu, or press P for help.
E E-1 1 GFK-0804B Appendix E Data Acquisition, Logging, and Display Program Creating a Bank of Registers for Downloading Data In Manual mode, you can create files of register data to be downloard to a Micro PLC. W ith this option, it is possible to store recipes on disk ette which can then be downloaded to the PLC when appropriate.
E E-12 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Data values can be entered on separate lines, or on the same line but separated by spaces. F or e xample, here are two ways to for mat the same data: R,15,T ,1 ; This specifier must be on line 1, and be as shown.
E E-13 GFK-0804B Appendix E Data A cquisition, Logging, and Display Program Creating or Editing Autopolling Screens This section e xplains how to create or edit display screens that can be used for: Displaying selected input, output, and register data from multiple Micro PLCs or other remote R TU devices.
E E-14 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Creating an Auto-polling Screen F or a new screen, the following display appears: During operation, an A uto -pollng screen can display up to 21 lines of te xt and data items. A very simple screen is shown below .
E E-15 GFK-0804B Appendix E Data A cquisition, Logging, and Display Program F ormatting Strings for Auto-polling Screens There are 3 types of formatting strings that set up the display and operating parameters for the auto -polling display screens. The 3 setup strings are: 1.
E E-16 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Data Display String Format – &XYYYYYZN Use this setup string format to: Specify one input, output, and/or register to include on the A uto -polling screen. Specify the target ID of the Micro PLC that is the source of the data.
E E-17 GFK-0804B Appendix E Data A cquisition, Logging, and Display Program Data Limits Format – &L,X,YYYYY ,Low_Limit,Hi_limit Use th i s setup stri n g for mat to spe ci fy a high and low li mit for a register , in put, or output. If the specified item ex ceeds either limit, the word HIGH or LOW appears on the A uto -polling display .
E E-18 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Colors/logtime setup format – &#,SC,BC,L T Use this setup format to: Change screen colors for the A uto -polling screen you are working on (other A uto -polling screens can use different colors).
E E-19 GFK-0804B Appendix E Data A cquisition, Logging, and Display Program System Messages This section explains how to: Create or edit system messages that can be displayed on the bottom of the A uto -polling screens.
E E-20 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B An example completed message file could be: 2. Enter the system messages you want to appear during system operation. Each message must fit on one line. Start each message with a number in the range of –32768 to 32767.
E E-21 GFK-0804B Appendix E Data A cquisition, Logging, and Display Program Auto-P olling During System Operation This section explains how to: Ex ecute an A uto -polling screen P rint the current scr.
E E-22 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Changing the Display If you want to return to the A uto mode menu, press the ESC k ey . If you want to display another screen (and screens are named 0.SCN to 0.SCN), press the appropriate number key 0 through 9.
E E-23 GFK-0804B Appendix E Data A cquisition, Logging, and Display Program Data Logging This section describes: How Data Logging W orks The .LOG File The F or mat of Logged Data How Data Logging W orks During A uto -pollingn, data logging occurs at a selected time interval if some data on the screen is out of range.
E E-24 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B The Format of L ogged Data Each data item on the A uto -polling screen at the time the log to disk starts is saved as a line in the .
E E-25 GFK-0804B Appendix E Data A cquisition, Logging, and Display Program Error Messages During Operation While you are ex ecuting a screen, the following errors may occur: ERROR WRITING TO DEVICE COM1 Y ou can test for the presence of COM 1 by typing >DIR >COM1.
F section level 1 1 figure_ap level 1 table_ap level 1 F- 1 GFK-0804B Appendix F Programming Applications This appendix describes some simple programming applications: Application #1: FLIP / FLOP (T o.
F F-2 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Application #1: FLIP / FL OP (T oggle Operation) This logic reverses the state of an output each time a control signal is energized. Flip Flops can be used to toggle an output based on the presence of an input.
F F-3 GFK-0804B Appendix F Programming Applications Application #2: P ower Up One Shot (Start–up Protection) This logic uses a special purpose coil called the Start–Up Scan Coil to provide protection in the event of power loss or stoppage in a program.
F F-4 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Application #3: Cascading Counters This logic provides a technique for cascading counters. Cascading allows for counting more events than a single counter is able to count. A typical ladder logic is shown below .
F F-5 GFK-0804B Appendix F Programming Applications Application #4: Industrial “Starting Circuit” This logic provides a sample starting circuit for an industrial application. Included in the circuit is a simulation of a time delay relay and an emergency stop feature.
F F-6 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Rung 4 | C4 C5 O1 +––| |––+––|/|––+––––––––––+–––––––+–––––––+––( ).
Index Index-1 GFK-0804B A A ddition function, 4-22 A ddresses, 1-6 communications, B-3 Analog Expander , scaling and references, 1-8 B Block Move function, 4-32 C Change directory , A-2 Coils Clock (C.
Index Index-2 GFK-0804B L Label display , 2-2 , 2-8 Labels, create with programming soft- ware, 2-8 Ladder logic format, 1-3 Loading files, A-1 Logging, E-1 Logic Operations Ex clusive OR, 4-41 Inclus.
Index Index-3 GFK-0804B Q Quer y–Response, C -1 R Read Analog Inputs (R TU message), C-12 Read Ex ception Status (R TU message), C-15 Read Input T able (R TU message), C -10 Read Output T able (R TU.
An important point after buying a device GE GFK-0804B (or even before the purchase) is to read its user manual. We should do this for several simple reasons:
If you have not bought GE GFK-0804B yet, this is a good time to familiarize yourself with the basic data on the product. First of all view first pages of the manual, you can find above. You should find there the most important technical data GE GFK-0804B - thus you can check whether the hardware meets your expectations. When delving into next pages of the user manual, GE GFK-0804B you will learn all the available features of the product, as well as information on its operation. The information that you get GE GFK-0804B will certainly help you make a decision on the purchase.
If you already are a holder of GE GFK-0804B, but have not read the manual yet, you should do it for the reasons described above. You will learn then if you properly used the available features, and whether you have not made any mistakes, which can shorten the lifetime GE GFK-0804B.
However, one of the most important roles played by the user manual is to help in solving problems with GE GFK-0804B. Almost always you will find there Troubleshooting, which are the most frequently occurring failures and malfunctions of the device GE GFK-0804B along with tips on how to solve them. Even if you fail to solve the problem, the manual will show you a further procedure – contact to the customer service center or the nearest service center