04-11-2014 04:59 PM - edited 04-11-2014 05:04 PM
Hi I am working with a combustion chamber and using a DAQ system (with NI SCB-68 hardware) to read the pressure within the cylinder (as analog voltage). I am trying to output a delayed, 1-millisecond, pulse at 5 volts once the pressure within the cylinder has risen above 5 bar (which corresponds to an analog voltage of 0.25 V). I also want to record 30 ms of samples before the trigger and 220 ms of samples after the trigger. The following image visually shows what I'm talking about.
I have created a LabVIEW VI (which is attached) but I keep running into 2 problems:
I am a beginner at LabVIEW so sorry if my questions are trivial or if my VI makes no sense but I have been stuck on this for more than a week. Any help would be greatly appreciated!
Thank you,
Morgen
Solved! Go to Solution.
04-14-2014 10:38 AM
Here's an explanation of the error code -200281:
http://digital.ni.com/public.nsf/allkb/3E9EBBEEFA2505388625713D006AEA4D
As far as getting a 1ms pulse inside that While Loop, I'm betting that is takes mroe than 1ms to iterate. The Elapsed Time VI can handle a 1ms increment, but you've got a lot going on in the While Loop, the Write to Measurement File VI is opening, writing, and closing the file each iteration.
04-14-2014 10:48 AM
Thank you so much for your help! The explanation of the error code is extremely helpful and that makes sense why I am unable to get the 1ms pulse. Do you have any suggestions on how I mght be able to produce the pulse without using such a complicated While Loop? I really appreciate your help.
Thank you,
Morgen
04-15-2014 12:51 PM
What device are you using for your AO?
04-15-2014 03:17 PM
I'm using an NI PCI-6259 DAQ card with an SCB-68 interface block. Once again, thank you so much for your help. I really appreciate your input.
Mrogen
04-16-2014 10:53 AM
This is not a good way to trigger a pulse.
Use a DAQmx trigger to send the pulse when your acquired signal rises above 250mV like you specified.
See this for DAQmx Triggering:
04-16-2014 12:32 PM
Thank you so much for the link! This is extremely helpful. I knew my VI was really inefficient but I wasn't sure how to clean it up. Also you were right before about the loop taking too long to iterate. Even after I moved the "Write to Measurement" outside the loop it was still taking more than 17 ms to iterate.
Thank you,
Morgen