LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Capture a portion of FP image

Hi all,

 

I like to know how to capture a portion of front panel image? for instance, if i have 2 graphs on fp, i like to capture only one graph image as jpeg to the disk.

 

 

Thanks

0 Kudos
Message 1 of 16
(4,291 Views)

(1) On the front panel: RIght-click on your graph and "create...invoke node...get image". (see image)

 

 

 

(2) On the diagram: Define the image depth (e.g. 24), background color, and use e.g. "write png file" to save the image data as an image file.

 

 

Message Edited by altenbach on 09-20-2008 12:13 AM
Message 2 of 16
(4,287 Views)

You didn't mention the LV version you are using.

 

If you have LV 7.1, then you won't see the sub-menu for the invoke node. Rather once you click on the invoke node, it would be placed on the block diagram and there, you can select the 'Get image' option.

 

Also there is another option of saving the data as shown in attached image 'Option 2'. If you use the 'Copy data', it copies all the figure data in the buffer (not only the data displayed) to the clipboard. you can then save using any graphics program.

also, If you use the 'export simplided image...' option, you can save a b&W image in either wmf or bmp format to the clipboard or a file.

 

Hope this helps.

Download All
0 Kudos
Message 3 of 16
(4,259 Views)
 
Download All
0 Kudos
Message 4 of 16
(4,198 Views)

From your mails now i know how to capture a part of front panel escpecially graph portion alone. If I like to capture image programatically, I can use Invoke node method only. fine.

 

To try workaround for my problem, I thought of capturing image and like to reproduce it on the front panel again by reading back. here i got struck. i dont know how and what should i use to fit this captured image into the chart again.

 

really I want to have answer for this problem:

I am writing a cluster of 10 elements into a file and reading back to create 1-d array of data onto the graph. i have some difficulty in doing this. thats the reason i thought of capturing graph portion alone as image file and try to retrieve into the chart again when reading back.  

 

Attached images tell you what i want or you can tell if i am making mistakes..

 

my version : LV7.1

 

Thanks

 

Kousy

Download All
0 Kudos
Message 5 of 16
(4,197 Views)

Are you really trying to recreate the chart from an image of it??? This seems extremely silly and the idea alone would qualify for a honorable mention in the Rube Goldberg Thread.

 

You cannot be serious! (If you just want to show the old image on the front panel, you could use a picture control.)


Kousy wrote:

I am writing a cluster of 10 elements into a file and reading back to create 1-d array of data onto the graph. i have some difficulty in doing this.


OK, the le'ts solve how to do this. making an image is probably not the answer.

Message 6 of 16
(4,173 Views)

Kousy, You started this thread by asking how to capture a portion of the FP as image. Your last post is 180° opposite to that and I would agree with the comments of 'altenbach'.

 

Why in the world would you reproduce a chart from an image of it?

 

 

From your VI snapshot, why are you sending your data to the 'byte stream type' input of the read file vi. Moreover, which drop-down combo box are you talking about? Can you state your problem more clearly?

 

 

 

0 Kudos
Message 7 of 16
(4,160 Views)

In one particular application- production based test rig, 10 different kind of tests were done and the data archiving done.

 

Root for saving the data is like this : Model/Customer/Sl.No./Filename (this is the combo I have mentioned earlier) This last hierarchy folder Filename which is having 10 files corresponds to 10 tests. Out of 10, for few tests – only numeric data to be saved ; for some its XY graph data ; One test require data of particular channel against time. This is where I am getting struck..

 

We have separate menu to see the test results later. Here I need to show all the 10 tests data in 2 pages. When I am in this menu, I have options to select Model(all available were populated into this combo). And then to Customer, Sl.No. Finally when I am selecting Filename from this combo, it read all 10 files data and filled up the screen. My last test data 1-D array from cluster of 10elemnts, I could not re-build into the chart first time (My another jpg depicts). By clicking second time the Filename from filename combo, it is Ok. I want to resolve this.

 

Altenbach, yeah I know its silly, but it helps avoiding irritation by clicking again and again to get the data ok.

 

Mani’s Hope this mail is defining my problem clearly..

0 Kudos
Message 8 of 16
(4,110 Views)

OK, let's focus on how to always correctly display your data. This should not be dficult. You only show a picture fo the code. Can you attach the real program and a datafile that you want to read in?

 

I think the main problem is your use of a chart instead of a graph to display a finite set of data once. Maybe the chart history interferes, but it is hard to tell from your code picture. Apparently, you are only feeding it naked array data without any x-axis information.


Kousy wrote:

We have separate menu to see the test results later. Here I need to show all the 10 tests data in 2 pages. When I am in this menu, I have options to select Model(all available were populated into this combo). And then to Customer, Sl.No. Finally when I am selecting Filename from this combo, it read all 10 files data and filled up the screen. My last test data 1-D array from cluster of 10elemnts, I could not re-build into the chart first time (My another jpg depicts). By clicking second time the Filename from filename combo, it is Ok. I want to resolve this.


Sorry, none of this is very clear.

0 Kudos
Message 9 of 16
(4,087 Views)
I am attaching the vi and data file to read in. I too thought of using waveform graph. So I tried. This is also not showing the data when the command button is clicked once. But clicking second time will display the data. Hope at least attached vi will sure give clarity.
Download All
0 Kudos
Message 10 of 16
(4,072 Views)