LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Export Image from Chart

Hi,

 

I'm having trouble exporting an image from a chart. It works but sometimes it doesn't and I don't know why. I guess it has something to do with the graphic system doing stuff in the background and when the plot is actually updated and when the image is exported/created.

 

What am I trying to do :

- Say you have trend chart of 5000 samples

- I want the full trend divided in plots of 1000 samples.

- So I change the X-scale programmatically accordingly in a loop 

- After changing the x-scale I trigger the invoke node 'Export Image' for each plot

 

The results are unpredictable. Sometimes the X-scale are correct, on other times they are just off. 

I tried inserting waits after changing the scale and triggering the 'Export Image'. Also tried the 'Force Redraw' invoke node.

 

To be fair, this belongs in a larger project with different loops running at the same time. 

In the isolated example below I was not able to reproduce the problem. But I attached it anyway to give you an idea on how the plots are exported.

 

Attached the isolated code. 

 

I guess what I need to know is, how can I be sure that the plot is redrawn with the new scales and ready to be exported.

 

Thanks for any tips/tricks 

Download All
0 Kudos
Message 1 of 3
(1,028 Views)

If the system can be busy with other processes, try adding a check that the scale has the desired limits:

 

chart.PNG

0 Kudos
Message 2 of 3
(993 Views)

A simple answer to my complex problem that might actually work 🙂

 

I'll try this out as soon as I get the chance

0 Kudos
Message 3 of 3
(962 Views)