06-07-2011 04:43 AM
Hello Everyone!
I'm implementing an adquisition systems that send data to a waveform Chart through VISA. All run properly, but I would like to save the data adquired to an excel file. I saw examples to how to save it, but only save the Y value.
I would like getting the X and Y values in 2 columns different in the excel file.
¿Is it possible?
¿Can someone tell me how I can do it?
Thanks for your feedbacks!
Solved! Go to Solution.
06-07-2011 08:04 AM
what kind of plot is that, are you plotting a Y value w.r.t time or w.r.t change in input. You are saying that you read the data from VISA so the data o/p is Y. WHen you read the data you also can get timestamp which can be used as X value. In short at t=0 Y=Y1, t=T100 Y=Y100, is this what you are looking for?
06-07-2011 11:06 AM
Hi!
This is!The value that I recieve through VISA are the values from Y scale. I can save these in excel, but I don't know how to save also de values from X scale. The pairs (XY) as you told me....
¿Can you help me? I don't know how implement timestamps...
Thanks for your feedbacks!
06-07-2011 11:16 AM
You don't implement timestamps. A timestamp is a data type. If you are sending a waveform data type to a chart that datatype contains 3 elements: start time, delta T, and array of values. You can calculate any value of X based on an index. I.e., the X value for the 5th Y value (index = 4) would be 4*deltaT + start Time.
06-07-2011 11:22 AM
Hi,
Ok! I understand... Can I find some example anywhere? I understand what are you saying to me, but I don't know how to send to excel file.
Now I have a OK button that if you press it, then the value of waveform Chart (Y value) safe into a excel file (using write spreadsheet).
¿How can I do it?
Thanks for your sooner answer! 🙂
06-07-2011 11:40 AM
What kind of example are you looking for? The Write to Spreadsheet File creates a delimited text file. In order to actually write to Excel workbooks you need to buy the Report Generation Toolkit or program Excel yourself using ActiveX. There is an example that ships with LabVIEW on writing a 2D array of data to an Excel workbook. You can find it by opening the Example Finder (Help - > Find Examples) and searching for Excel. There are also lots of examples on programming Excel in the Excel thread. NOTE: DO NOT POST QUESTIONS IN THE EXCEL THREAD. It is a repository of links only.
06-07-2011 11:53 AM
Ok! I will see it now...
In my appplication now, I only save a 1D array coming from the Waveform Chart to the SpreadSheet, because I didn't know how to save both coordinates (XY) in array of 2D. This is why I 'm asking this...
Thanks for your feedbacks!
06-07-2011 12:38 PM
What are you feeding the waveform chart? A waveform datatype or dynamic data? Can you post your VI?
06-07-2011 01:05 PM
The waveform Chart is feeding by the data reicivied through VISA. Now, I only keep the Y information in array of 1D. I want to get the value of X an Y from the waveform to an excel file. I would like to send this information (array 2D, because there are 2 datas) to the SpreedFile to write it to excel and have both information (time and amplitude).
Attached you will find the scheme I've made...
Thanks for your feedbacks.
06-07-2011 01:22 PM - edited 06-07-2011 01:22 PM
I meant uploading the actual VI, not a picture of it. You need to fix your code.