02-20-2025 04:48 PM
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.
Solved! Go to Solution.
02-20-2025 05:36 PM
You don't need to do timing in your loop, your samples are already timed by the sample clock.
02-20-2025 05:42 PM
Try this and the dt is built into the reading:
02-24-2025 07:51 AM
I 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.
02-24-2025 07:52 AM
Here is the VI
02-24-2025 10:43 AM - edited 02-24-2025 10:45 AM
@DePeppers wrote:
I 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>
02-24-2025 11:41 AM
There is a lot to be desired with that VI.
Here is a quick rewrite, you could still improve it.
02-24-2025 04:14 PM
Should have tested first. See mod, need a sequence structure with dialog.
02-25-2025 08:05 AM
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.
02-25-2025 08:25 AM - edited 02-25-2025 08:28 AM
@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.