Hello,
I have a Problem regarding to Write Configuration file and time consumption. I am reading measurements from different devices (4 x ni6008 rate 1250Hz, continuos samples, 100 samples/channel; cDAQ9174, using as a ) so at the end I have 50 measurements in every iteration of the loop. I checked how much time every device Needs to read in the channels and the "slowest" Needs Maximum 300ms (between 280-290ms), the other devices are quite fast (10ms). I have also inside the loop a elapsed time block (sometimes I want 1 Minute of measurements, sometimes 1h) and I want to log These measurements into an Excel file
I would like to have These measurements, at maximum, every 0.5s (if it is faster, better, but I guess the Maximum for my Hardware configuration is 300ms) stored in an Excel file, with the timestamp, and I am using Write to Configuration file.
The Problem I have is: The first second of the measurements, I write data every 0.3s, and after that, every second. If I Change the time of the loop, doesn´t matter, first second I log data every 0.3 and then every second (you can see this behavior below, untitled is the time of the loop, in minutes). Why this Change of Speed of writing? Is a Problem of open/Close the Excel file in every Iteration of the loop? if it is this Problem, why I can write so fast at the beginning?
Is a Problem of the reading from the devices? The configuration of the Analog 1D DBL NChan 1 Sampl is timeout to -1, but I am not sure "how to Play" with this Parameter. I define the channels of the devices much before than coming into the loop, could be that the Problem that then the devices wait until they get the 100Samples?
(from the help: timeout specifies the amount of time in seconds to wait for samples to become available. If the time elapses, the VI returns an error and any samples read before the timeout elapsed. The default timeout is 10 seconds. If you set timeout to -1, the VI waits indefinitely. If you set timeout to 0, the VI tries once to read the requested samples and returns an error if it is unable to)
Should be 0 and put lower samples per channel?
Thanks in advance
Here the output excel
Time | Untitled | Untitled 1 | Untitled 2 |
08.06.2017 16:33:41,249 | 10 | 0 | 0 |
08.06.2017 16:33:41,528 | 10 | 0 | 0 |
08.06.2017 16:33:41,788 | 10 | 0 | 0 |
08.06.2017 16:33:42,049 | 10 | 0 | 0 |
08.06.2017 16:33:42,388 | 10 | 0 | 0 |
08.06.2017 16:33:43,389 | 10 | 0 | 0 |
08.06.2017 16:33:44,389 | 10 | 0 | 0 |
08.06.2017 16:34:16,384 | 11 | 0 | 0 |
08.06.2017 16:34:16,631 | 11 | 0 | 0 |
08.06.2017 16:34:16,922 | 11 | 0 | 0 |
08.06.2017 16:34:17,387 | 11 | 0 | 0 |
08.06.2017 16:34:18,388 | 11 | 0 | 0 |
08.06.2017 16:34:19,387 | 11 | 0 | 0 |