Siemens PLC external data BCD code input method - Database & Sql Blog Articles

Photocoupler

1BCD code data external input application design example 1.1 design ideas First introduce the physical storage area structure of SIEMENS (Siemens) plcS7-200, in general, the physical storage area is in bytes, so the storage unit is a byte unit, When the operand length is a word or double word, the memory location parameter given after the identifier is the lowest byte unit number within the word or double word. Figure 1 (a) shows the relationship and representation of bytes, words, and double words. When the data width is word or double word, it should be ensured that no overlapping memory byte allocation is generated. For example, the word address code should use even digital addresses such as MW10, MW12, MW14······ or MW11, MW13, MW15······· and other odd-numbered addresses, because the memory word MW10 occupies two bytes of MB10 and MB11, and MW11 occupies two bytes of MB11 and MB12, and there is a byte address overlapping unit MB11, so the word address is encoded. The parity cannot be used together to avoid data read and write errors. Figure 1 (b) shows the data storage structure, the upper bits of the data are represented by MSB, and the lower bits are represented by LSB.

Secondly, take the S7-200 PLC of SIEMENS (Siemens) of Germany as an example. The heating control system is constructed, and the heating time is input from the outside of the PLC using a BCD code dial of three decimal digits. The PLC input/output contact assignments are shown in the following table:

The heating element of the heating system is controlled by the PLC output point Q0.0, the system start button is input by I1.4, and the reset button is input by I1.5.

Here, two bytes of PLC input image registers IB0 and IB1 are selected as external data inputs, and external data is placed into two bytes of IB0 and IB1 by using three BCD code dials. Each BCD code dial needs to use four PLC input points. For example, the BCD code 8421 is connected to the I0.3, I0.2, I0.1, I0.0 input contacts of the PLC, and the input contact IB0 of the PLC is assigned. The lower 4 bits are the single digit of the BCD code, the upper 4 bits are the tens digit of the BCD code, the lower 4 bits of the IB1 are the hundreds digits of the BCD code, and the upper 4 bits are invalid. Use the transfer instruction to send the tens, tens, and hundreds digits to the three internal flag registers (or internal variable registers), and multiply the tens and hundreds digits of the input by the weight 10 and the weight 100, respectively. The good ones, tens, and hundred digits are added together, and the operation result is used as the heating time constant of the heater. When the user program is initialized, the PLC sends it to the heating time timer to control the heating time of the heater in real time. The PLC reads the BCD code dial data in each initialization start program. This uses the data to change the external dial. That is, the heating time can be flexibly changed.
Finally, in the program flow of Figure 2, the basic idea of ​​the external data input processing process is introduced.
1.2 User processing program The user program consists of the main program and the initialization subroutine. According to the pulse signal given by the special flag bit SMO.1 during the first scan of the program, the initialization subroutine is called to realize the data input of the BCD code. In this way, the program is no longer called in subsequent scan cycles, which reduces scan time and the program is more structured. User program description: (1) block 1 implements subroutine call function; (2) segment 2 and segment 3 implement heater heating control function, output relay Q0.0 is set by I1.4, timer T37 or I1.5 Reset, the timer constant of timer T37 is placed by internal flag register MW8; (3) Segment 5 - Segment 9 is the BCD code data input and processing subroutine. Segments 6 and 7 will save MW2, 6 and VW2 in one, ten and 100 places respectively. Segment 8 implements ten digits by 10, hundreds of digits by 100, and the operation results are respectively fed into the VD4 and VD8 functions, and the result of the one-bit, ten-digit, and hundred-digit summation is sent to MW8 as the heater heating time. (4) Paragraph 9 returns for the subroutine. The PLCS7-200 ladder program is shown in Figure 3.




2 design key skills and precautions design skills: is to use the BCD code dial, the heater heating time value is set to BCD code number, and use the PLC data transfer instructions to read into the input image register, after the operation, as a control heating The preset value of the timer is used to achieve real-time control.
Note: First of all, you should be particularly familiar with the internal structure of the PLC physical register, in order to correctly determine the relationship between the BCD code data input bit and the PLC input contact, so that it corresponds to the time constant of the timer. Secondly, this reference program reads the external data when the PLC enters the RUN state from the STOP state, so the BCD dial data can only be modified in the STOP state. If you need to change the data during the running of the program, just change the subroutine calling conditions slightly.
3 Conclusion With the wide application of PLC technology in modern industry, more and more applications are used to input and modify control data by external devices. PLC application techniques and techniques should be rapidly popularized to continuously improve the level of industrial control technology and improve labor productivity. To improve the living standards and overall national strength of the people. Above, we are exploring a simple and reliable external data input method, which can be used as reference for engineers and technicians who specialize in PLC application technology research.

Screen Protector For Samsung

A TPU Screen Protector made of the super toughness of the honeycomb structure. Its unique ultra-soft properties allow it to cover the most complex curves and contours in a device.

The self-healing design of the Hydrogel Screen Protector can protect the display screen of the device from damage, leave no air bubbles, and maintain the sensitivity of the touch screen. Advanced anti-fingerprint and dust- and oleophobic overlays keep your screen smudge- and dirt-free. This overlay is also important in providing maximum touch sensitivity for improved high-speed glide and optimal touch response.

The optical transparency of the Hydrogel Film is more than 90%, showing you the most original screen color and bringing the most realistic visual experience.

If you want to know more about the product information of the Hydrogel Screen Protector for Samsung, please click the product details to view the parameters, model, picture, price and other information of the Samsung Screen Protector.
Whether you are a group or an individual, we will do our best to provide you with accurate and comprehensive information about Hydrogel Screen Protectors!

Screen Protector For Samsung,Hydrogel Screen Protector for Samsung,TPU Screen Protector for Samsung,Hydrogel Film for Samsung

Shenzhen Jianjiantong Technology Co., Ltd. , https://www.jjthydrogelprotector.com