09-10-2009 09:51 AM
Hi all,
I am not an expert at Labview and DAQ but learning with time. I am writing a program to trigger a stimulator with the USB 6009 DAQ. We first acquire the max Torque of 3 trails (MVIC). Then the subject it asked to reach the max MVIC by giving a visual feedaback. When the subject reached maximum torque and then drops by 1% of the maximum value then we trigger the stimulator to provide additional torque. The trigger is sent by writing a 5V signal on the analog ouput channel of USB 6009. That is connected to the trigger channel of the stimulator.
The issue is that the electric stimulus is felt with a delay of 1sec which is very high for our application.
I am using the DAQAssistant.
Does anyone have suggestions for making this faster. Is the USB 6009 an issue. Is the analog write speed slower for USB 6009? I have attached my program.
Thanks.
09-10-2009 12:26 PM
09-16-2009 05:44 PM
09-28-2009 03:30 PM
Hi!
My code is still running slow and I don't know if its because of the DAQ. Also I read somewhere that using the A:D board's counter to trigger a pulse sequence in LabVIEW could be faster. However, I do not understand what they mean. I have never used counters before and so if someone can explain to me how to proceed with using a counter to trigger a pulse sequence it would be great!
Inorder to trigger the stimulator I ahve to send a TTL pulse.
Thanks.
09-28-2009 04:14 PM
You don't have a counter output for pulse generation. Read the specs and the manual. The max update rate for analog out is 150S/s. For 0-5V signals, you could try a digital output but that is software timed as well and may not make any difference
Looking closer at you code. I don't quite understand some things. You set the analog out to be 0 (the Simulate Signal is not at all necessary) and if the trigger condition is detected, you write out +5V. It then never returns to 0.
09-28-2009 09:09 PM
Hi Dennis,
Thanks. Yes I know that the USB I have doesn't have the counter. I could borrow a DAQ card with counter from another lab for testing purposes. If it worked then we thought we could purchase one for our lab. But u say that it might not make a difference.
Yes I don't turn it to 0.I reset it only when I run the prog. I need the program to trigger only once when it reaches a particular value below the peak- is this bad programming?
Also I did try the DAQmx code for write and it seemed a bit faster but it still has a delay. I can post that code tomorrow when I get to work. I was having trouble with the DAQmx code for the input though.
Any way I can give the stimulus without a delay? I am willing to try different options.
Thanks for taking the time.