LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview Drivers for Wireless Sensor Networks

Hi Venky and David,

 

Please check my attachment timestamp.jpg, how can I set the time on the waveform chart to be the same as my computer time or the timestamp on my nodes? I checked in the waveform chart properties but can't figure out how to change or edit the time. The time is just different from my system time and the timestamp on my nodes. Can you pls give me some hint?
As for block2.jpg and my attached .xls file, how can I add time record into the .xls files... like the time for each reading or the time for everytime I run the system can also be recorded? How can this be done? I tried to wire the time stamp to the build array but I get the below message:
These cannot be wired together because their data types (numeric, string, array, cluster, etc.) do not match. Show the Context Help window to see what data type is required.
The type of the source is 1-D array of
Time Stamp.
The type of the sink is 1-D array of
double [64-bit real (~15 digit precision)].
How can I fix the above problem?
Regards,
Kim
Download All
0 Kudos
Message 81 of 154
(2,875 Views)

You can convert a timestamp to a double type by using the conversion on the Numeric / Conversion palette.

 

Note that timestamps in LabVIEW are based on seconds since 1904 while Excel values are based on days since 1900.  So some conversion is need to convert from a LabVIEW date/time value to an Excel date/time value.  Search the forums and you'll find several examples of this.

 

Please note that you are not actually creating an Excel file when you use the Write to Spreadsheet File function.  You are actually just creating a text file that you are also giving an .xls extension to.

Message 82 of 154
(2,869 Views)

Hi Ravens,

I don't quite understand how to convert a timestamp to a double type by using the conversion on the Numeric / Conversion palette. Can you please show me an example of how should I connect?

0 Kudos
Message 83 of 154
(2,855 Views)

Hey Ravens,

I tried to connect the conversion as attached and the results i get is as in the red box. Both EXT and DBL palette gives the same results. The date/ time is in a different format... how can i change the value to the standard date/ time format that we understand?

0 Kudos
Message 84 of 154
(2,844 Views)

1.  Once the value is in Excel, you will have to format the Excel column to be a Date data type.  That will have to be done during the Excel import process, or Format the column after the fact.

2.  You will still have to do a conversion, preferably in LabVIEW to convert from seconds since 1/1/1904 to days since 1/1/1900 so Excel can intepret the correct date.  You may still have to tweak the conversion after that.  I believe the time zone you are in comes into play.

3.  You may have to add a format specifer into the the Write to Spreasheet File Function.  The default is %.3f which means 3 places after the decimal point. 

 

Message 85 of 154
(2,822 Views)

Dear Ravens,

I've been trying to search for examples and solution through the forum but I couldn't get to solve/ correct the time on my waveform chart as the examples I found was to waveform graph or other different application. As for transfering to excel file, I tried to change the column format to date but it becomes as my attached .xls file... all ###. What is the correct way to do the conversion for my vi? I have attached my vi file, please help to check how should I correct it? Pardon my slow catch up, I couldn't picture your explaination in words... I'm just a new learner for LabView. can you please attach some solutions in graphics or help to correct my vi? I'm sure an expert like you can figure out my mistake easily. Please help...

Best regards,

Kim

Download All
0 Kudos
Message 86 of 154
(2,809 Views)

The ####'s are probably due to the fact that you hadn't converted from LV time to Excel time.

 

See the attached VI for the conversion.

 

Message Edited by Ravens Fan on 02-23-2009 09:42 AM
Download All
Message 87 of 154
(2,798 Views)

Thank you so much Ravens!

I've solved the time issues on my GUI!!

David and Venky, thanks again for your help earlier! Appreciate it... 🙂

0 Kudos
Message 88 of 154
(2,775 Views)
Hi all, please take a look at the data that I collected for my MTS400 using Crossbow driver provided by Labview. Can anyone tell me whether it is problematic or not and how can it be fixed if it is incorrect?
0 Kudos
Message 89 of 154
(2,743 Views)

It looks like you have a space delimiter between items.  This would be a problem because the space is a normal character in your header labels.  And all the data is strung out.  There is no end of line delimiter such as a carriage return.

 

We would have to see the actual program being used to generate the data.  It looks like a long stream of characters with nothing breaking up the data into rows.

0 Kudos
Message 90 of 154
(2,734 Views)