嗨,我正在使用C ++ Builder XE编程33522A波形发生器和34972A开关单元。
34972A配有一个40通道多路复用器(34908A)和两个20通道多路复用器卡(34901A)。
我已经配置了我想要读取的所有通道(频率,伏特交流和伏特直流),设置格式(读数,通道和时间全部开启),并发出扫描命令:: ROUT:SCAN(@ 101:140,201:
220,301:317)然后一个INIT命令扫描运行,然后在延迟之后,我在我的C代码中使用以下内容:viQueryf(Agilent_34972A,“:FETC? n”,“%#T”,& readings_size,读数)
;
读数只是一个字符数组,reading_size是一个int,我尝试设置为几个不同的值。
我想知道的是:1 /。
应该将readings_size设置为什么(它是我期待的读数数量?)2 /。
当频道列表达到317时,为什么我只将读数备份到(包括)频道309?
我得到的数据似乎是大约2560个字符。
这是“输出缓冲区”的大小吗?
当我使用34972A上的前面板绿色****逐步通过通道时,它会按预期显示所有通道的FREQ,VAC或VDC,包括vQueryf FETC语句无法返回的通道310-317。
编辑:NigelStevens于2013年11月8日下午2:59
以上来自于谷歌翻译
以下为原文
Hi
I'm programming a 33522A waveform generator and a 34972A switch unit using C++ Builder XE. The 34972A has one 40 channel mux (34908A) and two 20 channel mux cards (34901A) fitted.
I've configured all the channels I want to read (frequency, volts ac and volts dc), setup the format (reading, channel and
time all ON), and issued the scan command :
:ROUT:SCAN (@101:140,201:220,301:317)
then an INIT command
The scan runs, then after a delay, I use the following in my C code :
viQueryf(Agilent_34972A, ":FETC?n", "%#T", &readings_size, readings);
readings is just an array of chars, reading_size is an int, which I've tried setting to several different values.
What I want to know is :
1/. What should readings_size be set to (is it the number of readings I'm expecting ?)
2/. Why do I only get readings back up to (and including) channel 309, when the channel list goes up to 317 ?
The data I get back seems to be about 2560 characters. Is this the size of the "output buffer" ?
When I use the front panel green **** on the 34972A to step through the channels, it shows FREQ, VAC or VDC for all channels as expected, including channels 310-317 which don't get returned by the vQueryf FETC statement.
Edited by: NigelStevens on Nov 8, 2013 2:59 PM