Ian,
I think I answered your first question in a reply to your posted file attachments. However, I can explain b) as well.
In my experience, it's not a good idea to combine DAQ occurrences while varying the "number of scans to read" input on the AI read VI. Here's why!
First, the reason for the DAQ occurrence is to free up the CPU while waiting for data. If you take out the DAQ occurrence, and just run continuous acquisition, you'll find that it takes a LOT of CPU time to perform the same acquisition. Why? Because if the AI Read VI is called before the data is available in the buffer, it will take up the whole CPU while waiting for it. Therefore, if you use the DAQ occurrence, you don't call the AI Read VI until you're sure the amount of data you want to read from AI Read is actually IN the buffer. That way, you don't tie up the CPU.
Now, if you change the number of scans the AI Read VI reads with respect to the amount of data that triggers the occurrence, this is where you have problems. Let me give you an example, and see if you concur.
Let's assume that the number of scans to read is 20, and you're setting your occurrence every 20 scans. Everything is peachy, no backlogs. Now move some windows around. Let's say you see a backlog of 10. On the next iteration, the occurrence is set when 10 more scans enter the buffer, so there's 20 scans in the buffer. Under normal circumstances (meaning, you're always reading 20 scans out of the buffer in AI Read), it would clear this right up--no problem. But now, you've got (number of scans to read + scan backlog) as the input to AI Read, so it's waiting for 30 scans! So it ties up the CPU a bit, waiting for 10 more scans to become available, since there was only 20 when the occurrence happened.....
So 30 scans become available, and it resumes. 10 scans later, the occurrence happens--it thinks there's 20 in there again. See how the AI Read and the occurrence get out of sequence? It can get all screwed up. Pretty soon, after doing this several times, your occurrence and AI Read are so out of whack, you're pretty much running without the occurrence at all--the AI Read keeps having to wait for the data to be available.
That's why, as I suggested earlier, I check the backlog to see if it's greater than the number of scans to read. If it is, read the entire buffer ONCE (put in a -1 as the number of scans to read), and then go back to the original number of scans to read. This will keep your AI Read and occurrence synched up.
Mark