Jump to content

Read data from spreadsheet


Recommended Posts

Hi,

I am new to Labview. So, if someone could please help me out - I would greatly appreciate it. I have a spreadsheet with timestamp and temp as the two columns. Lets say I have the following data:

TimeStamp Temp

11:00:00 3

11:00:02 2.9

11:00:05 2.7

11:00:08 3.1

11:00:15 3.2

11:00:21 3

I have to read the the timestamp and temp separately. For default, the first output will be 3 for the temp. The next step is to calculate the time difference between consecutive timestamps - where I have to use that difference as the delay for the next temp update that needs to be sent (which is 2.9) - so the difference between the first two timestamps is 2 sec. After 2 secs I have to send 2.9. Then again, the difference between 2nd and 3rd timestamp is 3 sec, so wait for 3 sec and send 2.7 and so on. I am trying to work this out in labview, since I am new, I find this very hard. Could someone please help me out? Thank you very much. Last of all, I am using Labview 6.1. So, I cannot open the newer version files - so a screenshot would help. Please help.... and thank you.

Link to comment

QUOTE(H_H_H @ Jan 11 2008, 12:35 PM)

Hi,

I am new to Labview. So, if someone could please help me out - I would greatly appreciate it. I have a spreadsheet with timestamp and temp as the two columns. Lets say I have the following data:

TimeStamp Temp

11:00:00 3

11:00:02 2.9

11:00:05 2.7

11:00:08 3.1

11:00:15 3.2

11:00:21 3

I have to read the the timestamp and temp separately. For default, the first output will be 3 for the temp. The next step is to calculate the time difference between consecutive timestamps - where I have to use that difference as the delay for the next temp update that needs to be sent (which is 2.9) - so the difference between the first two timestamps is 2 sec. After 2 secs I have to send 2.9. Then again, the difference between 2nd and 3rd timestamp is 3 sec, so wait for 3 sec and send 2.7 and so on. I am trying to work this out in labview, since I am new, I find this very hard. Could someone please help me out? Thank you very much. Last of all, I am using Labview 6.1. So, I cannot open the newer version files - so a screenshot would help. Please help.... and thank you.

This is a cross post from here and here and here ... I could go on.

You could do something like this to get your data into a useable format (assumes a CSV data file - you can change the delimeter as needed):

http://lavag.org/old_files/monthly_01_2008/post-8758-1200088160.jpg' target="_blank">post-8758-1200088160.jpg?width=400

That should get you started. Once you have the data in numeric format the rest is pretty simple math. The parser VI in the example above can be built using functions from the string functions pallette. If you need more help post back here and include what you have so far.

-Toby

Link to comment

QUOTE(TobyD @ Jan 11 2008, 04:57 PM)

This is a cross post from here and here and here ... I could go on.

You could do something like this to get your data into a useable format (assumes a CSV data file - you can change the delimeter as needed):

http://lavag.org/old_files/monthly_01_2008/post-8758-1200088160.jpg' target="_blank">post-8758-1200088160.jpg?width=400

That should get you started. Once you have the data in numeric format the rest is pretty simple math. The parser VI in the example above can be built using functions from the string functions pallette. If you need more help post back here and include what you have so far.

-Toby

Thanks a lot. I am still trying to figure out how to parse the time string into seconds. I tried using the scan a value (from the string palatte) and then sending into Date/Time to seconds block, but no successful. I will keep trying. Thanks again.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.