LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to acquire and write periodically over 24 hours

I have been going around in circles trying to figure out how to acquire and write 200 ms of analog data every 60 minutes over a 24 hour period.

I'm using a PCI6035E daq card, a BNC2110 adapter, a microphone and LabView from my pc that uses Windows 2000.

I don't really have a problem with building an acquire and write vi that I can manually execute.

My problem is setting up the timing so that the vi runs automatically over 24 hours and no external timing hardware is used.
0 Kudos
Message 1 of 11
(5,745 Views)

There are many ways to do this and there are a lot of timing functions in LabVIEW that you could use. If you wanted to run the program for 24 hours after you start it and just log periodically, the Elapsed Time function is an easy way to go. It has a Time Has Elapsed output that you can wire to a case statement. Inside the true case, you would put your logging code. You could also set up a shift register and increment it by 1 every time in the true case. If the value of the shift register is equal to 24, then stop the loop. I've attached an image of this method. Using the Get Date/time in Seconds, you could also code up something that would start it at midnight, log on the hour, and stop it the following midnight.

Message Edited by Dennis Knutson on 08-09-2006 10:19 AM

0 Kudos
Message 2 of 11
(5,738 Views)
Wow!  That was fast.  Thanks.  I'll give your method a try and hope I get it right.
0 Kudos
Message 3 of 11
(5,723 Views)

Dear Dennis,

           I am using the same method for periodic logging, in my case i want to log the data into the excel file at each and every 1 minute so i am using the elapsed time with the option "Time has elapsed (true)",  but it delays the thing with heavy coding of my vi mean at one or two logging it adds one more second ( it should do it at every 60 seconds, instead it is doin at 61 second generally) so it adds the time error in my logging and it is not acceptable in my project, so is it any other way that i can do same thing as we are doing with Time has elapsed?

Thanks,

Nishant

0 Kudos
Message 4 of 11
(5,681 Views)

Nishant, see the comments I made on your post about alternative to elapsed time.

You can extend Dennis's example a bit, to solve your problem:  (see JPG)

 

P.S.  How do I embed the JPG into the message?  Do I need to have an URL to a server of my own, even though I attach the image?

 

Message Edited by Anthony de Vries on 08-25-2006 11:49 AM

0 Kudos
Message 5 of 11
(5,652 Views)
To answer your question about embedding the image...

Just attach it and post as you normally would, but once the page refreshes, and you can see your post, copy the link location of the picture to the clipboard, and then go back and edit your message, using that link for the picture location.  Careful though, because I think the editing time limit is 5 minutes after post.
0 Kudos
Message 6 of 11
(5,634 Views)

Neat little trick!    Too late to edit my orignial post...   

I'll put it in this post, just to make the thread easier to read:

NB:  The reset is 'true' is necessary.  It makes sure that elapsed time uses the start time from outside the while loop as its starting point!

0 Kudos
Message 7 of 11
(5,628 Views)

Dear  Day,

           Thanks for the info about embedding the image, but by referring to Image location, what does it mean? which link should be copied? i mean after submitting it will show the link of the picture, should we copy that link and to copy itinside the post?

Thanks,

Nishant

0 Kudos
Message 8 of 11
(5,602 Views)

You are righ Anthony,

            To read the description with the figure make the things really, easy rather than first to see the image and to remember, when  we read the description. Good one.

Thanks,

Nishant

 

0 Kudos
Message 9 of 11
(5,601 Views)

Good Day, 

 

I am new to labview, i need a program that is very close to this one... i guess. what i need is to run a PWM for 8 hours a day. i have the PWM done easy. but is to run it every day for 8 hours that i am having hard time with.

 

i am using labview 8.2 and cfp-2120, cfp-pwm-520.  

 

i am going to attach the small vi. 

 

waiting for your kind reply 

0 Kudos
Message 10 of 11
(5,067 Views)