CN102419564A - Method for improving antijamming capability of PLC (Programmable Logic Controller) analog signal - Google Patents
Method for improving antijamming capability of PLC (Programmable Logic Controller) analog signal Download PDFInfo
- Publication number
- CN102419564A CN102419564A CN2011102990587A CN201110299058A CN102419564A CN 102419564 A CN102419564 A CN 102419564A CN 2011102990587 A CN2011102990587 A CN 2011102990587A CN 201110299058 A CN201110299058 A CN 201110299058A CN 102419564 A CN102419564 A CN 102419564A
- Authority
- CN
- China
- Prior art keywords
- register
- input
- plc
- isolator
- analog signal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Programmable Controllers (AREA)
Abstract
The invention discloses a method for improving the antijamming capability of a PLC (Programmable Logic Controller) analog signal. The method comprises two parts: in the hardware aspect, an isolator is added between a PLC analog input module and a field instrument, and the isolator is a passive two-terminal filter isolator; and in the software aspect, a multisampling averaging algorithm with an input signal effectiveness judgment function is adopted. The method comprises the following steps of: 1. presetting sampling times n; 2. sampling an input analog signal; 3. judging whether values input into a register i are valid or not; 4. adding the values input into the register into an accumulating register x, wherein x is equal to x plus i; 5. calculating an output value y, wherein y is equal to x/n; and 6. resetting the accumulating register x. The method disclosed by the invention can be used for stably and precisely carrying out acquisition operation on the analog signal, has the advantages of simple circuit and low cost, is suitable for the occasion with a higher antijamming requirement in a newly built project and is also suitable for being additionally installed on the traditional equipment needing antijamming reformation.
Description
Technical field
The present invention relates to PLC control system field, relate in particular to a kind of method of the PLC of raising analog signals antijamming capability.
Background technology
PLC, i.e. FPGA controller is a kind of electronic system of digital operation operation, aims in industrial environment to use and design.Read in the analog signals process in traditional PLC, be vulnerable to the industry spot electromagnetic interference (EMI), this; The general method that adds isolator that adopts is come anti-interference; But there are a lot of shortcomings in it, as: (1) antijamming capability is more weak, and the detected signal of PLC still has fluctuation astatically; (2) isolator generally adopts active form, needs configuration power supply separately; (3) filter function that carries of PLC itself is general only through the power frequency waveform of filter 50Hz or 60Hz, can not suppress to filter the multiple harmonic that frequency converter produces and disturb; More than these shortcomings possibly cause influencing the accuracy of production data even cause equipment malfunction to stop.
Application number 200820230473.0 in the prior art " being used for the jamproof repeater of PLC high-speed counting " provides a kind of jamproof scheme, but also is not enough to address the above problem.
Summary of the invention
The new method that a kind of software and hardware that the objective of the invention is to overcome above-mentioned shortcoming and provide combines improves PLC analog signals anti-jamming capacity to reach.
The present invention adopts following technical scheme to realize: a kind of method of the PLC of raising analog signals antijamming capability, and it comprises two parts content:
Hardware aspect: between PLC analog quantity load module and field instrument, add isolator, isolator is passive two end filtering isolators;
Software aspect: the algorithm that the repeatedly sampling of adopting tape input signal validity to judge is averaged;
Step is following:
1, presets sampling number n;
2, the analog signals of input is sampled, deposit data in input register i;
Whether the value that 3, compares among the input register i confirms within the range of instrument whether this signal is effective: if invalid the 2nd step resampling that then returns, if effectively then continue;
4, the value with input register adds accumulation register x, i.e. x=x+i;
5, after sampling number reaches preset value, x stops accumulation, calculates output valve y:y=x/n;
6,, and return the next cyclic process of the 1st step beginning to accumulation register x zero clearing.
In above-mentioned software algorithm, the filtering time can be provided with and adjust sampling number n as required and get final product.
Beneficial effect of the present invention has following several respects:
1, adopts passive two end filtering isolators can not only the interference of various frequency signals be suppressed, can not produce the sudden change of signal, improved stability; Also do not need the dispensing power system, save the investment of power supply and cable, save electric energy; Thermal value is low; Reliability is high, and easy construction is installed fast.
Save material and man-hour.
2, software algorithm is simple in structure, applicable to the PLC programming instruction system of various manufacturers different model; And CPU in the PLC is taken operation time less, can not increase the too many computational load of CPU, less to the procedure time complexity effect, simultaneously PLC stored unit is taken less, less to the space complexity influence of program.
3, method of the present invention can be stablized accurately analog signals is gathered computing, and minimizing equipment is because the problem that the instrument circuit is disturbed and the chance of misoperation even parking; And circuit is simple, and is with low cost, is suitable for anti-interference occasion of having relatively high expectations in the new project, also is applicable on the equipment that is installed at the anti-interference transformation of existing needs simultaneously.
Description of drawings
Fig. 1 is a hardware configuration synoptic diagram of the present invention;
Fig. 2 is a software algorithm process flow diagram of the present invention;
Among the figure: 1 is PLC analog quantity load module; 2 is isolator; 3 is field instrument.
Embodiment
Embodiment:
Below in conjunction with accompanying drawing the present invention is done further elaboration:
Certain factory adopts method of the present invention, reads the flowmeter flow of an on-the-spot 0M3/h~100M3/h.The current flow value that reads fluctuates between 49.5M3/h~50.5M3/h.
Hardware aspect: adopt Siemens S7-200 PLC EM231 analog quantity input expansion module, between PLC analog quantity load module 1 and field instrument 3, add isolator 2, isolator 2 is passive two end filtering isolators;
Software aspect: the algorithm that the repeatedly sampling of adopting tape input signal validity to judge is averaged; Step is following:
1, presets sampling number n time; N=128;
2, the analog signals of input is sampled, deposit data in input register i;
The 1st time: i=49.53
The 2nd time: i=49.84
The 3rd time: i=50.45
The 4th: i=50.12
………………
The 128th time: i=49.88;
Whether the value that 3, compares among the input register i confirms within the range of instrument whether this signal is effective: confirm effectively to continue;
4, the value with input register adds accumulation register x, i.e. x=x+i;
The x initial value be 0 (because at a last circulation time by the 5th step zero clearing.)
The 1st time: x=0+49.53=49.53
The 2nd time: x=49.53+49.84=99.37
The 3rd time: x=99.37+50.45=149.82
The 4th: x=149.82+50.12=199.94
………………
The 128th time: x=6397.44;
5, after sampling number reaches preset value, x stops accumulation, calculates output valve y:y=x/n;
y=x/n=6397.44/128=49.98;
6,, and return the next cyclic process of the 1st step beginning to accumulation register x zero clearing.
X=0。
The above; It only is preferred embodiment of the present invention; Be not that the present invention is done any pro forma restriction; Anyly do not break away from technical scheme content of the present invention, to any simple modification, equivalent variations and modification that above embodiment did, all still belong in the scope of technical scheme of the present invention according to technical spirit of the present invention.
Claims (1)
1. method that improves PLC analog signals antijamming capability is characterized in that it comprises two parts content:
Hardware aspect: between PLC analog quantity load module and field instrument, add isolator, isolator is passive two end filtering isolators;
Software aspect: the algorithm that the repeatedly sampling of adopting tape input signal validity to judge is averaged; Step is following:
1, presets sampling number n;
2, the analog signals of input is sampled, deposit data in input register i;
Whether the value that 3, compares among the input register i confirms within the range of instrument whether this signal is effective: if invalid the 2nd step resampling that then returns, if effectively then continue;
4, the value with input register adds accumulation register x, i.e. x=x+i;
5, after sampling number reaches preset value, x stops accumulation, calculates output valve y:y=x/n;
6,, and return the next cyclic process of the 1st step beginning to accumulation register x zero clearing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011102990587A CN102419564A (en) | 2011-09-29 | 2011-09-29 | Method for improving antijamming capability of PLC (Programmable Logic Controller) analog signal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011102990587A CN102419564A (en) | 2011-09-29 | 2011-09-29 | Method for improving antijamming capability of PLC (Programmable Logic Controller) analog signal |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102419564A true CN102419564A (en) | 2012-04-18 |
Family
ID=45944011
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011102990587A Pending CN102419564A (en) | 2011-09-29 | 2011-09-29 | Method for improving antijamming capability of PLC (Programmable Logic Controller) analog signal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102419564A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102735946A (en) * | 2012-07-05 | 2012-10-17 | 山东华芯半导体有限公司 | Method for eliminating interference during signal sampling |
CN107436584A (en) * | 2017-06-22 | 2017-12-05 | 上海电器科学研究院 | A kind of immunity experiment quantification evaluating method of programmable controller |
CN110888384A (en) * | 2019-10-23 | 2020-03-17 | 湖南柿竹园有色金属有限责任公司 | High-interference filtering method for PLC analog input signal source |
CN112305406A (en) * | 2020-10-14 | 2021-02-02 | 上海华虹宏力半导体制造有限公司 | Chip micro analog signal testing method and device |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007129701A (en) * | 2006-10-04 | 2007-05-24 | Toyo Network Systems Co Ltd | Power line communication system |
US20070233452A1 (en) * | 2006-03-29 | 2007-10-04 | Fujitsu Limited | Simulation apparatus and simulation method |
-
2011
- 2011-09-29 CN CN2011102990587A patent/CN102419564A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070233452A1 (en) * | 2006-03-29 | 2007-10-04 | Fujitsu Limited | Simulation apparatus and simulation method |
JP2007129701A (en) * | 2006-10-04 | 2007-05-24 | Toyo Network Systems Co Ltd | Power line communication system |
Non-Patent Citations (3)
Title |
---|
蒲富竹等: "PLC数据采集系统的抗干扰措施", 《油气田地面工程》 * |
闫虎民等: "PLC控制系统中模拟量采样的数字滤波算法研究", 《机电产品开发与创新》 * |
陈瑜等: "PLC控制系统中模拟量信号采样和滤波及Step7语言实现", 《电气自动化》 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102735946A (en) * | 2012-07-05 | 2012-10-17 | 山东华芯半导体有限公司 | Method for eliminating interference during signal sampling |
CN102735946B (en) * | 2012-07-05 | 2014-12-03 | 山东华芯半导体有限公司 | Method for eliminating interference during signal sampling |
CN107436584A (en) * | 2017-06-22 | 2017-12-05 | 上海电器科学研究院 | A kind of immunity experiment quantification evaluating method of programmable controller |
CN107436584B (en) * | 2017-06-22 | 2019-05-28 | 上海电器科学研究院 | A kind of immunity experiment quantification evaluating method of programmable controller |
CN110888384A (en) * | 2019-10-23 | 2020-03-17 | 湖南柿竹园有色金属有限责任公司 | High-interference filtering method for PLC analog input signal source |
CN112305406A (en) * | 2020-10-14 | 2021-02-02 | 上海华虹宏力半导体制造有限公司 | Chip micro analog signal testing method and device |
CN112305406B (en) * | 2020-10-14 | 2024-03-15 | 上海华虹宏力半导体制造有限公司 | Chip tiny analog signal testing method and testing device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102419564A (en) | Method for improving antijamming capability of PLC (Programmable Logic Controller) analog signal | |
CN105119307B (en) | A kind of high ferro Traction networks low-frequency oscillation suppression method based on Active Disturbance Rejection Control | |
CN110011295A (en) | A kind of method for analyzing stability and system of distributed DC power grid | |
CN103532243B (en) | A kind of Active Power Filter-APF controls and communication system | |
CN103454520A (en) | Transformer winding deformation on-line monitoring method based on on-line frequency response method | |
CN201616023U (en) | Signal isolation conversion output module | |
CN105159390A (en) | Method for maximum power point tracing of dynamic variable-step-size photovoltaic system with anti-jamming capacity | |
CN201278008Y (en) | Transformer integrated monitor | |
CN201765285U (en) | Device of monitoring real time wastage and load of transformer in operation | |
CN104184142A (en) | Method for controlling coordinated operation of multiple DFACTS devices in urban regional power distribution network | |
CN202533823U (en) | Temperature control system | |
CN202662425U (en) | Multi-tap reactor for train | |
CN204668949U (en) | A kind of high-frequency harmonic absorption plant | |
CN112491276A (en) | Method for improving anti-interference capability of high-frequency power supply | |
CN202395447U (en) | Master-slave active filtering system | |
CN204992584U (en) | Digit reactor device based on PWM control technique | |
CN201194331Y (en) | Novel electric power filter | |
CN204465000U (en) | A kind of master control system of Active Power Filter-APF | |
CN105739362A (en) | Transformer station measurement and control protection device | |
WO2018121074A1 (en) | Intelligent hybrid compensation capacitor device | |
CN202737736U (en) | Complex programmable logic device (CPLD)-based active power factor correction (PFC) control circuit | |
CN202995375U (en) | Cold, heat and electricity triple supply exhaust gas monitoring system | |
Liu et al. | Research on travelling wave transmission characteristics in distribution network | |
CN202794926U (en) | Embedded data collecting device | |
CN216720928U (en) | Voltage control device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20120418 |