CN107092454A - A kind of method that optic fiber grating wavelength data real-time drawing function based on VC is shown - Google Patents

A kind of method that optic fiber grating wavelength data real-time drawing function based on VC is shown Download PDF

Info

Publication number
CN107092454A
CN107092454A CN201710127398.9A CN201710127398A CN107092454A CN 107092454 A CN107092454 A CN 107092454A CN 201710127398 A CN201710127398 A CN 201710127398A CN 107092454 A CN107092454 A CN 107092454A
Authority
CN
China
Prior art keywords
data
fiber grating
optic fiber
real
grating wavelength
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
Application number
CN201710127398.9A
Other languages
Chinese (zh)
Inventor
张卫方
任飞飞
戴伟
李英武
梁小贝
高晓岩
王翔宇
张萌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beihang University
Original Assignee
Beihang University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beihang University filed Critical Beihang University
Priority to CN201710127398.9A priority Critical patent/CN107092454A/en
Publication of CN107092454A publication Critical patent/CN107092454A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Optical Communication System (AREA)

Abstract

A kind of method that optic fiber grating wavelength data real-time drawing function based on VC is shown, step is as follows:One, software platform is taken, optic fiber grating wavelength data are transferred on software platform by network communication protocol;Two, this computer is arrived into wavelength data storage, and creates array and deposits current data;Three, the time TIME of timer is set;Four, judge whether sensor passage changes, current channel number is preserved if changing, next step is directly carried out if not changing;Five, set data to count, carry out plot and display;Six, find out the maxima and minima of current array;Seven, ordinate value is updated in real time according to the change of data;By above step, realize the optic fiber grating wavelength data real-time drawing function based on VC and show, solve the problems such as optic fiber grating wavelength excursion in practical application is small, real-time is high, transmission channel is more, be conducive to popularization and application in a practical situation.

Description

