Hi,
I'm trying to write a program that will simulatneously stimulate a cell and record two sets of responses using Labview 8 and a USB6009 DAQ card.
The stimulus is a series of rectangular pulses of 20ms duration and frequency between 1.2 and 10 Hz. I'm using DO for stimulation and AI to record the voltage response (sampling at 4Khz).
For testing purposes I'm using a stimulus of 20ms , frequency 10Hz repeated 1000 times. I have only used one AI channel although another AI channel will have to be added later on.
The rectangular pulse was generated by appling a DO of TRUE, waiting for 20ms and then applying a DO of FALSE. The AI READ function is used to clock the cycle duration (read 400 samples at a rate of 4000Hz = 100ms). A for loop was used to repeat the pulses 1000 times. The output of the DAQ was observed on a scope.
The problem is that I'm not getting an accurate rectangular pulse. There is an +-2 ms variation in the pulse width (a +-10% error) and up to 4ms variation in the interpulse delay (a 5% error) which is quite alot for my experiments.
I have tried using two USB DAQ cards (a 6009 and 6008) one for DO and one for AI but still had the same problem. which suggests this is a software problem.
If I only use DO without aquiring any signal (removed the create AI task completely) and I get a perfect rectangular pulse with no variations in inter-pulse timings.
I've attached a copy of the VI.
Is there a better way of setting up the AI or looping through the AI read to get rid of the variations?
Thanks for any tips
Amr
Message Edited by Amrosh on 07-27-2007 02:57 AM