1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,我正在使用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 |
|
相关推荐
3个回答
|
|
你好Nigel,从FORMat子系统下的34972A命令参考,你可以看到FETC?
返回ASCII字符串数据。 它显示了每个格式字段的字符数:64位浮点数据为14,? 对于单位(我认为它是4,包括逗号),24为时间和日期,等等。我不是C程序员,我真的不确定为什么你没有得到所有的读数,但我认为你 您可以在技术支持>驱动程序,固件和软件下的34972A(www.agilent.com/find/34972A)下的安捷伦网站上找到一些示例程序中的答案。 有几个C编程示例。 以上来自于谷歌翻译 以下为原文 Hello Nigel, From the 34972A Command Reference under FORMat Subsystem, you can see that FETC? returns ASCII string data. It shows the number of characters for each format field: 14 for the 64 bit floating point data, ? for the units (I think it's 4 including the comma), 24 for the time and date, etc. I'm not a C programmer and I'm really not sure why you aren't getting all the readings, but I think you can find the answer in some of the example programs you can find on the agilent web site under the 34972A (www.agilent.com/find/34972A) under Technical Support > Drivers, Firmware and Software. There are several C programming examples. |
|
|
|
嗨Tomc感谢您的回复。
我已按照您的建议查看了安捷伦网站上的一些示例。 我没有发现出了什么问题,但是用R来绕过它? 命令读取数据。 viQueryf(Agilent_34972A,“:R? n”,“%#b”,& readings_size,读数); 将readings_size设置为5120问题未解决,但已被规避。 以上来自于谷歌翻译 以下为原文 Hi Tomc Thanks for your reply. I've followed your advice and looked at some of the examples on the Agilent website. I've not found what went wrong, but got round it using the R? command to read the data. viQueryf(Agilent_34972A, ":R?n", "%#b", &readings_size, readings); with readings_size set to 5120 Problem not solved, but circumvented. |
|
|
|
嗨,当我使用'INIT'和'FETCH'时,收到'INIT'后,DMM启动SCAN并停止直到接下来'INIT'被它接收。我想收集数据30-60秒的时间,所以DMM应该是 进入连续扫描模式?我该怎么做?使用'TRIG:COUNT INF','INIT'然后定期发送'FETCH'是否可以实现,还需要在这种方法中添加什么来使其工作?谢谢 以上来自于谷歌翻译 以下为原文 hi, When I use 'INIT' and "FETCH', after receiving 'INIT', DMM starts SCAN and stops until next 'INIT' is received by it. I want collect data for 30-60 seconds of time, so DMM should be put into continuous scanning mode? How should I do that? Is it achievable using 'TRIG:COUNT INF', 'INIT' then periodically sending 'FETCH' , what more need to add in this approach to make it work? Thanks |
|
|
|
只有小组成员才能发言,加入小组>>
1283 浏览 0 评论
2371 浏览 1 评论
2189 浏览 1 评论
2062 浏览 5 评论
2946 浏览 3 评论
1105浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
752浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
923浏览 0评论
1285浏览 0评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-23 03:38 , Processed in 1.411166 second(s), Total 80, Slave 64 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号