Tektronix Technical Forums are maintained by community involvement. Feel free to post questions or respond to questions by other members. Should you require a time-sensitive answer, please contact your local Tektronix support center here.
Hardcopy, Ethernet and C# on MDO3024
Hardcopy, Ethernet and C# on MDO3024
Hello,
I'm trying to get a hardcopy from an MDO3024 onto my PC over ethernet.
I have done it successfully with Python and USB but now I need to get it done through C#, preferably over Ethernet and I am running into problems.
I can query and send command OK but when I issue the "HARDCOPY START" command I don't seem to get anything back although the scope flashes so I know a hardcopy is initiated. An "*ESR?" query returns 4.
I was expecting to get the bytes of the file as a response. Am I missing something?
appart from the initial "*CLS" and "*IDN?" commands, the only other things I am settings are " SAVe:IMAGe:FILEFormat PNG" and ""SAVe:IMAGe:INKSaver ON""
Thanks for your help
I'm trying to get a hardcopy from an MDO3024 onto my PC over ethernet.
I have done it successfully with Python and USB but now I need to get it done through C#, preferably over Ethernet and I am running into problems.
I can query and send command OK but when I issue the "HARDCOPY START" command I don't seem to get anything back although the scope flashes so I know a hardcopy is initiated. An "*ESR?" query returns 4.
I was expecting to get the bytes of the file as a response. Am I missing something?
appart from the initial "*CLS" and "*IDN?" commands, the only other things I am settings are " SAVe:IMAGe:FILEFormat PNG" and ""SAVe:IMAGe:INKSaver ON""
Thanks for your help
Re: Hardcopy, Ethernet and C# on MDO3024
Have you looked at the remote programming examples section on the forum? You may find an example that is close to the task you are trying to accompolish. viewtopic.php?f=580&t=133570
Re: Hardcopy, Ethernet and C# on MDO3024
Oh and querying "ALLEv?" returns "Querry INTERRUPTED"
Yes I have looked at some of those links but I'm not clear why there is nothing going on the stream after the "hardcopy start" command.
I'm monitoring the exchange between the scope and the pc with Wireshark but there is no byte returned by the scope after the hardcopy start so I don't see what I can do unless I missed a config line somewhere.
Also I am not using a VISA layer for the communication, just plain scpi
Yes I have looked at some of those links but I'm not clear why there is nothing going on the stream after the "hardcopy start" command.
I'm monitoring the exchange between the scope and the pc with Wireshark but there is no byte returned by the scope after the hardcopy start so I don't see what I can do unless I missed a config line somewhere.
Also I am not using a VISA layer for the communication, just plain scpi
Re: Hardcopy, Ethernet and C# on MDO3024
The hardcopy command isn't supported on raw socket connections. To get screen captures without VISA or VXI-11, you might try accessing eScope, the web server on the instrument. HTTP client libraries are readily available. I don't know how to do it in C# but in Python 3 it is the following
replace 192.168.1.116 with your MDO's ip or hostname
Code: Select all
import urllib.request
screen = urllib.request.urlopen('http://192.168.1.116:81/image.png')
with open('myfile.png', 'wb') as f:
f.write(screen.read())
Tektronix Application Engineer
Re: Hardcopy, Ethernet and C# on MDO3024
Thank you Carl.
So far I managed to get by by mounting a network drive on the scope and saving the hardcopy to it. However it is not ideal for various reasons.
Therefore I will try to implement your method. Thank you!
Florent
So far I managed to get by by mounting a network drive on the scope and saving the hardcopy to it. However it is not ideal for various reasons.
Therefore I will try to implement your method. Thank you!
Florent
Re: Hardcopy, Ethernet and C# on MDO3024
Works very well. Thanks again for the quick support.
Who is online
Users browsing this forum: No registered users and 3 guests