GE GFK-0804B manuel d'utilisation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160

Aller à la page of

Un bon manuel d’utilisation

Les règles imposent au revendeur l'obligation de fournir à l'acheteur, avec des marchandises, le manuel d’utilisation GE GFK-0804B. Le manque du manuel d’utilisation ou les informations incorrectes fournies au consommateur sont à la base d'une plainte pour non-conformité du dispositif avec le contrat. Conformément à la loi, l’inclusion du manuel d’utilisation sous une forme autre que le papier est autorisée, ce qui est souvent utilisé récemment, en incluant la forme graphique ou électronique du manuel GE GFK-0804B ou les vidéos d'instruction pour les utilisateurs. La condition est son caractère lisible et compréhensible.

Qu'est ce que le manuel d’utilisation?

Le mot vient du latin "Instructio", à savoir organiser. Ainsi, le manuel d’utilisation GE GFK-0804B décrit les étapes de la procédure. Le but du manuel d’utilisation est d’instruire, de faciliter le démarrage, l'utilisation de l'équipement ou l'exécution des actions spécifiques. Le manuel d’utilisation est une collection d'informations sur l'objet/service, une indice.

Malheureusement, peu d'utilisateurs prennent le temps de lire le manuel d’utilisation, et un bon manuel permet non seulement d’apprendre à connaître un certain nombre de fonctionnalités supplémentaires du dispositif acheté, mais aussi éviter la majorité des défaillances.

Donc, ce qui devrait contenir le manuel parfait?

Tout d'abord, le manuel d’utilisation GE GFK-0804B devrait contenir:
- informations sur les caractéristiques techniques du dispositif GE GFK-0804B
- nom du fabricant et année de fabrication GE GFK-0804B
- instructions d'utilisation, de réglage et d’entretien de l'équipement GE GFK-0804B
- signes de sécurité et attestations confirmant la conformité avec les normes pertinentes

Pourquoi nous ne lisons pas les manuels d’utilisation?

Habituellement, cela est dû au manque de temps et de certitude quant à la fonctionnalité spécifique de l'équipement acheté. Malheureusement, la connexion et le démarrage GE GFK-0804B ne suffisent pas. Le manuel d’utilisation contient un certain nombre de lignes directrices concernant les fonctionnalités spécifiques, la sécurité, les méthodes d'entretien (même les moyens qui doivent être utilisés), les défauts possibles GE GFK-0804B et les moyens de résoudre des problèmes communs lors de l'utilisation. Enfin, le manuel contient les coordonnées du service GE en l'absence de l'efficacité des solutions proposées. Actuellement, les manuels d’utilisation sous la forme d'animations intéressantes et de vidéos pédagogiques qui sont meilleurs que la brochure, sont très populaires. Ce type de manuel permet à l'utilisateur de voir toute la vidéo d'instruction sans sauter les spécifications et les descriptions techniques compliquées GE GFK-0804B, comme c’est le cas pour la version papier.

Pourquoi lire le manuel d’utilisation?

Tout d'abord, il contient la réponse sur la structure, les possibilités du dispositif GE GFK-0804B, l'utilisation de divers accessoires et une gamme d'informations pour profiter pleinement de toutes les fonctionnalités et commodités.

Après un achat réussi de l’équipement/dispositif, prenez un moment pour vous familiariser avec toutes les parties du manuel d'utilisation GE GFK-0804B. À l'heure actuelle, ils sont soigneusement préparés et traduits pour qu'ils soient non seulement compréhensibles pour les utilisateurs, mais pour qu’ils remplissent leur fonction de base de l'information et d’aide.

