Need help for a person wanting to convert to LabView!
I need to do a screen capture of an Agilent spectrum analyzer (Model 4408B) and this SA will output an image in JPEG in 488.2 Definite Length Block format. This means the JPEG file will have a header that starts with a "#", is followed by a single digit that gives the length of a following count field, and then the count field, which gives the length of data being sent. For example, to send a block of 1024 bytes, the header would have the form "#41024".
We do a lot a screen captures in our testing, so we have a many programs in Agilent VEE to do this on a routine basis. In VEE, there is a function called Read BINBLOCK which reads the image data and strips of the header mentioned above before we write the data to a file.
I started to port this program to Labview to see if we can speed up our testing (in general, not for screen capture). So with Labview 6, I use the "GPIB Read" function to read the image data from the GPIB bus, then write the data into a file. But using a probe, I found that header mentioned above is still there and any image program wouldn't read the image file at all (Can't Open or Can't Determine Type). Furthermore, the "Write File" function in Labview adds some additional header before the "#41024"-type header mentioned above.
By the way, I tried the GPIB function "RECEIVE" instead of the "GPIB Read" function above and got exactly the same result.
So the problem has 2 parts:
1. Is there a way to read, or receive, Definite Length Block data from the GPIB bus (similar to VEE's Read BINBLOCK function).
2. Is there a way to prevent Labview's "Write File" function not to add some other header of its own to the saved file.
NOTE: In the "Write File" function, I experimented with using a Pos_Offset value ranging from 1 to 8, in order to get rid of the header caused by part 1 above. But anytime the Pos_Offset value is greater than zero, the saved file will be empty!
I appreciate any help from the Labview community for this seemingly simple problem.