LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.gif

When I copy a .gif (screen dump) from my instrument to the hard drive on my PC, I cannot open the new file.  Anyone know why?
Message 1 of 10
(4,753 Views)
There's not much information to go on there. Smiley Wink
What instrument?  What kind of drivers are you using?  VISA/GPIB?  What are the commands you are using to get the screen dump?  Any error codes coming up?
Message 2 of 10
(4,751 Views)
Sorry, I am pretty new to LabView.  I am using 8.5.  The instrument is an Agilent E7402A.  I am using a VISA read and then sending the read buffer to a Write to VI.  I've tried writing as a text file and also as binary file.  I am not finding any VI's to write as an image file.  I don't get any errors when running the VI, but if I open the .gif file in notepad I can see that there are extra characters inserted at the beginning of the file.  If I remove them, I still cannot open the file.

Message Edited by iwantabuggy on 04-01-2008 10:24 AM
Message 3 of 10
(4,743 Views)

hi there,

do you got solution on .gif?

 

i am writing a vi also for e7401a emc analyzer thru lv8.2. i got the screen dump data from the instrument but i cant view it.

 

 

0 Kudos
Message 4 of 10
(4,557 Views)

The project was turned over to another (real) programmer before it was finished, but I am sure he found a solution.  I'll see if I can get him to post a comment that will help you out.

 

N

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

cmdrb,

 

The problem with trying to simply download the data, write it to a gif, and then view it is that there is header information added to the data you fetch.  It goes something like this:

#<number of characters in data size><data size><data><line feed>

 The number sign at the beginning is an actual number sign.  The rest depends on your data.

 

To get the data, you need to follow a few steps.

1) Read the # off of the data buffer and ignore it

2) Read the number of characters in the data size off of the data buffer

3) Read the data size (using the previously read number)

4) Add one to the data size (to account for the line feed), and use it to read the data off your data buffer.

5) Convert your data to an array of unsigned bytes

6) Write it to a binary file (using native, host order for the byte order) with a .gif extension

 

I've attached some VIs that I found not long ago when looking into this same problem.  I may have modified them some, but I got these from someone else on this or another board.

Download All
0 Kudos
Message 6 of 10
(4,524 Views)
i cant open the file, i am using lv 8.2 version
0 Kudos
Message 7 of 10
(4,511 Views)

hi,

i made a vi to get the data.

pls check the diagram that i made.

i am a little confuse here.

 

this is the first characters that was in the buffer:

 

#516410GIF87a

 

so, i will take off #, then what does 516410GIF87a means

 

please do help. i need your expertise

0 Kudos
Message 8 of 10
(4,509 Views)

i got it...disregard the previous inquiry

 

i have another inquiry: 

now, how can i display in the fronpanel.

do you have a .gif read vi?

0 Kudos
Message 9 of 10
(4,502 Views)

Please try to maintain these questions in one thread.

 

Continue the discussion here.  http://forums.ni.com/ni/board/message?board.id=170&thread.id=363265

Message 10 of 10
(4,483 Views)