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

[COM] Communication issue with Keysight DSOX-4024A using USB Connection #829

Open
j-ruhi opened this issue Jun 7, 2024 · 3 comments
Open
Labels
instrument Communication issue with a specific instrument

Comments

@j-ruhi
Copy link

j-ruhi commented Jun 7, 2024

Instrument details

Output of pyvisa-info

I'm running a python program in a computer with Windows that is connected to a Keysight Infiniivision oscilloscope (DSOX-4024A) with an USB. Basically my program applies the write(...) to configure the oscilloscope so that the signal is inside the display and then reads some values with query(...), and then repeats this process a lot of times with different signals. The problem is that, sometimes when i execute the query(...) i get a Timeout error, but this doesn't happen everytime, it happens occasionally without following any apparent pattern.

The error is the following:
error_time_out
error_time_out2

As you can see, the error always happens when i do the oscilloscope.query(...).

I checked the pyvisa documentation and then realised the problem may be that i had to define the termination_character, as i couldn't find it in the programming guide of this oscilloscope what character i had to use i am using '\n' for the moment, like this:

oscilloscope = resources.open_resource(osc_connected)
oscilloscope.read_termination = '\n'
oscilloscope.write_termination = '\n'

But it stills fail ocassionally, as you can see in the following image:

error_time_out3

@j-ruhi j-ruhi added the instrument Communication issue with a specific instrument label Jun 7, 2024
@MatthieuDartiailh
Copy link
Member

If the issue is transient, it is not a termination character issue.
What can happen is that the instrument is taking longer to process the operation you requested. It can sometimes take some time to an oscillscope to switch of measurement type for example.

@j-ruhi
Copy link
Author

j-ruhi commented Jun 10, 2024

If the issue is transient, it is not a termination character issue. What can happen is that the instrument is taking longer to process the operation you requested. It can sometimes take some time to an oscillscope to switch of measurement type for example.

And how can I solve that?

@MatthieuDartiailh
Copy link
Member

You can try to add some sleep, or recover graciously whenever a timeout occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
instrument Communication issue with a specific instrument
Projects
None yet
Development

No branches or pull requests

2 participants