外文翻译基于LabVIEW的虚拟示波器研究和开发Word格式.docx
《外文翻译基于LabVIEW的虚拟示波器研究和开发Word格式.docx》由会员分享,可在线阅读,更多相关《外文翻译基于LabVIEW的虚拟示波器研究和开发Word格式.docx(17页珍藏版)》请在冰豆网上搜索。
![外文翻译基于LabVIEW的虚拟示波器研究和开发Word格式.docx](https://file1.bdocx.com/fileroot1/2022-12/6/5959fde4-f65e-4b1d-a094-18b8c459db33/5959fde4-f65e-4b1d-a094-18b8c459db331.gif)
BasedonLabVIEW
Abstract:
ThispaperintroducesthedesignprocessofavirtualoscillographbasedonLabVIEW.Mainlyanalyzestheamplitudevalueandtimebaseadjustingmethodsduringthereal-timedisplay.Atthesametime,itsimplyintroducesthebasicthoughtwhenmeasuringtheperiodandfrequencyofthewaveformgatevoltagemethodanditsapplication.Attheendofthispaper,combiningtheparametermeasurementandwaveformdisplayofthevirtualoscillographwiththemodernmotorclose-looplock-phasespeedcontrol,itanalyzestheparametermeasurement'
seffectinPIDcontrol.
Keywords:
VirtualOscillograph;
Time-Base;
MotionControl
Ⅰ.INTRODUCTION
Intherapidlydevelopingindustrycontrolfield,measuringtechnologiesandapparatusbecomemoreandmoreimportant.Butbecauseofthedisadvantagesofthetraditionalinstrumentssuchashighprice,singlefunction,badexpansibility,etc.,theycanhardlymeettheindustryrequirement.Withthedevelopmentofcomputertechnologiesandvirtualinstruments(VIforshort),thescopedesignedbyusersbecomeswidely.TherearemanydifferentfunctionswiththesamehardwarewhichcanmaketwoormoremachinesworksynchronouslywiththeadvancedbustechnologiessuchasPXIbustechnology[1].Virtualinstrumentsbecomemoreandmorepopularforitsupstandingcharacteristicslikelowcost,multi-function,facilityandsoon.
Allmeasuringinstrumentsconsistofthreeparts:
dataacquisition,dataanalysisandresultsoutput[2].Inthesethreeparts,dataacquisitioncanbedonebythesystemhardwarelikeA/DmoduleordigitalI/Omodules.Dataanalysisandresultsoutputcanbecompletedbysoftwaresystembasedoncomputer.So,ifgivensomenecessarydataacquisitionhardware,ameasuringinstrumentbasedoncomputercanbeconstituted.Thesoftwaretechnologyistheessentialoneinthevirtualinstrument.[3]VisualC++,LabVIEW,LabWindows/CVI,VEEetc.arealldevelopmentsoftwareenvironment.LabVIEWisagraphicprogramminglanguagecalledGlanguage,whichcanbeusedinGPIB,VXI,PXI,PCIBusanddataacquisitioncardsbasedhardwaresystem,haspowerfulanalyzingability.Itsgraphicprogrammingmethodcanbeusedtofinishthetotalprogrambydataflowclearlyandsimply.Usingitsembeddedboardcarddriverinterface,wecanconvenientlyoperateaboardcard.[4,5]
Multi-channeldigitaloscillograph,whichmainlyusedinreal-timedataacquisition,isoneofthemostwidelyusedgeneralmeasuringinstruments.Italsocandisplaythechangesofsomeelectricsignalsandcomparethedifferencesamongdifferentsignals.Sotheresearchanddevelopmentofvirtualoscillographisthehotspotinthearea.MakinguseoftheGraphplatteinLabVIEW,youcanconvenientlyacquirethedynamicwaveformsandmakethemdisplayed.ButmostvirtualoscillographsbasedonLabVIEWusetheGraphplattetooperateandanalyzethewaveformdata.Althoughthisisveryfaciletouse,italsohasmanydisadvantages:
(1)Whenthewaveformchangesallthetime,thescreenwillkeeprefreshingandthegraphplattecouldnotproperlywork.
(2)Theoperationmethodcan'
tsatisfymostofoperatorsbecauseitisdifferentfromthetraditionoscillographinoperation.Tosolvetheseproblems,thispaperbringsforwardsomeways.Inthereal-timewaveformdisplay,weredevelopthewaveformoperationandintroducesomerelatedsoftwarearithmetic.Itintroducestheexploitingthinkingofadjustingdynamictimebaseandputforwardtwoconcepts:
theFIFOprocessandE-Mprocess.Inaddition,itintroducesasuccessfulgate-voltagemeasurewayinthemeasurementoftheperiodandfrequency,andbasedonwhich,thepaperputsforwardtheapplicationintheclose-looplock-phaseSystem.
II.RESEARCHONTHEMULTICENTERDIGITAL
OSCILLOGRAPH'
SSOFTWAREARITHMETIC
Thevirtualoscillographintroducedbythispaperismainlyusedinlaboratoryforthemeasurementandstorageofvariousanalogsignals.Themainfunctionsare:
dataacquisition,waveformdisplay,parametermeasurement,waveformstorageandreplayetc.Ithas64analogsignalinputchannelsandcantake8signalobservationsatthesametimewiththechoiceofswitchmatrix.Accordingtotherequirement,weusetheNI-6133Daqcardforthedataacquisition.TheblockdiagramofvirtualoscillographisshowninFig.1:
[6]
Nowwewillintroducethesoftarithmetictothebasicfunctionsofvirtualoscillograph.
A.CharacteristicsofGraphControl
InLabVIEW,therearethreecontrolsforwaveformdisplaying:
Graph,Chatandx-ygraph.Everycontrolhasitsownadvantages.ThispapertakesGraphcontrolforexampletodiscussthesoftarithmetictothebasicfunctionofvirtualoscillograph.Graphoscillographdisplaysallwaveformdatainputinthescreenatatime.Everytimewhenthewaveformdataareinput,thescreenwillbefreshed.[7]Usingitsownoperationtools,youcanmove,zoomthewaveformorusethecursorstomeasuretheparameters.Butitcouldnotworkwellondynamicwaveform.Soit'
snecessarytodevelopamoreconvenientoperationtooltoreal-timedisplayofdynamicwaveform.
Inthevirtualoscillographintroducedinthispaper,therearesomebasicfunctionssuchasamplitudeandpositionvalueadjustment,timebasechange,triggermodeselectionetc.Theoscillograph'
sfrontpanelisshowninfig.2.
B.AmplitudeValueAdjustment
Multi-centeroscillographcandisplaymorethanonewaveformatthesametime,soitisveryconvenienttocompareeverysignalchange.Everywaveformdisplayedshouldbeoperatedseparatelythroughtheselectingboxonthefrontpanel.Atfirst,wedistributethescreeninto10×
10gridsandseteverychannelaY-axis.Thevalueofeveryoneofthe10gridsintheY-axisisequaltothevalueofrelatedamplitudeknobcontrol.Withthepropertynodeofthewaveformgraph,youcansettheminimumvalueofeachY-axisas-5timesmuchastheknobvaluewhereasthemaximumvalueset5times.Sowhenyouchangetheamplitudeknobvalue,theminimumandthemaximumvalueoftherelevantY-axisshouldbechangedatthesametime,thewaveformdisplaycanbezoomedasrequired,andthezeropointpositioniskeptintheoriginallocation.
UseanarraytosavetheamplitudevalueseveryY-axischanged.Whenachannelisselected,putitsoldamplitudevaluetotheknobfirst;
andafteradjusting,replacetherelatedarrayelementwiththenewvalue.Andthentheamplitudevaluechangefunctionisfinished.
C.TimeBaseAdjustment
Timebaseadjustingisoneofthebasicfunctionsinoscillograph.Thetimebaseadjustingknob'
svalueshowsthetimeofeveryonegridofX-axisinthescreenwhichisthenodusduringtheoscillographdesignprocedure.
1)BasicClew
AccordingtothecharacteristicsoftheGraphcontrol,itdisplaysallthedatainputatatime.SodistributetheX-axisinto10gridsandmakeeverygrid'
stimet.IfthewaveformcouldbestridethewholeX-axis,thetimespenttocollectallthedatais10t.Supposetheboard'
ssamplingrateisf,inotherword,theboardcollectsfdataeverysecond.SothenumberNneededinthewaveformis:
N=f×
l0t=l0ft
(1)
Keepingtheboardsamplingatthefrequencyoff,theprogramreadsNdatapointsfromtheboardmemoryandputthemtotheoscillographineveryloop.ChangethetvalueistochangetheNvaluereadfromboardmemoryeverytime,andthusadjustthetimebaseinthereal-timesampling.
Butthroughtheexperimentwecansee,whenthetimebaseistoolong(>
100ms)ortooshort(<
500us),thewaveformdisplayedhastimelagstodifferentextend.Thatisbecausewhenthetimebaseistoolong(ifthelengthoftheneededwaveformexceeds1second),wemustwaitforenoughtimetogetallneededdatacollectedbytheboard,anddisplaythemonthescreenatatime.Sothatcancausediscontinuouswaveformdisplayedinthescreen.Whenthetimebaseistooshort,theNvaluereadeveryloopistoosmall,thenumberofdatapointsinonesecondshouldbereadformanytimes.Thereisanotherworktobedoneatthesametimeeveryloopinaddition.Soitwillcausethattheolddatacannotbereadintimeandmaybecoveredbythenewdatabecausetheboardissamplingalltime,theboardmemorywilloverflow.Soitisneededtodisposethenumberreadfromboardatlongandshorttimebaseseparately.
2)Longtimebase
Toavoidthetimelagdiscussedabove,itmustreducethenumberofdatareadfromsamplingboardeveryloop.ConsideringthedisplaycharacteristicsofGraphcontrol,itcannotputthedatapointsreadfromboardstothegrapheveryloopbecauseitwillmaketheoscillographrefreshingallthetime,andthewaveformdisplayedcouldnotbestridethewholeX-axis.Anarraycouldbesettosavethewaveformdatapointsdisplayed.Thearray'
scapacityisN,whichisthenumberofdatapointscalculatedviaEq.
(1).Supposethenumberofdatapointsreadfromboardcardeverytimeisafixedvaluem,whichisthenumberofdatapointstobereadatthepropertimebase.
Thewholeprocedureismadeupoftwoparts.First,setthewholearrayNULL.Atthebeginningofthedisplayprocedure,thearrayisnotfull.Soputthenewmdatapointsintotheendofthearray(Enqueue),andthendisplaythewholearrayvalueinthegraphcontrol.Acontinuouslymovingwaveformshouldbeshowedinthescreen.Second,whenthearrayisfull,getridoffirstmelementsofthearray;
movetherestN-melementsforwardthebeginningofthearray;
andputthenewmdatapointsintotheendofthearray.WecallthisprocessFIFO.Thenafullwaveformshouldbeshowedinthescreen,fromonesidetotheotherside.TheEnqueueandFIFOareshowninFig3.
Becausethenumberofdatapointsmread