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.
I'd appreciate any help. Thanks!
First, set the current working directory to the compact flash with:
next, if you do not know all the names of the files you need, then get the this of whats on the drive:
Then, loop through the contents of the file names with the:
Now, this will transfer the data over to your PC, and be held in RAM by your program. You will have to write that data to a file on the PC yourself.
For text file I used below given code;
Getting text file using this
and then below given code for creating the text file.
Code: Select all
Dim fso As Object Set fso = CreateObject("Scripting.FileSystemObject") Dim Fileout As Object Set Fileout = fso.CreateTextFile("D:\vba2.txt", True, True) Fileout.Write Osc.ReadString Fileout.Close
You seem to have had a similar post regarding the DPO5204B. The issue here is the same as the issue in that post. My response was
In short, don't treat the data returned as text because it is not text. Treat it as plain old bytes and make sure you are writing the raw bytes to disk without any modifications.When you read the bytes from the instrument you need to write them directly to a file on disk without any modification. I'm not too familiar with VBA, but I would guess your Osc.ReadString call is going to modify the bytes and try to convert them into a Unicode string which will corrupt the image data. Make sure you are reading the data back from the scope as a byte array and not a string.
Who is online
Users browsing this forum: No registered users and 6 guests