当前位置:文档之家› (最新版)英文文献 翻译_ 基于PLC高速IO口模拟信号_测量与控制毕业论文

(最新版)英文文献 翻译_ 基于PLC高速IO口模拟信号_测量与控制毕业论文

基于PLC高速IO口模拟信号的测量与控制

Hongtao Ma, Xiaojun Wang, FenPing Zhou

College of Information Science & Engineering

Hebei University of Science & Technology

Shijiazhuang,China

Basel: Marcel Dekker Inc,1987.

[3] Can Saygin, Firat Kahraman. A Web-based Programmable Logic

Controller laboratory for manufacturing engineering education. The

International Journal of [4] J.-S. Lee, P.-L. Hsu. An improved evaluation of Ladder logic diagrams and Petri nets for the sequence controller design in manufacturing systems. The International Journal of Advanced

Manufacturing Technology, 2004, 2(5): [5] John, Karl-Heinz, Michael.

Programming Industrial Automation System, Berlin. New York: Springer, 2001.

[6] T. Mikulczynski, Z. Samsonowicz, R Wieclawek. The Grafpol

Programming Language for Programmable Logic Controllers. Archives of Control Sciences, [7] Nanette Bauer, Sebastian Engell, Ralf Huuck, etal.

Verification of PLC Programs Given as Sequential Function Charts.

Lecture Notes in Computer Science, 2004, [8] Stephane Klein, Georg Frey, Mark Minas. PLC Programming with Signal

外文文献原文(2)

Measuring and Controlling of Analog signal Based on High-speed IO port of PLC

Hongtao Ma, Xiaojun Wang, FenPing Zhou

College of Information Science & Engineering

Hebei University of Science & Technology

Shijiazhuang,China

and PLC program are given. Through analyzing and comparing data, it is found that the system can achieve ± 0.1% accuracy.

Key words: PLC; High-speed IO; AD;

I. INTRODUCTION

PLC implement sequential logic control and automatic control of analog according to the requirement of technological process, so it is widely used in industrial field and also make a good control effect. In some systems controlled by PLC, the circumstance of measuring analog voltage signal often is encountered. Analog extended module of PLC is adopted to do some conversion work in this case. But these modules’ prices are close to the small and medium-sized PLC’s price, and only provide few input port. In addition, more one module is connected in order to practical application, whose expensive cost cause to decrease of performance cost ratio[1-8].

Based on CPU222 of Siemens S7-200 series PLC, use PLC’s VF converter to convert voltage signal into frequency signal and then send it into PLC’s be achieved. This method completes the measuring and controlling without special expensive analog IO module and decrease the cost of system.

II. CIRCUIT DESIGN

A. Analog input circuit

CPU222 only accept digital input signals, the author design external V F converter to convert 0~10V voltage signal to 0~10kHz frequency signal. The VF converter adopted LM331 IC, the production of NS Corporation, U.S.. Main features of LM331 includes: (1) wide dynamic range, up to 100dB; (2) good linearity, the largest non-linear distortion is less than 0.01 percent, and even conversion, digital resolution is up to 12 bit; (4) simple peripheral circuit, only a few external components are needed to form a VF converter and easily ensure accuracy.

The VF converter circuit is shown as Figure 1. The circuit can achieve ±0.03% linearity in the range of 10Hz -10kHz.

Figure 1. VF converter circuit

The output frequency of the circuit is calculated as following equation

where RS=R4+RP1. According to component parameter in Figure 1 to adjust potentiometer RP1, so RS value changes, to make f OUT up equal to 10kHz.Output frequency signal of LM331 is fed into PLC’s port of which D denotes counter value and T denotes counting time. T may be set up by timer, so the value of f can be able to calculate out if we know the value of D. PLC processes and stores the value of f, so that an AD conversion is implemented.

B.Measuring method of input voltage

S7-200 family PLC . Output frequency of VF converter in this paper is 0~10kHz, corresponding to input voltage 0~10V, that is, the resolution is

1mVHz..

Firstly, control byte MB47 of counter HSC1 is set at operating mode 0 using HDEF instruction, that is, reset input, start input and selecting input of external direction don’t exist. Reset value of current-value register SMD48 is 0, preset value register SMD52 is set with FFFFH. Interval register SMB34 of timing interrupt is set with 100ms. Timer interrupt is allocated to interrupt 0 and allow interruption. Finally HSC1 is started to count by instruction.

