最近做个项目要用到安捷伦34970A采集数据,34970A支持RS232接口,但是如果直接用winform自带的seriaport类基本是不管用的,经过几天研究和问客服呀,也没得到个啥结果,头发倒是掉了几根。最终灵感突发,翻墙Google别国论坛,才知道安捷伦等仪表通讯需要用到VISA的库。库的获取方法目前知道两个,1个是下载是德科技的IO Library,还有就是上NI下载NI-VISA.用法都差不多,下面直接贴代码`
using System;
using System.Windows.Forms;
using System.Threading;
using Ivi.Visa.Interop;
namespace 安捷伦采集仪
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
Ivi.Visa.Interop.ResourceManager rMgr = new Ivi.Visa.Interop.ResourceManager();
FormattedIO488 src = new For