LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

6534 DAQ card- i want to process continous stream of data....through DAQ card...

I have NI -6534 DAQ card.i have continous stream of 16-bit parallel data. I use two port as input port .(16 bits parallel data), such that i recieve  12000 bytes per second in my card buffer.  i  use  DIO read.vi. then on this bunch of 12000 bytes, i do some processing and display a XY chart/waveform. 

code structure is as follows:
1) DIO config. vi
2) DIO start. vi

3) while loop
    {          DIO read.vi (reads 12000/or fixed number of bytes, inserts into an array )
               Insert array.vi

               while loop(this processes data till end of 12000 bytes,then stops)
                            {
                                  stacked sequence(this processes the 12000 bytes data, )
                                    (      seq 0: intialize counters,
                                            seq 1: extract some pre-defined bytes,convert and display on frontpanel
                                            seq 2: extract specified bunch of bytes, create  xy chart/waveform
                                     )
            
                             }(12000 bytes data ends)

     }(16-bit parallel data is unavaible/or user control stop)

4)dio clear.vi

the problem persceptable here is , that processing data takes time.. few seconds for processing bucnh of data..then goes back to DIO read to fetch new bunch of data. till then the front panel waveforms and digital displays are on hold/static.
 
I want to process data simulatanouesly , and also being recieve in buffer through DAQ.real time processing.
simulatanoeus aqcuuistion..and process on continous data rather than in bunch of data.(i.e. TWO vi. should run in paralell  DIO READ.vi acqusition...and process.. on that data(vi) )

Can queue.vi slove this problem? any other method
your help is greatly appreciated..Thanks.



0 Kudos
Message 1 of 2
(2,416 Views)
Hi,

This is definitely something that can be solved using a producer consumer loop.  You would have two loops running in parallel, have all of your data acquisition/generation done in the producer loop.  Use queues to transfer all that data from the producer loop to the consumer loop and then do any kind of processing in your consumer loop.

The producer and consumer loop will run in parallel, and the consumer loop cannot run faster that the producer loop.

The good thing is that you can get a producer consumer template easily.  In the LabVIEW startup window, select New (not New VI) >> From Template >> Frameworks >>Desgin Patterns >> Producer/Consumer Design Pattern (Data).

Hope that helps.

Regards,
Raajit L
National Instruments
0 Kudos
Message 2 of 2
(2,400 Views)