Three large quantities in PLC programming

One, PLC in the three large quantities

Nothing more than three large amounts in PLC: switch, analog, pulse. Only by clarifying the relationship between the three, you can master the PLC.

1, the amount of switching is also called logic, refers to only two values, 0 or 1, ON or OFF. It is the most commonly used control. Controlling it is the advantage of PLC and it is also the most basic application of PLC.

The purpose of the switch control is to make the PLC generate the corresponding switch output according to the current input combination of the switch quantity and the history input sequence, so that the system can work in a certain order. Therefore, it is sometimes called sequential control. The sequence control is divided into manual, semi-automatic or automatic. The control principles used are decentralized, centralized and hybrid control.

2. Analog quantity refers to some continuously changing physical quantities such as voltage, current, pressure, speed, and flow.

PLC is developed after the introduction of micro-processing technology into the relay control, and can be conveniently and reliably used for switching control. Because the analog quantity can be converted into digital quantity, the digital quantity is only the switching quantity of many digits, so after the analog quantity after conversion, PLC can also carry on processing control reliably. Analogous control is sometimes referred to as process control because continuous production processes often have analog quantities.

Most of the analog quantity is non-electricity, while the PLC can only handle digital quantity and quantity of electricity. All the conversions between them need to have sensors to convert the analog to digital power. If this power is not standard, but also through the transmitter, the non-standard power into standard electrical signals, such as 4-20mA, 1-5V, 0-10V and so on.

At the same time, there must also be analog input units (A/D) to convert these standard electrical signals into digital signals; analog output units (D/A) to convert PLC-processed digital quantities to analog quantities - standard The electrical signal.

Therefore, the conversion between standard electrical signals and digital quantities requires various operations. This requires a clear understanding of the resolution of the analog unit and the standard electrical signals. E.g:

The resolution of the PLC simulation unit is 1/32767, and the corresponding standard power is 0-10V. The temperature value to be detected is 0-100°C. Then 0-32767 corresponds to the 0-100 °C temperature value. Then calculate the corresponding digital quantity of 1 °C is 327.67. If you want to make the temperature value accurate to 0.1°C, put 327.67/10.

Analog control includes: feedback control, feedforward control, proportional control, fuzzy control and so on. These are the calculation of the internal digital quantity in the PLC.

3. The pulse quantity is a digital quantity whose value always alternates between 0 (low level) and 1 (high level). The number of alternating pulses per second is called the frequency.

The purpose of controlling the amount of PLC pulse is mainly position control, motion control, trajectory control, and the like. For example: Application of pulse number in angle control. The subdivision of the stepper motor driver is 10,000 per turn, requiring the stepper motor to rotate 90 degrees. Then the pulse number to be acted = 10000/(360/90) = 2500.

Second, the calculation of analog

1,-10-10V. The voltage of -10V to 10V is converted to F448-0BB8Hex (-3000-3000) at a resolution of 6000; it is converted to E890-1770Hex (-6000-6000) at a resolution of 12000.

2,0-10V. The 0-10V voltage is converted to 0-1770 Hex (0-6000) at 12000 resolution and 0-2EE0Hex (0-12000) at 12000 resolution.

3, 0-20mA. 0 - 20mA current is converted to 0 - 1770 Hex (0 - 6000) at 6000 resolution and 0 - 2EE0Hex (0 - 12000) at 12000 resolution.

4, 4-20mA. The 4-20mA current is converted to 0-1770 Hex (0-6000) at 6000 resolution and 0-2EE0Hex (0-12000) at 12,000 resolution.

The above is only a brief introduction, different PLCs have different resolutions, and the physical range you measure is not the same. There may be some differences in the calculation results.

Note: Requirements for the wiring of analog inputs

1. Use shielded twisted pair but no shield.

2. When an input is not used, short the V IN and COM terminals.

3. The analog signal line is isolated from the power line (AC power line, high voltage line, etc.).

4. When there is interference on the power line, install a filter between the input section and the power supply unit.

5. After confirming the correct wiring, first power on the CPU unit and then power the load.

6, cut off the power of the load first, and then cut off the power of the CPU.

Third, the calculation of pulse amount

The control of pulse quantity is mostly used for angle control, distance control, and position control of stepping motors and servo motors. The following is a stepper motor as an example to illustrate each control method.

1. Stepping motor angle control. First of all, it is necessary to specify the number of subdivisions of the stepper motor, and then determine the total number of pulses required for the stepper motor to make one revolution. Calculate "Angle percentage = set angle / 360° (ie, one revolution)" "Angle action pulse number = Total number of pulses in one revolution * Angle percentage."

The formula is: the number of angular action pulses = the total number of pulses in a circle* (setting angle/360°).

Stepping motor distance control. First, the total number of pulses required for a stepper motor to make a revolution is determined. Then determine the stepper motor roller diameter, calculate the roller circumference. Calculate the distance traveled for each pulse. Finally, the number of pulses to be run at the set distance is calculated.

The formula is: set distance pulse number = set distance / [(roller diameter * 3.14) / total number of pulses in one circle]

3, stepper motor position control is a combination of angle control and distance control.

The above is only a simple analysis of the control method of the stepper motor, and may differ from the actual ones, and is only for your colleagues' reference.

The operation of the servo motor is the same as that of the stepping motor, but consider the internal electronic gear ratio of the servo motor and the reduction ratio of the servo motor.

Hydraulic Station

Hydraulic Station,Hydraulic Cylinder,Hydraulic Pump Station,Power Hydraulic Station

Ningbo junfa CNC Equipment Co. Ltd. , https://www.intimecnc.com