Today I will share with you an example of Siemens S7-300PLC analog quantity, which includes the following points:
1. Take the value of the transmitter and control it
2. Call the modulus function block FC105
3. Set up the AI module
4. Select the AI range block
In this example, a flow control loop is debugged. The flow transmitter outputs a 2-2-MA DC signal to the SM331 analog input module. The module converts the signal into a floating point number. Then, FC105 is called in the program to convert the value into an engineering quantity. We can then monitor the flow value in the actual project.
The analog AI uses the SM311 module, which is 8x12Bit (8 channels, 12 bits). The corresponding part number is 6ES7 331-7KF02-OABO. In analog-to-digital conversion, the voltage or current value taken out by the sensor or transmitter is converted to the AI module, and then the value is transmitted to the Siemens CPU for processing, so as to detect the value of the control sensor, as shown in the figure.
Analog Input Modules
Analog input is used to connect voltage and current sensors, thermocouples, resistors and thermal resistors, and to connect PLC to analog process signals. The analog input module is shown in Figure 2-1, which converts the analog signal sent from the process into a digital signal for internal processing of the PLC. The SM311 input module used in this project is shown in the figure. This module has the following features: Resolution is 9 to 15 bits + sign bit (for different conversion times), and different measurement ranges can be set. The basic measurement range of current/voltage can be mechanically adjusted through the range module. Fine-tuning can be performed using the STEP 7 hardware configuration tool.
The module sends diagnostic and limit-exceeding interrupts to the CPU of the programmable controller. The module sends detailed diagnostic information to the CPU.
Wiring method of analog input module
Both the two-wire current and the four-wire current have only two signal wires. The main difference between them is that the two signal wires of the two-wire current not only supply power to the sensor or transmitter, but also provide current signals, while the two signal wires of the four-wire current only provide current signals. Therefore, sensors or transmitters that usually provide two-wire current signals are passive, while sensors or transmitters that provide four-wire current signals are active.
Therefore, when the template input channel of the PLC is set to connect a four-wire sensor, the PLC only collects analog signals from the terminals of the template channel, as shown in Figure 2-3. When the template input channel of the PLC is set to connect a two-wire sensor, as shown in Figure 2-2, the channel of the PLC analog input template also outputs a DC 24V power supply to drive the two-wire sensor to work.
Sensor model: ● Two-wire system (needs to supply 24vDC power, output signal is 4-20MA, current) that is, + is connected to 24vdc, negative output is 4-20mA current. ● Four-wire system (has its own power supply, generally 220vac, signal line output + is 4-20ma positive, - is 4-20ma negative.
1. PLC: (Take 2 positive and 3 negative as an example), in two-wire system, positive pole 2 outputs 24VDC voltage, and 3 receives current, so when encountering a two-wire sensor, one connection method is to connect 2 to the positive of the sensor and 3 to the negative of the sensor; the jumper is a two-wire current signal. The other connection method is to leave 2 suspended and connect 3 to the negative of the sensor, and at the same time, the positive of the sensor should be connected to the 24vdc in the cabinet; the jumper is a two-wire current signal.
2. (Take 2 positive and 3 negative as an example), in the four-wire system, the positive pole 2 is the receiving current, and 3 is the negative pole. (The advantage of the four-wire system is that when the negative pole signal of the sensor and the M in the cabinet are at different levels, it will not affect the accuracy greatly, because it is the current loop of the sensor itself) When encountering a four-wire sensor, one method is to connect 2 to the positive of the sensor, 3 to the negative of the sensor, and the PLC jumper is a four-wire current.
"The sensor is connected to 3 of the PLC, 2 is left floating, and the jumper is for two-wire current." This rule is applicable to both four-wire and two-wire sensors. You can try it yourself and post a recommendation if you find it useful.
3. (Take 2 positive and 3 negative as an example), the jumper connection method between the four-wire sensor and the PLC two-wire system: the negative signal line is connected to the M line in the cabinet. Connect the positive sensor to the 3 of the PLC, leave 2 hanging, and the jumper is a two-wire current.
4. (Take 2 positive and 3 negative as an example), voltage signal: 2 is connected to the positive of the sensor, 3 is connected to the negative of the sensor, and the PLC jumper is a voltage signal.
Setting the range card The range card is installed on the left side of the template. The allowed settings are "A", "B", "C" and "D", which are suitable for different measurement types and ranges. It must be set correctly before installing the template. The analog template without range card has different wiring terminals for voltage and current measurement. In this way, the type of measurement can be set by correctly connecting the relevant terminals. Brief instructions on setting different measurement types and measurement ranges are printed on the template. For this project, the water level measurement uses a two-wire transmitter, so "D" is selected, as shown in Figure 2-4.
Input module settings After setting up the rack in the "Hardware" interface, double-click the input module "ATBx12bit", as shown below:
Double-click the input module and an execution box will pop up. Click "Address" and change the start address to "256" as shown below:
After changing the address, click "Input" and click "2DMU" in "Measurement Model" to set the sensor type. (This time, a two-wire transmitter is used). As shown below: AI system Create a Siemens hardware module After adding the power supply and CPU, select the AI module in the configuration file as shown in Figure 4-1
When the addition is complete, this module will appear in the hardware system as shown in Figure 4-2
After this operation is successful, double-click to select and enter the settings in the dialog box. See Figure 4-3
After completing the selection, click OK, and then you can write the program.
AI program The AI module program in S7-300 has been written by the manufacturer. You only need to call the function module. The calling method is shown in Figure 4-4.
Find the FC105 function block in the lower dialog box of Figure 4-4, as shown in Figure 4-5
IN: Enable terminal. HI_LIM: High line. L0_LIM: Low line. BIPOLAR: Polarity. RET_VAL: Error storage. OUT: Output value (liquid level).
Previous article:Analysis of VR control application of SEW-movifit inverter
Next article:Application of PoE Technology in Industrial Systems
Recommended ReadingLatest update time:2024-11-16 11:36
- 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
- Notes on using wireless instead of wired devices with modbus RTU protocol
- TI Texas Instruments CCD
- Design scheme based on embedded processor PowerPC7447
- 8-channel 5G ADC and 8-channel 10G DAC PCIe card based on RFSOC
- State Council: my country's chip self-sufficiency rate will reach 70% by 2025
- Output problem of triode common emitter amplifier circuit
- How to migrate custom logic from FPGA/CPLD to C2000 microcontroller
- There are some problems with this flyback power supply circuit
- Serial LCD1602 using STM32-CUBE has pitfalls
- Classic experimental case of power amplifier (1) piezoelectric ceramic drive!