07-09-2008 05:09 PM
07-10-2008 07:57 AM
07-10-2008 09:55 AM
Hi Rob,
Thank you so much for your input. I googled the "matlab analog output", but I did not use the "analog output" function in Matlab. I used MATLAB simply to create amplitude-modulated white noise and save it in a wave file. The wave file should be exactly the same as any "standardized" wave files.
Also there is another point I probably didn't explain clear enough in my first posting. When I said my trigger was delayed by about 1 ms out of every 1000 ms, I mean if I use my Labview program to read in a wave file that contains a 1000-ms sound signal (for example, amplitude-modulated white noise), the intervals between adjacent triggers recorded in the Neuroscan recording system will be 1001 ms. I mean, if the recording is set to collect 10,000 samples/second, the intervals between adjacent triggers will be 10,011 data points instead of 10,000 data points. If the recording is set to 20,000 samples/second, the triggers will be evenly spaced by 20,022 data points, instead of 20,000 data points.
On the other hand, if I use my Labview program to read in a 2000-ms-long wave file and the recording was set to 10,000 samples/second, the intervals between adjacent triggers will be 20,044 data points instead of 20,000 dtat points.
I mean, the delay seems to be proportional to the lenght of the wave file. That makes me think: (1) this might due to Labiview programming overhead (due to my immature Labview programming skills), or (2) this might also due to the fact that my Labview stimulation program and the Neuroscan recording system are not using the same clock. Before I jump into the second conclusion, I would like to be sure that my Labview program is producing any delay, or not.
Hope this would make more sense to the readers.
Sincerely,
Fuh
07-10-2008 07:27 PM
Hi Fuh,
I am interested to find out a little more about the issue. Your programming looks to be ok. The data transfer from the to the card from the PC is done through DMA transfers, which means that the data is written to the card in chunks because the on board memery of the card cannot hold all of the data. Do you see a constant error of 1ms per 1 second or does the delay happen periodically at some other interval? Is the Neuroscan stimulation system independant of LabVIEW, the pc, and the DAQ card? What rate is the Neuroscan recording system acquiring data?
07-10-2008 09:13 PM
Hi Steve,
Thanks a lot for looking at my Labview program.
I let my Labview program run for a little while and recorded the continuous EEG data (along with the triggers) from the Neuroscan recording system. I then analyze the recorded data and calculate the data points between adjacent triggers. It is a constant delay of 1 ms out of every 1000 ms. I also noted that the delay is not at the beginning, at the end, or at any specific location of the data points. Instead, the delay is evenly distributed throughout the entire recording data points. I have done a little experiment. I modified my Labview stimulation program and add additional triggers at the middle and at the end of the AO channel #1 output. The delay is found to be evenly distributed throughout the entire recording data points. That is, for some reason, the 1000 ms stimulation was evenly distributed over a recording period of 1001 ms. That is, something wrong was happening and delaying the presentation of each data output (either at the stimulation, recording, or somewhere in between). I simply cannot figure out where...
The Neuroscan stimulation system is completely independent of Labview. Actually the entire Neuroscan system (both the stimulation and recording systems) is independent of Labview. Neuroscan is written in Visual C. Their stimulation system uses a Keithley I/O card (Model KPCI-PIO24 24-ch, PCI Board w/ parallel Digital I/O) running on a DELL computer using Windows XP.
Signal flow of the Neuroscan recording system can be described as follow. EEG signals --> headstage preamplifier --> signal box --> USB cable to a DELL computer. The triggers should be delivered to a trigger port on the back of the signal box (either using Neuroscan stimulation system or through a TTL cable using my Labview program). When I use my Labview program as the stimulation system, the Neuroscan stimulation system is turned off and completely disconnected from the Neuroscan recording system. The Neuroscan recording system can record EEGs at different recording rates, from about 500 samples/second up to 20,000 samples/second. The recording sampling rate I used was 10,000 samples/second. I have also tried the recording sampling rate of 20,000 samples/second. Same thing happened -- 1 ms delay out of every 1000 ms, and the delay is evenly distributed throughout the entire recording process.
Specifications of the Neuroscan stimulation computer is:
NetData (miniature)
Location: W141A (Lab office)
CPU: Pentium (R) 4 CPU 3.00 GHz, 3.00 GHz
RAM: 2 GB
Hard Drive: 80 GB, 80 GB
Windows XP + Service Pack 2
Neuroscan STIM computer (DELL OPTIPLEX GX620)
Location: W141 (AEP Lab)
CPU: Pentium (R) D 2.80 GHz, 2.79 GHz
RAM: 1 GB
Hard Drive: 150 GB
Windows XP + Service Pack 2
By the way, I computer I used for my DAQ6062E (a PCMCIA card) is an ACER laptop.
Thanks a lot...
Sincerely,
Fuh
07-10-2008 09:13 PM
Hi Steve,
Thanks a lot for looking at my Labview program.
I let my Labview program run for a little while and recorded the continuous EEG data (along with the triggers) from the Neuroscan recording system. I then analyze the recorded data and calculate the data points between adjacent triggers. It is a constant delay of 1 ms out of every 1000 ms. I also noted that the delay is not at the beginning, at the end, or at any specific location of the data points. Instead, the delay is evenly distributed throughout the entire recording data points. I have done a little experiment. I modified my Labview stimulation program and add additional triggers at the middle and at the end of the AO channel #1 output. The delay is found to be evenly distributed throughout the entire recording data points. That is, for some reason, the 1000 ms stimulation was evenly distributed over a recording period of 1001 ms. That is, something wrong was happening and delaying the presentation of each data output (either at the stimulation, recording, or somewhere in between). I simply cannot figure out where...
The Neuroscan stimulation system is completely independent of Labview. Actually the entire Neuroscan system (both the stimulation and recording systems) is independent of Labview. Neuroscan is written in Visual C. Their stimulation system uses a Keithley I/O card (Model KPCI-PIO24 24-ch, PCI Board w/ parallel Digital I/O) running on a DELL computer using Windows XP.
Signal flow of the Neuroscan recording system can be described as follow. EEG signals --> headstage preamplifier --> signal box --> USB cable to a DELL computer. The triggers should be delivered to a trigger port on the back of the signal box (either using Neuroscan stimulation system or through a TTL cable using my Labview program). When I use my Labview program as the stimulation system, the Neuroscan stimulation system is turned off and completely disconnected from the Neuroscan recording system. The Neuroscan recording system can record EEGs at different recording rates, from about 500 samples/second up to 20,000 samples/second. The recording sampling rate I used was 10,000 samples/second. I have also tried the recording sampling rate of 20,000 samples/second. Same thing happened -- 1 ms delay out of every 1000 ms, and the delay is evenly distributed throughout the entire recording process.
Specifications of the Neuroscan stimulation computer is:
NetData (miniature)
Location: W141A (Lab office)
CPU: Pentium (R) 4 CPU 3.00 GHz, 3.00 GHz
RAM: 2 GB
Hard Drive: 80 GB, 80 GB
Windows XP + Service Pack 2
Neuroscan STIM computer (DELL OPTIPLEX GX620)
Location: W141 (AEP Lab)
CPU: Pentium (R) D 2.80 GHz, 2.79 GHz
RAM: 1 GB
Hard Drive: 150 GB
Windows XP + Service Pack 2
By the way, I computer I used for my DAQ6062E (a PCMCIA card) is an ACER laptop.
Thanks a lot...
Sincerely,
Fuh
07-10-2008 09:21 PM
Oops. I accidentally pressed some key, and submitted the information twice. Sorry!
Specifications of the computers should be:
Neuroscan Recording computer:
NetData (miniature)
CPU: Pentium (R) 4 CPU 3.00 GHz, 3.00 GHz
RAM: 2 GB
Hard Drive: 80 GB, 80 GB
Windows XP + Service Pack 2
Neuroscan stimulation computer (DELL OPTIPLEX GX620)
Location: W141 (AEP Lab)
CPU: Pentium (R) D 2.80 GHz, 2.79 GHz
RAM: 1 GB
Hard Drive: 150 GB
Windows XP + Service Pack 2
07-10-2008 09:21 PM
Oops. I accidentally pressed some key, and submitted the information twice. Sorry!
Specifications of the computers should be:
Neuroscan Recording computer:
NetData (miniature)
CPU: Pentium (R) 4 CPU 3.00 GHz, 3.00 GHz
RAM: 2 GB
Hard Drive: 80 GB, 80 GB
Windows XP + Service Pack 2
Neuroscan stimulation computer (DELL OPTIPLEX GX620)
Location: W141 (AEP Lab)
CPU: Pentium (R) D 2.80 GHz, 2.79 GHz
RAM: 1 GB
Hard Drive: 150 GB
Windows XP + Service Pack 2
07-10-2008 09:28 PM
Specifications for my Labview stimulation computer is:
******************************************************************************
Acer Aspire 3000
CPU: Mobile AMD Sempron (tm) Processor 3100+ 1.80 GHz
RAM: 512 MB
Windows XP and Service Pack 2
*************************************************************************
For some reason, I kept submitting information twice.
My apologies about that...
Fuh
07-11-2008 02:52 PM