ni.com is currently undergoing scheduled maintenance.
Some services may be unavailable at this time. Please contact us for help or try again later.
09-13-2013 07:59 AM
The following picture illustrates the idea (but of course doesn't work):
I could use the timing source of the task for the timed loop. But I would prefer to avoid it. In my application, additionally to the timed loop there is an AI task @ 1 kHz and an AO @ 30kHz. The three of them should be synchronized. If I use the timing source of the task, then I would have to set the AI to 30 kHz and downsample later. This I would like to avoid.
09-23-2013
04:08 AM
- last edited on
10-31-2024
12:06 PM
by
Content Cleaner
Hi,
to synchronize the loops, there are different ways. What hardware do you use
Best regards
Suse
09-26-2013 04:42 AM
Hello Suse,
thank you very much for your response and the informative links. I wasn't counting with an answer anymore!
I am using a PCI-6259 in a RT desktop PC. I wanted to limit the thread to the question alone, but it becomes clear that I need to explain the background. The attached VI illustrates the problem.
What I want to do is to update the AO buffer in each iteration of a timed loop. The number of written samples is the equivalent of the the loop period. I believe that I need synchronization for this (see below). Excepting using extra hardware (which I haven't tried), all the synchronization methods known to me seem to fail.
With the Boolean controls in the VI the user can choose between either synchronize AI with AO or AI with TL (timed loop) or both. I observe the following:
No sync: The available space in the AO buffer shrinks with time.
AI sync with TL: Same behavior
AI sync with AO: The available space in the AO buffer increases with time
Both: Same behavior
When the buffer space is either full or empty, an error will be produced.
The only way I can think of to explain this is that synchronization is failing. If the TL and AO clocks do not measure the same time, then the TL will be writing either more or less samples than the equivalent of its period. In the long run, the AO buffer will be full or empty.