完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
使用visual basic 6中的示例文档,这是我到目前为止所做的:我将以下命令提供给频谱分析仪:1):MMEM:STOR:SCR'C:PICTURE.GIF'; * OPC?
2):MMEM:数据? 'C:PICTURE.GIF'然后你如何进行下一步,将其转换为二进制块并将其保存为计算机中的picture.gif。 谢谢您的帮助。 以上来自于谷歌翻译 以下为原文 Using the example document from visual basic 6 this is what I have so far: I am giving the following commands to the spectrum analyzer: 1) :MMEM:STOR:SCR 'C:PICTURE.GIF';*OPC? 2) :MMEM:DATA? 'C:PICTURE.GIF' then how do you do the next step which is converting this into binary block and saving it as picture.gif in your computer. Thanks for the help. |
|
相关推荐
2个回答
|
|
Hi GaoGaiGar,即使在在线编程手册中,实际可用代码的示例也有点薄弱。
有一些在这里,你会觉得非常有用:[http://www.keysight.com/main/editorial.jspx?cc=GB&lc=eng&ckey=407788&nid=-33932.710346.02&id=407788&cmpid = 94444]。 附件是VEE的解决方案,你也可能觉得有用。 如前所述,这使用Direct IO对象,并以二进制块格式请求屏幕图像数据。 当我键入SCPI命令时,使用VISA助手(在IO事务窗口上有一个方便的“显示C代码”选项):*:MMEM:DATA? 'C: TEST.GIF'*我可以看到它生成了等效的C代码:char buf [32768 ]; int bufLength = sizeof(buf); viQueryf(vi,“mmem:data?'C: TEST.GIF' n”,“%#t”,& bufLength,buf); buf [] = {“#520638GIF87a€à÷”}; bufLength = 20646; 我想这在C#中会是类似的。 注意:注意区分大小写的文件名(分析器可能会将小写文件名转换为大写)。 我希望这有帮助。 此致Simon Coleby.Edited:simon_coleby于2015年10月21日上午10:38 以上来自于谷歌翻译 以下为原文 Hi GaoGaiGar, Examples of actual useable code are a bit thin on the ground, even in the online programming manuals. There are some here you might find useful: [http://www.keysight.com/main/editorial.jspx?cc=GB&lc=eng&ckey=407788&nid=-33932.710346.02&id=407788&cmpid=94444]. Attached is a solution in VEE you may also find useful. This uses a Direct IO object, and requests screen image data in the Binary Block format, as you mentioned. Using VISA assistant (which has a handy 'Show C code' option on IO transaction window), when I type the SCPI command: *:MMEM:DATA? 'C:TEST.GIF'* I can see it generate the equivalent C code: char buf[32768]; int bufLength = sizeof(buf); viQueryf(vi,"mmem:data? 'C:TEST.GIF'n","%#t", &bufLength, buf); buf[] = {"#520638GIF87a€ à ÷"}; bufLength = 20646; I imagine this would be similar in C#. Note: Watch out for case sensitive filenames (analyser may convert lower case file names to upper case). I hope this helps. Regards, Simon Coleby. Edited by: simon_coleby on Oct 21, 2015 10:38 AM 附件
|
|
|
|
yhxc 发表于 2018-10-19 15:19 感谢您的帮助simon_coleby。 我刚刚决定调用使用C#截取屏幕截图的exe文件,但会尝试你的建议。 谢谢。编辑:GaoGaiGar于2015年10月21日下午2:42 以上来自于谷歌翻译 以下为原文 Thank you for the help simon_coleby. I just decided to call the exe file that takes a screenshot using C# for now but will try your suggestions. Thanks. Edited by: GaoGaiGar on Oct 21, 2015 2:42 PM |
|
|
|
只有小组成员才能发言,加入小组>>
2091 浏览 1 评论
1850 浏览 1 评论
1707 浏览 5 评论
2577 浏览 3 评论
将设备连接到PC并通过asic格式读取数据然后我的网络分析仪挂起
1558 浏览 4 评论
497浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
355浏览 0评论
1405浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
268浏览 0评论
2254浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-4-20 10:32 , Processed in 1.461713 second(s), Total 69, Slave 60 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号