Posted Tue, 24 Sep 2024 06:49:20 GMT by Render, Lee
I'm using pyvisa to automate an MSO64b Oscilloscope.

I've encountered strange behaviour

e.g.

I issue  *idn?

and print the idn

but later I issue 
WFMO:NR_P?

and sometimes I see this
ValueError: invalid literal for int() with base 10: 'TEKTRONIX,MSO64B,C049439,CF:91.1CT FV:1.44.3.433'

which means the command returned the idn!

Is there some output flushing I need to do to ensure the query returns the correct values each time?

Thanks



 
Posted Wed, 25 Sep 2024 01:22:04 GMT by Render, Lee
I tried with telnet just now:

telnet <device ip> 5025

Connected to <device_ip>


Escape character is '^]'.
*IDN?
TEKTRONIX,MSO64B,C049439,CF:91.1CT FV:1.44.3.433
WFMO:NR_P?   
TEKTRONIX,MSO64B,C049439,CF:91.1CT FV:1.44.3.433
WFMO:NR_P?
TEKTRONIX,MSO64B,C049439,CF:91.1CT FV:1.44.3.433


Why is the WFMO:NR_P? query showing he IDN !?
Posted Wed, 25 Sep 2024 03:11:25 GMT by Render, Lee

Connected to ..
Escape character is '^]'.
*IDN?
TEKTRONIX,MSO64B,C049439,CF:91.1CT FV:1.44.3.433
*IDN?
TEKTRONIX,MSO64B,C049439,CF:91.1CT FV:1.44.3.433
*ESR?
TEKTRONIX,MSO64B,C049439,CF:91.1CT FV:1.44.3.433
*ESR?
TEKTRONIX,MSO64B,C049439,CF:91.1CT FV:1.44.3.433
*ESR?
TEKTRONIX,MSO64B,C049439,CF:91.1CT FV:1.44.3.433



*ESR?
TEKTRONIX,MSO64B,C049439,CF:91.1CT FV:1.44.3.433




*ESR?
TEKTRONIX,MSO64B,C049439,CF:91.1CT FV:1.44.3.433


WFMO:NR_P?
TEKTRONIX,MSO64B,C049439,CF:91.1CT FV:1.44.3.433


WFMO:NR_P?
TEKTRONIX,MSO64B,C049439,CF:91.1CT FV:1.44.3.433


WFMO:NR_P?
TEKTRONIX,MSO64B,C049439,CF:91.1CT FV:1.44.3.433


WFMO:NR_P?
32



WFMO:NR_P?
0


WFMO:NR_P?
0


WFMO:NR_P?
0


WFMO:NR_P?
0


WFMO:NR_P?
2001



WFMO:NR_P?
2001


WFMO:NR_P?
2001


WFMO:NR_P?
2001


*IDN?
2001


*IDN?
2001


*IDN?
2001


*IDN?
2001


*IDN?
2001


*IDN?
2001


*IDN?
2001


*IDN?
2001


*IDN?
TEKTRONIX,MSO64B,C049439,CF:91.1CT FV:1.44.3.433
 
Posted Wed, 25 Sep 2024 04:57:19 GMT by Render, Lee
Is there some flush command that I can use via telnet or pyvisa to reset the output buffer?

If I issue *RST this clears the oscilloscope of al set up MATH views and channels and I am not sure this will work either to stop this behaviour.
 
Posted Wed, 25 Sep 2024 19:30:42 GMT by Ryland, John
you should not have to do this but *cls is supposed to clear out anything in the output queue
Posted Thu, 26 Sep 2024 00:31:26 GMT by Render, Lee
Thanks , I'll try that

You must be signed in to post in this forum.