labview

LabVIEW调用DLL动态链接库

你说的曾经没有我的故事 提交于 2020-02-05 03:23:49
LabVIEW调用DLL动态链接库 有些数据运算比如多个数组之间的处理、雨流计数法、卡尔曼滤波使用labview这样的图形编程语言实在过于麻烦,实现不难但有一定的逻辑复杂度,倒不如用C++或者matlab来实现,之后生成DLL供LabVIEW调用。 示例一 通过调用DLL实现数组求和。输入一个10个元素的数组,返回全部元素之和。 1.生成DLL VS中选择创建动态链接库项目 在头文件和源文件文件夹分别创建相应的.h .cpp文件 在test.h中添加函数声明 extern "C" __declspec ( dllexport ) int qiuhe ( int raw [ 10 ] ) ; 在test.cpp中写函数体,注意要包含这两个头文件 # include "pch.h" //--- # include "test.h" //--- extern "C" __declspec ( dllexport ) int qiuhe ( int raw [ 10 ] ) { int add = 0 ; for ( int i = 0 ; i < 10 ; i ++ ) add + = raw [ i ] ; return add ; } 点击生成解决方案就得到DLL文件。无法直接运行或者调试,可以间接使用。 2.写LabVIEW程序 程序框图页面——互联接口——库与可执行程序—

LabVIEW面向对象的ActorFramework(3)

落花浮王杯 提交于 2020-02-05 02:42:02
四、LabVIEW面向对象的编程架构:Actor Framework Actor Framework是一个软件类库,用以支持编写有多个VI独立运行且相互间可通信的应用程序,在该类型应用程序中,每个VI即代表操作者(Actors)执行独立的系统任务,操作者本身维持着自己的内部状态,并传递消息给其它的操作者,在LabVIEW编程环境中已经有了一些创建此类架构程序的技术存在,而操作者框架则聚焦于容易学习(相对于其它可能强大的工具而言),够降低死锁和竞争条件,并拥有最大限度代码复用的优点。 加载ActorFramework4.1.0,可以看到当前框架的基本结构,主要父类有Actor和Message,及Message队列类、出入队列类、优先级操作类。 Actor:拥有数据状态的模块。 Message:消息在操作者间传递用来触发状态改变。 在NI官方资料中,介绍操作者框架(ActorFramework)是在广泛应用的队列驱动状态机(QDSM)的基础上开发而成,但更优于DSDM的框架。 现在用官网的QDSM和ActorFramework的程序图做一下比较,能够很直观的看出两者的程序简洁性,如下图所示: QDSM ActorFramework 可以看到,使用操作者框架后,整个程序非常简洁,队列驱动状态机的簇和相关代码封装成类和方法,消息和条件结构封装为类和动态匹配。当接收到消息时

LabVIEW面向对象的Actor Framwork架构(1)

天涯浪子 提交于 2020-02-02 18:25:21
本系列文章主要阐述以下几个问题: (1)什么是面向对象编程? (2)为什么要学习面向编程? (3)LabVIEW面向编程学习为什么有点难? (4)LabVIEW面向对象的编程架构:Actor Framwork 一、什么是面向对象 学习新知识,首先要搞明白定义。关于面向对象的定义,这里引用了百度百科的资料: 面向对象(Object Oriented)是软件开发方法。面向对象的概念和应用已超越了程序设计和软件开发,扩展到如数据库系统、交互式界面、应用结构、应用平台、分布式系统、网络管理结构、CAD技术、人工智能等领域。面向对象是一种对现实世界理解和抽象的方法,是计算机编程技术发展到一定阶段后的产物。 面向对象是相对于面向过程来讲的,面向对象方法,把相关的数据和方法组织为一个整体来看待,从更高的层次来进行系统建模,更贴近事物的自然运行模式。 面向对象的几大特性如下: (1)对象唯一性。 每个对象都有自身唯一的标识,通过这种标识,可找到相应的对象。在对象的整个生命期中,它的标识都不改变,不同的对象不能有相同的标识。 (2)抽象性。 抽象性是指将具有一致的数据结构(属性)和行为(操作)的对象抽象成类。一个类就是这样一种抽象,它反映了与应用有关的重要性质,而忽略其他一些无关内容。任何类的划分都是主观的,但必须与具体的应用有关。 (3)继承性。 继承性是子类自动共享父类数据结构和方法的机制

Labview远程连接MySQL详细教程

