您的位置 首页 被动

labview编程技巧—–labview与INI文件

在WIN95以前,WINDOWS还没有引入注册表的概念,WINDOWS是利用INI文件来存储计算机相关配置的,在API里,WINDOWS提供了丰富的API函数来操作I

在WIN95曾经,WINDOWS还没有引进注册表的概念,WINDOWS是运用INI文件来存储计算机相关装备的,在API里,WINDOWS供给了丰厚的API函数来操作INI文件,LV里也专门有个子类别封装了这些API函数,运用十分便利。

LV运用INI文件来存储装备,运用十分广泛,生成履行文档后也主动生成一个INI文件。

LV首要在下列情况下运用INI文件:

存储前面板或许前面板特定控件的默认值和当时值

存储本次运用的运转成果供下一次发动是调用

存储硬件装备文件

存储硬件装备是十分重要的,比方一般的板卡都有16个数字输出,外部接继电器来操控外部设备,继电器是比较简略损坏的,而一般16个继电器中是有备用的,如安在不改变软件和硬件的情况下把输出更改到别的的继电器上,这样,只需要简略地改动一下外部接线就能够了那,运用装备文件能够轻松完成。

INI文件结构很简略,装了多操作系统的人都知道,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 Files\National Instruments\LabVIEW 8.5\examples\DAQmx\Analog In\Measure Voltage.llb\Acq&Graph Voltage-Int Clk.vi;C:\Program Files\National Instruments\LabVIEW 8.5\examples\DAQmx\Analog In\Measure Voltage.llb\Acq&Graph Voltage-Ext Clk-Analog Ref.vi;C:\Documents and Settings\Administrator\Local Settings\Temporary Internet Files\Content.IE5\7M9NS8HF\chart%20right%20to%20left[1].vi;C:\Documents and Settings\Administrator\My Documents\windows_environment_variable_reader_writer\Windows Environment Variable Reader Writer.vi;C:\Documents and Settings\Administrator\My Documents\MDI.llb\Simple MDI Demo.vi;D:\Control 1.ctl;C:\Program Files\National Instruments\LabVIEW 8.5\vi.lib\tree\Tree Sorter.llb\Join.vi;C:\Program Files\National Instruments\LabVIEW 8.5\vi.lib\Utility\notifier.llb\Create Notifier.vi;C:\Program Files\National Instruments\LabVIEW 8.5\vi.lib\Utility\notifier.llb\Wait On Notification.vi;C:\Program Files\National Instruments\LabVIEW 8.5\vi.lib\Utility\inputDevices.llb\Acquire Input Data.vi”
ShowBufferAllocationsArrays=True
ShowBufferAllocationsClusters=True
ShowBufferAllocationsStrings=False
ShowBufferAllocationsPaths=False
ShowBufferAllocationsScalars=False
ShowBufferAllocationsVariants=False
ShowBufferAllocationsOther=False
NewDlgRecentMainTemplates.pathList=”C:\Program Files\National Instruments\LabVIEW 8.5\templates\Frameworks\DesignPatterns\ProducerConsumerEvents.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 Settings\Administrator\My Documents\xcontrol events\xcontrol events\XControl Events Project.lvproj;C:\Program Files\National Instruments\LabVIEW 8.5\examples\general\xcontrols\Dual Mode Thermometer\Simple Dual Mode Thermometer XControl.lvproj;C:\Program Files\National Instruments\LabVIEW 8.5\examples\lvdsc\XControls\Spinner\Spinner.lvproj;C:\Documents and Settings\Administrator\My Documents\Linked_List_Project\Linked List\Linked_List_Project.lvproj;D:\TEST\Untitled Project 1.lvproj;C:\Documents and Settings\Administrator\My Documents\Scripting_Tools_0.16.02\Scripting Tools\Scripting Tools.lvproj;C:\Documents and Settings\Administrator\My Documents\IconEditor_85_V2.2\IconEditor.lvproj;C:\Documents and Settings\Administrator\My Documents\第一名_何凌_公司问题\第一名 何凌 公司问题\Src\VI company.lvproj”
ProjectExplorer.ClassicPosition=143,53,543,415
colorHistoryItemB=009A8574
editRecentPaths=”C:\Program Files\National Instruments\LabVIEW 8.5\vi.lib\Utility\sysinfo.llb;C:\Program Files\National Instruments\LabVIEW 8.5\vi.lib\Utility\semaphor.llb;C:\Program Files\National Instruments\LabVIEW 8.5\vi.lib\Utility\miscctls.llb;C:\Program Files\National Instruments\LabVIEW 8.5\vi.lib\Utility\GetType.llb;C:\Program Files\National Instruments\LabVIEW 8.5\vi.lib\Utility\inputDevices.llb;C:\Program Files\National Instruments\LabVIEW 8.5\vi.lib\Utility\notifier.llb;C:\Program Files\National Instruments\LabVIEW 8.5\vi.lib\tree\Tree Sorter.llb”
LLBMgr_ActivePlugins=””
LLBMgr_RecentPath=”C:\Documents and Settings\Administrator\My Documents\MDI.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

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

声明:本文内容来自网络转载或用户投稿,文章版权归原作者和原出处所有。文中观点,不代表本站立场。若有侵权请联系本站删除(kf@86ic.com)https://www.86ic.net/ziliao/beidong/211737.html

为您推荐

联系我们

联系我们

在线咨询: QQ交谈

邮箱: kf@86ic.com

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

返回顶部