1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,我尝试使用matlab和“设备对象”环境与AWG 33522A进行通信。
为此我下载了安捷伦网站的Matlab驱动程序(“IVI-COM,IVI-C版本1.0.7.0 for 3352X for 32-bit Windows”)并将其安装在我的计算机上。 然后我使用Matlab命令搜索驱动程序的名称:* + instrhwinfo('ivi')。+ *找到驱动程序的名称后,列表中的好名称(这里我找到一个名为* +'Ag3352x。 Ag3352x '+ *),我使用将其转换成一个Matlab驱动程序:* + makemid(' Ag3352x.Ag3352x”, 'Ag33522A.mdd'); + * I现在可以创建一个设备对象使用此驱动程序:* + AWG = icdevice ('Ag33522A.mdd','TCPIP0 :: A-33522A-00132.local :: inst0 :: INSTR'); + *在我的matlab工作区上出现icdevice对象* + awg + *。 您现在可以打开一个会话:* + connect(awg)+ *如果您双击工作区中的对象,您可以访问AWG的许多参数。 或者您可以调用函数* + set + *并修改其中一些参数。 例如,以下行打开两个通道的输出:* + for i = 1:2 + * * + set(awg.Channeloutput(i),'Enabled','on'); + * * + end + * BUT 这是问题所在,我想修改一下,让我们说两个频道的采样率。 相应的属性* + awg.Channeloutputfunctionarbitrarywaveformsrate + *只是一个1维的对象! 我只能更改通道1 ...(相反* + awg.Channeloutput + *是1x2对象,* + awg.Channeloutput(1)+ *或* + awg.Channeloutput(2)+ *允许访问2 我错过了什么,比如一个从频道1切换到频道2的功能? 或者驾驶员不适合33522A? 非常感谢你的帮助 ! 以上来自于谷歌翻译 以下为原文 Hi, I try to communicate with the AWG 33522A using Matlab and the "device object" environment. For this I download the Matlab driver for the agilent website ("IVI-COM, IVI-C Version 1.0.7.0 for 3352X for 32-bit Windows ") and I install it on my computer. Then I search what is the name of the driver using the Matlab command : *+instrhwinfo('ivi').+* After finding what name of driver could the good one in the list (here I find one called *+'Ag3352x.Ag3352x'+*), I convert it into a Matlab Driver using : *+makemid('Ag3352x.Ag3352x','Ag33522A.mdd');+* I can now create a Device object using this driver : *+awg = icdevice('Ag33522A.mdd', 'TCPIP0::A-33522A-00132.local::inst0::INSTR');+* On my matlab Workspace appear the icdevice object *+awg+*. You can now open a session : *+connect(awg)+* If you double click on the object in the workspace you have acces to a lot of the parameters of the AWG. Or you can call the function *+set+* and modify some of these parameters. For example the following lines turn on the output of both channels : *+for i =1:2+* *+set(awg.Channeloutput(i), 'Enabled', 'on');+* *+end+* BUT here is the problem, I want to modify let say the Sample Rate of both channel. The corresponding property *+awg.Channeloutputfunctionarbitrarywaveformsrate+* is only a 1 dimensionnal object ! I can only change channel 1... (as a contrary *+awg.Channeloutput+* is a 1x2 object, *+awg.Channeloutput(1)+* or *+awg.Channeloutput(2)+* give access to the 2 channels.) Do I miss something, like a function that will switch from channel 1 to channel 2 ? Or the driver is not perfect for the 33522A ? Thanks a lot for your help ! |
|
相关推荐
2个回答
|
|
所以我已经证实这是这个驱动程序的主要缺陷。
它已在即将发布的版本中得到修复,但该版本已推出90天。 我会告诉你,在这种情况下,驱动程序比发送SCPI慢。 驱动程序只是在顶部构建的另一层将SCPI发送到仪器。 对于大多数不基于PXI的仪器来说就是这种情况。 我知道你说你关注吞吐量,所以我想我会指出这一点。 我强烈建议您切换到发送SCPI命令。 如果您需要帮助,我可以帮助您前进。 非常抱歉司机的尴尬缺陷。 以上来自于谷歌翻译 以下为原文 So I have confirmed this is a MAJOR defect in this driver. It has already been fixed in the upcoming release, but that release is 90 days out. I will tell you that in this case, the driver is slower than sending SCPI. The driver is just another layer built on top that sends SCPI to the instrument. This is the case for most instruments that are not PXI based. I know you said you were concerned about throughput, so I thought I would point that out. I highly suggest you switch to sending SCPI commands instead. I can help get you going if you need help. Very sorry about the embarrassing defect in the driver. |
|
|
|
4864165sas 发表于 2019-4-24 08:36 非常感谢您的回答! 我很高兴我们明白这一点。 我现在会坚持使用SCPI(代码已存在)并在发布后切换到驱动程序,主要是因为我尝试对我们在这里使用的所有设备进行某种通用的面向对象编程...再次感谢 以上来自于谷歌翻译 以下为原文 Thanks a lot for the answer ! I'm glad we figured that out. I will stick with SCPI for now (code already exist) and switch to driver after the release, mainly because I try to have some kind of generic object oriented programming of all the devices we use here... thanks again |
|
|
|
只有小组成员才能发言,加入小组>>
1283 浏览 0 评论
2371 浏览 1 评论
2189 浏览 1 评论
2062 浏览 5 评论
2946 浏览 3 评论
1105浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
752浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
923浏览 0评论
1285浏览 0评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-23 01:54 , Processed in 1.840497 second(s), Total 78, Slave 62 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号