Making images from labview charts
I had a hard time figuring out how to generate an image from a chart in Labview. The supplied help pages were seemingly helpful, but difficult to decipher once you really try to read it. So, my pain, your gain, here's a tutorial.
Let's start with an arbitrary waveform, say sine.
- Open a new vi and right click on the block diagram. Choose Input and then Simulate Signal. Accept the default.
- Right-click at the Sine output terminal and then select Create followed by Graph Indicator. You'll generate the graph icon.
- Right-click the graph, and then select Create followed by Reference. This is the key.
- Right-click on the reference, and select Create, then Method, then Get Image. You'll generate a box labeled "WFGraph". Note that it isn't connected to anything.
- Connect the WaveformGraph to the upper-left hand corner of WFGraph.
- Connect the Error Out of Simulate Signal with the Error In of WFGraph. This is needed so that the image is generated after the sine is made, not before.
- Right-click on blank area and select All Functions, Graphics & Sound, Graphics Formats, and then your choice of graphic formats to write in. I prefer PNG myself. (Yes, it took a while to find these...)
- Finally, hook up the image data terminals together, and you should be ready to go. Here's what the finished diagram should look like:
Run it and you should be able to save something that looks like this:
Beautiful, no? Size is dictated by the front panel size.