03-25-2021 04:06 AM
Dear all,
I make Labview program to record a temperature at 100 Hz sampling rate. "Iteration 1" input is 100 .
I found that number of data per second recorded is 96~98 data only. Refer to column C and F in attached excel sheet.
By right, i have to get 100 data in 1 second.
Attached my project file for your study and improvement.
Please attached your improvement project file if you manage to solve the problem.
thank you very much.
best regards.
03-25-2021 10:09 PM
I think you are discovering the difference between hardware timing that relies on a high-accuracy clock and software timing that relies on system clock through the Wait (ms) primitive. The help for the Wait (ms) primitive should give you cause for pause as it states: The actual wait time may be up to 1 ms shorter than the requested wait time. 'Shorter', 'longer' - it makes no real difference to me as it does not claim to be exact.
Hardware timing is more precise. In a real (data-driven) application where you need 100 Hz, acquire a waveform at 100 Hz, and let the hardware time your loop instead of inserting a Wait (ms) artificially.
03-26-2021 06:09 AM - edited 03-26-2021 06:10 AM
Hi, Doug
Can you advice me the external hardware part number from NI.
Thank you very much.
Best Regards.
03-26-2021 08:05 AM
The hardware would be the data acquisition device used to acquire real temperature data from temperature sensors (for example: thermocouples). Your question surprises me, so maybe I am missing something. Are you needing to eventually acquire data from a temperature sensor using a DAQmx device? some other device? or is this just a software exercise?
03-26-2021 08:14 AM
Hi, Doug.
The hardware I refer to is how to get precise timer not the temperature.
I want to have accurate sampling rate by using external hardware devices.
Best Regards.
03-26-2021 08:46 AM
Hi Jeffrey,
@Jeffrey_Oon wrote:
The hardware I refer to is how to get precise timer not the temperature.
I want to have accurate sampling rate by using external hardware devices.
How "accurate" do you need that timing?
Even the cheap USB600x devices from NI provide a hardware-timed ADC. Read the specsheets for the timing accuracy numbers!
03-26-2021 09:09 AM
Hi, Gerd,
My target for data sampling rate is up to 4k Hz.
Which NI hardware is suitable for me?
Thank you very much.
03-26-2021 09:55 AM
Hi Jeffrey,
@Jeffrey_Oon wrote:
Which NI hardware is suitable for me?
To answer this question you need to provide a lot more of information than just that "4kHz samplerate"!
Please collect ALL requirements - and then call your local NI sales support!
(Even the cheapest USB6008 could sample at more than 4kS/s…)
03-26-2021 06:13 PM
Hi, Gerd,
Thank you very much.
Best Regards
03-28-2021 01:41 AM
To reiterate (hopefully before you buy the first thing mentioned), the device you use/buy will depend on what you need to do with it.
For example, RTDs may have different connections to thermocouples (with/without additional amplication) to a function generator with a nice, buffered voltage output.
It's important to consider what you want to measure, what other hardware you plan on using (e.g. a "sense" resistor for ratiometric measurements with RTDs), the output of your sensors (uncommon for temperature, but for encoders pull-up/down is quite common, and could require different acquisition hardware or choices, or additional bits and pieces), along with more straightforward requirements like "accuracy" or sample rate.