07-11-2012 04:14 PM - edited 07-11-2012 04:17 PM
Hello everyone,
I would like to transfer a screenshot, which I have stored on my scope (a Tektronix TDS5104B scope) into my program. The way I am approaching this right now is neitherelegant nor working.
Can anyone point me into the right direction.
Here is what I am trying right now:
1. Copying the file into the GPIB buffer:
Session.Write("FILES:READF " + Path + FileName + ", GPIb");
2. Write the GPIB buffer as a file:
Session.ReadToFile(Path + FileName);
While the file is being created, it is empty and the ReadToFile command returns an TimeOut error.
Moreover, I would be glad, if I could avoid writing the picture as a file and then re-import it. (Eventually, I require a memory stream which contains the file).
Thanks for you support in advance,
Ben
Solved! Go to Solution.
07-11-2012 06:39 PM
Hi all,
I am getting there. I have been missing the quotation signs in the first command. Now that I have added them, it works - to some extend.
After 16 kB the transfer is interrupted and the "rest" of the file is grey...
Does anyone know how I can increase the buffersize or why the transmision is stopped?
Thanks,
Ben
07-11-2012 07:06 PM
Ok, I have solved it now entirely: I've used the ReadBytes Command and used 512000 as length. The other positive thing now is, that I have already a byte array which I can put into a Memorystream directly. So, I don't need to save the picture somewhere locally.