LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

post processing using NI6225

Ryan,

To refresh, I have 12 NI6225's in a PXI Chassis.  The task is to read ALL 960 ch's "simutaneously".  Earlier in the year you posted a vi that read ch 1 on one board and ch 1 on board 2.  I modified this vi to read "ch 1's" on all 12 boards simutaneously ( I added additional vi's and tied them together with the error out line)   I'll try an attach it.  Now I need it to repeat with all ch 2's then all ch 3's etc.  One test is at 1khz. with all 960 chs.  Another test is at 50 khz with all 960 chs.  In each case I have ~ 500 msecs to read all 960 chs.  Reading each ch on each card individually I hoped I'd get the full bw ( 250 khz) of each card.  Is this possible ( DO LOOP, FOR NEXT LOOP) and in the allotted time ??  Dave Hall walked me thru another example but when I ran it the time was over 5 secs.  I have < 500 msecs.

0 Kudos
Message 21 of 48
(1,777 Views)
Clint,

With your 6225s, it is only possible to read all 80 channels at approximately 3kS/s (a useable bandwidth of 1.5kHz). This is due to the multiplexing that goes on inside the card. Since it only has one analog to digital converter, it must multiplex each of the 80 channels on the bus, one at a time, for an aggregate rate of 250kS/s. That is, you can acquire 1 channel at 250kS/s, 2 channels at 125kS/s, etc...

This means that it is certainly possible to acquire 80 channels on 12 boards at 1kS/s (or even 2kS/s if you need 1kHz of bandwidth). You cannot, however, simultaneously acquire all 80 channels at 50kS/s. What I suggested earlier is that you should acquire for a brief period on one channel (times 12 boards), go on to the next channel, etc. This would allow you to scan at up to 250kS/s on each channel, but only for a snippet of time. Is this an option for you?

Regards,
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 22 of 48
(1,770 Views)

Ryan,

It is possible for the snippet of time as long as its less than 500 msec.

A question.  If for some outrageous reason I buy a 6225 to use only one ch, write a vi to read only 1 ch ( select it from the "I/O" drop down menu on the front panel of my vi)  and run it, I only can get 250 Ksamples/sec/80 chs or appox 3 k samples per that one ch ??  A BW of 1.5 k samples/sec  ??

I'm told from the Engr that is leading this project National presented to him the fact that he could get the full BW ( 250 KS/s )of the 6225 if he wrote the vi right.  Thats what we're trying to do.  Did you get a chance to look at the vi I sent that I thought would read one channel, one card at a time doing what we've discussed ?

0 Kudos
Message 23 of 48
(1,768 Views)
Clint,

The VI you posted will only acquire 1 single channel on each of your 12 boards. You have it configured for a rate of 100kS/s. If you have only one channel, you can achieve the maximum rate of 250kS/s. If you have multiple channels, they will have to share the sampling rate. For instance, the maximum sample rate you can achieve with 10 channels is:

250kS/s /10 channels = 25kS/s per channel

When you say that it is possible to sequentially scan channels as long as it is less than 500 msec., do you mean each channel has to be less than that, or that 80 channels has to take less than that? If each channel has to be less than 500msec., you should have no problem. If the entire channel list has to be less than 500 msec, this would be very difficult. I have attached a "benchmark" VI which is the fastest way I can think of skipping from one channel to the next at a high rate. It acquires 500 samples at 100kS/s on each channel of each card. Assuming that it takes no time to reprogram the hardware for each channel (which is untrue - HW reconfiguration will take time), this VI will take 80 channels * 500 samples / channel / 100kS/s = 400msec, which meets your requirement. Depending on the speed of your computer and how long it takes to reconfigure the hardware, this VI could take significantly longer. You may need to muck with the Device Number part of the channel creation string if your boards have different device numbers in MAX. This VI assumes you will have Dev1 to Dev 12. Also, this VI does not perform any type of synchronization.

Hope this helps,
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 24 of 48
(1,762 Views)
Ryan,
I want to trigger on an external pulse (PF8? Slot 2 of the PXI chassis) that will cause the cards to start reading.  I thought if I created 12 different groups of tasks ( like the vi in the last discussion)  in the same vi then called each ch individually with each iteration of the tasks I could get a reading of 960 chs in < 500 msec.  In your example I can decrease the # of samples from 500 to 100 ( 400 msec to 80ms)  Is 100 samples sufficient for a freq range of 1-50 khz ?  I haven't tried your bench mark vi yet but I want to read all 80 ch's x 12 boards ( 960 chs) in less than 500 msec after I receive the ext trigger.  I can play with any of the parameters on the card or in a vi as possible to accomplish this.  The test( probably 9 different ones) is basically an array of 960 LEDs that are lit with a pulse ( <500 msec) in a pattern ( some off, some on) that is known to the operator.  The cards measure the level and a vi verifies which ones should be on ( > than a threshold) or off.  Its basically a RMS reading of 960 ch's.
 
Clint
0 Kudos
Message 25 of 48
(1,759 Views)
Clint,

The minimum number of samples is really up to you. What sort of behavior are you looking to captiure? Do you want to acquire a period of a waveform? In the 50kHz case, what is the frequency of this waveform? Do you instead plan to acquire some samples of the waveform, take the RMS value, then threshold? If this is the case, it would be more efficient to implement an analog circuit to find the RMS value, then take a single sample on each channel to get this data into the computer.

As for my VI, as configured, I am not very confident that it will execute in under 500msec. By reducing the number of samples per channel, you may be able to get it down around that time. The simple fact of the matter is that the board(s) must be completely reconfigured for each channel you wish to acquire (when using my method). As I stated earlier, you should not have any problems at 3kS/s.

Regards,
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 26 of 48
(1,752 Views)
Clint,

I've attached another VI that should read twice as fast as my previous one. In this one, we are reading 2 channels at a time, each at 100kS/s, for a total of 200kS/s (80% of the board's maximum value). This is as fast as I can figure how to do it.

