06-29-2009 06:00 PM
Thanks for your time,
dycastellanos
07-01-2009 10:57 AM
To summarize your problem:
- You are reading three continuous analog input channels from a PCI-6251 at 5kHz
- You are trigger your 6251 (Dev1) from port0/line0
- You are then triggering another device (which device is this?) after a delay of 10 ms from port0/line5 (of which device?)
I have a few questions for this scenario
- what is this second device
- how are the three channels related to these two devices
- ideally what sampling rate would you like to achieve
07-01-2009 03:46 PM
Hello,
1) Let me explain more about my process. I’m trying to collect pressure data for an explosion process inside a vessel using one static pressure transducer (Dev 1 PCI 6251 channel ai4) and 2 two dynamic pressure transducers (ai0, ai1), which send information in form of a voltage output. Therefore I’m using 3 continuous analog input channels for this purpose.
2) In order to produce the explosion I need to control the opening of a valve which injects fuel/air into the vessel, and then I need to activate an igniter. The valve actuation is through a solenoid valve, and hence I’m sending a voltage pulse using a line output (Dev 1 port0/line0), which activates a solid state relay for the solenoid valve. In the same way, I’m sending another voltage pulse using a line output (Dev 1 port0/line5) which opens a second slid state relay, which activates the igniter.
3) The overall explosion process occurs in the order of milliseconds. Therefore, I need to have a very fast data collection in order to capture the pressure profile of the explosion. I’m not really familiar with how fast I can go with the PCI-6251, but I think the faster the better.
4) To obtain reproducible results, and be able to analyze them, I need to open the valve in a very precise way, keep it open for few milliseconds, close it, and then activate the igniters after few milliseconds, keep them activated, and then deactivate the igniters. That is the reason that I want to use a trigger to activate both lines outputs (P0.0, P0.5). I need to test different times to calibrate my equipment, so I would like to be able to adjust these times with a resolution of millisecond if possible (or at least in 10 ms intervals).
5) I want to activate the pressure data collection when opening the valve, so I would like to trigger these events together. And then stop the data collection when the igniter is deactivated.
I will really appreciate if you can guide me to develop a LabView routine for my process.
07-06-2009 04:33 PM
This sounds like way too much fun. So let's break this into a few problems:
You need two consecutive pulses of varying width and delay from the first trigger: Do you have to use those particular lines? You can, but it would be a little harder. The easiest way to do this would be to generate the two digital pulses on the two counters (which are only routed to ports 2 and 3, the PFI lines) and have them triggered from the same line. Start with the "Gen Dig Pulse-Dig Start.vi" shipping example. You could use a static digital output line to trigger the two counters or you could just trigger the second pulse off of the first (use /Dev1/Ctr0InternalOutput as the trigger source for counter 1, and you wouldn't have to trigger counter 0). They could each have a different initial delay and high time, which would be tunable down to the timebase period (12.5 ns for 80MHz). If you have to use P0.0 and P0.5then you'll need to use correlated digital output (start with the Correlated Dig Write With Counter.vi) and build a waveform that meets your timing requirements. The faster your clock (in the example, an internal counter) the higher your timing resolution will be. 1MHz would give you timing resolution of 1us, and the board can support up to 10MHz.
You need to acquire the AI data at the same time as fast as possible: The 6251 is a multiplexed baord with a max aggregate rate of 1MS/s. To acquire from 3 channels, you can acquire at a max rate off 1M/3 = 333kS/s. If you didn't need data before the triggers, you could start the acquisition with the first trigger using the Acq&Graph Voltage-Int Clk-Dig Start.vi example. If you needed some data before the triggers and some after, I'd use a reference trigger and start with the Acq&Graph Voltage-Int Clk-Dig Ref.vi example. If you end up using counters to generate the pulses, you could just use the first counter to trigger off of. If you have to use correlated digital output, you coudl still use the counter sample clock as a trigger. Both of those are finite acquisitions - they will acquire a certain number of points and then stop. You base the number of samples to acquire off of the timing of your pulses (ie you know your pulses are only going on for 1 second so you acquire 333kS) or just acquire for a set long time and throw away the extra data.
Hope this helps,
Andrew S
07-06-2009 07:08 PM - edited 07-06-2009 07:08 PM