Interrupt serving routine 0 is called every 100ms to read out count value of counter HSC1 and then clear it. Input voltage can be calculated out by count value of HSC1 according to transform relationship. Here a 0~10kHz VF converter is adopted, so in 100ms gate time 1000 pulses can be accumulated at most. It is equivalent to 1000h10=10000 pulses can be accumulated in one second, which corresponds to actual 10V input voltage. Supposed that count value is 200 in 100ms gate, and then its actual voltage is 2V. Such that a resolution of 10V1000=0.01V=10mV can beacquired.

A group of experimental result data of measured voltage with PLC TABLE I.

TABLE I. EXPERIMENTAL RESULT OF COUNT VF PULSES IN100ms GATE

Input Calculated

From the experimental results it can be seen that this method can reach a resolution of 10mV and full error of ±0.1%.

Interval of PLC timing interruption is variable within the range of 5~255ms. To extend the interval such that makes gate time longer, result of measuring voltage will be more accurate, but measuring speed will slow down at the same time. If gate time is set at 200ms, then measuring resolution may reach 5mV and full error can reach ±0.05%.

C.Anolog output circuit

Analog output circuit is shown in Figure 2, which is supplied by PLC's +24V power. PWM signal of 24Vp-p outputted by Q0.0 port of by R1 and R2. High accuracy PWM signal outputted by U1B is filtered by low-pass filter constructed by R6 and C9. Finally U2 provides direct current voltage relating to PWM signal.

RC time constant directly impact on the ripple amplitude of output voltage. The larger RC value is, the smaller the ripple voltage is. But to use too large RC value is inadvisable, because it will increase the corresponding time of output voltage.

Figure 2. Analog output circuit

D.O utput voltage control method

S7-200 series PLC implement period-variable, width-adjustable PWM waveform. Two outputs are respectively dedicated to Q0.0 and Q0.1. The set range of PWM period is within 2~65535, the set range of PWM pulse width is within 0~65535. Time base of PWM is 1us or 1ms.

In this paper, Q0.0 is selected to output PWM signal.Period of PWM is set to 5000, and pulse width of PWM is in range of 0~5000. Time base of 1us is adopted such that period of PWM is 5000 us (5 ms), and duty cycle changes from 0 to 100%. Resolution of PWM is 15000, which is equivalent to that of 12-bit AD converter.Direct-current output voltages are listed in TABLE II when the case is selected that PWM period is 5ms, time constant of RC filter is 25 ms and PWM is in different duty cycle.

From the TABLE II, we can see that although theoretical resolution can reach to 15000, that is, 2mV, equivalent to 0.02% of full scale, actually there is approximately f10mV error and f0.1% full error. This is only equivalent to the accuracy of 10-bit DA converter.

In experiment, changing time constant of RC filter, ripple voltage is measured with oscillograph under different duty cycle. The measured result is listed in TABLE III.

It can be seen from TABLE III that ripple voltage is larger when only one stage RC filter is used. To decrease this ripple voltage,multi-stage Rcfilters can be

introduced.

TABLE II. PWM OUTPUT VOLTAGE OF DIFFERENT DUTY CYCLE

TABLE III. THE RELATIONSHIP OF RIPPLE VOLTAGE AND RC TIME CONSTANT

AND DUTY CYCLE

III.CONCLUSION

In this paper, a simple VF converter circuit converts 0 ~ 10V voltage to

0~10kHz frequency. The frequency signal is then sent to achieve the measurement accuracy of ±0.1%. PWM ability of PLC with external RC filter implements 0~10V output voltage and reached ± 0.1% accuracy.

On the occasion of no requiring achieve measuring and control of analog without expensive PLC analog IO modules, which reduces greatly the cost of

system.

REFERENCES

[1] Henning Dierks. PLC-automata: a new class of implementable

real-time automate. Theotetical computer science, 2001, 253:61-93.

[2] David G. Johnson. Programmable Controllers for Factory Automation.

New York and Basel: Marcel Dekker Inc,1987.

[3] Can Saygin, Firat Kahraman. A Web-based Programmable

Logic

[4] J.-S. Lee, P.-L. Hsu. An improved evaluation of Ladder

logic diagrams and Petri nets for the sequence controller

design in manufacturing systems. The International Journal of [5] John, Karl-Heinz, Michael. Programming Industrial Automation

System, Berlin. New York: Springer, 2001.

[6] T. Mikulczynski, Z. Samsonowicz, R Wieclawek. The

Grafpol

Programming Language for Programmable Logic

Controllers.

[7] Nanette Bauer, Sebastian Engell, Ralf Huuck, etal. Verification of

PLC Programs Given as Sequential Function Charts. Lecture Notes

[8] Stephane Klein, Georg Frey, Mark Minas. PLC Programming with

Signal Interpreted Petri Nets. Lecture Notes in Computer Science, 2003,

4(8):

相关主题
相关文档 最新文档