02-17-2016 11:47 AM
I have a sine wave that I'm reading with a graph. This data is the acceleration reading from a specific material. I'd like to capture damping for this material...when I turn off the vibration switch, the damping cruve begins to degrade.
I would like to "freeze" the graph at this point, manually, then capture the current data points that are on the graph in an excel file.
I'm having trouble getting the data to line up with the curve I want to see on the graph. Is there a way to just capture the graph points that are currently displayed. I'd rather not use an image file
Solved! Go to Solution.
02-17-2016 11:50 AM
Right-click > Export > Export Data to Excel
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
02-17-2016 11:57 AM
Can I do this with a button? I'd like to make it as smooth as possible....preferably without opening excel in the middle of this process.
02-17-2016
12:04 PM
- last edited on
12-16-2024
04:04 PM
by
Content Cleaner
You can create an invoke node that does the exact same thing. Right-click your graph indicator terminal > Create > Invoke Node > Export Data to Excel.
This will open excel. If you want to export to a file without the user seeing anything pop up you'll need to write File I/O code yourself where you choose the destination path, etc.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
02-17-2016 12:10 PM
I have found that the data you export from a graph is not necessarily the raw data that you send to the graph. If this is important to you, I recommend using a non-graph indicator (array of doubles for example) and using the invoke node with that indicator. This can be used along with the graph indicator (just write to both indicators) and can be hidden on the front panel as well.
02-17-2016 12:16 PM
I guess that's my problem then...if I can't save the current graph points without excel opening, which I can't (that's what your referenced article said) I need another way. How would I stop the graph, and then push a button to capture only the data on the graph(or in the current graph buffer) ....Greg, If i can get away with doing this programatically I won't need to do it with the export/indicators will I?
Any advice on how to go about this?
02-17-2016 12:21 PM
I'm not sure how your program looks, but if you've got an event structure it should be quite easy to add some "Write to Spreadsheet File" functionality that takes that most recent graph data. You talked about a graph "buffer", so I just want to make sure that you are in fact using a graph, and not a chart. If it is a chart you can use a "get chart history" property node I believe.
02-17-2016 12:25 PM
I'm using a graph...I understand the concept of saving the graph data to an excel file. But I want to "freeze the graph" when this happens as well...and I want the graph data to be similar to what's in my saved file.
02-17-2016 12:28 PM
That could be quite easy as well depending on your program architecture. You just need to stop sending new data to the graph at that point. A "cheat" method might be set the "Defer Panel Updates" property to True, and then the front panel shouldn't update again until you set it back to False.
02-17-2016 01:11 PM
@glskinner84 wrote:I'm using a graph...I understand the concept of saving the graph data to an excel file. But I want to "freeze the graph" when this happens as well...and I want the graph data to be similar to what's in my saved file.
My interpatation of “freezing the graph” would be to stop executing a portion of your code. The same portion that’s graphing your data points.
There are different ways of doing this.
It would be much easier if you post your code, a portion of your code, or a sample code so we can understand your question better and help you.
Best,
Kingehp