03-01-2018 01:16 PM
Hmm. I still don't completely "get" what you are trying to do, and why you're doing it as you are, but I have an idea that might work.
You've got one channel that you are reading some analog response that is important to you. You've got a DO device that at various times you want to "set" to give the "stimulus" whose response you'll measure with your AI channel.
Your DO input is a 12-bit number that you send to your DO device. Do you also have an AO device? Send the same number there. Wire the output of the Analog Out channel to the Input of a second AI channel. Now start your AI acquisition using Continuous Sampling, 1000 samples at 5KHz, streaming to disk (using Producer/Consumer). Whenever you change your DO (which you do by an "On-Demand" setting), you also update the AO (the same way), and now you have a record, taking at the same time, of the Response (on Channel 0, say) and the Stimulus (on Channel 1).
Bob Schor
03-01-2018 02:04 PM
Bob's idea is pretty good if you need to know the time between the DO events. I think you could actually use your 13th static DO to drive a PFI line on the second device that can be used as a start trigger for the AO. Then it is very close to hardware synchronized.