Siemens S7-200 SIMATIC PLC instruction list
Detailed explanation of S7-200SMART series PLC bit logic operation instructions and bit read and write operations
The bit logic instructions of Siemens s7-200SAMRT are the most frequently used in PLC. Except for some very special program segments, it can be said that every ladder diagram program segment cannot do without bit logic instructions. As the name implies, the object of the bit logic instruction operation is the binary bit in the register storage unit. The essence of the bit logic operation instruction is to find the specified bit through bit addressing, read or change the state of the bit (0 or 1). The logical operations between bits are mainly AND, OR, and NOT operations.
1. Reading and writing bits. In the ladder diagram, reading bits means placing contacts, and writing bits means placing coils. As shown in the figure below, in the first program segment, we first read the binary bit I0.0 (that is, the 0th bit of every 0th byte of our process image input register) by placing contact I0.0. The corresponding object is input I0.0, and its state is written to M0.1 of the flag register. The second program segment is to copy the current value of M0.1 to Q0.0. So we have to remember which contact to place to read the bit, and which coil to place to write a bit.
Programming Examples
In the STL instruction, place the contact, use the LD instruction, LOAD means, LD I0.0 means to read the value of I0.0 and load it into the stack. = M0.1 means to make the value of M0.1 equal to the value at the top of the current stack.
STL directives
2. AND operation, series connection is AND operation. A and B, when AB are both 1, the operation result is 1, otherwise it is 0. As shown in the figure below: SM0.0 and M0.1 are connected in series for AND operation, and the operation result is written into Q0.0. If SM0.0 and M0.1 are both 1, Q0.0=1, if either SM0.0 or M0.1 is 0, Q0.0=0.
3. OR operation, parallel connection is OR operation. A or B, the operation result is 0 only when A and B are both 0, otherwise it is 1. As shown in the figure below: I0.0 and I0.1 are connected in parallel to do AND operation, and the operation result is written into Q0.1. If the values of I0.0 and I0.1 are both 0, then Q0.1=0, if any bit state of I0.0 and I0.1 is 1, then Q0.1=1.
AND operation
In STL instructions, A XX.X is an AND operation, and O XX.X is an OR operation.
4. Negation operation, which is negation, turns 1 into 0 and 0 into 1. The program in the figure below is to perform the OR operation first and then negate it.
5. Rising and falling edge instructions, positive jump contact instructions (rising edge) allow energy to flow for one scan cycle after each disconnection to connection transition. Negative jump contact instructions (falling edge) allow energy to flow for one scan cycle after each connection to disconnection transition.
6. Set and reset instructions, Set (S) and Reset (R) instructions are used to set (turn on) or reset (turn off) a group of bits (N) starting from a specified address (bit). You can set or reset 1 to 255 bits. If the reset instruction specifies a timer bit (T address) or a counter bit (C address), the instruction will reset the timer or counter bit and clear the current value of the timer or counter.
Previous article:Winding design and skin effect of flat wire motor
Next article:A brief discussion on the low-level errors in start-stop and self-locking circuits when programming PLC
Recommended ReadingLatest update time:2024-11-16 14:26
- Popular Resources
- Popular amplifiers
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Examples of Qorvo solutions for NB-IoT RF front-ends
- Are eMMC 4.0 and 5.0 compatible?
- MCU driver GEC6818 program development record
- How smart stores equipped with multiple sensors make shopping a breeze
- Showing off the products + CSR development board 10 years ago, when the Bluetooth market was just beginning to develop!
- LIN communication wake-up question
- Can someone please help me analyze this transistor circuit? Is this parallel voltage negative feedback or parallel current negative feedback?
- 6410 Bare Metal Program
- A 25-year-old DJI employee died suddenly of cardiac arrest, having just graduated with a master's degree
- C2000 chip calculation skills and precautions