1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
帮你娘度了一下,看看能不能解决你的问题
1.创建一个LabVIEW项目 2.添加源代码到项目 3.为VI创建一个web页 *选择:工具——web发布工具 *从下拉菜单中选择要发布的VI名称 *配置查看模式为嵌入、快照或显示器的一个(解释见每个选项的“帮助”按钮),并点击下一步 4.编辑文档的标题、页眉和页脚,并点击“下一步” 5.保存项目和创建可执行文件。右键“程序生成规范”选择“新建——应用程序(EXE)”选择“源文件”, 然后将顶层VI加入“启动V“目录I当中,HTML文件加入“始终包括”目录中。点“生成”,在完成创建 之后,点击确定 6.复制可执行文件和所有生成的文件到目标计算机中 注:目标计算机必须安装开发LabVIEW可执行程序的版本相同的LabVIEW运行时引擎。 7.在目标计算机上,浏览刚刚复制的可执行文件所在的目录,在文件编辑器中打开.ini文件, 并执行以下操作: 确认webserver.Enabled=True,如果你不能找到它,将其添加到文件末尾。 *LabVIEW8.6以前的版本(我没有进行测试) 添加或修改webserver的根目录,以使它的值为HTML页所在的目录(应 位于应用程序的数据目录) 保存以上改变,并关闭.ini文件 *LabVIEW8.6及以后版本呢 关闭.ini文件,使用文本编辑器打开niwebserver.conf文件,此文件被创建用来处理LabVIEW8.6中web 服务器提供的新功能 *被标记Directives that apply to the default server 的第二部分有一个指向文档目录,使用你的HTML 文件所在的目录代替默认的LabVIEWwww(其中不包括HTML的文件名) 8.启动可执行文件 注:在LabVIEW完全关闭的情况下,在开发程序的机器上运行可执行文件。 9.在另一台计算机上打开网页浏览器,输入步骤3中获得的URL地址,如果你不是在开发可执行文件的机器上 运行可执行文件,在URL中使用目标计算机的名称替换开发计算机的名称。现在可以远程查看和控制可执行文件。 评分 |
|
|
|
很赞啊,试过没问题的。顶一个
|
|
|
|
常規的VI web發布很簡單,然而,當需要生成Exe可執行文件后進行Web該如何做呢?
1.创建一个labview 项目. 2.编写源代码并将其添加到项目中. 3.生成VI的Web页 (1)从VI的前面板上, 选择工具» Web 发布工具. (2)按照你希望的方式配置查看模式 (点击帮助按钮以获得各选项的说明).点击下一步. (3)创建一个文档题目并点击下一步. (4)保存HTML文档至[LabVIEW]www 目录下. 点击保存至磁盘. 确认你已记下URL地址. 现在需要显示的Web页就已经生成并保存到你的硬盘上了. 4.在LabVIEW项目浏览器中, 右键单击我的电脑图片选择添加文件添加HTML文档到项目中. 找到你新生成的HTML文档并将其添加进来. 5.右键点击 程序生成规范» 新建» 应用程序来生成可执行文件. 选择源文件 部分将顶层VI添加至启动VI 并添加您的HTML文件至动态VI及支持文件. 点击生成按键生成您的可执行文件. 6.复制可执行文件及生成的其他所有文件到目标机器上(请确认在目标机器上已安装LabVIEW运行时引擎). 7.在你的目标机器上找到应用程序存储的目录. 打开.ini 文件. (1)添加WebServer.Enabled=True这个键值 到其他WebServer键值之后. (2)将web server root path从原来的[LabVIEW]www改为现在您的HTML网页所在的目录(它应该在您的应用程序所在的data目录下). (3)保存对.ini 文件所做的修改并关闭文件. 8.运行您的应用程序. 注意: 如果你在代码的开发机器上运行应用程序,请确认LabVIEW已经关闭. 9.打开其他机器的网页浏览器,输入你在步骤3d中获得的网址. 如果在网页中得到错误This page cannot bedisplayed, 请尝试将网址从http://TargetComputerName/VIname.html改为http://TargetComputerIPaddress/VIname.html. 另外若使用Windows XP请检查您的防火墙设置. 10.您现在应该可以访问到您的程序. 对于一个安装程序中使用远程前面板,思想是相同的. 创建一个Web页. 在项目中包含这个Web页. 生成应用程序并将Web页包含到支持文件中. 创建一个安装程序并在安装程序的源代码设置中将安装程序包含进来. 生成并发布安装程序.最后, 修改 .ini文件. 注意: 默认情况下, 在这个应用程序中对于远程前面板有一个应用许可. 如果你有LabVIEW 专业版, 你会有5个许可. 为了使用这些许可 (或者其他更多您购买的许可), 你需要在安装文件中包含你的应用程序和在附加安装程序中包含 LabVIEW 8.x发布许可. 如果不添加这些附加许可信息, 您发布的应用程序只可以由一台机器进行远程连接. 注意: 如果容量许可管理器在同一台机器上使用,则一个LabVIEW Web服务器不能允许一个以上的许可(因为它们在使用相同的技术). 英文更詳細 How Can I Use Remote Front Panels With LabVIEW Executables? Hardware: PXI/CompactPCI>>Controllers Troubleshooting:Create a LabVIEW project Add your source code to the project Build the web page for your VI: Select Tools»Web Publishing Tool... Select the VI to publish from the VI name drop down menu. Configure the Viewing Mode as either Embedded, Snapshot, or Monitor (click the Helpbutton for an explanation of each option) and click Next Edit the Document title, Header, and Footer and click Next Ensure that the HTML document is saved in your LabVIEWwww directory and clickSave to Disk. Note the Document URL for use in step 9 and Add the HTML document from step 3 to Project Explorer by right-clicking My Computer and selecting Add»Fileand then select the HTML file from your LabVIEWwww directory. Save your project and build your executable by right-clicking Build Specifications andselecting New»Application (EXE). Select the Source Files category. Then, place your top level VI under Startup VIs and your HTML file under Always Included. Click Build and then clickDone when the build is complete. Copy the executable and all of the generated files to your target computerNote: The target computer must have the LabVIEW Run-Time Engine installed and it must match the version of LabVIEW used to develop the executable. On the target computer, browse to the directory where you just copied your executable. Open the .ini file in a text editor and perform the following: Verify the token WebServer.Enabled=True exists. If you cannot find it, add it to the end of the file LabVIEW 8.x prior to LabVIEW 8.6: Add or modify the WebServer.RootPath so that its value is set to the directory where the HTML page currently resides (it should be located in the application's datadirectory) Save the changes to the .ini file and close it LabVIEW 8.6 and later: Close the .ini file and open niwebserver.conf in a text editor. This file was created to handle the new functionality provided by the LabVIEW web server in LabVIEW 8.6 In the second section labeled Directives that apply to the default server there is aDocumentRoot tag. Replace the default LabVIEWwww with the location of your HTML file. Do not include the name of the HTML file in the path Launch your executable Note: Running the executable on the development machine requires that LabVIEW be completely shutdown Open a web browser on another computer and navigate to the URL you obtained in step 3. If you are not running the executable on your development machine, replace the name of the development computer in the URL with the name of the target computer. You can now view and control the LabVIEW executable remotely Q. What steps can I take to resolve the This page cannot be displayed error? A. Try changing the URL from http://TargetComputerName/VIname.html tohttp://TargetComputerIPAddress/VIname.html. Also, verify that your firewall allows access to the port that the LabVIEW web server is using (default is 80). Q. Why do I receive an error statingRemote Panel Connection Refused by Specified Server? A. Typically, this message results from a mismatch in LabVIEW versions. Ensure that the version of the LabVIEW Run-Time Engine on the target computer matches the version of LabVIEW used on the development machine. Installers: To enable remote front panels for an installer, the same ideas apply. Create a web page. Include the web page in your project. Build your executable and include your web page in the support files. Create an installer and include your executable in the installer under the source files setting of the installer. Build and deploy the installer. Lastly, change the .ini and niwebserver.conf files. Licensing: By default, LabVIEW includes one remote front panel license. This means that one connection at a time can be made to the remote front panel of your executable. If you have LabVIEW Professional Edition you are entitled to five licenses for remote panels. In order to have access to these additional licenses (or any others that you may have purchased), you need to build an installer that contains your executable along with the LabVIEW 8.x Deployable License under Additional Installers. Note: A LabVIEW web server cannot permit more than one connection if Volume License Manager is in use on the same computer. This is due to the fact that remote front panel licenses share components with the Volume License Manager. |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
412 浏览 1 评论
NI Vision有个图片打不开其他图都能打开(用NI Vision Assistant也打开不了)
879 浏览 1 评论
labview2015使用Excel报表程序打包生成后打开程序要选一个vi才能使用,否则软件就会报错,这是什么问题?
1463 浏览 2 评论
LabVIEW与单片机无法串口通信 提示串口打开错误 端口设置有问题吗?
1396 浏览 3 评论
1677 浏览 2 评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-21 20:17 , Processed in 0.544496 second(s), Total 83, Slave 63 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号