完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,感谢您阅读本文.....我正在使用COM在Visual Basic中编写一些软件。
我已经完成了大部分我想做的事情。 我根据用户输入设置2到8个测量值,然后以3种方式中的1种进行校准。 我可以做Ecal校准OK。 但是,我正在努力进行机械标准校准,我试图一次性获取所有通道的每个标准,以最大限度地减少所需的连接器交换次数。 分析仪是E8801A PNA。 应用程序代码为A04.87.01 / build 450.0 / Type Library 1.9。 这是一台较旧的Windows 2000机器,我认为这是我可以使用的最新版本。 我的VB代码是:set calmgr = pna.GetCalManager Set guidedcal = calmgr.GuidedCalibration for c = 1 To NumberOfChannels pna.ActivateWindow c Set chan = pna.Channels(c)Set CalSet = calmgr.CreateCalSet(c)calsetGUID(c )= CalSet.GetGUID chan.SelectCalSet calsetGUID(c),True guidedcal.Initialize c,False guidedcal.ConnectorType(1)=“Type N(50)female”guidedcal.ConnectorType(2)=“Not used”guidedcal.CalKitType( 1)=“85032F”numsteps = guidedcal.GenerateSteps如果numsteps 3然后scrap = MsgBox(“ERROR !!”,vbCritical)'所有通道将打开/短/加载退出子结束如果下一个c对于calstep = 1到3废料 = MsgBox(guidedcal.GetStepDescription(calstep),vbOKOnly,“Step”+ CStr(calstep)+“of 3”)对于c = 1到NumberOfChannels pna.ActivateWindow c设置chan = pna.Channels(c)设置meas = pna。 测量(c)chan.Continuous meas.Activate calmgr.GetCalSetByGUID calsetGUID(c)chan.SelectCalSet calsetGUID(c),True guidedcal.AcquireStep(calstep)chan.Hold True Next c next Calstep for c = 1 To NumberOfChannels设置chan = pna.Channels(c)pna.ActivateWindow c设置meas = pna.Measurements(c)chan.Continuous meas.Activate calmgr.GetCalSetByGUID calsetGUID(c)chan.SelectCalSet calsetGUID(c),True guidedcal.GenerateErrorTerms chan.Hold True Next c这几乎可以工作,但是当它产生错误术语时,会出现错误,指出无法应用错误术语。 最后一个频道似乎确实应用了修正,我认为问题是在每一步都没有选择正确的校准集。 这让我觉得命令“calmgr.GetCalSetByGUID calsetGUID(c)”和“chan.SelectCalSet calsetGUID(c),True”不能正常工作,因为我认为它应该。 所以,我错过了一些东西(很明显,我是!!)或者这个旧的分析仪中是否有一个错误阻止我做我想做的事情? 论坛上关于多通道校准以及使用SCPI的信息很少。 有人可以帮忙吗? 感谢您的任何想法,最好的问候,迈克。 以上来自于谷歌翻译 以下为原文 Hi, thanks for reading this..... I am writing some software in Visual Basic, using COM. I have got most of the things I want to do pretty well sorted out OK. I am setting up between 2 and 8 measurements depending on user input and then calibrating in 1 of 3 ways. I can do the Ecal calibration OK. However, I am struggling with a mechanical standards calibration, where I am trying to acquire each standard for all channels in one go to minimise the number of connector swaps needed. The analyser is an E8801A PNA. Application code is A04.87.01 / build 450.0 / Type Library 1.9. It is an older windows 2000 machine and I think that this is the latest version available to me. The VB code I have is: Set calmgr = pna.GetCalManager Set guidedcal = calmgr.GuidedCalibration For c = 1 To NumberOfChannels pna.ActivateWindow c Set chan = pna.Channels(c) Set CalSet = calmgr.CreateCalSet(c) calsetGUID(c) = CalSet.GetGUID chan.SelectCalSet calsetGUID(c), True guidedcal.Initialize c, False guidedcal.ConnectorType(1) = "Type N (50) female" guidedcal.ConnectorType(2) = "Not used" guidedcal.CalKitType(1) = "85032F" numsteps = guidedcal.GenerateSteps If numsteps 3 Then scrap = MsgBox("ERROR !!", vbCritical) 'all channels will be open / short / load Exit Sub End If Next c For calstep = 1 To 3 scrap = MsgBox(guidedcal.GetStepDescription(calstep), vbOKOnly, "Step " + CStr(calstep) + " of 3") For c = 1 To NumberOfChannels pna.ActivateWindow c Set chan = pna.Channels(c) Set meas = pna.Measurements(c) chan.Continuous meas.Activate calmgr.GetCalSetByGUID calsetGUID(c) chan.SelectCalSet calsetGUID(c), True guidedcal.AcquireStep (calstep) chan.Hold True Next c Next calstep For c = 1 To NumberOfChannels Set chan = pna.Channels(c) pna.ActivateWindow c Set meas = pna.Measurements(c) chan.Continuous meas.Activate calmgr.GetCalSetByGUID calsetGUID(c) chan.SelectCalSet calsetGUID(c), True guidedcal.GenerateErrorTerms chan.Hold True Next c This almost works, but when it gets to the point of generating error terms, there is an error saying error terms could not be applied. The very last channel does seem to have correction applied, and I think that the problem is that the proper cal set is not being selected at each step. This makes me think that the command "calmgr.GetCalSetByGUID calsetGUID(c)" and "chan.SelectCalSet calsetGUID(c), True" is not working as I think it should. So, am I missing something (obviously, I am!!) or is there a bug in this old analyser that is preventing me from doing what I want? There is very little information on the forum about multiple channel calibrations and what there is uses SCPI. Can anybody help? thanks for any ideas you may have, Best regards, Mike. |
|
相关推荐
2个回答
|
|
谢谢,Dr_joel我已经离开办公室几天了,因此延迟了我的回复。
我将尝试SCPI解析器的想法; 感谢那。 肯定会创建所有校准集,但它只是集合中的最后一个似乎得到任何“动作”。 我正在写这个软件作为我的核心工作的一个帮助,所以进展有点慢,但是当我有机会做更多的事情时,我会报告回来。 谢谢agian,问候,迈克。 以上来自于谷歌翻译 以下为原文 Thanks, Dr_joel I've been out of the office for a few days, so hence the delay in my reply. I will try the SCPI parser idea; thanks for that. All the cal sets definately get created, but it is only the last of the set that seems to get any "action". I'm writing this software very much as an asside to my core job, so progress is a bit slow, but when I get chance to do a bit more I will report back. Thanks agian, Regards, Mike. |
|
|
|
我查看了我的文件,但是我没有任何COM示例来做这样的事情。
这是一个很好的线程,解释了使用SCPI的多通道校准:PNA-X远程校准,多个通道另一个警告,你正在使用一个非常旧版本的固件,然后我们没有允许多个同时引导校准的倾向 会话和您在上面的线程中看到的许多SCPI命令在版本A.04.xx之后添加了很长时间 以上来自于谷歌翻译 以下为原文 I looked through my files, but I don't have any COM examples for doing something like this. Here is a good thread that explains the multiple channel calibration using SCPI: PNA-X remote calibration, multiple channels one other Caveat is that you are working with a very old version of firmware and back then we had no inclination of allowing multiple simultaneous guided cal sessions and many of the SCPI commands that you see in the above thread were added long after version A.04.xx |
|
|
|
只有小组成员才能发言,加入小组>>
1238 浏览 0 评论
2352 浏览 1 评论
2163 浏览 1 评论
2029 浏览 5 评论
2913 浏览 3 评论
983浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
713浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
813浏览 0评论
1240浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-29 06:28 , Processed in 1.240961 second(s), Total 79, Slave 62 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号