4-4
S7-200 Programmable Controller, CPU 210
C79000-G7076-C235-01
4.2
Concepts for Creating a Program
Relating the Program to Inputs and Outputs
Figure 4-2 shows a simple diagram of how an electrical relay diagram relates to the
CPU 210. In this example, the state of the operator panel switch for opening the drain is
added to the states of other inputs. The calculations of these states then determine the state
for the output that goes to the solenoid that closes the drain. The CPU continuously cycles
through the program, reading and writing data.
The execution of the program follows a simplified flow of information: the state of the physical
input is copied to the memory area
'
the CPU 210 executes the program
'
whenever the
program modifies an output, the CPU 210 immediately updates the physical output. Each
memory area is assigned a mnemonic identifier (such as “
I
” for input) that is used for
accessing the data stored in that area of memory.
S
Drain Solenoid
Operator Station
Input
Area
CPU 210
Input
Output
Opn_Drn_PB
Drain_Sol
Cls_Drn_PB
A_Mtr_Fbk
Drain_Sol
E_Stop_On
Figure 4-2
Relating the Program to Inputs and Outputs
Accessing Data in the Memory Areas
All of the memory areas of the CPU 210 have “absolute” addresses. You access a specific
location by entering an address (such as
I0.0
for the first input point). An absolute address
for a memory area includes not only the area identifier (such as “M”), but also the size of data
to be accessed: W (word: two bytes). (The CPU 210 provides 3 words or 48 bits for the
M memory area.) The absolute address also includes a numeric value: either the number of
bytes from the beginning of the memory area (offset) or the device number. (This value is
dependent on the area identifier. See Section 4.5.)
Basic Concepts for Programming the CPU 210
Содержание Simatic S7-200 CPU 210
Страница 10: ...x S7 200 Programmable Controller CPU 210 C79000 G7076 C235 01 Contents ...
Страница 68: ...3 28 S7 200 Programmable Controller CPU 210 C79000 G7076 C235 01 Getting Started with a Sample Program ...
Страница 116: ...A 16 S7 200 Programmable Controller CPU 210 C79000 G7076 C235 01 CPU 210 Data Sheets ...
Страница 126: ...F 2 S7 200 Programmable Controller CPU 210 C79000 G7076 C235 01 CPU 210 Order Numbers ...
Страница 138: ...Index 12 S7 200 Programmable Controller CPU 210 C79000 G7076 C235 01 Index ...