LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

time data between retrieval using database

Solved!
Go to solution

Hello,

               I am doing datalogging with the interval of 1min data, this will logg the data up to 3 days, forthat i am using sql server, now i can able to insert and fetch the data as much fast enough.  but i need to retrieve the data as specified time and also a batch wise data.  could you tell me how do i implement this?

 

i downloaded some examples vi's from ni.com, but its not working....

 

if possible send me example vi

Regards,
Balaji DP
0 Kudos
Message 1 of 7
(2,753 Views)

Hi Balaji DP,

what do you mean with retrieve the data at specified time? Can you explain a bit more please?

 

Mike

0 Kudos
Message 2 of 7
(2,742 Views)

hello mike,

                     what i mean that, let say i am started data logging from 6:00:00 AM then till now running the logging as per 1min interval will insert the data in to the data base.

 

1. now, i just want to retrieve the data from 8:00:00 AM to 9:00:00 AM,

 

Here i am doing with paramerterised data logging and the first column will be Date/time format i set in the sql database, and my date/time format from labview will be dd/mm/yyyy hh:mm:ss PM or AM, this will be a single column only. remaining data channels are single precesicision format only .

 

2. here i am always inserting the data in the interval of 1min. after, i want to retrieve the data for my report, i need a every 5 minutes data, this must be a user defined.

 

eg. this is example for insert data to sql data base as default as 1min interval.

 

15/06/2009 06:00:00 AM     234.5       454.5   565.7

15/06/2009 06:01:00 AM     234.5       454.5   565.7

15/06/2009 06:02:00 AM     234.5       454.5   565.7

15/06/2009 06:03:00 AM     234.5       454.5   565.7

15/06/2009 06:04:00 AM     234.5       454.5   565.7

15/06/2009 06:05:00 AM     234.5       454.5   565.7

15/06/2009 06:06:00 AM     234.5       454.5   565.7

15/06/2009 06:07:00 AM     234.5       454.5   565.7

15/06/2009 06:08:00 AM     234.5       454.5   565.7

15/06/2009 06:09:00 AM     234.5       454.5   565.7

15/06/2009 06:10:00 AM     234.5       454.5   565.7

15/06/2009 06:11:00 AM     234.5       454.5   565.7

15/06/2009 06:12:00 AM     234.5       454.5   565.7

 

 

 

eg:  This is to be done. for retrieve the data as 5 min interval only.

 

 

15/06/2009 06:00:00 AM     234.5       454.5   565.7

15/06/2009 06:04:00 AM     234.5       454.5   565.7

15/06/2009 06:09:00 AM     234.5       454.5   565.7

 

 

 

for the above logic is there any queries on sql server?

 

3.  what is the difference betweeen the sql database and access data base, functionality and userfriendly programming?

 

 

 

Regards,
Balaji DP
0 Kudos
Message 3 of 7
(2,727 Views)
HI MIKE I AM WAITING FOR YOUR REPLY....
Regards,
Balaji DP
0 Kudos
Message 4 of 7
(2,701 Views)
Solution
Accepted by topic author Balaji_DP

Hi Balaji DP,

see this link please

http://vyaskn.tripod.com/searching_date_time_values.htm

 

It shows how you can search for date and time values. You can combine them. I'm not really sure if you can solve the 5 minutes interval with it, but you can definitifly get the range you need. You can then filter the last data in LabVIEW.

 

See also this link for your second question

http://www.mssqlcity.com/Articles/Compare/sql_server_vs_access.htm

 

Mike

0 Kudos
Message 5 of 7
(2,699 Views)

thanks mike,  

                        I have another question, i am using TDMS.vi for fast data logging, what i mean that i am logging the data 1000 samples/sec. of course my pc has a 4gb ram as well as high speed drive also, i can able to retrieve the data upto 30mb, blut i wants to check the file size while i am start stroing the data.. how could do this?

Regards,
Balaji DP
0 Kudos
Message 6 of 7
(2,696 Views)

Hi Balaji DP,

you can use the "Get File Size" function from the File I/O palette.

 

Mike

0 Kudos
Message 7 of 7
(2,695 Views)