




已阅读5页,还剩2页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
关于LabVIEW产生的DLL被C调用的问题1 LabVIEW的工作1.1 工程项目从LV8.0开始,想要生成exe、安装程序或DLL就必须首先创建1个工程,然后把所有有关的VI全部添加到工程中,如图1:图1 LV项目为了使目录结构清晰,最好把最后需要输出的VI放置在一起,把子VI放置在一起,如图1中,虚拟目录Top Level Vis用来存放3个输出的VI(可以把它想像成DLL中的函数)、虚拟目录Dynamic Vis存放子VI、虚拟目录Support Files存放支持文件(位图、光标等)。1.2 VI设置如同在LV中一样,有些VI完全是作为计算模块使用的(调用时不会弹出界面,如图1中的acquire.vi、analyze.vi),而有些是用来显示界面的(调用时弹出对话框,如图1中的present.vi)。那么如何设置1个输出VI是否显示界面呢?想要产生界面调用的函数,请配置Window Appearance(如图2),然后确保红线圈住的地方必须被选中:图2 VI界面设置1.3 输出配置(Build Specification)右击Build Specification选择New-DLL,弹出DLL输出配置对话框,其有以下对话框需要配置:1.3.1 基本信息(Information)图3 Build specification name指定唯一的生成模板名称(出现在项目管理页面中),用以和其他模板相区别 Target filename指定输出的DLL名称 Destination directory指定生成文件的输出路径 Build specification description描述该生成模板的相关信息。1.3.2 输出源指定(Source Files)图4 Project Files窗口显示项目窗口My Computer下列举的项目(如图1),使用图4中的左/右箭头可将My Computer下列举的项目移入/移出Exported VIs和Always Included窗口。 Exported Vis窗口指定DLL的输出函数(VI),至少要指定1个输出VI。选定移入的VI,Define VI Prototype按钮可使用,并且在点击后弹出如图5所示对话框:图5 接口原型定义对话框该对话框可用于调整对应VI的C+接口。 Define Prototype按钮在选择了输出VI后被激活,该按钮用于启动接口原型定义对话框,用于修改输出VI的接口定义。 Always Included指定DLL中所必需的动态VI和支持文件。o 动态VI:通过VI Server调用的VIo 支持文件:非VI文件,比如驱动、文本文件、帮助文件、.NET组件等DLL使用的文件注意下列对象不可移入Exported VIs窗口、Always Included窗口:Exported VIs 多态VI(Polymorphic Vis) 控件(Controls) 私有数据控件(Private data controls) 非VI文件(Files that are not VIs, such as text, image, or .mnu files) 库文件(LabVIEW类、XControls) 全局变量(Global variables)Always Included 私有数据控件(Private data controls)若将库文件(LabVIEW类)移入Always Included窗口,LabVIEW将标记库内所有项目。可将库内的任意一项指定为输出VI。但是若将XControls移入Always Included窗口,LabVIEW将在生成过程中包含所有与XControls相关联的项目,这些项目都不能成为输出VI。1.3.3 目标(Destination)图6 Destinations窗口指定生成文件存放目录,列表中的第一项就是Information窗口(图3)里的Target filename项目。 Add Destination(+按钮)在Destinations窗口中添加1个自定义目录 Remove Destination(X按钮)在Destinations窗口中删除1个选定的项目 Destination label指定Destinations窗口所选项目的名称。在Source File Settings窗口中,这些项目作为Destination下拉菜单的项目。 Destination pathDestinations窗口所选项目的指定目录或LLB。若更改了基本信息里Target Filename对应的路径(图1),则所有子目录都将相应发生改变。注意:为了避免出错,需保证路径最长不超过255字符 Destination type指定目标类型,对于目标项和支持目录,其设置不可修改o Directory指定目标为路径 Preserve disk hierarchy保存定位到该目标路径的所有文件之前的目录结构o LLB指定目标为LLB. Add files to new project library是否指定想要添加文件形成新的库文件o Library name包含指定文件的新库文件1.3.4 源文件设置(Source File Settings)图7 Project Files显示项目窗口My Computer下列举的项目(如图1) Inclusion Type显示LabVIEW在生成过程中如何包含所选项目。这个选项与Source Files窗口中项目所指定的类型有关,比如在Always Included窗口内的项目,其选项= Always Included。如果选择了1个目录,则目录内所有项目的Inclusion Type属性为:o Service VI包含项目作为service VI o Always Included生成时包含项目o Include if referenced当其他项目引用它是,被包含 Destination设置选择项目的目标。LabVIEW在用户未指定启动VI时开启此功能。Destination下拉菜单中的项目= Destinations窗口中的Destination label。默认目标= Same as caller,LabVIEW作为调用者将这些项目放置于相同的目标中 Sets the destination for the selected item. LabVIEW enables this option if you have not designated the item as a startup VI. The names in the Destination pull-down menu correspond to the options in the Destination label text box on the Destinations page. The default destination is Same as caller and LabVIEW places the item in the same destination as the caller. o Make top level in LLBAppears when you select a destination that is an LLB.Place a checkmark in the Make top level in LLB checkbox if you want the selected VI to be the top level item in the LLB. Customize VI PropertiesDisplays the VI Properties dialog box. Use the dialog box to specify the properties for the selected VI. By default, LabVIEW uses the property settings configured in the VI. Any settings you configure in the VI Properties dialog box override any settings you configured in the Customize Window Appearance dialog box. LabVIEW dims this option for items other than VIs. Use default save settingsSaves the VIs using default save settings. The default save setting for the VIs you add to the Exported VIs and Always Included listboxes on the Source Files page is to remove the block diagram. The default for all other VIs is to remove the block diagram and the front panel. Remove the checkmark from this checkbox to change the default settings for each item you select in the Project Files tree. o Remove front panelRemoves the front panel from a VI in the build. Removing the front panel reduces the size of the application or shared library. If you select yes, LabVIEW removes the front panel, but Property Nodes or Invoke Nodes that refer to the front panel might return errors that affect the behavior of the source distribution. LabVIEW enables this option if you remove the checkmark from the Use default save settings checkbox. o Remove block diagramRemoves the block diagram from a VI in the build. LabVIEW enables this option if you remove the checkmark from the Remove front panel checkbox. If you remove the front panel, you also remove the block diagram. As a result, if you place a checkmark in the Remove front panel checkbox, a checkmark automatically appears in the Remove block diagram checkbox. No password changeSpecifies for LabVIEW to not prompt for a password if you use the VI in a build. LabVIEW also does not modify or apply a password you previously applied to the VI. Remove passwordRemoves the password you previously applied to a VI or library. Prior to removing the password, LabVIEW prompts you to enter the current password during the build. Apply new passwordApplies the password you supply in the text box to a VI or library. Prior to applying the new password, LabVIEW prompts you to enter the current password during the build. Enter the password in the text box below the Apply new password option. Rename this file in the buildAppears when you select a file in the Project Files list. Renames the selected file. Enter the new name of the file in the text box. Set destination for all contained itemsAppears when you select a folder in the Project Files tree. Place a checkmark in the checkbox if you want to set the destination directory for the items in the selected folder. NoteLabVIEW places an item set to Same as caller in the directory of the caller. If you set an item to Same as caller and two different callers are in different directories, LabVIEW places the item in the same directory as the build. Set VI properties for all contained itemsAppears when you select a folder in the Project Files tree. Place a checkmark in the checkbox if you want to set the VI properties for the items in the selected folder. When you place a checkmark in the checkbox,LabVIEW e
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年南平延拓文旅集团幼儿园保育员招聘若干人笔试参考题库附答案解析
- 2025云南省投资控股集团有限公司集中招聘98人考试模拟试题及答案解析
- 2025福建泉州市晋江市首峰中学招聘笔试参考题库附答案解析
- 2025浙江宁波象山县商贸集团有限公司第三期招聘工作人员2人笔试参考题库附答案解析
- 2025浙江杭州上城资本私募基金管理有限公司招聘1人考试模拟试题及答案解析
- 2025年甘肃省平凉市静宁县西岭幼儿园教育集团总园招聘考试参考题库附答案解析
- 若尔盖县2025年医疗卫生辅助岗招募(6人)考试备考题库及答案解析
- 2025云南省怒江州福贡县人民检察院招聘合同制辅助人员(2人)考试备考试题及答案解析
- 四川交通职业技术学院2025年7月编制外工作人员招聘(5人)笔试参考题库附答案解析
- 2025山东大学教师外其他专业技术岗位招聘11人(三)考试备考试题及答案解析
- 土地使用权法律风险尽职调查指南
- 2025年8月16日贵州省黔东南州事业单位遴选笔试真题及答案解析(专业水平测试)
- 2025-2026秋季学年第一学期学生国旗下演讲稿(20周):第一周 新程启航礼润心田-开学典礼
- 2025年教师招聘小学语文真题及答案
- 2025年突发疾病应急演练方案(脚本)
- 幼儿园保安人员培训记录
- 2025年北京市中考语文真题(含答案)
- KET教学课件新版
- 小学英语“教学评一体化”实施
- T∕ACSC 01-2022 辅助生殖医学中心建设标准(高清最新版)
- vestas故障中英文对照表
评论
0/150
提交评论