Hope this helps,
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 27 of 48
(1,748 Views)

Ryan,

You hit the nail on the head.  I want to acquire a waveform for a brief period of time and then figure out the RMS value.  More specifically, I have a waveform of frequency 50 Khz that lasts for 500 msec on 960 chs of my 6225 and trying to trigger on PF8 from an external enable.  IS this possible ??

0 Kudos
Message 28 of 48
(1,742 Views)
"Clint",

Interesting thread...  Your latest post helped me a lot to understand what you're doing and why.

Based on your approach to date and conventional methods, I don't think you can even get close to doing what you want.  Standard Nyquist sampling would require a sample rate PER CHANNEL of 100 kHz.  This explains why you're looking to perform a burst of samples on 1 channel at a time, then reprogram for the next channel, repeat 80 times.  However, each step of reprogramming is very time-consuming -- I don't know how many times you've been able to reprogram channels on a single board within 0.5 seconds, but I'd be surprised if it's much more than 10, if that.

So, I had a very different and sort of unconventional idea.  Perhaps you could drastically undersample your 50 kHz signals and use the aliasing to your advantage.  This method has the further advantage of drastically decreasing the amount of data you need to handle.  However, it also depends on your signals' frequency content being dominated by the 50 kHz component.  (It may be helpful if you can control that 50 kHz signal to be slightly different such as 49.7 kHz or whatever.)

Here is an example that assumes a pure sine wave at 50 kHz.  Suppose you would ideally like 20 samples per period, i.e., 1 MHz sampling.  The spacing between samples is then 5% of the period, i.e., 5% of 20 microseconds == 1 microsecond.

However, with a pure sine wave, you could produce the EXACT SAME DATA by sampling at intervals of exactly 105% of the period, i.e., 21 microseconds, or 205% or 305% or 5005% and so on.  Your goal will now be to produce a sampling interval of exactly (n*20 + 1) microseconds.

So let's suppose you setup a task with all 80 channels.  You need to get, say, 20 samples each in 0.5 seconds for a nominal sampling rate of about 40+ Hz.  Let's go with 50 Hz == 20 msec sampling interval.  Remember that every one of the 80 channels gets sampled once in this interval.  Now let's use our aliasing formula to find an exact desired sampling interval of (n*20 + 1) microseconds.  This will wind up being 20.001 milliseconds per interval == 49.9975 Hz.

I'm not sure if the boards' AI system will support that kind of precision in its internal sampling clock.  If not, you should be able to get it using the boards' counter/timers.  I'm running out of time, but there's plenty of info in the help, examples, and here on ni.com about using a counter pulsetrain as an AI sample clock.

Also note that if your signals aren't perfectly at 50 kHz, then you won't alias at perfect 5% points.  However, if it's close to 50 kHz, you'll be close to 5% points and the RMS calculation may very well produce useful results.  Note that the data handling becomes very manageable as well.  20 samples per channel * 80 channels per board * 12 boards == 19200 values per 1/2 second.  There should be no problem streaming this to disk.

Good luck!

-Kevin P.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 29 of 48
(1,736 Views)

Maybe I'm making this more simplistic than it really is.  I'm "new" to DAQmx but in the old days of LV5.1 I could setup a ch to AI CONFIG.vi, then AI START.vi then when I'm ready take a reading.( AI READ.vi).  Couldn't I "DAQmx" create virtual ch.vi, Timing.vi, start task.vi only once thru out this 500 msec for each of the 80 ch or 12 cards ? Thus saving setup time ?  Then when I get my external trigger, read one ch on each of the 12 cards giving me 250 kHz BW?  Then concatenate( using some kind of LOOP) the for next loop, or do while loop value to form a string that is equivalent to the next channel number for each card ??  From past experience 10 samples or 100 samples at the proper BW is plenty to recreate the original waveform. 

Tell me if I'm wrong but AS AN EXAMPLE this is how I'd figure samples and sample rate:  Lets use 1 KHZ waveform being measure on a single channel of a NI6225 AS AN EXAMPLE.

1 Khz is 1 msec long for 1 waveform.  To get a proper recreation I'd like 2 waveforms, 2msecs.  To satisfy Nyquest you need 2x freq of ( highest) interest but because we have the BW and you get better results ( past experience) lets use 10x or 10 K samples /sec.  This will give me 10 msec of data or 10 waveforms ( 100 data pts/10k samples/sec).  More than what I wanted.  Each data point is spaced 10 msec/100 data points=100 microsecs.  This looks good to me and I would plug in 100 samples and 10kS/s into the vi.

Using that example and my explaintion at the top for my application:  Freq of interest: 50 khz.  50 khz x 10 =500 ksamples/sec.......can't do.  Beyond the 6225 capability use the max of 250 ksamples/sec.  Remember, we're only going to read 1 channel ( by configuration) at a time on EACH BOARD IN EACH SLOT.  One waveform is 20 micro secs long.  We'd like 2 waveforms=40 micro.  100 samples/250kS/s=400 micro which will give us 20 waveforms.  400 microS* 960 chs=~400 msec . 100 msec less than what I need.  Is this reasonable and "do-able"??

0 Kudos
Message 30 of 48
(1,740 Views)