Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPIB interface.command() calls don't seem to work #275

Open
greyltc opened this issue Sep 27, 2020 · 1 comment · May be fixed by #276
Open

GPIB interface.command() calls don't seem to work #275

greyltc opened this issue Sep 27, 2020 · 1 comment · May be fixed by #276

Comments

@greyltc
Copy link
Contributor

greyltc commented Sep 27, 2020

ifc.command(b"0x1")

This doesn't seem to be working with the latest stable release of gpib_ctypes:

ifc.command(b"0x1")
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/pyvisa_py/gpib.py", line 450, in gpib_control_ren
    ifc.command(b"0x1")
  File "/usr/lib/python3.8/site-packages/gpib_ctypes/Gpib.py", line 47, in command
    gpib.command(self.id, str)
  File "/usr/lib/python3.8/site-packages/gpib_ctypes/gpib/gpib.py", line 262, in command
    raise GpibError("command")
gpib_ctypes.gpib.gpib.GpibError: command() error: Iberr 4, bad argument to function call

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.8/site-packages/gpib_ctypes/Gpib.py", line 47, in command
    gpib.command(self.id, str)
  File "/usr/lib/python3.8/site-packages/gpib_ctypes/gpib/gpib.py", line 262, in command
    raise GpibError("command")
gpib_ctypes.gpib.gpib.GpibError: command() error: Iberr 4, bad argument to function call

I can't seem to find the syntax trick to get gpib_ctypes to accept that command :-(

It also doesn't work with the python bindings for linux-gpib all built from the latest linux-gpib SVN commit:

ifc.command(b"0x1")
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.8/site-packages/Gpib.py", line 43, in command
    gpib.command(self.id, str)
gpib.GpibError: cmd() failed: One or more arguments to the function call were invalid.

Maybe the two breakages are related?

@MatthieuDartiailh MatthieuDartiailh linked a pull request Sep 28, 2020 that will close this issue
3 tasks
@MatthieuDartiailh
Copy link
Member

That one is something I added recently and could not test (don't remember if I shouted out to the community for this one....). This is a pretty dumb typo I think it should be:

ifc.command(b"\x01")

#276 should fix it. If you can test it would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants