是德科技
直播中

潘千

7年用户 183经验值
私信 关注
[问答]

怎么使用perl远程控制34410A

您好,我想使用perl(或其他一些脚本语言)远程控制我的34410A。
对于大多数事情,这将是非常容易的,因为我会这样做:$ rm = Win32 :: OLE-> new(“VisaComLib.ResourceManager”);但是,由于某种原因,这不起作用(我从中获取了prog-id
VB示例;“Ivi.Visa.Interop.ResourceManager”也不起作用。
这有可能吗?
我不想使用.NET或我必须编译的其他语言/系统。
(是的,我安装了驱动程序,所需的组件似乎就在那里;我可以用C#创建这个对象。)谢谢,marco

以上来自于谷歌翻译


     以下为原文

  Hello,  I'd like to remote control my 34410A using perl (or some other scripting language).  For most things, this would be pretty easy as I would do :

$rm = Win32::OLE->new("VisaComLib.ResourceManager");

But, for some reason this doesn't work (I took the prog-id from the VB sample; "Ivi.Visa.Interop.ResourceManager" doesn't work either).   Is this even possible?  I don't want to use .NET or other language/system that I have to compile.

(Yes I installed the drivers and the required components seem to be there; I can create this object from C#.)

Thanks,
marco  

回帖(2)

卢兰凤

2019-5-14 13:48:59
你考虑过使用Python吗?
有一个名为PyVISA的附加软件包,它与标准VISA库连接,允许对仪器进行编程控制。
我在安捷伦和NI VISA库中都使用过它。
附件是网络分析器的一个例子,可能有所帮助。还有一个名为Lab :: Instrument的Perl项目也可以使用VISA工作,但我没有时间去尝试它。使用其中一个,可能会让你远离
必须在脚本语言中使用COM,这并不总是最容易的。

以上来自于谷歌翻译


     以下为原文

  Have you considering using Python?  There is an add-in package called PyVISA which interfaces with the standard VISA libraries to allow programmatic control of instruments.  I've used it with both Agilent and NI VISA Libraries.  Attached is an example for a network analyzer that may help.

There is also a Perl project called Lab::Instrument that should also work using VISA, but I haven't had time to try it.

Using one of these, may keep you from having to use COM in a scripting language, which can not always be the easiest.

附件

举报

潘千

2019-5-14 13:59:31
谢谢你的提示。
Python会很好。

以上来自于谷歌翻译


     以下为原文

  Thanks for the tip.  Python will do fine.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分