LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

oscilloscope bmp hardcopy problem

hallo:

in my project, there is a Tektronix ocsilloscope connect to labtop via GPIB cable, i try write a program which  use Hardcopy command to get bmp screen shoot picture and indicate it in program's interface, the VISA-read can read back some signal, but it seems like strings, how to cope with such data and return it to a picturn which can present in the interface and save in the disc as bmp picture?

anyone have experience of such issure or some advices? deeply appreciate of that. 

 

0 Kudos
Message 1 of 10
(4,382 Views)
any comments?
0 Kudos
Message 2 of 10
(4,353 Views)
Have you simply tried to save the returned data with the correct extension?
0 Kudos
Message 3 of 10
(4,337 Views)
thanks for your reply, from device, i just get a string, and have no idea  how to cope with it, do you have more information or sample?
0 Kudos
Message 4 of 10
(4,333 Views)

Yes, you get a string when you read from an instrument. All that I am saying is that if you are transferring a .bmp file for example, all that you might have to do is take that entire string and save it to a file with a .bmp extension. If you look at the string in LabVIEW, it is probably meaningless. It's just the encoding of the file displayed as ASCII. Try it and see if you can then open the file in a graphics viewer.

 

There are numerous examples for writing to a file. Try Write to Binary File with your string as an input.

 

 

0 Kudos
Message 5 of 10
(4,331 Views)

hallo dennis:

thanks, and this is my test program picture, but it seems that after running, no picture shows in this .bmp file, do you know why?

0 Kudos
Message 6 of 10
(4,313 Views)

You could have starting or ending information in the text string.  You will need to strip this before sending to the file.  Consult your oscilloscope interface manual for details.

 

Another option is to use a binary editor to look at the file.  Look up the BMP filespec so you know what to look for. Google "bmp file structure" for lots of information on BMP files.  If you don't have a binary editor, you can pick up an open source one fairly easily.

 

It is probably easier to look at the text string with the codes display turned on so you can see all the non-printing characters.  You already have it displayed.

 

Let us know if you need more help.

0 Kudos
Message 7 of 10
(4,289 Views)
I agree with DFGray. The best resource is the manual. You might also do a search of the forum. Here is some code for a Tek scope. It uses a Write to Text File with Convert EOL set to true. That seems a bit backwards from what I would expect but you can give that a try.
0 Kudos
Message 8 of 10
(4,279 Views)

hi guys.

my problem is fixe, thanks a lot for your kind help.

0 Kudos
Message 9 of 10
(4,258 Views)
hi,i have the same question!how do you fix it? thanks
0 Kudos
Message 10 of 10
(3,916 Views)