色婷婷AⅤ一区二区三区|亚洲精品第一国产综合亚AV|久久精品官方网视频|日本28视频香蕉

          新聞中心

          EEPW首頁 > 測試測量 > 設(shè)計應(yīng)用 > labview編程技巧-----labview與INI文件

          labview編程技巧-----labview與INI文件

          作者: 時間:2017-01-09 來源:網(wǎng)絡(luò) 收藏
          在WIN95以前,WINDOWS還沒有引入注冊表的概念,WINDOWS是利用INI文件來存儲計算機相關(guān)配置的,在API里,WINDOWS提供了豐富的API函數(shù)來操作INI文件,LV里也專門有個子類別封裝了這些API函數(shù),使用非常方便。


          LV使用INI文件來存儲配置,應(yīng)用非常廣泛,生成執(zhí)行文檔后也自動生成一個INI文件。

          LV主要在下列情況下使用INI文件:

          存儲前面板或者前面板特定控件的默認值和當前值

          存儲本次應(yīng)用的運行結(jié)果供下一次啟動是調(diào)用

          存儲硬件配置文件

          存儲硬件配置是非常重要的,比如一般的板卡都有16個數(shù)字輸出,外部接繼電器來控制外部設(shè)備,繼電器是比較容易損壞的,而通常16個繼電器中是有備用的,如何在不改變軟件和硬件的情況下把輸出更改到另外的繼電器上,這樣,只需要簡單地改動一下外部接線就可以了那,使用配置文件可以輕松實現(xiàn)。

          INI文件結(jié)構(gòu)很簡單,裝了多操作系統(tǒng)的人都知道,WINDOWS本身有個BOOT.INI

          [boot loader]
          timeout=30
          default=multi(0)disk(0)rdisk(0)partition(1)WINDOWS
          [operating systems]
          multi(0)disk(0)rdisk(0)partition(1)WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect



          我們看一下LV軟件本身也利用了INI文件來保存配置。

          [LabVIEW]
          server.tcp.port=3363
          server.tcp.enabled=TRUE
          server.tcp.access="+127.0.0.1"
          IsFirstLaunch=False
          PaletteHidddenControlCategories_LocalHost="Modern;System;Classic;Control Design & Simulation;.NET & ActiveX;Addons;"
          PaletteHidddenFunctionlCategories_LocalHost="Programming;Measurement I/O;Instrument I/O;Vision and Motion;Mathematics;Signal Processing;Data Communication;Connectivity;Control Design & Simulation;SignalExpress;Addons;"
          menuSetup="default"
          saveFloaterLocations=True
          find.viListFlags=4
          LastErrorListSize=0,0,379,486
          paletteStyle="NamedIcons"
          NoAdvice070=",CleanUpWire,FlatSequence"
          SaveChanges_ApplyToAll=True
          PropPageBounds="398;181;884;636"
          RecentFiles.pathList="C:Program FilesNational InstrumentsLabVIEW 8.5examplesDAQmxAnalog InMeasure Voltage.llbAcq&Graph Voltage-Int Clk.vi;C:Program FilesNational InstrumentsLabVIEW 8.5examplesDAQmxAnalog InMeasure Voltage.llbAcq&Graph Voltage-Ext Clk-Analog Ref.vi;C:Documents and SettingsAdministratorLocal SettingsTemporary Internet FilesContent.IE57M9NS8HFchart%20right%20to%20left[1].vi;C:Documents and SettingsAdministratorMy Documentswindows_environment_variable_reader_writerWindows Environment Variable Reader Writer.vi;C:Documents and SettingsAdministratorMy DocumentsMDI.llbSimple MDI Demo.vi;D:Control 1.ctl;C:Program FilesNational InstrumentsLabVIEW 8.5vi.libtreeTree Sorter.llbJoin.vi;C:Program FilesNational InstrumentsLabVIEW 8.5vi.libUtilitynotifier.llbCreate Notifier.vi;C:Program FilesNational InstrumentsLabVIEW 8.5vi.libUtilitynotifier.llbWait On Notification.vi;C:Program FilesNational InstrumentsLabVIEW 8.5vi.libUtilityinputDevices.llbAcquire Input Data.vi"
          ShowBufferAllocationsArrays=True
          ShowBufferAllocationsClusters=True
          ShowBufferAllocationsStrings=False
          ShowBufferAllocationsPaths=False
          ShowBufferAllocationsScalars=False
          ShowBufferAllocationsVariants=False
          ShowBufferAllocationsOther=False
          NewDlgRecentMainTemplates.pathList="C:Program FilesNational InstrumentsLabVIEW 8.5templatesFrameworksDesignPatternsProducerConsumerEvents.vit"
          NewDlgBounds="700;480"
          NewDlgRecentTemplates.pathList=""
          NewDlgLastSelected="8E4D36AD-F776-4C48-97C6-C1D85EFE889F"
          NewDlgSmall=False
          NewDlgCollapsed="77E350A8-F9AA-43FF-85E2-454279EBB9A7/Frameworks3F7CF7A8-5E4D-4EDC-AA25-FA4A326988EF8E4D36AD-F776-4C48-97C6-C1D85EFE889F"
          SuperSecretPrivateSpecialStuff=True
          colorHistoryItemA=00000BFF
          RecentFiles.projectPathList="C:Documents and SettingsAdministratorMy Documentsxcontrol eventsxcontrol eventsXControl Events Project.lvproj;C:Program FilesNational InstrumentsLabVIEW 8.5examplesgeneralxcontrolsDual Mode ThermometerSimple Dual Mode Thermometer XControl.lvproj;C:Program FilesNational InstrumentsLabVIEW 8.5exampleslvdscXControlsSpinnerSpinner.lvproj;C:Documents and SettingsAdministratorMy DocumentsLinked_List_ProjectLinked ListLinked_List_Project.lvproj;D:TESTUntitled Project 1.lvproj;C:Documents and SettingsAdministratorMy DocumentsScripting_Tools_0.16.02Scripting ToolsScripting Tools.lvproj;C:Documents and SettingsAdministratorMy DocumentsIconEditor_85_V2.2IconEditor.lvproj;C:Documents and SettingsAdministratorMy Documents第一名_何凌_公司問題第一名 何凌 公司問題SrcVI company.lvproj"
          ProjectExplorer.ClassicPosition=143,53,543,415
          colorHistoryItemB=009A8574
          editRecentPaths="C:Program FilesNational InstrumentsLabVIEW 8.5vi.libUtilitysysinfo.llb;C:Program FilesNational InstrumentsLabVIEW 8.5vi.libUtilitysemaphor.llb;C:Program FilesNational InstrumentsLabVIEW 8.5vi.libUtilitymiscctls.llb;C:Program FilesNational InstrumentsLabVIEW 8.5vi.libUtilityGetType.llb;C:Program FilesNational InstrumentsLabVIEW 8.5vi.libUtilityinputDevices.llb;C:Program FilesNational InstrumentsLabVIEW 8.5vi.libUtilitynotifier.llb;C:Program FilesNational InstrumentsLabVIEW 8.5vi.libtreeTree Sorter.llb"
          LLBMgr_ActivePlugins=""
          LLBMgr_RecentPath="C:Documents and SettingsAdministratorMy DocumentsMDI.llb"
          colorHistoryItemC=00FF8242
          autoerr=2
          colorHistoryItemD=00000FDC
          colorHistoryItemE=003100DC
          colorHistoryItemF=00FFFFFF
          colorHistoryItemG=00FF3D00
          colorHistoryItemH=000F00DC
          colorHistoryItemI=004AFF42
          colorHistoryItemJ=00C88E00
          colorHistoryItemK=000025FF
          exoticControls=TRUE
          NoAdvice080=",ClassBrowser"
          SuperPrivateScriptingFeatureVisible=True
          SuperSecretPrivateSpecialStuff=True
          superPrivateScriptingFeatureSichtbar=True

          本文引用地址:http://cafeforensic.com/article/201701/337269.htm

          FPFont="0" 18
          BDFont="0" 18
          toolPaletteLoc=494,22,645,100
          LVLibraryThemeColor=006699FF


          上一頁 1 2 下一頁

          關(guān)鍵詞: labview編程技巧INI文

          評論


          技術(shù)專區(qū)

          關(guān)閉