完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
当我试图在C上使用VISA的部分示例时,从通道1获取数据是可以的,但是当我试图从通道2-4或数学中获取前导时,我会在弹出的“查询未终止”中弹出
范围,所有值都是0 !! 我使用的代码的相关部分是:viOpenDefaultRM(& defaultRM); viOpen(defaultRM,sco,VI_NULL,VI_NULL,& vi); viClear(VI); viPrintf(vi,“:MEASURE:CHANnel2 n”); viPrintf(vi,“:DIGItiZE CHAN2 n”); viPrintf(vi,“:WAVEFORM:POINTS 100 n”); viQueryf(vi,“:WAVEFORM:PREAMBLE? n”,“%,10lf n”,序言); printf(“Preamble FORMAT:%e n”,序言[0]); printf(“Preamble TYPE:%e n”,序言[1]); printf(“Preamble POINTS:%e n”,序言[2]); printf(“Preamble COUNT:%e n”,序言[3]); printf(“Preamble XINCREMENT:%e n”,序言[4]); printf(“Preamble XORIGIN:%e n”,序言[5]); printf(“Preamble XREFERENCE:%e n”,序言[6]); printf(“Preamble YINCREMENT:%e n”,序言[7]); printf(“Preamble YORIGIN:%e n”,序言[8]); printf(“Preamble YREFERENCE:%e n”,序言[9]); viClose(VI); viClose(defaultRM); 感谢名单! 以上来自于谷歌翻译 以下为原文 When i'm trying to use parts of the example of VISA on C, acquiring data from channel 1 is ok but when im trying to get the preambles from channels 2-4 or Math, i get a "Query Unterminated" pop up on the scope, and all the values are 0!! the relevant part of the code i use is: viOpenDefaultRM(&defaultRM); viOpen(defaultRM, sco, VI_NULL,VI_NULL, &vi); viClear(vi); viPrintf(vi, ":MEASURE: CHANnel2n"); viPrintf(vi, ":DIGITIZE CHAN2n"); viPrintf(vi, ":WAVEFORM:POINTS 100n"); viQueryf(vi, ":WAVEFORM:PREAMBLE?n", "%,10lfn", preamble); printf("Preamble FORMAT: %en", preamble[0]); printf("Preamble TYPE: %en", preamble[1]); printf("Preamble POINTS: %en", preamble[2]); printf("Preamble COUNT: %en", preamble[3]); printf("Preamble XINCREMENT: %en", preamble[4]); printf("Preamble XORIGIN: %en", preamble[5]); printf("Preamble XREFERENCE: %en", preamble[6]); printf("Preamble YINCREMENT: %en", preamble[7]); printf("Preamble YORIGIN: %en", preamble[8]); printf("Preamble YREFERENCE: %en", preamble[9]); viClose(vi); viClose(defaultRM); Thanx! |
|
相关推荐
6个回答
|
|
|
我现在没有范围尝试,但这里有一些猜测:添加以下命令:对于Chan 2 :: CHAN:DISP ON:WAV:SOUR CHAN2对于数学:: FUNC:DISP ON(或任何正确的
SCPI在屏幕上启用数学):WAV:SOUR FUNC 以上来自于谷歌翻译 以下为原文 I don't have a scope right now to try, but here are few guesses: Add the following commands: For Chan 2: :CHAN:DISP ON :WAV:SOUR CHAN2 For Math: :FUNC:DISP ON (or whatever the correct SCPI to enable Math on screen) :WAV:SOUR FUNC |
|
|
|
|
oqw1 发表于 2019-5-6 20:44 在我开始运行程序之前,显示已经在通道2上... 以上来自于谷歌翻译 以下为原文 The display is already on channel 2 before i start running the program... |
|
|
|
|
|
:wav:酸没有帮助? 另外,请列出您的型号和软件转速。 以上来自于谷歌翻译 以下为原文 :wav:sour did not help? Also, list your model number and software rev number please. |
|
|
|
|
|
我改为:viprintf(vi,“:View Channel4 n”); viprintf(vi,“:Channel4:Display n”); viprintf(vi,“:Measure Channel4 n”); viprintf(vi,“:Measure:Source Channel4 n”); viprintf(vi,“:DIGITIZE Channel4 n”); 它仍然不起作用......范围模型是:DSO6034A软件版本:系统版本:06.16.0001语言版本:06.16 Apr 19.2011图书馆版本:02.25图形版本02.19请帮助,我真的坚持了... 以上来自于谷歌翻译 以下为原文 I changed to: viprintf(vi, ":View Channel4n"); viprintf(vi, ":Channel4:Displayn"); viprintf(vi, ":Measure Channel4n"); viprintf(vi, ":Measure:Source Channel4n"); viprintf(vi, ":DIGITIZE Channel4n"); and it still doesn't work... the scope model is: DSO6034A SW versions: system version: 06.16.0001 language version:06.16 Apr 19.2011 libary version: 02.25 graphic version 02.19 please help, im really stuck with it... |
|
|
|
|
sinoxutong 发表于 2019-5-6 21:04 我不关心您正在查看哪种波形,您需要使用“WAV:SOUR”命令来获取您正在寻找的数据。 人 以上来自于谷歌翻译 以下为原文 I don't it matters which waveforms you are viewing, you need to use the "WAV:SOUR" command to get the data your are looking for. Al |
|
|
|
|
|
|
|
|
|
|
只有小组成员才能发言,加入小组>>
273 浏览 0 评论
1868 浏览 0 评论
2755 浏览 1 评论
2657 浏览 1 评论
2477 浏览 5 评论
1870浏览 0评论
434浏览 0评论
274浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-13 15:38 , Processed in 1.871196 second(s), Total 82, Slave 65 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
822