03-22-2021 03:37 PM
Hello community,
I'm slightly embarrassed to post this because my issue seems trivial, but I cannot find the information to point me in the right direction. I'm fairly new with LabView and I am currently working through the Core I lessons provided by NI. I've made slight modifications to VIs in the past, but now I'm beginning to create my own.
I'm trying to increase the sampling rate of the my measured data and record it to a file, and I have the following two concerns:
1) Current sample/record rate is ~1Hz, and the goal is to bump it up to 10Hz. I'm having trouble understanding where or how I implement such a change.
2) I currently have the VI setup to record into an excel file using the Write To Measurment File VI; am I limiting the speed at which I can record data based on my file choice?
Any other tips/advice/suggestions you have based on the provided code is encouraged and appreciated. I'm here to learn.
Solved! Go to Solution.
03-23-2021 01:35 AM
Hi imhere,
@imheretolearn wrote:
1) Current sample/record rate is ~1Hz, and the goal is to bump it up to 10Hz. I'm having trouble understanding where or how I implement such a change.
2) I currently have the VI setup to record into an excel file using the Write To Measurment File VI; am I limiting the speed at which I can record data based on my file choice?
03-23-2021 11:31 PM
You need to add a DAQmx Timing VI after you have added your channels to the task.
This example shows how you can acquire continuously.
C:\Program Files\National Instruments\LabVIEW 2020\examples\DAQmx\Analog Input\Voltage - Continuous Input.vi
Of particular note, create the task, set timing, start before the continuous acquisition loop; read in the loop; and stop and clear the task after the loop when done. That example also implements DAQmx logging to TDMS Files.
03-25-2021 04:44 PM - edited 03-25-2021 04:45 PM
GerdW,
Poor planning of what my needs were led to an insufficient setup.
Thank you for the insight!
03-25-2021 04:49 PM
You're explanation and comment was very helpful. I was able to input the recommended changes and now I can easily adjust the sampling rate. Thank you!
I attached my updated file for anyone that may be interested.
02-08-2023 12:04 PM
I download the VI to try it but I do not think we can set the sample rate correctly in the data logger. save to .Xlsx is alway 1 second
02-08-2023 01:42 PM
Please start a new thread for your question. When you post, please include as much detail as possible: what are you observing, what are you expecting, CODE, data file, what have you already tried changing, etc.