From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-29-2018 04:53 PM
I am using tensile machine doing the fatigue test and each test could cost 10 hours, for saving the disk room in computer, the loop has to be developed to periodically collect the real-time data then write out, for example collecting 1000 data at first second in each 10 seconds,rest 9 seconds will be empty, then start to write 11th seconds so on. I was using both DAQ Max and DAQ assistant with time loop, as show below in picture 1 and picture 2.
After 40 seconds ruining the program, the picture 3 and 4 are result for each DAQ Max and DAQ assistant, the result in picture 4 are right, but result in picture 3 have wrong time history which is 20 seconds with continuous data recording. Could anyone help me to locate the problems?
08-29-2018 05:03 PM
Yes, the location of the problem is in the VI(s) and not the pictures. Please upload the actual VI(s) so we can inspect them.
08-29-2018 05:19 PM
Sorry, I attached my block diagram below.
08-29-2018 10:56 PM - edited 08-29-2018 10:57 PM
How do you stop your VI? You don't have any stop condition on the Timed While Loop (if you are running on Windows OS, there is not much benefit to timed while loops), so the only way to stop it is to hit the Abort button. Don't do that!
You have a fundamental difference between your 2 VI's (looking at underlying code and ignoring the use of express VI's.). The one with the DAQ assistant is set for N samples which means when it runs, it waits until N samples are collected, stops and returns them. When run again, it runs, waits for another N samples, stops and returns them. Nothing is captured in the buffer between the two loop iterations.
Your DAQmx one you set for Continuous Samples. It runs, collects N samples, returns them, but the acquisition doesn't stop, it keeps going loading samples in the buffer. Next iteration it collects the next N samples which are in the buffer, and will be "continuous" to the ones you already captured. Eventually, if you don't read the samples fast enough, the buffer will fill up, overflow, and throw an error.
Don't use the timed while loop. You'd be better off collecting all data continuously, and only writing out the first second of every 10 to the file and throwing away the rest of the data.
08-30-2018 12:15 AM
Ok, I am thinking to use case structure with Write to measurement inside connect with DAQ Assistant so that I can make the case structure be true to write out data at the first second, and turn it to false to stop the data recording at next 9 seconds, and do it time by time, but I could not imagine which block in Labview can control the case structure in this periodic recording way? the counter? or other function?
08-30-2018 12:56 AM - edited 08-30-2018 12:56 AM
Hi John,
so that I can make the case structure be true to write out data at the first second, and turn it to false to stop the data recording at next 9 seconds, and do it time by time
Use ElapsedTime ExpressVI and configure it to 10s with automatic reset.
Now compare the elapsed time with 1 to get your boolean signal:
IF elapsed time <= 1 THEN save data ENDIF
08-30-2018 06:42 AM
@GerdW wrote:
Hi John,
so that I can make the case structure be true to write out data at the first second, and turn it to false to stop the data recording at next 9 seconds, and do it time by time
Use ElapsedTime ExpressVI and configure it to 10s with automatic reset.
Now compare the elapsed time with 1 to get your boolean signal:
IF elapsed time <= 1 THEN save data ENDIF
I'm guessing you meant to compare Time has Elapsed instead of Elapsed Time?
08-30-2018 07:00 AM - edited 08-30-2018 07:01 AM