LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I write continuous data into a file for about 15-20 min? Welcome any suggestion.

The DAQ card I am using LabView 7.0. and DAQ hardware is PowerDAQ PD2-MF-16-400/14H. How can I write continuous data into a file for about 15-20 min? Welcome any suggestion.
0 Kudos
Message 1 of 36
(5,320 Views)
Hi Azad,

Here are some basic steps to get you going. Sorry I'm not going into details...

Place the vi's that acquire the data within a while loop. Initialize a timestamp (using a Get Date/Time vi) and wire it to the same while loop. Place another "Get Date / Time" within the while loop and compare it with the one that you used outside the loop. Compare it (G.E. >=) to a control that has the amount of time you want to store the data. Wire the boolean output to the conditional terminal which should be set to "Stop if True".

Open or Create a file outside the While Loop.

Here you have a choice:

A) Depending on how many data points you want to store... You may temporarily store the data within buffers (use shift registers) and write the data t
o file upon exit of the While Loop.

B) Or, you can aquire and write the values to the file within the While Loop.

You may want to put a delay if you want to take measurements at given intervals. You may even want to store timestamps. You can place this into the array and store in into a spreadsheet.

You can have one shift register for each of the data items you want to store, or you can place everything into an array first, then wire that to the shift register (this is probably preferred).

There are many ways to implement this. Experiment a little, look at examples, and adopt the method which suits you best.

Don't forget to close the file after you are done writing to it.. ;o)

Hope this helps..

JLV
Message 2 of 36
(5,316 Views)

HI RAY SAME PROBLEM

i am sweetu

i use daqcard usb 6221 and labview 8.0

i acquired data from daq its rigth. its save in one file which is in spredsheet format with current date and time and also create own file which name is  current date like 8 oct_2009.

my problem is that its not create new file after 12am.

i thik some while loop problem well i wil send u my vi plz check it and give me suggesion how i wil automatically create file i.e. after 12am 

plz help me as early possible 

0 Kudos
Message 3 of 36
(4,952 Views)

hi ray where ru?

u didn't replay me why?

i wnt ans

plz help me as early as possible 

0 Kudos
Message 4 of 36
(4,916 Views)

Hey sweetu,

 

One thing I noticed is that you are not capturing the errors that come out of the DAQmx Read.  Is there a chance that you are getting an error and that is what causes your program to stop working properly? 

 

Also, I would not wait around for Ray to reply.  He has not posted on this thread in about 5 years 🙂

 

Scott

Scott G.
AE Specialist
National Instruments
Message 5 of 36
(4,905 Views)

Don't use 'texting' abbreviations - 'ru' should be spelled out as 'are you'. And show a bit of patience.

 

Your question does not make any sense. Since you create the file and name outside the loop, why would you think that you would get a new file at midnight?

Message 6 of 36
(4,901 Views)

sweetu wrote:

hi ray where ru?

u didn't replay me why?

i wnt ans


Jst bm t DQmx fr 4 gr8 cz it n fr lp fil opn, fr an he Array to Spreadsheet String an plz cree8 cz an an op fr.

 

Message Edited by Broken Arrow on 10-09-2009 07:27 AM
Richard






Message 7 of 36
(4,896 Views)

Scott_G wrote:

 

 

Also, I would not wait around for Ray to reply.  He has not posted on this thread in about 5 years 🙂

 

Scott


??? Ray has been plenty active recently.

 

This place is getting weird.  Smiley Mad

Richard






0 Kudos
Message 8 of 36
(4,896 Views)

I didn't mean that Ray was not active on the boards.  I know he is.  I just thought it was funny because the last time he posted on this particular thread was in 2004. 

Scott G.
AE Specialist
National Instruments
0 Kudos
Message 9 of 36
(4,879 Views)

Scott_G wrote:

I didn't mean that Ray was not active on the boards.  I know he is.  I just thought it was funny because the last time he posted on this particular thread was in 2004. 


 

Oh, this particular thread. Now I get it. Sorry 'bout that.
Richard






0 Kudos
Message 10 of 36
(4,876 Views)