08-15-2007 05:28 PM
08-15-2007 07:47 PM
08-16-2007 09:55 AM
08-17-2007 02:21 PM
08-17-2007 02:43 PM
08-17-2007 03:06 PM
08-17-2007 04:27 PM
I'd approach this by returning to your earlier configuration where you acquire only 1 analog signal. The change I'd recommend is to capture the digital signal in a different way. You're probably trying to read this as a digital bit using software calls, right? I know the E-series board won't let you perform a hardware-timed digital input task. However, you *CAN* use an onboard counter to react to TTL edges with hardware-precision timing.
The part that may seem tricky is sync'ing the two. I'm not near a LV pc now to post a screenshot, but I can describe an idea. Configure a counter task to count edges. Configure the DAQmx Timing vi such the source of the "Sample Clock" signal is your external TTL pulse. This configuration means that each external pulse will buffer a single count value.
What count value will you buffer? Well the simplest one would be the AISampleClock. You can specify that with a DAQmx Channel property node, something like CounterInput-->Count Edges-->Input Terminal.
Finally, make sure you start the Counter task first. As soon as you start the AI task, your counter will be counting samples. When you get an external TTL pulse, you'll buffer the instantaneous count. This count will be the most recent AI sample # taken. It directly identifies the index into your overall array of AI voltage values.
If you're new to counters, look through your help resources and online here for tutorials. They work a bit different than AI, AO, DI, DO tasks, and may require just a little extra time to get used to.
-Kevin P.