WElcome to the world of Windows and other non-deterministic operating systems!
There are a number of issues.
1) Wait for next millisecond multiple will wait the time you specify only if the work performed in parallel with it runs in less time time that the interval specified. OTHERWISE it will miss the first multiple and will have to wait for the next multiple.
2) When you update your chart, space has to be allocated to store all of your data. LV is very smart about allocating memory but can not read your mind. When the space currently allocated for storage needs extended, LV will have to allocate more memory. Allocating memory takes a lot of time. If the allocation time exceed your loop rate spec'd by the Wait until.... you will miss a multiple.
3) Win
dows was developed to make it look like it could follow your mouse movements. Just about everything else has to wait. Windows will also go off into "la-la-land" just to make sure you can find all of your files fast, or check for other nodes on the network. THe list of distrations that Windows is subject to, can go on for quite a while. That is the nature of Windows. Only going to a Real-Time OS will help fix that issue.
Enough on what is happening and why. Now how to fix.
1) Use a "WAIT" not a "Wait until..."
2) Use a queue (or another mechanism_ to pass your data out of your data acq loop to a parallel loop that updates your display. THis will move the "memory allocation" delays out of the DAQ loop. The display loop will still expecience interuptions but it will only affect the display and not your DAQ backlog.
3) Update your display less often. Let you display updates pile up and apply the updates as a larger chunk. This way the work assoiated with auto-scaling and displa
ying is done less often and thereby reducing the demainds on your processor.
Now some questions.
How fast is your processor?
How much memory?
Ben