A kind of method that optic fiber grating wavelength data real-time drawing function based on VC is shown
Technical field
The present invention provide it is a kind of based on Microsoft's C/C++ compilers (i.e. MicroSoft Visual C/C++, hereinafter referred to as VC the method that optic fiber grating wavelength data real-time drawing function) is shown, it is related to a kind of based on real-time to optic fiber grating wavelength data The method of plot and display, belongs to computer real-time drawing function display technology field.
Background technology
Fiber grating have the advantages that it is lightweight, corrosion-resistant, at present in Petroleum Industry, power industry, Aero-Space etc. Multiple fields are applied, and are frequently necessary to be stored the data of wavelength during the use of fiber grating, and supervise in real time The situation of change of optic fiber grating wavelength data is controlled, is shown herein using the VC real-time drawing functions for carrying out optic fiber grating wavelength data.
In the drawing algorithm that existing VC is shown in real time, it common are pointwise split screen and draw and dynamic drafting, pointwise point Screen drafting is drawn first point, second point according to time sequencing and is eliminated to completely whole viewing area, rear all points is painted, weight The new drafting for starting next round, this algorithm does not simply still meet normal visual custom;Dynamic, which is drawn, to be included directly translating Method and auxiliary picture box method, direct shifting method is first drawn to whole screen, then wipes leftmost a part of curve, will be surplus Under curve map be placed on screen high order end, then drawn in right side blank area, so as to realize the translation to image;Aid in picture box method It is to be drawn in data on the auxiliary picture box of twice of size of plot space, interception is moved with the picture box of screen size and is realized The translation of image.They can realize the real-time display of image, still, and optic fiber grating wavelength signal has data in practical application The problems such as changing small and many transmission channels, causes optic fiber grating wavelength signal to be difficult to realize real-time display using above method.Base In problem above, a kind of method that optic fiber grating wavelength data real-time drawing function based on VC is shown is proposed.
The content of the invention
The purpose of the present invention is:
For the problems such as fiber grating actual wavelength signal excursion is small, display frequency can not be changed, transmission channel is more, A kind of method that optic fiber grating wavelength data real-time drawing function based on VC is shown is proposed, so as to stable to fiber grating ripple Long data are shown, and the adjustment transverse and longitudinal coordinate of dynamic, change display frequency and points, the switching for realizing transmission channel etc. Function, enables the display of optic fiber grating wavelength data to more conform to actual conditions.
The method that a kind of optic fiber grating wavelength data real-time drawing function based on VC of invention is shown, its specific steps It is as follows:
Step one, optic fiber grating wavelength data transmission software platform is built, the optic fiber grating wavelength data of hardware are passed through Network communication protocol is transferred on software platform;
Step 2, will be transmitted to the wavelength data storage of software platform to this computer, and creates array and deposit currently Data;
Step 3, sets the time TIME of timer, for the display frequency of control data;
Step 4, judges whether sensor passage changes, and current channel number is preserved if changing, and empties current Drawing enter next step, if do not change if directly progress next step;
Step 5, sets the data to be shown points on screen, is set to DATA_NUM, carry out plot and display;
Step 6, finds out the maxima and minima of current array, is set to DATA_MAX and DATA_MIN, if data Number is less than DATA_NUM, then to the data maximizing and minimum value of current number, if data amount check is equal to DATA_NUM, Then to DATA_NUM data maximizing and minimum value;
Step 7, ordinate value is updated in real time according to the change of data, so that optic fiber grating wavelength data are small Remained to during range display when fluctuating range it is larger, be easy to observation.
Wherein, " building optic fiber grating wavelength data transmission software platform " described in step one, refers to be based on Microsoft The version of C/C++ compilers 6.0 (i.e. VC++6.0) and Microsoft Foundation class libraries Microsoft Foundation Classes are (referred to as MFC) the software platform for transmission process optic fiber grating wavelength data of exploitation;Specific practice is to install VC+ on computers + 6.0, the engineering of newly-built entitled " Fiber " designs and develops software platform using MFC.
Wherein, " will be transmitted to the wavelength data storage of software platform to this computer, and creating described in step 2 Array deposits current data ", its practice is as follows:Text document is created, DATA.txt is named as, with data stream B uffer by number According to writing into text document, and create array TEMP and deposit current data.
Wherein, " sensor passage " described in step 4, refers to the data channel of different Fiber Bragg Grating FBGs, Software desk Implementation of the present invention be multi fiber grating sensor wavelength data real-time display, one " sensor passage " Refer to the wavelength data passage of a fiber-optic grating sensor.
By above step, realize the optic fiber grating wavelength data real-time drawing function based on VC and show, solve actual answer With the problems such as middle optic fiber grating wavelength excursion is small, real-time is high, transmission channel is more, be conducive to popularization in a practical situation Using.
The advantage of the invention is that:
1st, solving coordinate when data during optic fiber grating wavelength data display are shown in real time can not change, no at any time The problem of display frequency and not changeable display channel can be changed.
2nd, implementation is simple, no complicated algorithm, applicability and workable, coordinates VC transmission control protocol (i.e. What TCP) communication can be stable is transmitted and realizes the effect shown in real time to data, and optic fiber grating wavelength data are shown in real time Precision and stability improve obvious.
3rd, compared with the algorithm that other real-time drawing functions are shown, methods described herein are by the original number of optic fiber grating wavelength signal According to being stored, be conducive to actual application.
Brief description of the drawings
Fig. 1 the method for the invention flow charts.
Optic fiber grating wavelength data display results of the Fig. 2 when K values set too small.
Optic fiber grating wavelength data display results of the Fig. 3 when K values set excessive.
Optic fiber grating wavelength data display results of the Fig. 4 when K values set suitable.
Sequence number, symbol, code name are described as follows in figure:
In Fig. 1:" DATA_NUM " is the data to be shown points;" DATA_MAX " is the maximum of data in array, " DATA_MIN " is the minimum value of data in array.
Embodiment
The method that a kind of optic fiber grating wavelength data real-time drawing function based on VC of the present invention is shown, as shown in Figure 1, its is specific Step is as follows:
Step one:Optic fiber grating wavelength data transmission software platform is built, the software version used is Microsoft C/C++ compilings The version of device 6.0 (i.e. VC++6.0), is communicated using Transmission Control Protocol, software platform is arranged into server, can be for connecing Receive the data that different clients are sent.
Step 2:Will be transmitted to the data Cun Chudao local (i.e. this computer) of software platform, and create array storage ought Preceding data.It is deposited into when intercepting after function finds and has data transfer in the array of definition, if array is TEMP, then Text storage data are created, and real-time update is carried out to data.
Step 3, sets the time TIME of timer, for the display frequency of control data, is called in timing function Drawing function, plot and display is just carried out when reaching the time of setting, so as to control the frequency shown in real time.
Step 4:Judge whether sensor passage changes, sensor passage is got off with variable storage, be set to SENSOR_NUM, therewith compares current sensor passage number, if equally, sensor passage does not change, is directly entered Next step, if different, SENSOR_NUM is stored in by current sensor passage number, and empties drawing, does drafting current The preparation of sensor passage data.
Step 5, sets the data to be shown points on screen, is set to DATA_NUM, and being sized to array DATA_NUM, when the number of data is less than DATA_NUM, Drawing Directly, when the number of data is more than DATA_NUM, by array Data reach, and current data are assigned to last position.
Step 6, finds out the maximum DATA_MAX and minimum value DATA_MIN of current array, sets a data for most Big value and minimum value, travel through all data, if current data is bigger than maximum, by current data assignment to maximum;If Current data is smaller than minimum value, then by current data assignment to minimum value.
Step 7, ordinate value is updated in real time according to the change of data, according to minimax value changes, if K is Constant, for controlling the change of ordinate, DATA_MAX+ (DATA_MAX-DATA_MIN) * K are determined by the maximum of ordinate, Minimum value is defined as DATA_MIN- (DATA_MAX-DATA_MIN) * K, can show curve when the selection of K values is too small incomplete, such as Shown in Fig. 2;When the selection of K values is excessive the viewing area of data can be made too small, as shown in Figure 3;To show max min On image and there is preferable effect, K is that 0.075 display is best after tested, and display effect is as shown in Figure 4.

