LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to control the number of samples to write

Solved!
Go to solution

Hello

The module that I am using has a minimum sampling rate of 1613 s/sec. I am using the write to measurement express vi for writing the acquired data.  I need only 4 samples per second to be written into the TDMS file while I am doing a continuous acquisition. Can anyone tell me hoe to do that? If you provide an example vi that would be very helpful

 

Thanks

 

 

0 Kudos
Message 1 of 5
(3,401 Views)

@wisjaf12 wrote:

Hello

The module that I am using has a minimum sampling rate of 1613 s/sec. I am using the write to measurement express vi for writing the acquired data.  I need only 4 samples per second to be written into the TDMS file while I am doing a continuous acquisition. Can anyone tell me hoe to do that? If you provide an example vi that would be very helpful


You can set the sampling rate (of DAQ) to say 10000 samples/second (using DAQmx Timing.vi)and then in the DAQmx Read.vi set 'number of samples per channel' input to 2500 samples. So the code will read 2500 samples every 250ms and then you can take the mean of those 2500 samples.

1 sample every 250ms

 

Example is also attached.


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 2 of 5
(3,386 Views)

 

moderator1983

I would like to thank you too much for your interest. In the example you sent, you will only be reading on the chart 1 sample every 250 ms. However, I want to be able to read all the acquired samples on the chart but to WRITE only 1 sample every 250 ms. Imaging that there is a (Write to measurement express vi wired into the data output line along with the chart. Is it going to be correct if I just remove the mean vi from the reading chart and wire it to the write to measurement express vi? Can you please just modify the example so that it can do this?

 

Regards

 

 

0 Kudos
Message 3 of 5
(3,365 Views)
Solution
Accepted by topic author wisjaf12

@wisjaf12 wrote:

In the example you sent, you will only be reading on the chart 1 sample every 250 ms. However, I want to be able to read all the acquired samples on the chart but to WRITE only 1 sample every 250 ms. Imaging that there is a (Write to measurement express vi wired into the data output line along with the chart. Is it going to be correct if I just remove the mean vi from the reading chart and wire it to the write to measurement express vi? Can you please just modify the example so that it can do this?


Yeah you're right, if you want to plot every sample, you can connect the array data directly to the chart and the output of Mean, you can connect to the write to measurement express vi.

 

1 sample every 250ms_Modified


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 4 of 5
(3,359 Views)

moderator1983

Thank you so much that was really helpful

 

Best Regards

0 Kudos
Message 5 of 5
(3,354 Views)