Siemens S7-200PLC special instructions - Solutions - Huaqiang Electronic Network

Photocoupler

(1) Digital input and output image area
1. Input image register (digital input image area) (I)
The digital input image area is a memory area that the S7-200 CPU opens for the input signal state. The input image register has an identifier of I. At the beginning of each scan cycle, the CPU samples the input point and stores the sampled value in the input image register.
The input image register is a window in which plc receives an externally input binary signal.
It can be accessed in four ways: bit, byte, word, and double word.
(1) Press "bit" mode: from I0.0~I15.7, there are 128 points (2) according to the "byte" mode: from IB0~IB15, there are 16 bytes (3) according to the "word" mode: From IW0~IW14, there are 8 words (4) according to the "double word" mode: from ID0~ID12, there are 4 double words
2. Output image register (Q)
The digital output image area is a memory area that the S7-200 CPU opens for the output signal state. The output image register identifier is Q (from Q0.0 to Q15.7, a total of 128 points). At the end of each scan cycle, the CPU transfers the data of the output image register to the output module, which then drives the external load. .
It can be accessed in four ways: bit, byte, word, and double word.
(1) Press "bit" mode: from Q0.0~I15.7, there are 128 points (2) according to the "byte" mode: from QB0~QB15, there are 16 bytes (3) according to the "word" mode: From QW0~QW14, there are 8 words (4) according to the "double word" mode: from QD0~QD12, there are 4 double words: the actual unused input and output channel of the image area can be used as intermediate relay use.
(2) Analog input image area and output image area
1. Analog input image area (AI area)
The analog input image area is a memory area that the S7-200 CPU opens for the analog input signal. The S7-200 converts the measured analog quantity (such as temperature and pressure) into a digital word length (2 bytes). The analog input image register uses the identifier (AI), data length (W) and word. The starting address of the section is indicated.
From AIW0~AIW30, there are 16 words in total, and a total of 16 analog inputs are allowed.
Description: The analog input value is read-only data.
2. Analog output image area (AQ area)
The analog output image area is a memory area that the S7-200 CPU opens for analog output signals. The S7-200 converts the digital quantity of one word long (2 bytes, 16 bits) into a current or voltage. The analog output image register is represented by an identifier (AQ), a data length (W), and a starting address of the byte.
From AQW0~AQW30, there are 16 words in total, and a total of 16 analog outputs are allowed.
(3) Variable memory (V) (equivalent to internal auxiliary relay)
During the execution of the PLC, there will be some intermediate results of the control process. These intermediate data also need to be saved by memory. The variable memory is designed according to this actual requirement. The variable memory is a storage area established by the S7-200 CPU to store intermediate variable data, and is represented by V.
It can be accessed in four ways: bit, byte, word, and double word.
(1) According to the "bit" mode: from V0.0 to I5119.7, there are 40,960 points. The CPU221 and CPU222 variable memory has only 2048 bytes, and its variable storage area can only reach V2047.7 bits.
(2) Press "Byte" mode: from VB0~VB5119, there are 5120 bytes (3) Press "word" mode: from VW0~VW5118, there are 2560 words (4) Press "double word" mode: from VD0 ~VD5116, a total of 1280 double word (four) bit memory (M) area
During the execution of the PLC, some flag bits may be used. These flags also need to be stored in memory. The bit memory is designed according to this requirement. The bit memory is a memory area established by the S7-200 CPU to save flag data, and is represented by M. Although the area is called a bit memory, the data therein can be not only a bit, but also a byte, a word or a double word.
(1) According to the "bit" mode: from M0.0 to M31.7, there are 256 points.
(2) Press "byte" mode: from MB0~MB31, there are 32 bytes (3) according to "word" mode: from MW0~MW30, there are 16 words (4) according to "double word" mode: from MD0 ~MD28, a total of 8 double words (5) sequential control relay area (S)
Sequence control may be used during PLC execution. The sequence control relay is designed according to the characteristics and requirements of the sequence control. The sequence control relay area is a storage area established by the S7-200 CPU for sequentially controlling the relay data, denoted by S. Used to organize the control of the stepping process during the sequence control process.
It can be accessed in four ways: bit, byte, word, and double word.
(1) According to the "bit" mode: from S0.0 to S31.7, there are 256 points.
(2) Press "byte" mode: from SB0~SB31, there are 32 bytes (3) according to "word" mode: from SW0~SW30, there are 16 words (4) according to "double word" mode: from SD0 ~SD28, there are 8 double words (six) local memory area (L) (equivalent to internal auxiliary relay)
The S7-200 PLC has 64 bytes of local memory, 60 of which can be used as temporary memory or to pass parameters to subroutines.
Local memory and variable memory are very similar, the main difference is that variable memory is globally valid, while local memory is locally valid. Global means that the same memory can be accessed by any program (for example, main program, subroutine or interrupt program). Partially directs the memory area to be associated with a particular program.
There is no way to exchange visits between several programs.
The local memory area is a storage area established by the S7-200 CPU for local variable data, denoted by L. The data of this area can be accessed in four ways: bit, byte, word, and double word.
(1) According to the "bit" mode: from L0.0 to L63.7, there are 512 points.
(2) Press "byte" mode: from LB0~LB63, there are 64 bytes (3) according to "word" mode: from LW0~LW62, there are 32 words (4) according to "double word" mode: from LD0 ~LD60, a total of 16 double words (seven) timer memory area (T)
The PLC needs to be timed in the work. The timer is the timing device that realizes the timing function of the PLC. Timer number:
T0, T1, ..., T255
The S7-200 has 256 timers.
(8) Counter memory area (C)
PLCs sometimes need not only timing, but also counting functions. The counter is the counting device that the PLC has a counting function.
Counter number:
C0, C1, ..., C255
(9) High-speed counter area (HSC)
High-speed counters are used to accumulate events that are faster than the CPU scan rate. The S7-200's high-speed counters not only count frequencies up to 30kHz.
Each S7-200 high-speed counter has the current value of a 32-bit signed integer counter. To access the value of the high-speed counter, the address of the high-speed counter, the number of the high-speed counter, must be given.
The high-speed counters are numbered HSC0, HSC1, ..., HSC5.
The S7-200 has six high-speed counters. The CPU221 and CPU222 have only four high-speed counters (HSC0, HSC3, HSC4, HSC5).
(10) Accumulator Area (AC)
An accumulator is a device that can read/write like a memory. For example, you can use an accumulator to pass parameters to a subroutine, or to return parameters from a subroutine, and to store intermediate data for calculations.
The S7-200 CPU provides four 32-bit accumulators (AC0, AC1, AC2, AC3).
The data in the accumulator data can be accessed in bytes, words or double words. However, when reading/writing data in the accumulator in bytes, only the lowest 8 bits of the 32-bit data of the accumulator can be read/written. If the data in the accumulator is read/written in word form, only the lower 16 bits of the 32-bit data of the accumulator can be read/written. All 32-bit data can be read and written at a time only when the data in the accumulator is read/written in the form of a double word.
Because the computing function of the PLC is inseparable from the accumulator. Therefore, there is no occupation of the accumulator as it does for other memories.
(11) Special Memory Area (SM)
Special memory is the medium through which the S7-200PLC communicates information between the CPU and the user program. They can reflect various state information of the CPU in operation, and the user can judge the working state of the machine based on the information, thereby determining what the user program should do and what not to do. These special information also need to be stored in memory. Special memory is designed according to this requirement.
1. Special memory area It is a storage area established by the S7-200PLC to save its own working status data, which is represented by SM. Some of the data in the special memory area is readable and writable, and some are read-only. The data in the special memory area can be either a bit, a byte, a word or a double word.
(1) According to the "bit" mode: from SM0.0 to SM179.7, a total of 1440 points.
(2) Press "byte" mode: from SM0~SM179, there are 180 bytes (3) according to "word" mode: from SMW0~SMW178, there are 90 words (4) according to "double word" mode: from SMD0 ~SMD176, a total of 45 double words: the first 30 bytes of the special memory area is a read-only area.
2. Commonly used special relays and their special memory are used to exchange information between the CPU and the user. For example, SM0.0 is always in the "1" state, and SM0.1 is only in the "1" state during the first scan cycle of executing the user program. SM0.4 and SM0.5 provide clock pulses with periods of 1 min and 1 s, respectively. SM1.0, SM1.1, and SM1.2 are the zero flag, the overflow flag, and the negative flag, respectively.

LED Flood Light

Photographic Lamp,Best Led Flood Light,Led Security Flood Light,Commercial Led Flood Lights

SHAOXING SHANGYU FEIXIANG PHOTOGRAPHIC CO.,LTD , https://www.flying-photography.com