We're using LabView 6.0 and a PCI-MIO-16E-4 to run our electrophysiology experiments, and have a moderately tricky set of requirements.
What we have so far: four analog inputs and two analog outputs to monitor and control two recording electrodes. We need tight synchronization (within << 1 msec) between input and output so that we can properly correlate the timing of responses with the timing of stimuli during each presentation (which are no more than a few seconds long). We do this by using the Clock Config AIs to have our output side set the scan clock (via the AO update signal through PFI 5) and the input side use that scan clock. This all works and we're happy with it.
What we need: we'd like to independently control at least 6 (preferably more) stimulator devices. The stimulators look for TTL triggers, so in principle we could use the DIO ports to send those trigger events. The trouble is timing: we want the digital output to be tightly synchronized (again << 1 msec) with the analog i/o and to be able to specify the timing of those events to within 100 usec or so. I've put together a very dumb VI that takes as input an array of (bit pattern,time) pairs, then uses a While loop and Wait to manage that event list and Write to Digital Port to generate the trigger events. Since Wait is only 1 msec precision, and since we don't have a good way to synchronize with the analog i/o, we've got jitter in the trigger events of about 1 msec, which is too big.
One solution to the Wait resolution problem might be pattern i/o, but our board apparently doesn't do that. I have vague ideas about synchronizing the start of the digital and analog by setting the analog output to start on a trigger and having the digital side write that trigger value to start everyone, but in practice I haven't got that working yet. (A possibly related problem: though our scan clock is supposedly running through PFI5, if I hook an oscilliscope to that terminal on our BNC-2090, I don't see anything. I'm probably doing something stupid. Can anyone spot it?)
I'm new to LabView (though an experienced C/C++ programmer) and thus would greatly appreciate any advice or examples people could provide.
Thanks much,
Kevin