0

关于投票
LabVIEW与多台AI-501仪表的通迅设计
点击下载LabVIEW与多台AI-501仪表的通迅设计
系统分类: 工业控制
用户分类: Labview
标签: LabVIEW与多台AI-501仪表的通迅设计
来源: 转贴
发表评论 阅读全文(442) | 回复(0)

1

关于投票
时间戳显示0.1S
点击下载如何设置0.1S的时间格式,老是忘,写一个以防万一。
系统分类: 虚拟仪器
用户分类: Labview
标签: 时间显示格式
来源: 原创
发表评论 阅读全文(292) | 回复(1)

0

关于投票
用CFP-DIO-550 relay 控制温度

On/Off Temperature Control with LabVIEW and FieldPoint Using [c]FP-TC-120 and [c]FP-DO-401

 

下载

文件名: temperature_control.vi
要求: View

This VI shows how use Relay.vi to implement a closed-loop control strategy to control an analog process variable such as room temperature. The feedback signal is a thermocouple measurement of the room temperature. The control output turns the heating unit on if the room is too cold and off if the room is too warm.
I/O Connections:
1. Connect the thermocouple signal to Channel 0 of the [c]FP-TC-120.
2. Connect the heating unit control to Channel 0 of the [c]FP-DO-401.

Setup:
1. Edit your comm resource from the FieldPoint software and click Find Devices.
2. Configure the channel ranges using the FieldPoint software.
3. Save your .iak file.
4. Verify that the configuration information above matches the names in the FieldPoint software. If not, edit the values listed above.
5. Close the FieldPoint software.
6. Run the VI.
Using the VI:
1. There are two inputs: the set temperature and the hysteresis.
2. Adjust the set temperature to the temperature you want the room to be.
3. Adjust the hysteresis to determine at what temperatures the digital output is turned on and off. For example, if the hysteresis is set to 2, and the set temperature is 21 degrees, the relay will turn on at 19 degrees and off at 23 degrees.
Because this is a software-timed control system, the Loop Delay controls the rate of acquisition and generation.


Related Links:
LabVIEW PID Control Toolset for Windows

要求


文件名: temperature_control.vi

软件要求


应用软件: LabVIEW完整版开发系统 6.1
工具包和附加软件: LabVIEW PID控制工具包
语言: LabVIEW

硬件要求


硬件组: FieldPoint

zip

 

 

系统分类: 虚拟仪器
用户分类: Labview
标签: 温度控制
来源: 转贴
发表评论 阅读全文(398) | 回复(0)

0

关于投票
在labview 中添加Calculator

文件名: calculator_xcontrol.zip
要求: View

This example demonstrates how to use a LabVIEW XControl. The Calculator XControl can manipulate values similar to a handheld calculator. The value of the XControl is the current calculated value shown in Output.

Open the Calculator XControl Project included with this example to see the configuration of the XControl. The project includes the XControl VIs and controls, as well as the Calculator Example VI that implements the XControl.

Related Links:
Developer Zone Example: String XControl with Autocomplete Functionality
Creating New Front Panel Objects with LabVIEW XControls
LabVIEW 8 Online Help: Using XControls

要求


文件名: calculator_xcontrol.zip

zip

系统分类: 虚拟仪器
用户分类: Labview
标签: Labview 做的计算器
来源: 转贴
发表评论 阅读全文(573) | 回复(0)

1

关于投票
如何制作三态按钮(对如何制作图片按钮的补充)

关于制作图片按钮的过程在前面的文章中有了很好的说明了。但是它是一个2态的按钮,如何制作图片3态按钮呢?这里讲的三态按钮即如果Cursor 移动到时按钮一种状态,正常时一种状态,按下时又是一种状态。以下是用labview 制作3态按钮的过程。

rar

 

 

 

 

 

系统分类: 虚拟仪器
用户分类: Labview
标签: labview 图片按钮制作
来源: 原创
发表评论 阅读全文(981) | 回复(1)

0

关于投票
利用LabVIEW MathScript 开发算法

利用LabVIEW MathScript 开发算法:第一部分——LabVIEW MathScript 节点

0 评级 | 0.00 out of 5
| 打印文档

概览

这一个系列的文章提供了丰富的练习让您熟悉LabVIEW MathScript 。本文提供了使用LabVIEW MathScript节点一步一步开发算法的范例。本系列的下一篇文章将研究交互式LabVIEW MathScript 窗口。

MathScript 含义

无论您是要开发算法、研究信号处理理论还是分析结果,利用LabVIEW 您可以选择最有效的技术计算语法。您可以结合LabVIEW 图形化编程方式和LabVIEW MathScript ,它是面向数学的文本化编程语言,兼容广泛使用的m文件脚本语法。

