Hi thank you for the reply
What I dont understand is that in the data sheet for the NI6070e the input buffer (FIFO) is stated to be 512 samples. However in the software i am able to set the buffer size of the DAQ's to greater than 512 samples. See Fig 1 the circles enclosed by 'a' and 'c'. I always set the buffer size equal to 2 times greater than the sampling rate I use as shown by 'b'. So this means when I sample at 1000 Hz i set the buffer size to 2000 samples, which is greater than 512 samples. Now in Figure 2 I show a part of the producer loops code. What I do there is read the samples from the DAQ devices and check for a buffer overflow and the number of samples in the buffer. (See the circles enclosed by Z1 and Y1) I always read out 1 sec of data. So when i sample at 34 000 Hz the numbber of samples I read will be 34 000 samples . Now On by front panel the number of samples in the buffer for each DAQ is displayed and when I sample at 34 000 hertz by buffer size is set to 68 000 samples and I can see that each daq has 1020 samples in buffer at certain times (this value varies as I run the software) Again I thought the max number of samples in buffer is 512 as indicated in the spec sheet of the NI card, but clearly the buffer fills uop with more samples before it is read.
THE MAIN QUESTION I would like to know is how to speed up my LABVIEW Program so that it does not lag. As mentioned in my orginal question. Fig 3 shows a simple block diagram of my program. My software runs but as time goes by the software only shows events that accured say for instance 2 minutes ago and the longer I run it the slower the greater the lag becomes. I would like to increase the update rate of my program. If I dont use a producer consumer loop a get a buffer overflow error. I attached the GUI's files and the dp_software Qui is the main VI and the other two are subvi's. I load a 3d model in my program that is not included, just remove that part of code if it cannot run. In this example I use two simulated DAQ's. Regards
Feel free to SKYPE ME

FIGURE 1

FIGUE 2

FIGURE 3