1. Unified program structure
OB1: main program;
OB100: Initialization program (no need to call the main program);
OB35: 100ms (modifiable) interrupt (no need to call the main program), can call the PID module;
OB80, OB82, OB85, OB86, OB87, OB121, OB122: fault diagnosis module (no need to call the main program, no need to program);
FC1: system mode;
FC2: input processing;
FC3: output processing;
FC4: Run processing;
FC5: stop processing;
FC6: manual-automatic switching;
FC100: Later used to create some subroutines that can be called cyclically;
FC105: system built-in, analog input subroutine (can be called cyclically);
FC106: System built-in, analog output subroutine (can be called cyclically);
Modbus communication (CP341): FB7: P_RCV_RK, FB8: P_SND_RK;
Communication CP340: FB2: P_RCV, FB3: P_SND;
General PID: use FB41;
Temperature and humidity PID: use FB58;
If the program block overlaps with the system block, avoid it.
2. Data Block
DB1: AI data, type: REAL, interface with host computer;
DB2: AO data, type: REAL, interface with host computer;
DB3: DI data, type: BOOL, interface with host computer;
DB4: DO data, type: BOOL, interface with host computer;
DB5: Equipment running time and flow accumulation, type: REAL, interface with host computer;
DB6: alarm message, type: BOOL, interface with host computer;
DB7: Type: REAL, intermediate register;
DB8: Type: INT, intermediate register;
DB9: Type: WORD, middle register;
DB10: Type: BOOL, intermediate register;
DB11: used for communication with the device, such as MODBUS communication, etc.
DB100: Later used as background data block when calling FB block;
M area: also serves as an intermediate variable.
3. DP slave fault diagnosis
The DP slave station must perform fault diagnosis and fault alarm, which can be done using FB125.
1. Control mode
1. System settings remote/local/manual buttons
1.1. Remote control: The system can only be started/stopped automatically through the host computer. Local control of a single device is preferred. When program control is in progress, the device can be switched between manual and automatic operation and started/stopped manually through the host computer.
1.2. Local: The system can only be automatically started/stopped through the touch screen. Local control of a single device is given priority. When program-controlled, the device can be switched between manual and automatic operation and started/stopped through the touch screen.
1.3. Manual: During manual control, the host computer/touch screen is invalid and the device can only be started/stopped manually.
2. Single device control
A single device must have the function of soft manual/automatic switching and start/stop during soft manual operation. When switching from automatic to soft manual operation, the device cannot be shut down; when switching from soft manual operation to automatic, the start/stop of the device depends on the automatic program.
3. Single device
(Pumps, fans and other large equipment) must be rotated after running for 24 hours, and the running time must be accumulated, unless the start/stop sequence is set by the host computer, which is set by the operator;
2. Programming skills
1. Make the program blocks as detailed as possible for easy reading, and put the same type of device controls in one program block;
2. If language programming is used under special circumstances, in most cases, ladder diagram programming should be used to facilitate reading by others;
3. For frequently called subroutines, they can be made into submodules and called frequently, for example: finding the average of several numbers or the maximum of several numbers;
4. The program must be annotated, and the variables and intermediate variables must be described to facilitate others to read or refer to it later;
5. Back up the program regularly, preferably with project name + system name + today's date;
6. The program is encrypted to prevent others from stealing.
Siemens PLCs are classified according to the control scale: they can be divided into large, medium and small machines.
Minicomputer: The control points of a minicomputer are generally within 256 points, which is suitable for single-machine control or small system control.
Siemens minicomputers include S7-200: processing speed 0.8~1.2ms; memory 2k; digital quantity 248 points; analog quantity 35 channels.
Medium-sized machine: The control points of a medium-sized machine are generally no more than 2048 points. It can be used to directly control the equipment and monitor multiple next-level programmable controllers. It is suitable for medium or large control systems.
Siemens mid-range computers include S7-300: processing speed 0.8~1.2ms; memory 2k; digital quantity 1024 points; analog quantity 128 channels; network PROFIBUS; industrial Ethernet; MPI.
Mainframe: The control points of a mainframe are generally greater than 2048 points. It can not only complete more complex arithmetic operations but also perform complex matrix operations. It can not only be used to directly control the equipment, but also monitor multiple next-level programmable controllers.
Siemens mainframes include S7-400: processing speed 0.3ms/1k words;
Storage: 512k; I/O points: 12672.
Previous article:Application of AI/AO Cards in PLC System
Next article:Siemens S7-300 PLC wiring diagram
Recommended ReadingLatest update time:2024-11-16 09:18
- 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
- DIY IP5306 power bank, the discharge current is too small (only 300ma) (with schematic diagram)
- What type of chip does SH366002 replace?
- [RVB2601 Creative Application Development] Build CDK Development Environment
- This strange cut made the PCB hang inexplicably
- It seems that I have a good relationship with Shide——Part 2
- 【Silicon Labs BG22-EK4108A Bluetooth Development Review】I. Hardware Appreciation and Development Environment Introduction
- [ESP32-S2-Kaluga-1 Review] 4. LCD example compilation pitfalls
- HuaDa MCU FLASH operation instructions and precautions
- I am working on a product for traffic security equipment recently. The project has high safety requirements and heavy tasks. I am having a headache recently...
- Several issues on key-controlled 8X8LED dot matrix screen displaying graphics program