LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

saving fieldpoint data

I could really use some help here. I need to pull temperature data from a fieldpoint unit, viewing the live data in a chart. I seem to be able to do this with the attached code. The part I can't seem to figure out is how to take the data and send it to a spreadsheet for viewing in excel. There are 8 channels that I am viewing at once. The data that is in the history of the chart is all I need to save. I have tried creating a property node of the history, but can't seem to get it to send data to a file. What I would really like to do is have a button on the front panel that the user would push to save the current chart (data) to file.

Can someone please help me with this?

Here is a stripped down version of what I am working with.

 

Thanks Mike

Message Edited by mic3030 on 10-21-2006 05:07 PM

0 Kudos
Message 1 of 8
(3,545 Views)
Hi,
 
There are a couple of tools I might point you to as you are developing a write-to-spreadsheet type application.  The first of these tools is the Write to Spreadsheet File.vi which is fairly self-explanatory and easy to use.  You could also search the NI Example Finder of LabVIEW for 'excel,' and there are a few pre-developed VIs which do what you are wanting to accomplish.
 
Peter
 
Peter L.
Applications Engineer
National Instruments
www.ni.com/support/
0 Kudos
Message 2 of 8
(3,508 Views)
Peter, thanks for the referral to the help documents and examples.  I am quite familiar with them, as they have got me this far.  I am having trouble converting the data into something that the write to spreadsheet will accept.  The type of source is a 1D array cluster of 8 elements, which doesn't appear to be something that the write to spreadsheet will accept.  I have attempted to change the shape, but have not been sucessful at getting all the data into the spreadsheet.  Also, I can't seem to get the X-axis (time) into the spreadsheet. 
 
I am a new labview user, so if this is overly simply forgive me.  I was hoping that someone could help guide me though this problem.  I am schedules to go out to labview basic 1 and 2 next month, but in the meantime I need to get this part of it going.
 
Thanks

Message Edited by mic3030 on 10-24-2006 05:39 AM

Message Edited by mic3030 on 10-24-2006 05:39 AM

0 Kudos
Message 3 of 8
(3,498 Views)
Here is the vi I have been working on.  Seems to work,  the only thing I don't get is the time or x-axis values. Any ideas how to fix this?

Message Edited by mic3030 on 10-24-2006 07:31 AM

0 Kudos
Message 4 of 8
(3,490 Views)
Hi,
 
I took a look at the VI you attached and there are a few things to consider.  One of them is that you don't need to use a property node to pass data to another VI; you just need to wire the data stream straight into the next VI.  Also, using a build array in this manner isn't going to add any timing information to the plot.  I know it can be difficult to piece together an application like this without any formal LabVIEW training, but I would highly recommend that you take a look at the Learn LabVIEW in 3 and 6 hours tutorials online before proceeding further.  One of the biggest principles in this sort of development is the concept of data flow.  You will definitely want to use error handling in order to determine the order in which VIs are called.
 
Peter
Peter L.
Applications Engineer
National Instruments
www.ni.com/support/
0 Kudos
Message 5 of 8
(3,465 Views)

Peter,

I don't seem to understand where you are leading me here, other than to read the help documents and work though the tutorials.

Why is it so difficult to get "real"  time and date information and save it with your data? I have looked through the forums, I don't appear to be the only one with this sort of questioning.  Right or wrong, it's took me 3 or 4  clicks to get measurement data into an array and another 3 to save it to spreadsheet.  I would say aquiring measurement data is fairly easy.  Dressing it up is a little more work, but not too bad. Then there is "time and date information". I have looked at some of the examples for merging time and date in with your data set.  This seems to be a big kludge. Then when you get outside of fieldpoint, it really gets complicated.  What am is missing here? I am sure it can't be this difficult.

I have looked through all the help documents and did the 3 and 6 hour tutorials. You can only get so much from tutorials, that is why I am going out to training for some human interface.  I was really looking for someone to help walk me though this exercise. Possibly I misunderstood the NI sale rep, but I thought that is what this forum is for. Please let me know if this is wrong so that I don't post questions of this sort in the future. 

Thank you

Mike

Message Edited by mic3030 on 10-26-2006 09:23 AM

0 Kudos
Message 6 of 8
(3,442 Views)
Hi Mike,
 
First of all, yes, these forums are indeed for the sharing of ideas and assisting each other in code development and concept-learning.  There are a couple of things that might work for extracting time information in this application.  One of them is that there is a timestamp node as output on the Fieldpoint Read VI that will provide you with the time information of the most recent "read."  There are also the Get Date/Time in Seconds and Get Date/Time String VIs which can be used for grabbing the time from the computer's internal clock for logging purposes.  Please take a look at the detailed help if you have further questions with these VIs.  By using a Build Array (it appears that you're doing so already) or concatenating this timing information to the data you're logging, you should be able to simultaneously log data and date/time information in the same file.
 
Peter
Peter L.
Applications Engineer
National Instruments
www.ni.com/support/
0 Kudos
Message 7 of 8
(3,400 Views)

Peter,

I played around with concatenating the time and turning it into a string. That seem to do the trick.  I also did some reading as you suggested on error control.  I understand now what you meant about data flow.

Thanks for the help!

Mike

0 Kudos
Message 8 of 8
(3,366 Views)