我正在尝试通过 USB 从 DSOX 1204G 读取波形数据,我需要平均波形数据。如何从示波器中获得平均结果?
我在手册中找到了以下描述
包含波形的数据点的数量根据 :ACQuire 子系统中请求的数量而变化。:ACQuire 子系统确定 :DIGitize 命令使用的数据点数、采集类型和平均数。这允许您准确指定数字化信息包含的内容。
myScope.WriteString ":ACQuire:TYPE AVERage"
myScope.WriteString ":ACQuire:COMPlete 100"
myScope.WriteString ":ACQuire:COUNt 8"
myScope.WriteString ":DIGitize CHANnel1"
myScope.WriteString ":WAVeform:SOURce CHANnel1"
myScope.WriteString ":WAVeform:FORMat BYTE"
myScope.WriteString ":WAVeform:POINts 500"
myScope.WriteString ":WAVeform:DATA?"
所以我执行了它。
import visa
rm = visa.ResourceManager()
myScope = rm.get_instrument(instAddress)
myScope.WriteString ":ACQuire:TYPE AVERage"
myScope.WriteString ":ACQuire:COMPlete 100"
myScope.WriteString ":ACQuire:COUNt 8"
myScope.WriteString ":DIGitize CHANnel1"
myScope.WriteString ":WAVeform:SOURce CHANnel1"
myScope.WriteString ":WAVeform:FORMat BYTE"
myScope.WriteString ":WAVeform:POINts 500"
myScope.WriteString ":WAVeform:DATA?"
但是,结果
Code ":WAVeform:DATA?"
Results "COMException:VI_ERROR_TMO: A timeout occurred | CommunicationTimeoutException:SCPI connection attempt timed out | SCPI Error: 109,No Data For Operation | SCPI Error: -420,Query UNTERMINATED"
其他,当我将:ACQuire:COUNt:
s 值的值从 8 更改为 256 时,错误消息发生了变化。
Code ":DIGitize CHANnel1"
Results "COMException:VI_ERROR_TMO: A timeout occurred | CommunicationTimeoutException:SCPI connection attempt timed out | CommunicationTimeoutException:Timed out while trying to query instrument errors"
最后想将采集方式设置为平均,计数设置为256来采集数据,但出现上述情况,无法获取波形数据。
谢谢你的帮助。