流过昼夜 提交于 2020-01-13 06:26:44
一、远程服务器上MySQL的操作 1、服务器安装MySQL 远程桌面连接 下载安装MySQL(个人喜欢使用mis安装) 下载地址:https://dev.mysql.com/downloads/mysql/ 按照网上的教程很容易安装。 2、配置MySQL容许远程访问 首先,服务器的防火墙要容许MySQL的端口支持TCP/IP协议(MySQL的访问端口默认是3306) 如上图所示,端口3306已经默认是支持TCP访问。如果不支持,可以点击右侧的新建规则。 然后,在MySQL中创建一个用户,让该用户能够远程访问MySQL中的数据库。 打开MySQL 8.0 Command Line Client 输入密码,登陆MySQL; 创建远程登陆用户并授权; CREATE USER 'user_name'@'host' IDENTIFIED BY 'password'; user_name. *:要创建的用户名; host :表示要这个新创建的用户允许从哪台机登陆,如果只允许从本机登陆,则 填 ‘localhost’ ,如果允许从远程登陆,则填 ‘%’; ’password’ :新创建用户的登陆数据库密码,如果没密码可以不写。 例如: mysql > create user 'user_name' @ '%' identified by '123456' ; Query OK , 0 rows

LabVIEW: OK Button doesn't update its color after pressed

删除回忆录丶 提交于 2020-01-03 17:13:39
问题 Hi I have a simple VI to press a button to turn on the led. My code works just fine except I would like to have the button to be back to normal color after pressing. I tried all the mechanical actions, but none of them does what I want it to do. The procedure is as follows: Say before user presses the button it appears like this After user presses the button it becomes Then the led turns on Once it executes the event the button goes back to The block diagram is shown below: I am puzzled and

LabVIEW: OK Button doesn't update its color after pressed

筅森魡賤 提交于 2020-01-03 17:13:05
问题 Hi I have a simple VI to press a button to turn on the led. My code works just fine except I would like to have the button to be back to normal color after pressing. I tried all the mechanical actions, but none of them does what I want it to do. The procedure is as follows: Say before user presses the button it appears like this After user presses the button it becomes Then the led turns on Once it executes the event the button goes back to The block diagram is shown below: I am puzzled and

How to Wait on Service Request (RQS)

こ雲淡風輕ζ 提交于 2020-01-02 07:54:49
问题 **Note: Cross-posted at LabVIEW forums: http://forums.ni.com/t5/LabVIEW/C-VISA-wait-on-RQS/td-p/3122939 I'm trying to write a simple C# (.NET 4.0) program to control a Keithley 2400 SMU over VISA GPIB and I'm having trouble with getting the program to wait for the Service Request that the Keithley sends at the end of the sweep. The sweep is a simple linear voltage sweep, controlled internally by the Keithley unit. I've got the unit set up to send a ServiceRequest signal at the end of the

How to Wait on Service Request (RQS)

谁说胖子不能爱 提交于 2020-01-02 07:54:07
问题 **Note: Cross-posted at LabVIEW forums: http://forums.ni.com/t5/LabVIEW/C-VISA-wait-on-RQS/td-p/3122939 I'm trying to write a simple C# (.NET 4.0) program to control a Keithley 2400 SMU over VISA GPIB and I'm having trouble with getting the program to wait for the Service Request that the Keithley sends at the end of the sweep. The sweep is a simple linear voltage sweep, controlled internally by the Keithley unit. I've got the unit set up to send a ServiceRequest signal at the end of the

How can a Labview VI be run as a background task through an ActiveX call ? (without keeping ActiveX busy)

拟墨画扇 提交于 2019-12-31 04:37:32
问题 I would like to execute a Labview VI through ActiveX in Matlab. I use the following commands: e=actxserver('LabVIEW.Application'); vipath='C:\DATA\Labview\test.vi'; vi=invoke(e,'GetVIReference',vipath); vi.Run; This works correctly and the VI is seen to execute on its front panel. However, Matlab keeps waiting until the VI has terminated. I want Labview to run the VI silently, without telling Matlab (through ActiveX) to wait. How can a VI be executed without keeping ActiveX busy ? Is there a

Wideband RF Transceiver Evaluation Software

蓝咒 提交于 2019-12-25 09:45:00
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> These are the evaluation boards that are available for the AD9371/AD9375 and ADRV9008/ADRV9009 Wideband RF transceivers and their corresponding compatible software. Transceiver Part Evaluation Board Compatible Evaluation Software AD9371 ADRV9371-N(W)/PCBZ AD9371/AD9375 Evaluation Software with GUI for Evaluation Board (ZIP) AD9371/AD9375 API Source Code (ZIP) AD9375 ADRV9375-N(W)/PCBZ AD9371/AD9375 Evaluation Software with GUI for Evaluation Board (ZIP) AD9371/AD9375 API Source Code (ZIP) DPD GUI for AD9375 (ZIP) AD9375 ADRV-DPD1/PCBZ AD9375 Small Cell Radio