Claims (4)

1. a kind of method that optic fiber grating wavelength data real-time drawing function based on VC is shown, it is characterised in that:Its specific steps is such as Under:
Step one, optic fiber grating wavelength data transmission software platform is built, the optic fiber grating wavelength data of hardware are passed through into network Communication protocol is transferred on software platform;
This computer is arrived in step 2, the wavelength data storage that will be transmitted to software platform, and creates the current number of plural groups storage According to;
Step 3, sets the time TIME of timer, for the display frequency of control data;
Step 4, judges whether sensor passage changes, and preserves current channel number if changing, empties current paint Figure enters next step, and next step is directly carried out if not changing;
Step 5, sets the data to be shown points on screen, is set to DATA_NUM, carry out plot and display;
Step 6, finds out the maxima and minima of current array, is set to DATA_MAX and DATA_MIN, if data amount check It is less than DATA_NUM, then right if data amount check is equal to DATA_NUM to the data maximizing and minimum value of current number DATA_NUM data maximizing and minimum value;
Step 7, ordinate value is updated in real time according to the change of data, so that optic fiber grating wavelength data are in small range Remained to during change display when fluctuating range it is larger, be easy to observation;
By above step, realize the optic fiber grating wavelength data real-time drawing function based on VC and show, solve in practical application The problems such as optic fiber grating wavelength excursion is small, real-time is high, transmission channel is more, is conducive to popularization in a practical situation should With.
2. the method that a kind of optic fiber grating wavelength data real-time drawing function based on VC according to claim 1 is shown, it is special Levy and be:" building optic fiber grating wavelength data transmission software platform " described in step one, refers to compile based on Microsoft C/C++ The version of device 6.0, i.e. VC++6.0 and Microsoft Foundation class libraries Microsoft Foundation Classes, abbreviation MFC are translated, is developed The software platform for transmission process optic fiber grating wavelength data;Specific practice is to install VC++6.0 on computers, newly The engineering of entitled " Fiber " is built, software platform is designed and developed using MFC.
3. the method that a kind of optic fiber grating wavelength data real-time drawing function based on VC according to claim 1 is shown, it is special Levy and be:" will be transmitted to the wavelength data storage of software platform to this computer, and creating plural groups described in step 2 The current data of storage ", its practice is as follows:Text document is created, DATA.txt is named as, is write data with data stream B uffer Enter in text document, and create plural groups TEMP and deposit current data.
4. the method that a kind of optic fiber grating wavelength data real-time drawing function based on VC according to claim 1 is shown, it is special Levy and be:" sensor passage " described in step 4, refers to the data channel of different Fiber Bragg Grating FBGs, the software Platform is accomplished that the real-time display of multi fiber grating sensor wavelength data, and one " sensor passage " is to refer to an optical fiber light The wavelength data passage of gate sensor.
CN201710127398.9A 2017-03-06 2017-03-06 A kind of method that optic fiber grating wavelength data real-time drawing function based on VC is shown Pending CN107092454A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710127398.9A CN107092454A (en) 2017-03-06 2017-03-06 A kind of method that optic fiber grating wavelength data real-time drawing function based on VC is shown

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710127398.9A CN107092454A (en) 2017-03-06 2017-03-06 A kind of method that optic fiber grating wavelength data real-time drawing function based on VC is shown

Publications (1)

Publication Number Publication Date
CN107092454A true CN107092454A (en) 2017-08-25

Family

ID=59646244

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710127398.9A Pending CN107092454A (en) 2017-03-06 2017-03-06 A kind of method that optic fiber grating wavelength data real-time drawing function based on VC is shown

