Fuh
2008-07-09 22:10:10 UTC
Dear Labview Experts,
I am an EEG person and am currently trying to build my own stimulation system using Labview. I have a DAQcard 6062E and Labview 8.0, and I am new in Labview programming. My plan is to play a .wav file continuously through AO channel #0, and at the same time deliver triggers through AO channel #1. I intertwined the outputs of the two AO channels so that the sound signals and the triggers will always be synchronized. I do this because my DAQ 6062E card does not do hardware-timed triggering. The sound signals were sent to a loud speaker, whereas the triggers were sent to a Neuroscan recording system. The Neuroscan recording system will then be used to record EEGs from a human subject along with the triggers that were sent through my Labview program.
My problem is: My triggers recorded by the Neuroscan recording system were delayed by about 1 ms out of every 1000 ms. I mean I have tested the Neuroscan recording system using their own stimulation system. When the triggers were sent using Neuroscan's stimulation system, the triggers were correct and precise in time. However, when the triggers were sent using my Labview program, the triggers were delayed by about 1 ms out of every 1000 ms. I have also checked the output array of my two AO channels. They contained exactly the same number of data points as it has in the wave file. Is it possible that the delay is due to my lousy, immature Labview programming skills? I mean, it is quite possible, but I simply do not know where the problem is. If anyone would be generous enough to take a look of my Labview programming codes and to give me comments, I would greatly appreciate it.
Sincerely,
Fuh
P.S. My wave file is generated using MATLAB, at a sampling rate of 44,100 samples/second. Because the ".wav" file extension is not a valid file extension for attachment on the NI Discussion Forum. I have changed the file extension of my wave file into ".txt". If anyone needs to use my wave file to test my Labview program, please be sure to change the file extension bact to ".wav" before using it.
FSnoise_cos_10_100_dur2.txt:
http://forums.ni.com/attachments/ni/250/41436/1/FSnoise_cos_10_100_dur2.txt
Practice_DAQmx_AO_2chan_WAV_AOTrigger2.vi:
http://forums.ni.com/attachments/ni/250/41436/2/Practice_DAQmx_AO_2chan_WAV_AOTrigger2.vi
Read WAV with trigger2.vi:
http://forums.ni.com/attachments/ni/250/41436/3/Read WAV with trigger2.vi
I am an EEG person and am currently trying to build my own stimulation system using Labview. I have a DAQcard 6062E and Labview 8.0, and I am new in Labview programming. My plan is to play a .wav file continuously through AO channel #0, and at the same time deliver triggers through AO channel #1. I intertwined the outputs of the two AO channels so that the sound signals and the triggers will always be synchronized. I do this because my DAQ 6062E card does not do hardware-timed triggering. The sound signals were sent to a loud speaker, whereas the triggers were sent to a Neuroscan recording system. The Neuroscan recording system will then be used to record EEGs from a human subject along with the triggers that were sent through my Labview program.
My problem is: My triggers recorded by the Neuroscan recording system were delayed by about 1 ms out of every 1000 ms. I mean I have tested the Neuroscan recording system using their own stimulation system. When the triggers were sent using Neuroscan's stimulation system, the triggers were correct and precise in time. However, when the triggers were sent using my Labview program, the triggers were delayed by about 1 ms out of every 1000 ms. I have also checked the output array of my two AO channels. They contained exactly the same number of data points as it has in the wave file. Is it possible that the delay is due to my lousy, immature Labview programming skills? I mean, it is quite possible, but I simply do not know where the problem is. If anyone would be generous enough to take a look of my Labview programming codes and to give me comments, I would greatly appreciate it.
Sincerely,
Fuh
P.S. My wave file is generated using MATLAB, at a sampling rate of 44,100 samples/second. Because the ".wav" file extension is not a valid file extension for attachment on the NI Discussion Forum. I have changed the file extension of my wave file into ".txt". If anyone needs to use my wave file to test my Labview program, please be sure to change the file extension bact to ".wav" before using it.
FSnoise_cos_10_100_dur2.txt:
http://forums.ni.com/attachments/ni/250/41436/1/FSnoise_cos_10_100_dur2.txt
Practice_DAQmx_AO_2chan_WAV_AOTrigger2.vi:
http://forums.ni.com/attachments/ni/250/41436/2/Practice_DAQmx_AO_2chan_WAV_AOTrigger2.vi
Read WAV with trigger2.vi:
http://forums.ni.com/attachments/ni/250/41436/3/Read WAV with trigger2.vi