微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 测试测量 > 虚拟仪器 > 大家好,请教大家一个问题.关于VB和VISA

大家好,请教大家一个问题.关于VB和VISA

时间:12-13 整理:3721RD 点击:
摘要:我用从agilent光谱仪采集下来的测试数据,但在VB语言中却没有足够大的数据容器把它存放下来的问题
具体:
定义部分为
Dim data As String * 65280    
调用部分为    
Call viVScanf(vi, "%t", data)      ’从vi会话中获取数据以%t形式存入data这个字符串中
但是我需要获取的数据为长度为170017的字符串(每个点有16个字符和一个分割符“,”,一共17个字符。一共有10001个点)
而viVScanf中的参数data只能定义成定长的,而VB中的定长字符串却不能大于65536。T.T
安捷伦的文件中描述如下
When reading in a string value with viVScanf or viVQueryf, you must
pass a fixed length string as the params parameter. To declare a fixed
length string, instead of using the normal variable length declaration:
Dim strVal as String
use the following declaration, where 40 is the fixed length.
Dim strVal as String * 40
btw似乎可以改用C语言解决这个问题。但现在软件已经完成了,不想再从头开始弄了。

试试是否可以分批读取?
.234

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top