The use of analog signals and digital signals is essential. For analog signals and digital signals, the introduction of analog signals and digital signals in this article is to explain how analog signals are processed.

An analog signal is one in which the information parameters appear as continuous signals within a given range. Or in a continuous time interval, the characteristic quantity of its representative information can be presented as a signal of any value at any instant.

Analog signal refers to the information expressed by continuously changing physical quantities, such as temperature, humidity, pressure, length, current, voltage, etc. We usually call analog signal a continuous signal, which can have infinite value within a certain time range multiple different values. The digital signal refers to a discrete, discontinuous signal in value.

Various physical quantities in actual production and life, such as the image captured by the camera, the sound recorded by the tape recorder, the pressure, flow t, speed, humidity, etc. recorded in the workshop control room, are all analog signals. The digital signal is formed by sampling, quantization and encoding on the basis of the analog signal. Specifically, sampling is to press the input analog signal. Appropriate time intervals to obtain sample values at each moment. Quantization is to represent the value of each moment measured by sampling with a binary code system, and encoding is to arrange the binary numbers generated by t-quantization together to form a sequential pulse sequence.

In the process of analog signal transmission, the information signal is first converted into an almost “identical” fluctuating electrical signal (so called “analog”), and then transmitted by wired or wireless means. After the electrical signal is received, it is restored to information signal.

Most of the signals encountered in practice are analog signals, and these signals, which vary continuously in time and amplitude, are processed using an electrical network containing active and passive circuit elements. This approach is called Analog Signal Processing (ASP, Analog Signal Processing), and radio and television receivers, for example, belong to this category.

They can be processed by digital hardware or dedicated microprocessors utilizing adders, multipliers and logic elements. However, the analog signal needs to be converted into a form suitable for digital hardware, and this form of signal is called a digital signal. Such a signal takes on one of a finite number of values at a particular moment in time, so it can be represented by binary numbers (or bits). The processing of this digital digital signal is called DSP and is represented in block diagram form as:

PtF: is a prefilter or anti-aliasing filter that controls the analog signal to prevent aliasing;

ADC: analog-to-digital converter, analog-to-digital converter, used to generate a stream of binary values from an analog signal;

DSP: The core part of DSP, which can represent a computer or special processor, or digital hardware, etc.;

DAC: The inverse operation of ADC, digital-to-analog converter, which generates a staircase waveform (as shown below) from a sequence of binary numbers, which is the first step towards generating an analog signal;

PoF: postfilter, post filter, used to smooth the staircase waveform to the desired analog signal;

(1) Nyquist sampling theorem

The conversion from analog to digital involves two processes of “sampling” and “quantization”, through which the sound is converted into a bit stream.

Sampling: Take N time points at equal intervals from the time axis, and then obtain the value of the original analog signal at the N time points. This process is called sampling;

Then, how many points should be taken so that the information contained in the original continuous time signal will not be lost. Nyquist gives an argument, if a signal is band-limited (bounded bandwidth, the Fourier transform has a value (f) in a certain limited frequency band, and all outside are 0), if the samples sampled are dense enough (The sampling frequency is greater than twice the signal bandwidth, 2f), then the signal can be restored without distortion. This conclusion is called the Nyquist sampling theorem.

The frequency of human sound is generally: 85 – 1100hz, and 1-4kHz is also a very sensitive frequency range for the human ear. According to the Nyquist sampling frequency, 8kHz sampling can meet the needs of mobile phone calls.

In fact, the sampling frequency of GSM mobile phones specified by the GSM specification is exactly 8kHz;

(2) S7-200 range conversion

1. Engineering quantity: refers to the physical quantity before quantification in engineering design, such as temperature, pressure, flow rate, rotational speed, wind speed, liquid level, differential pressure, etc.;

2. Analog: refers to the standard DC signal output by the sensor, such as 0–20MA, 4–20MA, 0–10V, 1–5V, etc.

3. Digital value (quantized value): refers to the value corresponding to the analog value, such as 0-10V analog value corresponds to 0-32000 digital value;

4. Range: the upper limit of the engineering quantity minus the lower limit of the engineering quantity; 5. Value range: the upper limit of the digital quantity minus the lower limit of the digital quantity;

6. Range conversion: The method of converting the digital quantity on the analog quantity address into the engineering quantity after the arithmetic operation instruction of the PLC.

(3) The process of S7-200PLC range conversion

(4) Relationship between S7-200PLC analog signal and digital signal

(5) Range conversion formula and its usage Range conversion formula

(6) How to use the range conversion formula

A project uses CPU224 to expand the EM235 module to measure temperature, the measurement range of the temperature sensor is -50 ℃—-+120 ℃, the signal output is 0—-10V, and it is connected to the input port A of the analog module (address AIW0), assuming AIW0= 10000, what is the temperature at this time? According to the given conditions: yH=120.0℃, yL=-50.0℃, xH=32000.0, xL=0.0, x=10000.0, then y=3.12℃

(7) Programming method of S7-200PLC range conversion

1. Read the data of the analog address and convert it to floating point and store it in the VD0 address

2. Convert the obtained digital quantities into engineering quantities (range conversion), first assign addresses to each variable and arrange them in the V area, the intermediate results are arranged in the M area, the final results are stored in the VD4 address, and the HMI reads the VD4 address. Get the engineering value. X=VD0, Y=VD4

Before the S7-200PLC can perform a mathematical operation, the data must be converted into the same type of data before performing the operation. If you are not particularly familiar with the data type, convert the data to floating-point numbers before performing the operation.