完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
当捕获屏幕(myScope.WriteString“:DISPLAY:DATA?BMP,SCR,COL”)时,屏幕捕获的BMP图片中间包含“无效字符”或“远程操作完成”。
如果sub自己运行,则问题不存在。 如果嵌入在较长的代码中,则会出现“无效字符”。 如果第二次(或更多次)立即调用sub,则出现“远程操作完成”。 怎么修? 韩国社交协会。 适用范围:DSO6034A Windows Vista,Excel 2007 VBA,尝试使用NI和安捷伦库作为主要问题。 安捷伦lib。 版本16(最新 - 昨天安装)。 代码程序员手册略微修改了代码。 Sub DumpImage(io_ As String,strPth As String)Dim ioMgr作为VisaComLib.ResourceManager Dim myScope作为VisaComLib.FormattedIO488 Dim fn As Integer,tmr As Double Set ioMgr = New VisaComLib.ResourceManager Set myScope = New VisaComLib.FormattedIO488 Set myScope.IO = ioMgr.Open(io_)'IMAGE_TRANSFER - 在这个例子中,我们将使用“:DISPLAY:DATA?”查询图像数据,读取数据,然后将其保存到文件中。 Dim byteData()As Byte'删除文件(如果存在)。 如果Len(Dir(strPth))那么Kill strPth End如果myScope.WriteString“:DISPLAY:DATA?BMP,SCR,COL”'& Chr(10)byteData = myScope.ReadIEEEBlock(BinaryType_UI1)fn = FreeFile()打开strPth进行二进制访问写入锁定写入#fn'打开文件进行输出。 把#fn ,, byteData'写入数据。 关闭#fn'关闭文件。 结束子 以上来自于谷歌翻译 以下为原文 When capture screen (myScope.WriteString ":DISPLAY:DATA? BMP, SCR, COL"), screen captured BMP picture contains "Invalid Character" or "Remote operation completed" right in the middle. If sub is run on its own, the problem does not exist. If sub in embedded in longer code, "Invalid character" appears. If sub is called immediately second (or more) times, "Remote operation completed" appears. How to fix? Tks. Scope: DSO6034A Windows Vista, Excel 2007 VBA, tried NI and also Agilent library as primary with same problem. Agilent lib. version 16 (newest - installed yesterday). Code slightly modified from scope programmer manual. Sub DumpImage(io_ As String, strPth As String) Dim ioMgr As VisaComLib.ResourceManager Dim myScope As VisaComLib.FormattedIO488 Dim fn As Integer, tmr As Double Set ioMgr = New VisaComLib.ResourceManager Set myScope = New VisaComLib.FormattedIO488 Set myScope.IO = ioMgr.Open(io_) ' IMAGE_TRANSFER - In this example, we will query for the image data ' with ":DISPLAY:DATA?", read the data, and then save it to a file. Dim byteData() As Byte ' Remove file if it exists. If Len(Dir(strPth)) Then Kill strPth End If myScope.WriteString ":DISPLAY:DATA? BMP, SCR, COL" ' & Chr(10) byteData = myScope.ReadIEEEBlock(BinaryType_UI1) fn = FreeFile() Open strPth For Binary Access Write Lock Write As #fn ' Open file for output. Put #fn, , byteData ' Write data. Close #fn ' Close file. End Sub |
|
相关推荐
4个回答
|
|
我应该在建议之前尝试一下,但我认为发送以下内容而不是等待4s应该可以解决问题:*:SYST:DSP“”*(引号中的空字符串)它的作用是清除自定义消息,但我认为 它也会清除系统消息。 有关详细信息,请参阅以下文档:SYSTEM:DSP。 除此之外,尝试找出导致“无效字符”消息的原因。 以上来自于谷歌翻译 以下为原文 I should probably try it out before suggesting, but I think sending the following instead of waiting 4s should do the trick: *:SYST:DSP ""* (empty string in quotes) What it does is to clear custom messages, but I think it will clear system messages as well. See the documentation for :SYSTEM:DSP for full details. Other than that, try to figure out what's causing that "invalid characters" message. |
|
|
|
SCR是DISP:DATA的有效命令吗? DSO程序员指南只有img类型(BMP,PNG等)和颜色(COL,GRAY)我只看到为MEAS和HARDcopy列出的SCR:AREA 以上来自于谷歌翻译 以下为原文 is SCR a valid command for DISP:DATA? the DSO programmers guide only has img type (BMP, PNG, etc) and color (COL, GRAY) i only see SCR listed for MEAS and HARDcopy:AREA |
|
|
|
jingfu888 发表于 2018-12-12 17:09 我认为SCR已被弃用。 *:SYST:DSP“”*解决方案适合您吗? 以上来自于谷歌翻译 以下为原文 I think SCR has been deprecated. Did the *:SYST:DSP ""* solution work for you? |
|
|
|
回到主题:有没有人找到如何摆脱屏幕中间恼人的“远程操作完成”消息? 提前致谢。 以上来自于谷歌翻译 以下为原文 Returning to the subject: did anybody find out how to get rid of annoying "Remote operation completed" message in the middle of the screen? Thanks in advance. |
|
|
|
只有小组成员才能发言,加入小组>>
1271 浏览 0 评论
2371 浏览 1 评论
2187 浏览 1 评论
2061 浏览 5 评论
2943 浏览 3 评论
1082浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
744浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
902浏览 0评论
1271浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-18 18:40 , Processed in 1.387745 second(s), Total 85, Slave 68 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号