完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我正在尝试使用功率计执行源功率校准,方法是从运行matlab的远程PC发出DCOM命令。
如果我使用PNA的前面板,源功率校准工作正常。 功率计:地址为13的gpib上的N1912A,通道A上的E4413A传感器:PNA:N5242A,端口1,测量让app = pna 835x应用程序对象我的代码* app.Preset; * *%设置频率和点数* * app.ActiveChannel.StartFrequency = 60e6; * * app.ActiveChannel.StopFrequency = 2.51e9; * * app.ActiveChannel.NumberOfPoints = 101; * *%将参数更改为非比例R1 * * app.ActiveMeasurement.ChangeParameter('R1',1 ); * *%config功率计测量* * app.SourcePowerCalibrator.PowerMeterGPIBAddress = 13; * * app.UsePowerSensorFrequencyLimits = 0; * * app.SourcePowerCalibrator.IterationsTolerance = 0.05; * * app.SourcePowerCalibrator.MaximumIterationsPerPoint = 5; * * app .SourcePowerCalibrator.ReadingsTolerance = 0.05; * * app.SourcePowerCalibrator.ReadingsPerPoint = 3; * * app.SourcePowerCalibrator.SetCalInfoEx(1,1,0.0,'True'); * * pschan = app.SourcePowerCalibrator.PowerSensors.Item(1) .PowerMeterChannel; * * app.SourcePowerCalibrator.AcquirePowerReadingsEx('naPowerMeter',pschan,'True'); *最后一行 导致以下错误:+ ??? 调用错误,调度异常:+ +描述:方法AcquirePowerReadingsEx失败:找不到通道。+我已经尝试了以下所有版本的AcquirePowerReadingsEx命令。 它们都返回上面列出的相同错误。 * app.SourcePowerCalibrator.AcquirePowerReadingsEx(0,'ASEN',1); * app.SourcePowerCalibrator.AcquirePowerReadingsEx('naPowerMeter','ASEN','True'); * app.SourcePowerCalibrator.AcquirePowerReadingsEx(0,'naPowerSensor_A',1); * app.SourcePowerCalibrator.AcquirePowerReadingsEx('naPowerMeter','naPowerSensor_A','True'); * app.SourcePowerCalibrator.AcquirePowerReadingsEx(0,'E4413A',1); * app.SourcePowerCalibrator.AcquirePowerReadingsEx('naPowerMeter','E4413A','True'); * app.SourcePowerCalibrator.AcquirePowerReadingsEx(0,'E4413A',1); * app.SourcePowerCalibrator.AcquirePowerReadingsEx('naPowerMeter','E4413A','True'); * app.SourcePowerCalibrator.AcquirePowerReadingsEx(0,'1',1); * app.SourcePowerCalibrator.AcquirePowerReadingsEx('naPowerMeter','1','True'); 注意,以下三个命令工作正常:* app.SourcePowerCalibrator.CheckPower(0,80e6)* app.SourcePowerCalibrator.CheckPower('naPowerSensor_A',80e6)* app.SourcePowerCalibrator.CheckPower(pschan,80e6)%pschan定义如上 帮助将不胜感激。编辑:golfnut于2012年8月15日下午3:08 以上来自于谷歌翻译 以下为原文 I'm trying to perform a source power calibration with a power meter by issuing the DCOM commands from a remote PC running Matlab. The source power calibration works fine if I use the front panel of the PNA. Power Meter: N1912A on gpib with address 13, with E4413A sensor on channel A PNA: N5242A, port 1, measurement let app = the pna 835x application object my code *app.Preset;* *%set frequencies and number of points* *app.ActiveChannel.StartFrequency=60e6;* *app.ActiveChannel.StopFrequency=2.51e9;* *app.ActiveChannel.NumberOfPoints=101;* *%change parameter to unratioed R1* *app.ActiveMeasurement.ChangeParameter('R1',1);* *%config power meter measurements* *app.SourcePowerCalibrator.PowerMeterGPIBAddress=13;* *app.UsePowerSensorFrequencyLimits = 0;* *app.SourcePowerCalibrator.IterationsTolerance = 0.05;* *app.SourcePowerCalibrator.MaximumIterationsPerPoint = 5;* *app.SourcePowerCalibrator.ReadingsTolerance = 0.05;* *app.SourcePowerCalibrator.ReadingsPerPoint = 3;* *app.SourcePowerCalibrator.SetCalInfoEx(1,1,0.0,'True');* *pschan=app.SourcePowerCalibrator.PowerSensors.Item(1).PowerMeterChannel;* *app.SourcePowerCalibrator.AcquirePowerReadingsEx('naPowerMeter',pschan,'True');* The last line causes the following error: +??? Invoke Error, Dispatch Exception:+ +Description: Method AcquirePowerReadingsEx failed: Channel not found.+ I've tried all of the following versions of the AcquirePowerReadingsEx command. They all return the same error listed above. * app.SourcePowerCalibrator.AcquirePowerReadingsEx(0,'ASEN',1); * app.SourcePowerCalibrator.AcquirePowerReadingsEx('naPowerMeter','ASEN','True'); * app.SourcePowerCalibrator.AcquirePowerReadingsEx(0,'naPowerSensor_A',1); * app.SourcePowerCalibrator.AcquirePowerReadingsEx('naPowerMeter','naPowerSensor_A','True'); * app.SourcePowerCalibrator.AcquirePowerReadingsEx(0,'E4413A',1); * app.SourcePowerCalibrator.AcquirePowerReadingsEx('naPowerMeter','E4413A','True'); * app.SourcePowerCalibrator.AcquirePowerReadingsEx(0,'E4413A',1); * app.SourcePowerCalibrator.AcquirePowerReadingsEx('naPowerMeter','E4413A','True'); * app.SourcePowerCalibrator.AcquirePowerReadingsEx(0,'1',1); * app.SourcePowerCalibrator.AcquirePowerReadingsEx('naPowerMeter','1','True'); Note, the following three commands work fine: * app.SourcePowerCalibrator.CheckPower(0,80e6) * app.SourcePowerCalibrator.CheckPower('naPowerSensor_A',80e6) * app.SourcePowerCalibrator.CheckPower(pschan,80e6) %pschan is defined above Any help would be appreciated. Edited by: golfnut on Aug 15, 2012 3:08 PM |
|
相关推荐
4个回答
|
|
我在SPC对象页面上做了一个注释:http://na.tm.agilent.com/pna/help/latest/Programming/COM_Reference/Objects/SourcePowerCalibrator_Object.htm
以上来自于谷歌翻译 以下为原文 I put a note on the SPC object page: http://na.tm.agilent.com/pna/help/latest/Programming/COM_Reference/Objects/SourcePowerCalibrator_Object.htm |
|
|
|
感谢您对该问题的帮助。
我从来没有想到这一点。 我假设源校准器对象在PNA中持久存在,就像通道一样,app.sourcepowercalibrator只是对该持久对象的引用。 还有其他具有这种特性的物体吗? 顺便说一下,我注意到在线手册说明CheckPower方法是只写的。 这应该只读吗? 再次感谢。 以上来自于谷歌翻译 以下为原文 Thanks for the help on that issue. I never would have figured that out. I assumed that the source calibrator object persisted within the PNA much like a channel does and the app.sourcepowercalibrator was just a reference to that persistent object. Are there other objects that have this peculiarity? Btw, I noticed that the online manual states the CheckPower method is write only. Should this be read only? Thanks again. |
|
|
|
sagafa 发表于 2019-7-17 06:29 我同意这是违反直觉的。 如果我们从头开始设计我们的COM接口,我会解决这些问题。 此时,向后兼容性需要当前行为。 具有相似行为的另一个对象(在我的头顶)是GuidedCalibration对象。 在整个引导校准过程中,该物体必须保持活着...... SCPI没有这些奇怪的行为 - 因此使用SCPI也是可以解决的问题。 以上来自于谷歌翻译 以下为原文 I agree that it is counter intuitive. If we were designing our COM interface from scratch, I would fix these issues. At this point, the current behavior is required for backwards compatibility. The other object that has similar behavior (off the top of my head) is the GuidedCalibration object. This object must be kept alive throughout the entire guided calibration... SCPI doesn't have these odd behaviors - so using SCPI is also work-around. |
|
|
|
非常感谢你们这些帖子。
今晚让我保持健康。 真棒! -Andy 以上来自于谷歌翻译 以下为原文 Thank you so very much for these posts. Kept me sane tonight. Awesome! -Andy |
|
|
|
只有小组成员才能发言,加入小组>>
1262 浏览 0 评论
2365 浏览 1 评论
2180 浏览 1 评论
2049 浏览 5 评论
2935 浏览 3 评论
1049浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
737浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
870浏览 0评论
1263浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-13 01:35 , Processed in 1.498205 second(s), Total 85, Slave 67 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号