参见:
LabVIEW MathScript 内幕:了解什么特性使LabVIEW 如此完美的适合于文本化算法开发和原型化
LabVIEW MahtScript示例库:本站点包含了大量LabVIEW MathScript示例。

LabVIEW MathScript 节点

您可以通过两种接口来使用LabVIEW MathScript——LabVIEW MathScript 交互式窗口和MathScript 节点。参考本系列文章的第二篇来了解有关LabVIEW MathScript 的更多信息。

利用LabVIEW MathScript 节点——下图中的蓝色矩形区域,您可以在LabVIEW 图形化程序中(虚拟仪器——VI)中运行m文件语法脚本。您可以使用MathScript 节点在VI中插入文本化算法,然后在LabVIEW 环境中通过增加旋钮、滑块、按钮、图形和其它用户控制件和显示件来仪器化您的脚本。

参见:
利用LabVIEW 进行算法开发和原型化:第二部分——使用MathScript 交互式窗口

LabVIEW 和图形化编程介绍

LabVIEW 是用于工程和科学应用的图形化开发平台,比如设计、控制和测试等。在LabVIEW 中,您可以利用输入控件和显示控件来建立用户界面——前面板。输入控件包括旋钮、按钮、拨盘、文本输入域和其它输入对象。显示控件包括图形、数码显示、LED和其它输出显示。在您建立好用户界面后,利用VI和结构您可以增加代码来控制前面板对象。程序框图包含了这种代码。


[+] 放大图片


完成下列步骤,建立一个VI的前面板和程序框图

1. 打开LabVIEW

2.LabVIEW Getting Started窗口中选择File»New VI,或者点击Blank VI来建立一个新VI



3.VI的前面板上,选择View»Controls Palette来显示控件选板。

4.Modern模板的图标上移动光标定位到Numeric选板上。当您在Controls选板的图标上移动光标,图标下的提示条上会显示子选板、输入控件或显示控件的名称。

5. 点击Numeric图标以显示Numeric选板

6.Numeric选板的图标上移动光标到Vertical Pointer Slide(垂直指针条)上。

7.点击Vertical Pointer Slide图标并拖放到前面板上。

8. 双击Vertical Pointer SlideSlide标签。在出现的文本框中键入Amplitude(幅值)。

8.Controls选板上点击Modern链接返回到Modern顶层模板。在Modern模板的图标上移动光标定位到Graph选板上。

9.点击Graph图标显示Graph选板。

10.Graph选板的图标上移动光标定位到Waveform Graph。点击Waveform Graph图标并拖放到前面板上。


[+] 放大图片

11. 选择Window»Show Block Diagram来显示VI的程序框图。建立程序框图和建立前面板类似。当您把操作对象放置在前面板上时,LabVIEW 会在程序框图中为这些对象建立连线端子。您可以连接数据出入程序框图中的端子,从而在程序的用户界面上显示数据或者在程序中使用用户输入值。

12. 在程序框图上找到AmplitudeWaveform Graph端子。

13.选择File»Save As来保存VI

参考Getting Started with LabVIEWLabVIEW 使用入门)来了解更多有关信息,包括LabVIEW 图形化编程环境和基本的LabVIEW 特性来建立数据采集和仪器控制程序。

参见:
LabVIEW 使用入门

在算法开发和原型化中使用MathScript节点

您可以使用MathScript 节点在LabVIEW 中进行编程开发和原型化算法。完成以下步骤可以在MathScript 节点中进行编程开发和原型化算法。您将在前面已经生成的VI中运行该脚本。
1.
在程序框图上,选择View»Functions Palette来显示Functions选板。

2. 在编程模板的图标上移动光标定位到Structures选板上。

3.点击Structures图标显示Structures选板。

4.Structures选板上移动光标定位到MathScript 节点上。

5. 点击MathScript Node图标。

6.在程序框图上,点击并拖放鼠标画出矩形框来放置MathScript 节点。


[+] 放大图片


7.MathScript 节点内部点击并输入下列命令。

x = linspace(0, 2*pi, 30);
b = A*sin(x)

注意x = linspace(0, 2*pi, 30);命令生成一个新的x变量并在02*pi内均匀取30个值来填入变量。

(可选)您也可以右击MathScript 节点并从快捷菜单中选择Import来输入您所建立的m文件脚本。


[+] 放大图片

   8. 右击MathScript 节点框并从快捷菜单中选择Add Input

9. 在输入端子中键入A,为脚本的A变量提供输入。


[+] 放大图片

10.右击MathScript 节点框并从快捷菜单中选择Add Output

