From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
12-18-2023 02:13 AM
Hi
I am trying to run 2 loops in the same VI. It's probably not the best way, but as a beginner this was the next logical to try to do what I'm trying to do.
I have a number of voltage and temperatures being read a certain rates (10Hz maximum for the temperatures, 1kHz for the voltages).
In parallel of this, I need to read a RPM sensor connected to a NI-9421 outputting the frequency.
The issue is that, this frequency is relatively low (lower than the rate at which I am reading everything else).
What I had before attempting to run 2 loops:
I initially had the task for the RPM sensor in the main loop and it worked alright at higher speeds, but would miss a lot of reading at lower frequencies. My best guess is I am reading this RPM sensor task too often. As a result, there will be instance when the Read will return nothing. Causing 0's get filled in the array that's collecting the data. Detecting and removing those zero's could work but there would be instances where I would like to see those zero's (for example to detect problem with the apparatus we're working with).
Anyway, that's how I got to trying to run 2 loops. After trying that, I did some searches and a few instances where it had been done and generally the advice was to insure there was no dependencies between the 2 loops which I think I was able to do.
I know I only provided 2 screenshots, which won't necessarily be sufficient to help, but I think I'm mostly looking for some advice on a better strategy to employ here.
thanks
Solved! Go to Solution.
12-18-2023 03:12 AM
12-18-2023 06:13 PM
I feel so dumb, thank you!