研华DAQ数据采集卡编程

DAQ数据采集卡软件编程-只支持一个程序来访问设备编程

一、安装软件开发包(SDK)---DAQNAVI_SDK。数组

二、可识别到数据采集卡片。spa

三、加载C#编程的动态连接库-dll文件。(Automation.BDaq.dll与Automation.BDaq4.dll区别)。orm

四、编写软件流程。对象

4.1DI数字量输入流程图:blog

描述以下:开发

1)、建立InstantDiCtrl对象。it

Automation.BDaq.InstantDiCtrl ind = new Automation.BDaq.InstantDiCtrl();io

2)、选择获取设备。form

ind.SelectedDevice = new DeviceInformation(deviceNumber);

3)、读取设备Di信息。

 ind.Read(portStart, portCount, values);//从portStart端口到portCount端口,读取的值存至values数组中。

 

4.2DO数字量输出流程图:

描述以下:

 

1)、建立InstantDoCtrl对象。

 

Automation.BDaq.InstantDoCtrl ind = new Automation.BDaq.InstantDoCtrl();

 

2)、选择获取设备。

 

ind.SelectedDevice = new DeviceInformation(deviceNumber);

 

3)、操做设备DO信息

 

 ind.Write(portStart, portCount, values);//从portStart端口到portCount端口,写入Value的值存至设备中。

4)、读取设备DO信息

ind.Red(portStart, portCount, values);//从portStart端口到portCount端口,读取的值存至values数组中。 

库文件: 

biodaq.dll与bdaqctrl.h---------适用于VC++,在头文件中加入

#include "bdaqctrl.h"
using namespace Automation::BDaq;

 

Automation.BDaq.dll以及Automation.BDaq4.dll-----适用于.NET

添加Dll库引用。

相关文章
相关标签/搜索