Country Status (1)

Country Link
CN (1) CN107092454A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107631698A (en) * 2017-09-08 2018-01-26 北京航空航天大学 A kind of implementation method based on optical fiber and smart coat structure monitoring software platform
CN107655419A (en) * 2017-09-08 2018-02-02 北京航空航天大学 A kind of method of fiber grating and smart coat sensing data plot and display

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100037126A1 (en) * 2004-02-02 2010-02-11 At&T Intellectual Property I, L.P. F/K/A Bellsouth Intellectual Property Corporation Methods, systems, and storage mediums for providing database management services for a telecommunications system
CN102109539A (en) * 2009-12-25 2011-06-29 北京普源精电科技有限公司 Data processing method of multichannel data acquisition device
CN203825087U (en) * 2014-03-25 2014-09-10 苏州经贸职业技术学院 Frequency display apparatus
CN104159079A (en) * 2014-08-13 2014-11-19 上海航天电子通讯设备研究所 Image real-time decoding display method
CN105389170A (en) * 2015-11-20 2016-03-09 中国农业大学 Drawing method and system
CN105698836A (en) * 2016-02-04 2016-06-22 昆明理工光智检测科技有限公司 Optical fiber Bragg raster sensing net-based on-line monitoring method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100037126A1 (en) * 2004-02-02 2010-02-11 At&T Intellectual Property I, L.P. F/K/A Bellsouth Intellectual Property Corporation Methods, systems, and storage mediums for providing database management services for a telecommunications system
CN102109539A (en) * 2009-12-25 2011-06-29 北京普源精电科技有限公司 Data processing method of multichannel data acquisition device
CN203825087U (en) * 2014-03-25 2014-09-10 苏州经贸职业技术学院 Frequency display apparatus
CN104159079A (en) * 2014-08-13 2014-11-19 上海航天电子通讯设备研究所 Image real-time decoding display method
CN105389170A (en) * 2015-11-20 2016-03-09 中国农业大学 Drawing method and system
CN105698836A (en) * 2016-02-04 2016-06-22 昆明理工光智检测科技有限公司 Optical fiber Bragg raster sensing net-based on-line monitoring method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
胡星星: ""月震计关键技术预研"", 《中国优秀硕士学位论文全文数据库 工程科技II辑》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107631698A (en) * 2017-09-08 2018-01-26 北京航空航天大学 A kind of implementation method based on optical fiber and smart coat structure monitoring software platform
CN107655419A (en) * 2017-09-08 2018-02-02 北京航空航天大学 A kind of method of fiber grating and smart coat sensing data plot and display

Similar Documents

Publication Publication Date Title
CN107092454A (en) A kind of method that optic fiber grating wavelength data real-time drawing function based on VC is shown
CN110442965A (en) Railway customer service information machine room implementation management system and method based on BIM
CN109325986B (en) Sketch drawing method and device
CN110058936B (en) Method, apparatus and computer program product for determining an amount of resources of a dedicated processing resource
KR102409355B1 (en) Method and apparatus for outputting information
JP7200277B2 (en) Method and apparatus, electronic device, storage medium and computer program for identifying word slots
CN108334622A (en) A method of it obtains and formats complex data
CN109460201A (en) The methods of exhibiting of information, device, hardware device
CN104965813B (en) The treating method and apparatus of textual materials
CN105590547B (en) A kind of implementation method of seating plan, device and system
CN101419618B (en) In-text information displaying method and apparatus
CN111191242A (en) Vulnerability information determination method and device, computer readable storage medium and equipment
CN105224111A (en) Interactive reading method under a kind of network environment and system
CN101516086A (en) Service matching method for mobile communication
Troyanovskyi et al. Why the using of Nyquist-Shannon-Kotelnikov sampling theorem in real-time systems is not correct?
CN107655419A (en) A kind of method of fiber grating and smart coat sensing data plot and display
CN114462571A (en) Deep learning model training method, data processing method and device
Brehler et al. Simulation of nonlinear signal propagation in multimode fibers on multi-GPU systems
CN104267609B (en) A kind of method of simulation hardware control amount access transport
WO2016111553A1 (en) Method and system for real-time grid type content sharing
WO2022055026A1 (en) Scan conversion apparatus using gpu
CN110377366A (en) It is a kind of splice multizone map show method
WO2006014904A2 (en) System and method for networked computer graphics
US6600494B1 (en) Color reduction for a remote control system
CN115374187B (en) Index data acquisition method and device, electronic equipment and computer readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170825