11. 在输出端子中键入b,为脚本中的b变量提供输出。

12. 右击b输出端子并从快捷菜单中选择Choose Data Type»1D-Array»DBL 1D来指定b输出变量的数据类型。


[+] 放大图片


     13.
把光标移动到Amplitude端子的箭头上。光标变成了线轴或连线工具。利用连线工具把程序框图上的对象连接起来。

14. 当连线工具出现时,点击Amplitude端子的箭头,然后再点击MathScript 节点的A输入来连接两个对象。数据将顺着这条连线从Amplitude端子流向MathScript节点。

15.类似地,连接b 输出到Waveform Graph端子。现在您可以从脚本中获取合适的数据并利用LabVIEW 丰富的用户界面功能来可视化地分析结果。程序框图应如下所示:

16.选择Window»Show Front Panel来显示VI的前面板。

17.Amplitude控件的滑块拖放到大约3的位置。

18. 点击前面板顶端的Run按钮或白色箭头。注意波形图形更新为正弦波。

19.拖拉Amplitude控件的滑块到不同的值并再次运行VI。注意波形会相应地更新。

20.(可选)点击前面板顶端的Run Continuously按钮或循环箭头。注意:每次当您改变Amplitude控件的值时波形图也会更新。

21.选择File»Save来保存VI

您可以通过交互式选板、对话框和菜单来操作这些LabVIEW 工具。LabVIEW 也提供了上百种VI,让您在所建立的程序中使用它们。拖放这些VI到程序框图中可以定义您所写程序的功能。这种点击方式能极大地减少从程序最初建立到最终解决方案所需的时间。

相关链接
LabVIEW MahtScript示例库

 

系统分类: 虚拟仪器
用户分类: Labview
标签: 利用LabVIEW MathScript
来源: 转贴
发表评论 阅读全文(397) | 回复(0)

0

关于投票
Error 7 When Running an .EXE Using VIs from Report

Error 7 When Running an .EXE Using VIs from Report Generation Toolkit for MS Office

Primary Software: LabVIEW Toolkits>>Report Generation Toolkit for Microsoft Office
Primary Software Version: 1.2
Primary Software Fixed Version: N/A
Secondary Software: LabVIEW Development Systems>>Full Development System, LabVIEW Development Systems>>Professional Development System

Problem:
Why do I get Error 7 running an .EXE that uses VIs from Report Generation Toolkit for MS Office? The VI runs great in LabVIEW and there were no errors during the building process.

Solution:
This happens when the Report Generation Toolkit's dynamic VIs are not included during the build process.

When you build a stand-alone application or DLL that uses the LabVIEW Report Generation Toolkit 1.0, the support file directory containing  _wordsub.llb and  _exclsub.llb must be located in the same directory as the application or DLL, and must be named data (the default support file directory for the Application Builder). If error 7 is still thrown when executing the application, _wordsub.llb and  _exclsub.llb need to be mass compiled to relink their VIs. Mass compiling is done by selecting Tools»Advanced»Mass Compile.

In versions 1.0.1 and 1.1 of the toolkit, you must add _Word Dynamic VIs.vi from _wordsub.llb and _Excel Dynamic VIs.vi from _exclsub.llb as dynamic VIs on the Source Files tab when you build the application or DLL. These two VIs contain SubVIs that the high-level Report Generation VIs call dynamically.

LabVIEW 7.x

To add the Word and Excel dynamic VIs in LabVIEW 7.x, click on the Source Tab in Application Builder and select Add Dynamic VI.

If using MS Excel, please include the path labview\vi.lib\addons\_office\_exclsub.llb. A file dialog box should come up. Select _Excel Dynamic VIs.VI then click OK.

If using MS Word, please include the path labview\vi.lib\addons\_office\_wordsub.llb. A file dialog box should come up. Select _Word Dynamic VIs.VI then click OK.

LabVIEW 8.x

The Application Builder only lets you add files from your project therefore you have to add this file to your project explorer first:

Then you can add it as a dynamic VI inside the Application Builder:



If you are using the MS Office Report Express VI, you should include the template used by the Express VI in addition to your application. The configuration of the MS Office Report Express VI relies on a report template which is either a basic template provided in the LabVIEW templates directory or a custom template provided by the user. When an executable is created from the MS Office Report Express VI, the template must also be included as a support file in the Source Files tab. This will add the template to the data directory so that the executable will be able to call it upon execution of the program.



Related Links:
KnowledgeBase 2C27CLXL: When Running My Executable Made in Application Builder it Gives ERROR 7

Attachments:


file - file_in_project.jpgadd - add_dynamic.jpg
系统分类: 汽车电子
用户分类: Labview
标签: labview error7