LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fast Voltage Data Acquisition and Logging

Solved!
Go to solution

I have been experimenting with Labview to create a VI that can record and log voltages for several analog in channels.  I am using a DAQ 9171 with a NI 9223 module to record with my VI at a sample rate of 500 samples a second.  My problem is I acquire the data at inconsistent intervals and not the intervals of my sample rate.  If anyone has some knowledge or an example, they can dole upon me it would be much appreciated.

Download All
0 Kudos
Message 1 of 12
(635 Views)

You don't need to do timing in your loop, your samples are already timed by the sample clock. 

______________________________________________________________
Have a pleasant day and be sure to learn Python for success and prosperity.
0 Kudos
Message 2 of 12
(619 Views)

Try this and the dt is built into the reading: 

 

Jay14159265_0-1740094925520.png

 

______________________________________________________________
Have a pleasant day and be sure to learn Python for success and prosperity.
Message 3 of 12
(615 Views)

TIme addition.PNGI can get the dt component of the waveform but I cannot get the right elapsed time in my .csv right.  It only writes a value of 1 for every time value in the column.

0 Kudos
Message 4 of 12
(550 Views)
0 Kudos
Message 5 of 12
(549 Views)

@DePeppers wrote:

TIme addition.PNGI can get the dt component of the waveform but I cannot get the right elapsed time in my .csv right.  It only writes a value of 1 for every time value in the column.


dt is a fixed value (time between samples). You have the start time(t0), dt and n samples so to get your sample time you must do <t0> + <dt>*<n>

______________________________________________________________
Have a pleasant day and be sure to learn Python for success and prosperity.
Message 6 of 12
(530 Views)

There is a lot to be desired with that VI.

  • You are downloading a single point at a time
  • You have ever growing arrays
  • You never stop or clear the task

Here is a quick rewrite, you could still improve it.

 

snip.png

Message 7 of 12
(520 Views)
Solution
Accepted by DePeppers

Should have tested first. See mod, need a sequence structure with dialog.

 

snip.png

Message 8 of 12
(505 Views)

Thank you for the enlightening information.  I was hoping there was a simpler way to display elapsed time next to the recorded data to confirm the sample rate and dt.  As you explain it for my VI Jay, we need to take a component and compute parallel to the data acquisition.  And the sample rate is used to compute the dt and makes no errors, so it is perfectly fine to use it to calculate elapsed time and dt.

 

0 Kudos
Message 9 of 12
(457 Views)

@DePeppers wrote:

 I was hoping there was a simpler way to display elapsed time next to the recorded data to confirm the sample rate and dt. 


There is a simple way to do this, wire the waveform data type wire directly to a waveform chart and set to show elapsed time. 

______________________________________________________________
Have a pleasant day and be sure to learn Python for success and prosperity.
0 Kudos
Message 10 of 12
(452 Views)