Table des matières du manuel d’utilisation

  • Page 1

    GE F anuc Automation Programmable Control Pr oducts GE F anuc Micr o PLC Pr ogrammer’s Guide GFK -0804B April 1994[...]

  • Page 2

    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. In situations where inattention could cause eithe[...]

  • Page 3

    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. Cha[...]

  • Page 4

    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. We W elcome Y our Comments and S[...]

  • Page 5

    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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . PLC Programs 1-3 . . . . . . . . . . . . . . . . . . . . . . . . . .[...]

  • Page 6

    Contents vi GFK -0804B Micro PLC Programmer ’s Guide - April 1994 Coils 4-11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Output Coil 4-12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Set/Reset Coil P air 4-13 . . . . . . [...]

  • Page 7

    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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Communications Files B-2 . . . . . . . . . . . .[...]

  • Page 8

    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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using the Display Software with Micro PLC Net E-1 . . . . . .[...]

  • Page 9

    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 evenap:A1app_big level 1, resetA figure_ap level 1, reset table_ap level 1, reset figure level 1, reset table level 1, reset these restarts oddbox reset: 1[...]

  • Page 10

    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. The desired sequence of program actions[...]

  • Page 11

    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. There are many types of symbo[...]

  • Page 12

    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. The Instruction Set for the GE F anuc Micro PLC includes both basic relay -replacement contacts and many advanced program functions: Contacts Nor mally - open Contact Nor[...]

  • Page 13

    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 . Programming with the Programming Software P rograms created with the programming software are in traditional ladder log[...]

  • Page 14

    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 Coil? Use as General P urpose R egister? Use as Indir ect R egister R eference? I 256 1 – 256 none no yes no no O 256 1 – 256 none yes yes no no [...]

  • Page 15

    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 . This coil is a read- only coil. It can only be used as a program input, not as an outpu[...]

  • Page 16

    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.969 volts = 19.922mA = 255 bits Some examples of equivalen[...]

  • Page 17

    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. In this example, the program compares the value of the first analog in[...]

  • Page 18

    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. Using the Programming F unctions Creating a Program R ung Running the P rogramming Software Editing Basics Horizontal and V ertic[...]

  • Page 19

    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. If there is no program currently in RAM memor y , the screen looks lik e this: The window shows the current rung, total number o[...]

  • Page 20

    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 .EQ. .NE. .GT . SHIFT REG LEFT .GE. .LE. AND XOR NOT SHIFT REG RIGHT IOR .L T . VER T LINE HOR[...]

  • Page 21

    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. Use the ESC key if you want to return to a pr[...]

  • Page 22

    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). Running the Programmin[...]

  • Page 23

    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”). use the cursor k eys to move to another position in the r ung being edi[...]

  • Page 24

    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. Enter the first element on that line. T o add a horizontal[...]

  • Page 25

    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. The first [...]

  • Page 26

    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. Refer to the previous descriptions of [...]

  • Page 27

    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. Adding a Progr[...]

  • Page 28

    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. P ress the function key that corresponds to the new el[...]

  • Page 29

    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. F irst, delete the element by pressing the Delete key on[...]

  • Page 30

    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. If you want to delete just that rung, press the Enter key . If you want to delete a dif[...]

  • Page 31

    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. T o copy one or more r ungs, use the R ung Copy (F6) key . The software prompts: The first number that appears is the number of the rung that is now at the top of the [...]

  • Page 32

    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. Finally , use [...]

  • Page 33

    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. P rogram Listing P rogram T ransfer Entering Program Logic Inserting a Rung Element Deleting a Rung Element, Rung or P rogram In Memor[...]

  • Page 34

    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. TRANSFER TO/FROM PLC PROM PC The Hand-held Programmer will transf[...]

  • Page 35

    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. On the display , “empty location” refers to the[...]

  • Page 36

    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. Example Pr ogram I1 O17 I3 O17 I5 " I5 " Element is to be added to the program as shown 46106 In this example, the statement OR PTRAN I005 is inserted between the e xisting s[...]

  • Page 37

    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. The[...]

  • Page 38

    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. Example Pr ogram I5 I6 I3 O17 I1 Element is to be removed from the program as shown. I1 46107 AND NOT I003 OR PTRAN I005 OUT O017 Hand-Held Programmer Key Operation and Displays use the [...]

  • Page 39

    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. Hand-Held Programmer Key Operation and Displays SRCH AND I001 OUT O017 ENTER I/O Key Operatio[...]

  • Page 40

    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 I2 I6 F3 (NOT) I1 I2 I3 I4 I5 I6 C1 ENTER ENTER ENTER ENTER ENTER ENTER ENTER ENTER ENTER 46108 Example 2 Ladder Diagram Key Operations C2 I3 I1 ST A[...]

  • Page 41

    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 (PTRAN) F3 (NOT) F3 (NOT) F3 (NOT) F3 (NOT) I1 I4 I2 I5 I6 I9 I7 I3 C5 I8 I4 C2 ENTER ENTER ENTER ENTER ENTER ENTER ENTER ENTER ENTER ENTER ENTER ENTER E[...]

  • Page 42

    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. Instruction Set Summar y Contacts Nor mally - Open Contact Nor mally - Closed Contact P ositive T ransition Contact Negative T ran[...]

  • Page 43

    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-closed contact Positive transition Negative transition Output coil Set coil Reset coil Master Control Relay Skip/jump operation Ending operation for a sk[...]

  • Page 44

    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 = S2 Continue when S1 > S2 Continue when S1 < S2 Continue when S1 > S2 Continue when S1 < S2 Continue when S1 0 S2 Logic Operation A [???N??[...]

  • Page 45

    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 . P asses power flow to the right for one program cycle when i[...]

  • Page 46

    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. Examples and HHP Instructions The HHP progra[...]

  • Page 47

    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. [...]

  • Page 48

    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. Examples and HHP Instructions The HHP programming[...]

  • Page 49

    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 . The example shows how to use the HHP to program a Normally - Closed contact at the first and second positions in [...]

  • Page 50

    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. Example and HHP Instru[...]

  • Page 51

    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. Example and H[...]

  • Page 52

    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. Used to reset the same specified reference to 0. –(MCR)– Master Contr ol R elay . Use[...]

  • Page 53

    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. When no power flow is received, the reference is 0. The state [...]

  • Page 54

    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. Notice that the Set and Reset coil are programme[...]

  • Page 55

    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 . The rungs with the outputs to be controlled must be located between the Master C[...]

  • Page 56

    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 . The r ungs with the outputs to be controlled must be located betwe[...]

  • Page 57

    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. See page 4-18. Programming Software Instructions for Timers T imers require input logi[...]

  • Page 58

    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.7 seconds. T o program a timer function, enter two inputs (in the example below[...]

  • Page 59

    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.7 seconds. T o program a timer function, enter two inputs (in the [...]

  • Page 60

    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. See page 4-21. Programming Software Instructions for Counters Counters requ[...]

  • Page 61

    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. If the count incre[...]

  • Page 62

    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). T o program a counter function, enter two inputs (in the example below , I1, and I2), and two parameters (R2 and R38[...]

  • Page 63

    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 . Mult[...]

  • Page 64

    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. F or example: R001. Then press the Enter k[...]

  • Page 65

    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 . number – number = register 46132 The numbers can be constants, as in the first subtraction shown on the facing page, or the contents of register locations in[...]

  • Page 66

    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 " [R1– 5 ! R2] [R3–R4 ! R5] 46133 In the first r ung of the e xample above, the P ositive T ransition contact I1 is used as conditional logic to th[...]

  • Page 67

    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. Only the first registe[...]

  • Page 68

    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. When I1 transitions on, the value in r[...]

  • Page 69

    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. When this function is programmed, only the first [...]

  • Page 70

    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. F or example: x = Mu[...]

  • Page 71

    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. It copies more t[...]

  • Page 72

    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. That Move function copies the c[...]

  • Page 73

    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. The options are explained below: Option Example Description Register > Register R001 0002 > [...]

  • Page 74

    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 " [R1E 5 ! R10] N L [O9E 8 ! O17] N L 46139 In the first e xample r ung above, when transitional contact I1 goes on, 5 registers (R1 – R5) are copied [...]

  • Page 75

    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. This[...]

  • Page 76

    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. During one[...]

  • Page 77

    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. They can be used to activate an output, or as conditional logic to other program functions. The Micro PLC Instr uction Set includes these Compare functions: Equal P asses power flow to the ri[...]

  • Page 78

    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 < .L T . (F4) Less Than > .GE. (F5) Greater Than or Equal < .LE. (F6) Less Than or Equal 1[...]

  • Page 79

    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 . Inclusive OR The Inclusive OR[...]

  • Page 80

    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 . If either or both of the cor responding bits is 0, the AND function [...]

  • Page 81

    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 . If both of the cor responding[...]

  • Page 82

    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 . If the bits are different, it places a 1 [...]

  • Page 83

    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). The number of positions to be shifted is provided in the function’s second register (R2 in the example a[...]

  • Page 84

    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). The data is copied to the[...]

  • Page 85

    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. Select Logic (F7) 2. Select NOT (F4) fr om [...]

  • Page 86

    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. Y ou also have the following directories: MICRO MICRO.EXE [...]

  • Page 87

    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. This is useful if you repeatedly need to load or save from a [...]

  • Page 88

    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. Also, you then have the capability of saving a di[...]

  • Page 89

    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. Communications Files Memor y T ypes and Addresses I/O Memory Addresses W ork Memor y P rogram and I/O Address Map[...]

  • Page 90

    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. If you used the automated install routine for the P rogramming software, these files were placed in the comm subdirector y under the main /micro directory[...]

  • Page 91

    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 O 256 0100 – 01FF F orced Discrete Input FI 256 0200 – 02FF F orced Discrete Output FO 256 0300 – 03FF Internal Coil C 1024 0400 – 07FF Regist[...]

  • Page 92

    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. This driver is contained in the MCROCOM.C file from the distribution disk e[...]

  • Page 93

    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 (registers) to read addr_high – High byte of address of the first register to read addr_low – Low byte of address of the first register to read dataN ?[...]

  • Page 94

    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 – number of instruction words to write addr_high – High byte of address of the first instr uction to write addr_low – Low byte of address of the [...]

  • Page 95

    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 – 7 are for fatal conditions (stopping the PLC) bits 8 – 11 are for non-fatal conditions bit 15 is informational 0 memor y is cor rupted 1 invalid [...]

  • Page 96

    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. Microsoft C (Large Model: Compile w/ -AL Option) F unction : Read Register Call[...]

  • Page 97

    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. of the 1st register to read */ int count; /* Number of words to r[...]

  • Page 98

    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. of the 1st register to read */ int count; /* Numbe[...]

  • Page 99

    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. of the 1st register to read */ int count; /* Number of words to re[...]

  • Page 100

    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. of the 1st register to read */ int count; /* Number of words t[...]

  • Page 101

    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.C” int port; int memtype; int addr; int count; char buf [16]; int temp;[...]

  • Page 102

    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 Address–49 230 COUNT% =16 REM Length–16 Registers 240 CALL BASRreg (PORT%, MEMTYPE%, ADDR%, COUNT%, BUF%(1), ERRSTAT%) 250 IF ERRSTAT% <>0 THEN GO[...]

  • Page 103

    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 . Message T ypes T ransmission Sequence Message Fields C[...]

  • Page 104

    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. Normal R esponse A fter the slave per for ms the function requested by the quer y , it sends back [...]

  • Page 105

    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 . It is one byte in length and has a value from 0 to 247 inclusive. An address of 0 selects [...]

  • Page 106

    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). Between cha[...]

  • Page 107

    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. The receiver gener- ates its own CRC for the incoming data and compares it to the CRC sent by the transmit- ter to ensure prop[...]

  • Page 108

    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 polynomial): 13 12 11 10 9 8 7 6 5 4 3 2 1 15 14 0 + + + CRC Register X 16 X 15 X 2 LSB + = Exclusive OR Data Input 40473 The message data bits are fed[...]

  • Page 109

    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. When this occurs, the output of the CRC algorithm will be zero indicat[...]

  • Page 110

    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. The length for all types of messages can be determined from the table below . F unction Code And Name Quer y or Broadcast Message Length Less CRC Code R esponse Message Length Less CRC Code[...]

  • Page 111

    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. Points Starting Number of Data Hi Lo Hi Lo Byte Count Query: An address of 0 is not[...]

  • Page 112

    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. The function code is 02[...]

  • Page 113

    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. The [...]

  • Page 114

    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. Analog Inputs Starting Number of Data Hi Lo Hi Lo Byte Count Analog First Hi L o Hi L o Input Query: An address of 0 is not allowed as this reques[...]

  • Page 115

    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. All slave stations process a broadcast request and no respons[...]

  • Page 116

    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. All slave stations process a broadcast r[...]

  • Page 117

    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. An address of zero is not allowed as this cannot be a broadcast request.[...]

  • Page 118

    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. Registers Starting Number of Query: An address of 0 indicates a broadcast request. All[...]

  • Page 119

    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 Slave Run Mode 5 Query: The Report Device T ype query is sent by the master to a slave in order to lear n what type of programmable control or other com[...]

  • Page 120

    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 ransaction Invalid Quer y Message When the Micro PLC receives a query addressed to itself , but cannot process the quer y , it sends one of the following er[...]

  • Page 121

    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). Invalid Data V alue Error R esponse (3) An er ror response with[...]

  • Page 122

    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.EXE that is included with the Micro PLC software. This demonstration program is provided to acquaint you with an available software product that can be used to connect[...]

  • Page 123

    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. It also allows setting individual parameters or downloading recipes to a prog[...]

  • Page 124

    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. T o tr y it, follow these steps: 1. First, use the Micro PLC programming software to download the[...]

  • Page 125

    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. 3. F rom the Program Managers menu bar , select “F ile/R un”. [...]

  • Page 126

    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. T o copy the link to the clipboard, from the “ Options/Driver Mess[...]

  • Page 127

    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. Note that not all of the capabilities of the Display software desc[...]

  • Page 128

    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 . Howeve r , you do n[...]

  • Page 129

    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. In this e x ampl e , data is sent to regis ters R100, R101, R102[...]

  • Page 130

    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.42 Micro PLC NET (optional): Master interface module: HE485MST232 Slave interface module: HE[...]

  • Page 131

    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. T o tr y a quick experiment, connect your PC to Micro PLC cable to[...]

  • Page 132

    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 = exit Auto Polling Operation C = Create/Change Screen file E = Execute Screen file M = Edit Messages file H = Help Esc = Back to main menu Manual Op[...]

  • Page 133

    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). When you select S, this setup window appears: Use the keys indicated t[...]

  • Page 134

    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 . AL T F7 will undo most of the block level comma[...]

  • Page 135

    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, output, or register data Setting an output low or high W riting a single register Creating or changing a register file W riting data to a register file[...]

  • Page 136

    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. Reading One W ord of Input, Output, or Register Data The R,Q, an[...]

  • Page 137

    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. A sample of this[...]

  • Page 138

    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. 156 ; This is register 15, the setpoint temperature for the donut ovens[...]

  • Page 139

    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. W riting a V alue to a Register F orcing an[...]

  • Page 140

    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 . T o create a screen, enter the following on the first 21 lines of the [...]

  • Page 141

    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. Data display formatting string (e.g. &R32H1). See page E-16. 2. Optio[...]

  • Page 142

    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. Specify how the data for that item should be displa[...]

  • Page 143

    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 . In ad[...]

  • Page 144

    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). The sc ree n an d border colors de faul t to 7,7 whi ch is recommen ded for mon oc[...]

  • Page 145

    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. Specify a Micro PLC to control system messages T rigger system message displays during A uto -polling operation System messages ar[...]

  • Page 146

    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. If you want a message to blink on the display , give it a negati[...]

  • Page 147

    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 screen W rite a data value to a register F orce an output Obtain register data from a disk file Executing an Auto-polling Screen T o exe cut e a n A ut o[...]

  • Page 148

    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. The new screen will tak e a few seconds to start up. Printing the Screen[...]

  • Page 149

    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. If all values are in range, no [...]

  • Page 150

    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 .LOG file. Each line in the .LOG file has the following format: log_data(1990,2,10,11,32,57,”&R”,1234,97,1) year month day hour minutes secs tab[...]

  • Page 151

    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. If you get a message “ERROR WRITING TO DEVICE COM1.... ”, you probably nee[...]

  • Page 152

    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 oggle Operation) Application #2: P ower Up One Shot (Start–up Protection) Application #3: Cascading Counters Application #4: Industrial “Starting C[...]

  • Page 153

    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. A typical lad- der logic is shown below . R ung 1 | I1 C2 +––|+|––[...]

  • Page 154

    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. The FLIP/FLOP program shown in Application 1 has been modified for this application. A typica[...]

  • Page 155

    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 . Rung 1 | I1 UPCTR C1 +––|+|––+–––––––+––––[...]

  • Page 156

    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. In your ap- plication other safety interlocks may need to be included in the l[...]

  • Page 157

    F F-6 Micro PLC Pr ogrammer ’ s Guide – April 1994 GFK-0804B Rung 4 | C4 C5 O1 +––| |––+––|/|––+––––––––––+–––––––+–––––––+––( )–– | Rung 5 | C5 O2 +––| |––+–––––––+–––––––––––+–––––––+–––––––+––( )[...]

  • Page 158

    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 (C1018), 1-7 creating with programming software, 4-11 Hold Output (C1021), 1-7 inter nal, 1-6 MCR/End MCR pair , 4-14 output coil, 4-12 Set/Reset pair ,[...]

  • Page 159

    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 Inclusive OR, 4-40 NOT , 4-44 Shift Register Left, 4-43 Shift Register Right, 4-42 types of , 4-38 W ord AND, 4-39 M Master Control Relay coil, 4-14 Math fu[...]

  • Page 160

    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 message), C -9 Read Registers (R TU message), C-11 Reference, enter with programming soft- ware, 4-4 Registers, 1-6 Report Device T ype (R TU Message[...]