1. Enter image register (input relay) I
(1) input image register works
Input relays the PLC interface to receive user input signal. PLC in the “relay“ and the relay in the relay control system there are essential differences, “soft relay“, which is essentially a storage unit. Each “input relay“ coil is connected to the PLC inputs (such as “enter the relay“ I0.0 coil connected to a PLC input terminals 0.0), when the external switch signal closed, “enter the relay‘s coil“, normally open contact closure in a program, normally closed contacts disconnect. Due to the storage unit can be an unlimited number of times read, so numerous to normally open, normally closed contacts for programming purposes. Be aware of when programming, “enter the relay“ coil can have an external signal to drive, cannot be used within a program instruction to drive and, therefore, should only appear in the ladder diagram prepared by the user “enter relay“ touch points, and should not appear “enter relay“ coil.
(2) the registers of the input image address assignment
S7-200 input images register area of IB0~IB15 a total of 16 bytes of memory cells. System registers on the input image is in byte (8-bit) address assignment for the unit. Enter image registers can be bitwise operations, each corresponding to a digital input points. Such as the basic unit of CPU224 input 14, requires 2×8=16, which occupies the IB0 IB1 and two bytes. I1.6, I1.7, unused because there are no actual input, user programs can’t be used. But if the byte is not used, such as IB3~IB15, can be used as an internal flag bit (m).
Enter a relay can be used, byte, Word or double word to access. Enter the address of the relay access number in the range of I0.0~I15.7.
2. register the output image (relay output)
(1) the output image register works
“Output relay“ interface that is used to signal the output to the load, each “output relay“ coil is connected to the PLC output, and there are numerous open and normally closed contacts for programming purposes. In addition, and a pair of constant open contacts connected with the PLC outputs (such as a pair of normally open relay output Q0.0 points connected with the PLC output terminals 0.0) is used to drive the load. The switching State of the output relay coil instructions to drive only within a program.
(2) the output image register address allocations
S7-200 register the output image area QB0~QB15:16 bytes of storage modules. System registers on the output image is in bytes (8-bit) address assignment for the unit. Register the output image can be a bitwise operation, each bit corresponds to a digital output points. CPU224 basic unit of output to 10, requires 2×8=16, which takes up two bytes QB0 and a QB1. Unused bits and bytes can be used as an internal flag bit in the user program.
Output relay can be used, the byte, Word or double word to access. Output relay–access the address number in the range of Q0.0~Q15.7.
Described above are two soft relay is connected with users, thus PLC with external contact window. Described below is the external device is not connected with the internal soft relay. They cannot be used to receive a signal, it also cannot be used to drive external loads, can only be used in the preparation of the program, which coils and contacts only appear in the ladder diagram.
3. the variable memory v
Variable storage is mainly used to store a variable. Can store intermediate results for an operation or set of data parameters, at the time of data processing, the variable memory is often used. Variable memory-bit addressing can also be addressed by byte, Word, double word for unit, its access number ranges vary depending on the CPU model, CPU221/222 to V0.0~V2047.7 2KB storage capacity, CPU224/226 for V0.0~V5119.7 5KB storage capacity.
4. internal flag bit memory (auxiliary relay) m
Internal logo bit memory, used to save control following electrical of middle operation State, its role equivalent to following electrical control in the of middle following electrical, internal logo bit memory in PLC in the no entered/output end and of corresponds to, its coil of pass broken state only in program internal with instruction drive, its touch points cannot directly drive external load, only in program internal drive output following electrical of coil, again with output following electrical of touch points to drive external load.
Internal flag bit memory using bit, byte, Word or double word to access. Internal flag bit memory–access the address number in the range of M0.0~M31.7 a total of 32 bytes.
5. special flag storage SM
PLC also has a number of special signs in memory, memory provides plenty of status of special signs and control functions, used to exchange information between the CPU and the user programs, special sign-bit memory to bit, byte, Word or double word to access SM of the CPU224-digit address number in the range of SM0.0~SM179.7 a total of 180 bytes. SM0.0~SM29.7–30 bytes are read–only areas.
Commonly used special memory as follows:
SM0.0: run the monitoring. SM0.0 is always “1“ State. When the PLC runs can take advantage of its contacts–driven output relay in the external display is in the running state.
SM0.1: Initializes a pulse. Whenever the PLC program begins to run, SM0.1 coil connected to a scanning cycle, so the SM0.1 contact is often used to invoke the initialization procedure.
SM0.3: when you boot into RUN through a scanning cycle, for use before starting the operation, equipment warm-up in advance.
SM0.4, SM0.5: clock pulse duty ratio is 50%. When the PLC is running, SM0.4 production cycle for the 1min clock pulse, SM0.5 produces the clock pulse period of 1s. If the count signal to pulse signal into the counter as can play the role of timer.
SM0.6: scan–clock, 1 scan cycle is closed and the other is OFF, cycling.
SM0.7: the operation mode switching position indication switches placed in the RUN position for 1.
SM1.0: zero flag, result = 0 o’clock, position 1.
SM1.1: overflow flag, result when an overflow or an illegal value, the position 1.
SM1.2: negative sign, when the result is negative, the position 1.
SM1.3: Division by 0 flags.
Other special memory use is manual.
6. local variable storage l
L local variables memory used for storing local variables, local variables memory • memory and variable v is very similar, the main difference is that global variables are global, and that the same variable can be any program (main program, subroutine, and interrupt the program). Local variables are only partially effective, that is, variables associated with specific programs.
S7-200 64 bytes of local variables memory, 60 bytes of which can be used as temporary storage, or by passing parameters to the subroutine. Back 4 bytes as system reserved bytes. PLC at run time, as needed memory dynamically allocated local variable, in the implementation of main program, 64 bytes of local variables memory allocation to the main program, when the subroutine is called or when an interrupt occurs, local variables memory allocation routine or interrupt the program.
Local memories can be bit, byte, Word, double word direct addressing, access the address number in the range of L0.0~L63.7.
• Can be used as the address pointer.
7. Timer t
PLC offers timer functions as relay time relay in the control system. Each timer can provide countless normally open and normally closed contacts for programming use. Set the time set by the program.
The current value of each timer has a 16-bit registers, used to store the cumulative time of the timer increment value (1~32767), and the other has a status bit indicates the timer status. If current value register cumulative time increment values greater than or equal to the set value, the timer status bit is set “1“, the timer normally open contact is closed.
Timer timing accuracy 1ms, 10ms, and 100ms, respectively three, CPU222, CPU224 and CPU226 timers address number in the range of T0~T225, their resolution, timing is not uniform, the user should be depending on the CPU Model time base, the correct choice of the number of timer.
8. the counter c
Counters for total count input number of pulses received from disconnected to connected. Counter offers numerous open and normally closed contacts for use in programming, its set value given by the program.
Structure of the counter and timer are basically the same, each counter has a 16-bit register is used to store the current value of counter accumulated pulse number, otherwise a status bit counter status, if the current registers accumulated pulse number greater than or equal to the set value, counters the status bit is set “1“, the normally open contact closure of this counter. Counter address number in the range of C0~C255.
9. high speed counter HC
Counter frequency under the influence of scanning cycle, not too high. High speed counter can be used to aggregate event faster than the scanning speed of the CPU. High speed counter‘s current value is a double–length (32-bit) integers, and are read–only values.
High speed counter address numbering ranges vary depending on the CPU model, CPU221/222 have 4 high-speed counters, CPU224/226 has 6 high-speed counters, the number is HC0~HC5.
10. the accumulator AC
Accumulators are used for staging data registers, which can be used to store data, the data and results. Provides 4 CPU 32-bit accumulator, the address number is AC0~AC3. The usable length as a 32-bit accumulator, access can be byte, Word, double word, press the low 8 bytes, words can only access the accumulator or the low 16 bits, DWORD can access all 32-bit accumulator.
11. s sequence control relays (components)
Sequence control relay is using stepping sequence control programming instruction important status symbol, often used with step instruction to implement order functions flow charts programming.
Control relay of addresses in the order numbers in the range of S0.0~S31.7.
12. analog input/output image register (AI/AQ)
S7-200 analog input circuit is an external input of analog signals into the digital signal into an analog input of the 1–length image register area, regional markers to AI.
Analog output circuit is analog output registers the image area 1 Word (16-bit) value converted to an analog current or voltage output, regional identifier for AQ.
16-bit digital word length in the PLC, that is two bytes, so the addresses are expressed in an even number, such as AIW0, AIW2…..;AQW0, AQW2 … …
Analog input/output is based on 2 words (w) for assigning addresses, each analog input/output using 1 Word (2 bytes). If you have 3 analog input, and will allocate 4 Word (AIW0, AIW2, AIW4, AIW6), which was not a word used by the AIW6, is not being used or assigned to subsequent modules. If there is a 1–channel analog output, will allocate 2 words (AQW0, AQW2), none of which was used contain AQW2 not being used or assigned to subsequent modules.
Analog input/output address number range depending on the CPU Model differ, CPU222 for AIW0~AIW30/AQW0~AQW30;CPU224/226 for AIW0~AIW62/AQW0~AQW62.