03-23-2017 05:33 PM
Hey
So I'm fairly new to LabVIEW and am working on a program that reads data from a text file, creates two separate graphs from the data, and exports the two graphs to a single jpeg file (one on top of the other).
So far I've been able to program everything up until exporting the graphs to a single jpeg file. The current version of the program (the VI posted) ends with it creating two separate jpeg files of the graphs.
Does anyone have any ideas as to how to code LabVIEW properly so that the two graphs end up in a single jpeg file?
Thanks in advance for your help.
P.S. An example of how the final jpeg should look (done manually through paint) is also attached, along with the test data
Solved! Go to Solution.
03-24-2017 03:01 AM - edited 03-24-2017 03:02 AM
Hi Jordan,
possible solutions:
- put those graphs nicely on your frontpanel, hide the remaining stuff and get the whole FP image…
- after reading the images of both graphs you can use all those 2D graphics functions to put these two smaller images into one bigger image and then save this bigger image
Btw. in your VI you have a big race condition: you should make sure the data is plotted before you read the graph images…
03-24-2017 09:29 AM
So I ran into the problem that you mentioned, where the data wasn't plotted before the VI took the front panel image. Do you have any suggestions as to how to fix that?
As I said, I'm very new to LabVIEW and still trying to get a handle on some of the basics. Thanks for your help.
03-24-2017 09:53 AM
Hi jordan,
Do you have any suggestions as to how to fix that?
THINK DATAFLOW!
Simplest solution is to put the code reading the graph images into a flat frame and using data dependencies to run this frame after you have plot the data…
I'm very new to LabVIEW and still trying to get a handle on some of the basics.
That is what those "Getting Started" is made for!
03-24-2017 12:27 PM
Something simple I've been using successfully is just placing the graphs in a cluster, then after the data is plotted, exporting said cluster instead of graphs. You can arrange the graphs and any extras as you like, and after that, the cluster is the only thing that gets exported.