LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Labview for high speed hardware control

Hi,
 
I am trying to use LabView 6.1 on Windows XP for data acquisition.  The task amounts to turning equipment on and off using digital pulses for specific amounts of time when triggered through an analog input channel.  Part of the experiment involves times of up to 250 milliseconds which my program can accomplish fairly accurately as the variations are small as compared to the overall time.  But for the other part of the experiment, I need to be able to trigger a digital output pulse on for 1 millisecond within 5 microseconds of an incoming trigger.  The pulse length must also be accurate within 5 microseconds.  I am getting approximately a 1 millisecond variation in the length of the pulse and approximately 6 milliseconds for the pulse start time.  The trigger is a voltage increase of 5 volts in a square wave pattern.  I am using a while loop to recognize the trigger and if I could make the while loop go through iterations at a higher frequency the problem would be resolved.  If anyone knows how to run the program at a faster rate or has any other suggestions it would be greatly appreciated.  Thank you for your help. 
0 Kudos
Message 1 of 3
(2,765 Views)
Hi K80,

With timing increments as small as 5 microseconds, I think the accuracy of the timing will be a function of the hardware that you are currently using (i.e. computer specifications) rather than software timing issues.

Perhaps someone else can verify this.   
Anthony Wong
University of Toronto
Chemistry Department
0 Kudos
Message 2 of 3
(2,759 Views)
Hi K80,

Anthony is definitely right.  If you're using software timing then you should consider yourself lucky that everything is happening within 1 millisecond and not longer (Windows is a non-Real Time OS, so it can never be dependable to have fast loop rates).

Other things slowing you down are that you're using LabVIEW 6.1 (which only uses Traditional DAQ, which is up to 40x slower for single point operations than DAQmx). 

You could do what you are trying to accomplish with some counters and some external circuitry.  Essentially it sounds like you are triggering off of an analog level, so that trigger circuitry would need to be external to your device, but you could easily make a triggered pulse off of a digital trigger with a counter and have the accuracy and resolution that you are looking for.  I'm not really sure about the details of how to make an analog level trigger, so if you could get some help with that, then we could work on explaining the LabVIEW part.  If you could upgrade to LabVIEW 7.0 or higher, then that would also make everybody's life a lot easier once we start trying to think of how to actually do this.

Ultimately though, if you need to do something with <1ms timing, then you will have to use hardware timing or an FPGA.

Regards,
0 Kudos
Message 3 of 3
(2,732 Views)