From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
04-30-2012 09:10 AM
This is something I haven't done before in LabVIEW, though it seems like it should be pretty simple... I am just not quite sure where to start.
I am used to saving my data as text files using the write to measurement file express.vi and the write to spreadsheet.vi, but now I have an XY graph that I want to save. What is the name of the .vi I use to do this and what kind of options do I have for file format and such, do I just save it as a .jpeg or some other image file, or is there a .vi that will save both the image and the data?
Thanks for the help!
Solved! Go to Solution.
04-30-2012 09:13 AM
Hi Lars,
maybe you should tell us, what you really want to save into a file!
I guess you only need to save the data. As the XY graph is composed of (atleast) 2 arrays you simple need to save those two arrays in the same way as you did before. I would suggest using WriteToSpreadsheetFile to save a 2D array...
04-30-2012 09:20 AM
I plan on saving the data as well, but I really would like to save the graph as an image file so that the tech who will be running this test does not have to go back and re-create it. The test is for a calibration certificate, so I will need both, and would like to make the life of the cal-tech easier if I can.
I attached an image of the block diagram.
04-30-2012 09:21 AM
LarsUlrich,
It sounds from the format options you mentioned you would like to save a picture.
1. Right click on your graph on the BD.
2. Select "Create>Invoke Node>Get Image
3. Wire the newly created Invoke Node to "Write to PNG" sub-vi (found under "Graphics & Sound>Graphics Format" in Functions Palette)
-Chazzzmd
04-30-2012 09:25 AM
Thanks Chaz, that was exactly what I needed.
11-09-2012 09:49 AM
Hello there!
Thanks for the advice - this is exactly the problem that I am currently having. Unfortunately, when I right-click my x-y chart, the ' create' menu does not seem to have an 'invike node' option. I am currently running LabVIEW 2011 - do you think that might be the cause?
Regards,
Euan
11-09-2012 09:52 AM
11-09-2012 09:55 AM
Ah!
Thanks very much for your response GerdW - I couldn't see it on my block diagram, but when I right-click on the chart in the front panel it gives me the option to invoke node.
Many thanks!
Euan