Python GPIB 命令

发布于 2024-11-14 09:44:21 字数 222 浏览 2 评论 0原文

我已经安装并运行了一个可用的 GPIB 接口和 Linux-GPIB 软件包。

我目前只知道两个命令,x.write 和 x.find。我对Python了解不多,但我认识点运算符,并意识到导入gpib后,我应该可以使用一些函数。

我无法找到 GPIB 功能列表。

I have a working GPIB interface and Linux-GPIB package installed and working.

I only know two commands at the moment, x.write and x.find. I don't know much about Python, but I recognize the dot operator and realize that after importing gpib, I should get some functions at my disposal.

I have not been able to locate the list of GPIB functions.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

若水微香 2024-11-21 09:44:21

它们位于 gpib 库中。您可以像这样引用它们:gpib.foo()

将此行添加到您的代码中:

help(gpib)

并浏览函数/类。

They are in the gpib library. You reference them like so: gpib.foo().

Add this line into your code:

help(gpib)

And browse through the functions/classes.

假面具 2024-11-21 09:44:21

如果您使用 Python 工作,我认为 pyvisa 就是您正在寻找的。它提供了许多有用的高级功能,可以帮助您向您的设备发送一系列 SCPI 命令通过GPIB,如writereadask等。

至于 SCPI 命令本身,通常不同供应商的命令会有所不同。因此,对于应该向设备发送什么样的SCPI,您应该阅读相应的数据表。但在其他情况下,您可以安装供应商提供的驱动程序。在这种情况下,您可以发送一些更高的命令。例如,如果您想控制电压源,他们可能已经获得了函数setVoltage(双电压)。事情对你来说会容易得多。

If you are working in Python, I think the pyvisa is what you are looking for. It provides lots of useful high level functions which helps you to send a series of SCPI commands to your equipment via GPIB, such as write, read,ask and so on.

As for SCPI commands themselves, usually they will differ from the different vendors. So in terms of what kind of SCPI you should send to the equipment, you should read the corresponding datasheet. But in the other case, you could have installed the drivers which were provided by the vendor. In this case you can send some even higher commands. For instance, if you would like to control a voltage source, they have probably already got the function setvoltage(double voltage). Things will be much more easier for you.

计㈡愣 2024-11-21 09:44:21

实际上有很多命令可用。除了你提到的这两个之外,还有x.readx.askx.ask_for_value等等。

但我建议您阅读那些帮助文件,我认为这会让您更好地理解。

Actually there are many commands available. Except those two you mentioned, there are x.read, x.ask, x.ask_for_value and so on.

But I recommend your to read those help file, I think that will give you a better understanding.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文