首先要尝试的是:在手册中,在STAT:OPER:DEV部分,我点击了“关键字”链接。
它提到在设置事件寄存器后,它会保持设置直到被读取或重置。
如果Capture1中显示的VI在循环中运行(这样PNA处于连续模式,在进入此VI时进行测量),您可以在“CALC:PAR”之前删除额外的“Check Sweep Complete”块。
SEL ...“签证阻止(在发送命令之前清除”测量完成“事件位)。
http://na.support.keysight.com/pna/help/WebHelp9_42/Programming/GP-IB_Command_Finder/Status_Keywords.htm如果不起作用,请继续阅读。
我不确定这是否适用于scpi命令,但是当使用COM接口编程时,我会注册一个事件(OnChannelEvent)来触发我的软件从PNA中提取数据。
起初我使用过CHANNEL_SWEEP_COMPLETE事件,但是在某些软件更改(以及PNA设置更改)之后的某个时刻,我开始使用此调用获取虚假数据。
我最终发现我需要使用ALL_SWEEPS_COMPLETED_AND_PROCESSED事件。
在那次活动之后我总能获得好的数据。
http://na.support.keysight.com/pna/help/WebHelp9_42/Programming/COM_Reference/Events/OnChannelEvent.htm但是,我没有在scpi STAT:OPER:DEV命令中看到类似的东西。
手册上的内容就像第4位一样,只代表我试图使用的第一个事件。
http://na.support.keysight.com/pna/help/WebHelp9_42/Programming/GP-IB_Command_Finder/Status.htm我想知道几件事:你为“检查扫描完成”显示的VI只检查来自
“STAT:OPER:DEV?”
是!= 0.即使其他寄存器位在手册中显示“未使用”,它们可能仍会填充某些东西?
也许您应该从该命令获取结果,逻辑AND与0x10隔离该位,然后检查状态。
如果这不起作用,可能另一个寄存器保存有关扫描完成和处理的更多信息......可能是“标准事件状态寄存器”或“平均完整摘要”寄存器?
编辑:mr_matt于2015年9月2日12:25 PM编辑:mr_matt于2015年9月2日12:27 PM
以上来自于谷歌翻译
以下为原文
First thing to try:
In the manual, in the STAT:OPER:DEV section, I clicked the "keyword" link. It mentions that after an event register is set, it remains set until being read or reset. If your VI shown in Capture1 is run in a loop (such that the PNA is in continuous mode taking measurements when entering this VI), you might be able to drop an extra "Check Sweep Complete" block in BEFORE the "CALC:PAR:SEL..." visa block (to clear the "measurement complete" event bit before sending the command).
http://na.support.keysight.com/pna/help/WebHelp9_42/Programming/GP-IB_Command_Finder/Status_Keywords.htm
If that doesn't work, keep reading.
I'm not sure if this applies to scpi commands, but when programming with the COM interface, I would register an event (OnChannelEvent) to trigger my software to pull data from the PNA. At first I had used the CHANNEL_SWEEP_COMPLETE event, but at some point after some software changes (and PNA setup changes), I started getting bogus data using this call. I eventually found I needed to use the ALL_SWEEPS_COMPLETED_AND_PROCESSED event. I would always get good data after that event.
http://na.support.keysight.com/pna/help/WebHelp9_42/Programming/COM_Reference/Events/OnChannelEvent.htm
However, I don't see something similar in the scpi STAT:OPER:DEV command. The manual reads to me like bit 4 ONLY represents the first event I had tried to use.
http://na.support.keysight.com/pna/help/WebHelp9_42/Programming/GP-IB_Command_Finder/Status.htm
I wonder several things:
The VI you show for "Check Sweep Complete" only checks to see if the response from "STAT:OPER:DEV?" is != 0. Even though the other register bits show "unused" in the manual, they might still be populated with something? Maybe you should take the result from that command, logical AND with 0x10 to isolate that bit, then check the state.
If that doesn't work, maybe another register holds more information about the sweeps being complete AND processed... maybe the "Standard Event Status Register" or the "Averaging Complete Summary" register?
Edited by: mr_matt on Sep 2, 2015 12:25 PM
Edited by: mr_matt on Sep 2, 2015 12:27 PM