Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Use of a non-NI DAQ with Labview

Your original problem, as you stated, was losing data.  You need to be able to figure out for yourself if you are losing data still (with the loop removed).  I can suggest connecting a known signal (such as a known frequency triangle wave).  But again, you must be the final determiner if you lose data.

 

As for adding back the loop, after you determine that you are not losing data, that is a general LabVIEW question.  My focus is MCC brand DAQ, and data quality from MCC brand DAQ. 

0 Kudos
Message 11 of 26
(1,694 Views)

Sir as you told me that i remove the loop and timeout . but when i run the Vi , it is just run and stop and  it write the text file of the sample data. ok then i want to know that for how much time this program is run. if i know the time of its running then i can calculate the data that i am loosing or not.

Suppose my vi run for 100ms and i got 5000 samples so it means that when it runs for 1 second it should have collect 50000 samples.

So my question is only that how can i determine the time of runing of vi without any loop ? means how can i know this 100ms (as in example)?

Agnivesh
0 Kudos
Message 12 of 26
(1,690 Views)

If you run the VI without the loop and the number of samples in the file is equal to what you have specified in the count input, you are not loosing any samples - ever. You have configured the Write to Measurement File incorrectly in the example you have posted here and are incorrectly using it in the example you posted on the other thread you started. Because of your lack of understanding, in neither example will the number of samples be anywhere close to the number you are expecting. The number of samples will always be equal to the Count input because that is the way you have programmed it.

 

You can change the Write To Measurement File to not create a new file each time. You can also change the way you calculate when to stop. For example, you can simply set the count equal to the rate and iterate x number of times. 1000Samples/Sec and a count of 1000 means that each iteration will take 1 second.

0 Kudos
Message 13 of 26
(1,684 Views)

Thank You sir,

As you say i check this so i found that my card is working properly and not loosing any data without loop.So i feel that the problem is in my Vi that i make.

Now i am going to tell you exactly what i want to do.

Sir i want to continiously acquire the data from sensor but i want to make the vi that will run under my condition means if i want then my vi to acuire data for 2 second and write all the samples for 2 second in text file.

Ex. (if i run my program for 2 second with rate of 50KHz then for two second , in my text file 100000 samples are to be write. but there is necessary that count should be 5000 and sampling rate 50000) So please help me for making loop correctly and where can i place the block of file write because when i put this block out side the loop then it will only write the 5000 samples as i given in count. every time.

So sir please help me because i dont have much time , i have to submitt my project as soon as posible.

Agnivesh
0 Kudos
Message 14 of 26
(1,667 Views)

Start with fixing the Write to Measurement File like I said. You need to set it to append - not create a new file each time. Instead of using the elapsed time, calculate the number of loop iterations based on sample count and rate. Sample rate of 10000S/sec with 5000 samples takes .5 seconds. Two seconds worth of data means to run the loop 4 times. If you use the elapsed time like you are now, you will get additional samples but that may not be any problem.

0 Kudos
Message 15 of 26
(1,662 Views)

Thank You Sir now i got the desired samples that i want.

Now i am sending you my programs and its output please see and if there is any mistake or any improvement then please tell me .

Agnivesh
0 Kudos
Message 16 of 26
(1,641 Views)

This is the VI ,sir 

Agnivesh
0 Kudos
Message 17 of 26
(1,640 Views)

You have not changed the way you write to file. Why not? Do you not want all of the samples in one file?

0 Kudos
Message 18 of 26
(1,634 Views)

Sir actully i want the saprate files of my every time of execution thats why i am using this.

sir the first part of my project is completed not i want to take the FFT continously and when i got the frequency components then i have to compair the magnitude of components and make some LED decision boxes.

Agnivesh
0 Kudos
Message 19 of 26
(1,628 Views)

Then I would suggest you look at the shipping examples. Post back on a new thread if you have problems.

0 Kudos
Message 20 of 26
(1,625 Views)