Format of captured data from an instrument

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hello,
Im running Visual Basic 2010 Express. Ive built an application that communicates with a Tektronix DP04034 oscilloscope via the USB interface using some VISA libs.
I can connect, cause button press events etc on the scope. The scope has a screen capture function wich I can also successfully call. The capture is in the form of a .BMP file, but is returned to the PC as a string of ASCII characters.
A bit more info.....One can also save a screen capture to a USB stick plugged into the scope, again as a .BMP file. I have looked at this file with a hex editor and compared it to the string that I capture with my VB app. They are both similar, but some of the bytes are different in the file I get form my app. i.e., in the header part of the file, the file on the USB stick has a number of bytes = 0x00 while in the one from my app these are 0x20. In this case, null characters are being replaced with spaces. Other bytes are different as well. I assume this has to do with the way the string is being handled by VB.
Any thoughts on how to "fix" the file from my app so it comes out as a valid .BMP file?
Thanks!
Bob

View the full article
 
Back
Top