-
Notifications
You must be signed in to change notification settings - Fork 39
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
Communication fails for simulated GPIB/USB/TCPIP devices #40
Comments
This might be too late, but I figured something out that might work for you. I had to make two changes.
To fix 1, I did eg.
To fix 2, here's an example
|
Or you can just change the
|
I also found that setting the open_resource arguments to match the device eom in default.yaml to work:
|
I am encountering the same issue. In my tests the |
I encounter similar issue... A minimal code to reproduce and illustrate: import pyvisa
resource_manager = pyvisa.ResourceManager("mock.yaml@sim")
asrl_instr = resource_manager.open_resource("ASRL0::INSTR")
asrl_instr.query('?IDN')
# Returns expected reply: 'ASRL DEVICE\n'
tcpip_instr = resource_manager.open_resource("TCPIP0::localhost::inst0::INSTR")
tcpip_instr.query('?IDN')
# Returns: VisaIOError: VI_ERROR_TMO (-1073807339): Timeout expired before operation completed. mock.yaml file: spec: "1.0"
devices:
asrl_dev:
eom:
ASRL INSTR:
q: "\r\n"
r: "\n"
error: ERROR
dialogues:
- q: "?IDN"
r: "ASRL DEVICE"
tcpip_dev:
eom:
TCPIP INSTR:
q: "\n"
r: "\n"
error: ERROR
dialogues:
- q: "?IDN"
r: "TCPIP DEVICE"
resources:
ASRL0::INSTR:
device: asrl_dev
TCPIP0::localhost::inst0::INSTR:
device: tcpip_dev |
I am trying to communicate to the simulated devices that the pyvisa-sim backend provides. However only if I talk to the device over the (simulated) serial it works. All other interfaces result in a timeout error. I am using the
default.yaml
configuration for the pyvisa backend.Below example code with which I tested it:
gist of the error: https://gist.github.com/StefanD986/830ede22e5a2bad067862874eaef777e
The text was updated successfully, but these errors were encountered: