On the AI Read VI, there is an input which is a cluster that contains
the position and read offset where the read from buffer should occur.
You can set the position to the "End of the buffer", and the read offset
to zero.  This would retrieve the most current piece of data entered
into the buffer.
If the position were "relative to the beginning of the buffer" and then
the read offset was the iteration of your loop times the number of scans
to be read per loop, this would read x scans in the correct position of
the buffer for your DAQ occurrence loop.
Mark
In article <39FD396D.CDE41D66@amc.uva.nl>,
  Thijs Boeree  wrote:
> First of thank you for the fast response!!
>
> I opened the example "Cont Acq&Chart (Async Occurence)" and already
made
> another while loop, putted the AI read in it, but now I don't know
what you
> mean by "you're going to read it referenced to the END of the buffer."
How
> do I wire this? I not that familier with LabView yet, can you send me
a
> simple VI where the seperate loop is displayed, i don't need the Cont
> Acq&Chart because i already have 'm.
>
> What do you do with LabView?
>
> Best regards, Thijs Boeree
>
> mark.wysong@ae.ge.com schreef:
>
> > Absolutely.  I have done this many, many times.
> >
> > Let's understand what is happening first.  If you are just using a
loop
> > that sets up a continuous acquisition, and reads 1000 points every
> > iteration, when the AI Read is called, you stop the data acquisition
> > "thread".  If any other data acquisition VI is called, it won't
execute
> > until this AI read is finished, or 1 second has elapsed (because of
your
> > 1000 Hz sampling rate), even if it is in another loop.
> >
> > Therefore, to eliminate this problem, take a look at the Labview
example
> > under examples\daq\anlogin\anlogin.llb\Cont Acq&Chart (Async
> > Occurrence).  This vi uses the DAQ Occurrence VI which allows
Labview to
> > generate an occurrence (like an interrupt) when the buffer contains
a
> > certain amount of data (say, 1000 scans!), and you can hold off
doing
> > your AI Read of 1000 scans until the buffer contains that much data.
> >
> > What does this do for you?  It doesn't tie up the data acquisition
> > thread anymore.  In a separate loop, now you can perform another AI
> > read, but this time you're going to read 1 scan, and you're going to
> > read it referenced to the END of the buffer.  This will get the last
> > scan that went into the buffer (the most recent data), and that is
what
> > you can display on your graph.  This will NOT interfere with your
> > buffered acquisition.
> >
> > The only trick is that when you make the call to read the 1000 scans
in
> > your other AI Read, you must make that referenced to the "beginning
of
> > buffer", because your other AI read will move the buffer marker,
which
> > is the default read location of the AI Read.
> >
> > Give that a try.  I know it works.  Let me know if you have any
trouble.
> >
> > Mark
> >
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.