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

1、安装软件开发包(SDK)---DAQNAVI_SDK。

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

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

4、编写软件流程。

4.1DI数字量输入流程图:

描述如下:

1)、创建InstantDiCtrl对象。

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

2)、选择获取设备。

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库引用。

  • 1
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值