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
附件
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
附件
举报