05-08-2023 07:51 AM
This is my program, I want to capture each 4.5s data after trigger get press
(One off my DAQ setting)
First I setting Smaples to Read equal to Rates, than I relize it meaning DAQ will cature 1s data than stop.
The loop stop unit is 1s instead 0.1s, 4.5s acutal meaning 5s.
(DAQ setting after changing)
So I change Sample to Read to 2/10 of Rate. (you probably confuse why is not 1/10, reason will explain later)
Look good right? Loop stop unit now is 0.2s, is not good enough but batter.
Will here is the problem. After about 1 hours later the program will stuck. No error message, but program just freeze.
At my first setting (Sample to Read = Rates) this never happen.
"Sample to Read = 1/10 Rates" program freeze after 1-10 minute and it always happen, even faster.
I assume it cant be too short so I try the different Sample to Read.
Finally "Sample to Read = 1/10 Rates" look like a good setting (short enought to get clear unit and long enough to avoid freeze)
But after a few test, this setting sometimes still freeze.(every 5 times).
please suggest me how to solve this problem
05-08-2023 10:23 AM
The secret of writing good code is a clean diagram, so things like the following are just silly, with overlapping wires flowing in all directions. that "equal false" is just a "not", right? Also, your "Boolean" (sic) seems to have the wrong mechanical action. Do you know how fast the outer loop runs when the case is FALSE? I would also recommend to use high-resolution relative seconds. No need for 128bit timestamps if all you evert use is the relative DBL part.
Sorry, I don't have any drivers so I cannot look at most of your express Vi configurations. A good idea would probably be to eliminate express VIs and dynamic data entirely.
You create a new file with each iteration of the inner loop. How many?
05-08-2023 10:33 AM
First thing I would check is whether the program is actually frozen or just in a state you're not expecting. You can create indicators off of the iteration terminals for both while loops to quickly see if you're while loops are still iterating. Once you know what is/isn't running you can use probes to figure out why you aren't in the state you think you should be in.