Please see attached diagram.
Can anybody help find why this loop hang up at "nowhere"?
This loop was found stop iteration, hang up at "ReadData" case,
while its parallel loop is contiouing iteration. the occurance can
be from once several days or just 1 hour after start.
this vi is for continuous DAQ of 2 AI cards. two AI tasks (one 4-channel
and one 3-channel) are configured time based, no trigger, continous,
25kHz sample rate, default buffer size, overwrite un-read samples. two
task are not synchronized, read sample size is 2500 sample per channel
(read every 0.1s); DAQ read wait time is 0.25s.
if there is any DAQ read error other than -200279 (overwriten happened),
then the loop will go to "Error" case then terminate. if the error is
-200279, then clear the AI tasks and reconfig, restart DAQ, up to 10
consequtive re-try.
After hang up was found (other VIs reads data from this VI is not getting
data), I add a parallel log loop to track while it hangs. the log loop
check "Status", "Iter#", RdErr", "Card#" every 0.5s, and log the values to
disk file if RdErr changes or 5 seconds after last log.
The DAQ loop was found hang up at Status=ReadData, Card#=100,
RdErr=0; the log loop continues run and logging with logged iter# and
other values no change.
Because "Status"=ReadData, the loop is not terminated; because Card#=100,
appears both DAQ tasks reading are finished. the programm seems not even
get to the error check case, because if there is no read error, it will go
to next case "HistWave" and Card#=101; if there is an error, "RdErr" log
shall show non-zero, and "Card#"=102 or 103.
if it is waiting on DAQ (it shall not because the time limit is 0.25s),
then Card#= 0 or 1.
One place may hang up is the merge error function, but I can't image it
would because nothing inside it should cause waiting forever.
Another place is: the FOR loop has write "100"out to the local variable
"Card#", but the waveform ****ft reister is never writen out, can this be
possible?
the "Newwaves" is a 7-channel array with waveform length initialized to
7501 samples, even contributes (name, units are iniliazed to larger than
actually would be).
there are many other vis running at the same time and they appears to be
fine, windows task manager show no abnormal in CPU and Memory usage.


|