分类目录归档:Labview 设计

LabVIEW 使用 dll

labview密码破解请联系QQ:1425939287,速度一流,价格优惠

最近有网友来信询问于在LabVIEW 中如何使用” User32.dll ”中API EnumWindows ,由于它是使用callback 的方式传回资料因此需封装成dll 的形式给LabVIEW 使用,本篇将介绍此过程的程序撰写方式。
在LabVIEW 中若想要使用dll 来注册Event ,dll 必须加入extcode.h 这个头文件和使用Library 档labview.lib 或labviewv.lib 。
对于到底是使用labview.lib 或labviewv.lib ,根据这篇文章(labview.lib or labviewv.lib?[http://forums.ni.com/t5/LabVIEW/labview-lib-or-labviewv-lib/ td-p/2916894]) ,我的理解是为了对应不同版本的LabVIEW RunTime ,应该要使用labviewv.lib 。
首先由微软的MSDN 查看EnumWindows 的使用说明:
BOOL WINAPI EnumWindows(
_In_ WNDENUMPROC lpEnumFunc,
_In_ LPARAM lParam
);
Parameters
lpEnumFunc [in]
Type: WNDENUMPROC
A pointer to an application-defined callback function. For more information, see EnumWindowsProc .
lParam [in]
Type: LPARAM
An application-defined value to be passed to the callback function.
Return value
Type:
Type: BOOL
If the function succeeds, the return value is nonzero.
由此可看出EnumWindows 需要输入的参数,lpEnumFunc 就是callback函数的原型,要传入实作函数程序码的位址,lParam 则是输入的参数,要传入未定的资料型态位址。
接着再看看EnumWindowsProc的函数原型定义:
BOOL CALLBACK EnumWindowsProc(
_In_ HWND hwnd,
_In_ LPARAM lParam
);
Parameters
hwnd [in]
A handle to a top-level window.
lParam [in]
The application-defined value given in EnumWindows or EnumDesktopWindows .
Return value
To continue enumeration, the callback function must return TRUE ; to stop enumeration, it must return FALSE .
由此可知EnumWindowsProc 这个callback 函数的原型声明方式,当callback发生时系统会提供 hwnd 就是我们想要列举的程序handle值,而lParam 在这边并没有用到。
有了这些资讯就可以开始编写提供给LabVIEW 的dll 了,首先先定义回传给LabVIEW的资料型态,由于希望取得的是目标程序的类别字串和视窗名称自串,因此宣告一个结构包和两个字串:
typedef struct tagStrRec {
LStrHandle Str1;
LStrHandle Str2;
} StrRec, *StrRecPtr;
这样的话在LabVIEW 的部分就可以解成cluster 包含两个String 的结构。
接着宣告全局变数用于储存LabVIEW UserEvent的位址和常数。

//labview 密码破解, Labview 忘记密码请找QQ:1425939287

// 纪录LabVIEW UserEvent的位址
LVUserEventRef EnumWindowsEvent;
// 预设最长字串长度为256 Bytes
#define STRING_LENGHT 256
然后再宣告dll 输出的函数:
// 用于注册LabVIEW事件
MgErr __declspec(dllexport) __cdecl RegisterEnumWindowsEvent(LVUserEventRef *value);
// 用于呼叫dll 内EnumerateWindows
void __declspec(dllexport) __cdecl EnumerateWindows(void);
实作这两个函数与callback 函数就完成dll 的部分。

labview 密码破解, Labview 忘记密码请找QQ:1425939287
MgErr __declspec(dllexport) __cdecl RegisterEnumWindowsEvent(LVUserEventRef *value)
{
// 用于纪录LabVIEW 程序内Event 的位址
EnumWindowsEvent = *value;
return 1;
}
void __declspec(dllexport) __cdecl EnumerateWindows(void)
{
// 透过dll 呼叫EnumWindows ,并传入dll内宣告的callback函数位址。

//labview 密码破解, Labview 忘记密码 请找QQ:1425939287

EnumWindows(EnumWindowsProc, NULL);
}
BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam)
{
char class_name[STRING_LENGHT];
char title[STRING_LENGHT];
StrRec returnData;
// init labview string
returnData.Str1=(LStrHandle)DSNewHandle(sizeof(int32)+STRING_LENGHT*sizeof(uChar));
returnData.Str2=(LStrHandle)DSNewHandle(sizeof(int32)+STRING_LENGHT*sizeof(uChar));
// get windows class and title data
GetClassName(hwnd,class_name, sizeof(class_name));
GetWindowText(hwnd,title,sizeof(title));
// convert char arr to labview string
PopulateStringHandle(returnData.Str1,class_name);
PopulateStringHandle(returnData.Str2,title);
// use labview event to send back data
PostLVUserEvent(EnumWindowsEvent,(void *)&returnData);
return TRUE;
}
LabVIEW 程序的部分主要就是dll 的呼叫与User Event 的注册

Based on Circuit Course virtual experimental platform Multisim and LabVIEW architecture _ Wu Guifeng基于Multisim和LabVIEW的电路课程虚拟实验平台的构架_吴桂峰

基于Multisim和LabVIEW的电路课程虚拟实验平台的构架_吴桂峰

 

Based on Circuit Course virtual experimental platform Multisim and LabVIEW architecture _ Wu Guifeng

· 90 · contemporary practice and education research-based framework of LabVIEW and Multisim circuit course Virtual Experiment Platform Yangzhou University Wugui Feng Lei Chen Dong Tang Hongru Abstract: Through Multisim to create electronic circuits, create a controller for LabVIEW, LabVIEW and Multisim is achieved between the co-simulation by introducing simulation platform can enhance students’ mastery of circuit concepts and theories to understand, through examples and discuss the virtual platform in circuit experiment Teaching. Further promoting the teaching curriculum, “circuit”, the ability to improve students’ comprehensive experiments. Keywords: Multisim Labview virtual circuit course experiment platform Article ID: ISSN2095-6711 / Z01-2016-01-0090 I. Background and Significance framework virtual experiment platform Currently, there are all kinds of colleges and universities have advanced theoretical knowledge and experimental programs and backward the traditional test equipment and test equipment does not match the conflict. The shortage of large student base and also makes experimental teaching instrument appeared a considerable drawback. In recent years, the strong support of the state, colleges and universities to train high-quality personnel to meet the needs of experimental teaching has also been strengthened, the most important is the introduction of new distance education media, new design principles and programming software to enhance operational experiment and usability. “Virtual Lab (Virtual Lab)” The concept of the University of Virginia professor of American William Wolfe in 1989 first proposed. It is similar to the general physical laboratory, provides equipment and related equipment for the students to configure their own hands, connect, adjust and use. At the same time, teachers can also use virtual equipment library equipment operational freedom to build any experiment or test case, so long as there are students and teachers and related computer software can make the appropriate experimental teaching, which is a virtual laboratory are different in general experimental courseware important attribute. With the new requirements of the development of teaching equipment and experimental teaching in Universities in the New faces will be introduced virtual instrument experiment teaching colleges and universities will become an important future teaching and research methods and means. Two, LabVIEW virtual experiment platform architecture used in the theoretical basis of the virtual instrument is a computer-based software instruments, instrument systems and is the result of a combination of computer technology, some programs may be implemented by running some hardware physical function. From the point of view of the instrument, these programs are called virtual instruments. In the virtual instrument during use, can improve the performance of virtual instruments by modifying the properties of the instrument, the instrument continuously extended functionality. Currently, the most popular virtual instruments used to develop the software LabVIEW. LabVIEW itself features a more complete software development environment, it is as an alternative to conventional Basic or C language design. LabVIEW development software is a graphical programming language, it is widely accepted by industry, academia and research laboratories, as a standard data acquisition and instrument control software. Third, based on the framework curriculum virtual circuit experiment platform of Multisim and LabVIEW 1. The first order circuit transition process. (1) Create the circuit: Optional source voltage, resistance, capacitance, selected from a library of single-pole double-throw switch components J1 and oscilloscope XSC1, create a first-order circuit shown in Figure 1. Capacitor charging and discharging control by the switch J1, simulation, the switching is controlled by the spacebar Space, press the spacebar once, switching from one contact to another contact. Charging and discharging process of FIG. 1 a first order circuit (2) capacitors: When the switch is switched to the contacts J1 1, the voltage source V1 through the resistors R1, R2 to charge the capacitor C1 when the switch is switched to the contact 2, the capacitor through resistor R2 , R3 discharge. (3) simulation run: Click Run (RUN) button, double-click the icon XSC1 oscilloscope, oscilloscope display interface pops up repeatedly switch can be obtained waveform capacitor charging and discharging, as the switch to stay at 1:00 when the contact 2 power has been to charge the capacitor, the capacitor charge to a maximum of 12V, the beginning of charging and discharging the capacitor 2 as shown in the waveform. Figure 2 is a first order circuit capacitor discharge waveform diagram 3 capacitance charging and discharging of the simulation waveform is small, the size of the circuit parameters selection should be reasonable, and the speed of the transition process circuit time constant related to the size, the greater the time constant of the transition process slower; smaller the time constant, the faster the transition process. When the circuit the other parameters constant, capacitance size represents the time constant size. Figure 3 is given when a small capacitance, C = time 100μF, capacitor discharge waveform that is approximately rectangular wave, charge and discharge faster, rising and falling edges steepening. 2. between NI LabVIEW and Multisim software co-simulation of analog and digital data. In the design and analysis of some of the complete system (such as electrical and mechanical engineering industry some applications), we often need to effectively between the analog and digital portions of the design. During the experiment, using the LabVIEW Multisim software to change a series RLC circuit output voltage value of the DC power supply, and then after the simulation circuit output voltage back to LabVIEW, and LabVIEW graphical display in the display. (1) Create an analog circuit in Multisim. First of a series RLC circuit principle experiment created in Multisim based on the complete circuit comprises a voltage-controlled voltage source and the inductor, capacitor and resistor in series. Then add LabVIEW interactive interface (HB / SC) in the schematic, and then open the LabVIEW Co-simulation Terminals window will HB / SC interface is set to input or output for LabVIEW, and LabVIEW for data transmission between the simulation engine, voltage-controlled voltage source DOI: 10.16534 / j.cnki.cn13-9000 / g.2016.0072 · 91 · · education · theory of output voltage in LabVIEW is controlled by a control output RLC filter sent back to LabVIEW, then graphical display in the control input voltage and output voltage simultaneously displayed for comparison. (2) in LabVIEW to create a digital controller. To transfer data between LabVIEW and Multisim, you first need to use LabVIEW to control and simulation loop (Control & Simulation Loop). Then add VI in emulation suspend (Halt Simulation) function to stop the simulation loop control. Next will manage the communication between LabVIEW and Multisim simulation engine Multisim Design VI placed in the block diagram. Such Multisim Design VI generates terminal, terminal form of the Multisim environment Multisim Design VI Preview consistent with the corresponding inputs and outputs. To Multisim circuit in transmitting data, you must first create a digital control on the front panel. And digital control terminals connected to the Multisim VI input. (3) in between LabVIEW and Multisim achieve joint simulation. After creating analog circuits and digital control in Multisim and LabVIEW, and the establishment of good data communications can be achieved between the two co-simulation environment simulation, and the results are graphically displayed to the LabVIEW front panel waveform chart in. Multisim and LabVIEW to create a good analog and digital control, and we have established good data communications. Click the Run button in the toolbar LabVIEW co-simulation can be achieved between the two simulation environment, and the results are graphically displayed to the LabVIEW front panel waveform graph. By modifying the LabVIEW input voltage, observe the results returned from the Multisim simulation engine output voltage. 3. Based on LabVIEW & Multisim temperature measurement system design. With the Multisim 10.1 and NI Educational Laboratory Virtual Instrumentation Suite II (NI ELVIS II) release, combined with the use of these products can make up the gap between theory and practice, thereby providing a new method for hands-on learning. The following platinum resistance temperature measurement circuit, for example, circuit-based curriculum introduced Multisim and LabVIEW virtual experiment platform temperature measurement system design and simulation. (1) Based on Multisim simulation of platinum resistance temperature measurement circuit. Temperature measurement circuit by the temperature sensor (platinum resistance), the basic amplification circuit, voltage links, correcting links and other components. As shown in Figure 4. The use of powerful simulation capabilities to Multisim circuit analysis can determine the parameters of the circuit. Figure 4 Total temperature measurement circuit in the measuring circuit shown in FIG. 4, may be a DC Resistance Module scan analysis, observed and measured relationship between the temperature of the platinum resistor. Scanning power to the analog voltage source V1 measuring temperature values, the scanning range from 0 to -100V (ie simulated changes from 0 to -100 ℃), the voltage difference between the observed changes between nodes 4 and 3 (simulation of platinum resistance changes). DC sweep analysis results as shown in FIG. 5 is a solid line analysis of the resulting data, the resulting broken line connecting the two end points of a straight line, showing that there is a nonlinear relationship between the resistance value of the platinum resistance and temperature. Therefore it needs to be adjusted Rw2 to adjust the degree of feedback, thereby correcting the output voltage and temperature of the non-linear relationship. Relationship between resistance and temperature resistance of platinum FIG. 5 (2) based on LabVIEW virtual instrument design. Virtual instrument design includes a front panel (front panel), a flow chart (block diagram) and the icon / connector (icon / connector) in three parts. Taking into account the input is a 2-dimensional array with respect to time and voltage, to design a time-domain signal acquisition. By the time domain signal acquisition, the voltage waveform extracted out, and then a continuous input voltage value as the VI. Double-click the created sub-VI, right-click the icon in the front panel window pane, select Show Connector from the shortcut menu. Next is associated terminals on the front panel controls and connectors of the window, the input port and the time-domain signal acquisition “voltage” is connected; the two output ports are connected to the “Rt” “thermometer” two display module. After the completion of the work, to complete the establishment of the sub-VI (3) LabVIEW and Multisim interface circuit design. The purpose of this part of the interface design is to design a subroutine above LabVIEW Multisim mosaic to show the temperature and other parameters. Interface circuit design is carried out in StarterInputstrument.vit open StarterInputstrument.vit block diagram template, complete block diagram of the interface design. In the data processing section, select “Update DATA” option to be modified. Press the diagram shows the block diagram, click the right mouse button to select “Select VI”, the completion of the sub-VI in LabVIEW add “Update DATA” option, subroutine interface Multisim output data interface, the subroutine Create an output terminal indicator. (4) LabVIEW and Multisim co-simulation. The designed circuit and a display module connected to the circuit after adjustment for simulation to verify the circuit design is reasonable. Figure 6 is a simulation of four different temperatures when taken, can be seen that the non-linear error of this design is not big, about 2%, in line with the design requirements. Figure 6 Simulation results References: [1] Liu Jun, Yang Ping, Lu linking Rong .Multisim 11 in Analog Electronic Technology Experiment [J] Laboratory Research and Exploration, 2013 [2] Yang Lina, Cui Wenhua, Wang Shun Yu Based on Multisim and analog circuit design virtual experimental platform on LabVIEW [J]. Chinese education information, 2014 [3] Zhou Yan, Chen Jian. based on LabVIEW and Multisim virtual electronic experiment system [J]. computer systems & applications, 2013 [4] Dai Chengmei Dai Jian based on LabVIEW virtual Electrical and electronic network laboratory Research and Development [J]. laboratory research and exploration, 2011 [5] Zhang Xiaoqiang, Hong Yan Ping, Zhu Jun .LabVIEW data acquisition design conditioning circuit [J]. Popular Science, 2012 Circuit1 JLAXIN DC Transfer Characteristic vv1 Volage (V) Volage (V) 50 60 70 80 90 100 110 -100 -80 -60 -40 -20 0 (a) -90 ℃ (b) -70 ℃ (c) -50 ℃ (d) -30 ℃

·90· 当代教育实践与教学研究 基于 Multisim 和 LabVIEW 的电路课程 虚拟实验平台的构架 扬州大学  吴桂峰  唐鸿儒  陈东雷 摘 要:本文通过 Multisim 创建电子电路,在 LabVIEW 中创建控制器,实现 LabVIEW 和 Multisim 之间的联合仿真,     通过引入仿真实验平台可加深学生的对电路相关概念的掌握及相关理论的理解,并通过实例探讨了虚拟平     台在电路实验教学中的应用。进而推进《电路》课程的教学,提高学生综合实验的能力。 关键词:Multisim Labview 电路课程 虚拟实验平台 文章编号:ISSN2095-6711/Z01-2016-01-0090 一、构架虚拟实验平台的背景及意义 目前,各类高校都存在着先进理论知识和实验方案与落后 的实验器材和传统实验仪器不匹配的矛盾。而学生的大基数和 仪器的紧缺也使得实验教学出现了相当大的缺陷。近年来,在国 家的大力支持下,高校为满足培养高素质人才的需求,实验教 学也在不断加强,最主要的就是引进新型远程教育媒体、设计 原理和新型程序设计软件来加强实验的可操作性和利用性。“虚 拟实验室(Virtual Lab)”的概念由美国弗吉尼亚大学的教授威 廉·沃尔夫于 1989 年率先提出。它与一般的实体实验室类似, 都提供了相关设备和器材供学生自己动手配置、连接、调节和 使用。同时,教师也可以利用虚拟器材库中的器材自由的搭建任 意可操作的实验或实验案例,使得学生和教师只要存在电子计 算机和相关软件就可以进行相应的实验教学,这是虚拟实验室 有别于一般实验教学课件的重要属性。随着教学仪器的发展和 高校新时期实验教学所面临的新要求,将虚拟仪器引入实验教 学将成为高等学校未来教学科研的重要方法和手段。 二、LabVIEW 应用于虚拟实验平台构架的理论基础 虚拟仪器是基于计算机的软件仪器 , 是仪器系统与计算机 技术相结合的结果 , 通过运行一些程序可以实现某些硬件的物理 功能。从仪器角度来看 , 这些程序被称为虚拟仪器。在虚拟仪器 使用过程中 , 可以通过修改仪器的属性提高虚拟仪器的性能 , 不 断扩展仪器的功能。目前 , 用来开发虚拟仪器最流行的软件是 LabVIEW。LabVIEW 本身是功能较完整的软件开发环境 , 它是 作为替代常规的 Basic 或 C 语言而设计的。LabVIEW 开发软件 是一个图形化编程语言 , 它广泛地被工业界、学术界和研究实验 室所接受,视为一个标准的数据采集和仪器控制软件。 三、基于 Multisim 和 LabVIEW 的电路课程虚拟实验平台的 构架 1. 一阶电路的过渡过程。(1)创建电路:从元器件库中选 择电压源、电阻、电容、单刀双掷开关 J1 和示波器 XSC1,创建 如图 1 所示的一阶电路。电容的充放电由开关 J1 控制,仿真时, 开关的切换由空格键 Space 控制,按下一次空格键,开关从一个 触点切换到另一个触点。 图 1 一阶电路 (2)电容的充放电过程:当开关 J1 切换到触点 1 时,电压 源 V1 经电阻 R1、R2 给电容 C1 充电,当开关切换到触点 2 时, 电容经电阻 R2、R3 放电。 (3)仿真运行:单击运行(RUN)按钮,双击示波器 XSC1 图标,弹出示波器显示界面,反复切换开关,就能得到电容的充 放电波形,如图 2 所示当开关停留在触点 1 时,电源一直给电容 充电,电容充到最大值 12V,如图 2 中电容充放电波形的开始阶 段。 图 2 一阶电路电容的充放电波形图 图 3 电容容量较小时的充放电波形 仿真时,电路的参数大小选择要合理,电路的过渡过程快 慢与时间常数大小有关,时间常数越大,则过渡过程越慢;时间 常数越小,则过渡过程越快。电路中其他参数不变时,电容容量 大小就代表时间常数的大小。图 3 所示给出了电容容量较小时, C = 100μF 时,电容的充放电波形,该波形近似为矩形波,充放 电加快,上升沿和下降沿变陡。 2. 在 NI LabVIEW 和 Multisim 软件之间实现模拟和数字数据 的联合仿真 。在设计和分析一些完整系统 ( 例如电力和机械行 业的一些工程应用 ) 的时候,常需要有效地在模拟部分和数字部 分之间进行设计。实验过程中,使用 LabVIEW 来改变 Multisim 软件中的一个串联 RLC 电路中直流电源的电压输出值,然后将 仿真后的电路输出电压回传给 LabVIEW,并在 LabVIEW 显示图 形中进行显示。 (1)在 Multisim 中创建一个模拟电路。首先根据实验原 理在 Multisim 中创建一个 RLC 串联电路,完整的电路包括一个 与电感,电容和电阻串联的压控电压源。接着在电路图中添加 LabVIEW 交互接口 (HB/SC),然后,打开 LabVIEW Co-simulation Terminals 窗口来将 HB/SC 接口设置为针对 LabVIEW 的输入或者 输出,用以与 LabVIEW 仿真引擎之间的数据收发,压控电压源 DOI:10.16534/j.cnki.cn13-9000/g.2016.0072 ·91· ·教育理论研究· 的输出电压由 LabVIEW 中的一个控件控制,RLC 滤波器的输出 传送回给 LabVIEW,然后在图形化显示控件中将输入电压和输 出电压同时进行显示,以便于比较。 (2) 在 LabVIEW 中 创 建 一 个 数 字 控 制 器。 为 了 在 LabVIEW 和 Multisim 之间传送数据,首先需要使用 LabVIEW 中 的控制与仿真循环 (Control & Simulation Loop)。接着在 VI 中添加 仿真挂起 (Halt Simulation) 函数来停止控制仿真循环。接下来将 管理 LabVIEW 和 Multisim 仿真引擎之间通讯的 Multisim Design VI 放置到程序框图中。这样 Multisim Design VI 会生成接线端, 接线端的形式与 Multisim 环境中的 Multisim Design VI 预览一致, 具有相对应的输入与输出。要向 Multisim 中的电路传送数据,还 必须首先在前面板上创建一个数字控件。并将数字控件的接线 端连接到 Multisim VI 的输入上。 (3) 在 LabVIEW 和 Multisim 之 间 实 现 联 合 仿 真。 在 Multisim 和 LabVIEW 中创建好模拟电路和数字控制,并建立好 了数据通讯之后就可以在两个仿真环境之间实现联合仿真,并 且将结果以图形化的形式显示到 LabVIEW 前面板的波型图表 中。在 Multisim 和 LabVIEW 中创建好了模拟电路和数字控制, 而且我们已经建立好了数据通讯。点击 LabVIEW 工具栏中的运 行按钮就可以在两个仿真环境之间实现联合仿真,并且将结果 以图形化的形式显示到 LabVIEW 前面板的波型图表中。通过修 改 LabVIEW 中的输入电压,可观察从 Multisim 仿真引擎返回的 输出电压的结果。 3. 基于 LabVIEW & Multisim 的温 度 测量系统 设 计。随 着 Multisim 10.1 和 NI 教学实验室虚拟仪器套件 II(NI ELVIS II)的 发布,结合使用这些产品可以弥补理论和实际的差距,从而提 供全新动手学习的方法。下面以铂电阻测温电路为例,简要介绍 基于 Multisim 和 LabVIEW 的电路课程虚拟实验平台的温度测量 系统设计及仿真。 (1)基于 Multisim 的铂电阻测温电路仿真分析。测温电路 由温度传感器(铂电阻)、基本放大电路、稳压环节、校正环节 等部分组成。如图 4 所示。利用 Multisim 强大的仿真功能对电路 进行分析,可确定电路的参数。 图 4 温度测量电路 在图 4 所示的总测量电路中,可对铂电阻模块进行直流扫 描分析,观察测量温度与铂电阻阻值的关系。扫描电源为模拟 测量温度数值的电压源 V1,扫描范围为 0 到 -100V(即模拟 0 到 -100℃的变化),观察节点 4 和 3 之间的电压差变化(模拟 铂电阻的变化)。直流扫描分析的结果如图 5 所示,实线的是分 析所得数据,虚线是连接两端点所得的直线,可见铂电阻的阻 值与温度的关系存在非线性。因此需要调节 Rw2 来调节反馈的 程度,从而矫正输出电压与温度的非线性关系。 图 5 铂电阻阻值与温度的关系 (2)基于 LabVIEW 的虚拟仪器设计。虚拟仪器设计包括前 面板 (front panel)、流程图 (block diagram) 以及图标 / 联接器 (icon/ connector) 三部分。 考虑到输入是关于时间和电压的 2 维数组,设计一个时域 信号采集器。通过时域信号采集器,将电压的波形提取出来,再将 连续电压值作为 VI 的输入。双击创建好的子 VI,用鼠标右键单击 前面板窗口中的图标窗格,在快捷菜单中选择显示连接器。接下来 是建立前面板上的控件和连接器窗口的端子关联,把输入端口与 时域信号采集器“电压”相连;把两输出端口分别于“Rt”“温度计” 两显示模块相连。完成上述工作后,即完成了子 VI 的建立 (3)LabVIEW 与 Multisim 接 口 电 路 的 设 计。 本 设 计 接口部分的目的是把以上 LabVIEW 中设计的子程序镶嵌到 Multisim 中进行温度及其他参数的显示。接口电路的设计是在 StarterInputstrument.vit 中进行,打开 StarterInputstrument.vit 的框 图模板,完成接口框图的设计。在数据处理部分选择“Update DATA”选项进行修改。按框图的说明,在结构框图中单击鼠标 右键选择“选择 VI”,把在 LabVIEW 完成的子 VI 添加在“Update DATA”选项中,子程序的接口连接 Multisim 的输出数据接口, 在子程序的输出端创建指示器。 (4)LabVIEW 与 Multisim 联合仿真。把设计好的电路和显 示模块相连接,电路调整后,进行仿真,验证电路设计是否合理。 图 6 为所取的 4 个不同温度时的仿真,可以看出,本设计的非线 性误差不大,约为 2%,符合设计要求。 图 6 仿真结果 参考文献: [1]刘 君,杨晓苹,吕联荣等.Multisim 11在模拟电子技术实验 中的应用[J].实验室研究与探索,2013 [2]杨立娜,崔文华,王顺俞.基于Multisim和LabVIEW的模拟电 路虚拟实验平台的设计[J].中国教育信息化,2014 [3]周 艳,陈永建.基于LabVIEW和Multisim的虚拟电子实验系 统[J].计算机系统应用,2013 [4]戴成梅,戴成建.基于LabVIEW的电工电子网络虚拟实验室 研究与开发[J].实验室研究与探索,2011 [5]张小强,闫洪平,朱 俊.LabVIEW数据采集中调理电路的 设计[J].大众科技,2012 Circuit1 JLAXIN DC Transfer Characteristic vv1 Volage(V) Volage(V) 50 60 70 80 90 100 110 -100 -80 -60 -40 -20 0 (a)-90℃ (b)-70℃ (c)-50℃ (d)-30℃