Joined: 13 Apr 2006
|Posted: Thu Apr 08, 2010 11:11 am Post subject: Notes on Pattern Mode
The X5-TX supports an alternate mode where data is delivered to the DACs from a stored pattern in memory instead of from packets busmastered continuously. This allows the playing of large complicated waveforms without gaps that are caused when busmastering cannot keep up with the output rate.
Pattern Mode Commands
There are two operations involved in pattern mode - loading a pattern into memory and playing it. The"Load" command places a pattern into waveform memory. The command "Replay" plays one of these loaded patterns.
"Play" combines these into one operation. It loads the pattern then starts playing it at once, as soon as the entire pattern is loaded into memory.
The final command is "Halt". It will stop the playback of all patterns until a new command arrives.
How Pattern Mode Works
A pattern is played in its entirety, for at least the number of rep counts given in the play or replay command. If no instruction is ready at the when the last iteration finishes, it will continue to play the current pattern indefinitely.
If a new play or replay instruction has been sent, it then proceeds to that instruction at once.
If two replay or two play instructions are sent, there will be no gap, as the first pattern continues to play until the next is ready. The number of rep counts of each might be much larger than requested, however.
The only way to produce a 'gap' between patterns is to halt playback. Even in that case, if a new replay command is queued after that, it will proceed to play that pattern.
If you care about exact rep counts, the best chance is to load 2 patterns, then send two replay commands. If the pattern and rep-count is large enough, you can get the second replay request in before the original rep count is exhausted. If not, you will get some extra replays.
Pattern Mode and Triggering
If when you replay a pattern the DAC trigger is disabled, the pattern play will wait until the trigger goes active. The output will start playing at the start of the pattern, and continue normally.
If you stop the trigger after starting it, the output stops in the midst of the pattern. If the trigger turns on again, it will pick up at the same spot in the pattern it left off. This is an exception to the usual behavior of the Pattern Mode that assures that a complete pattern will be played out. There is no way to 'abort' a pattern halted in this way and move on to later patterns.
There is also no way to use the trigger to signal the system to change the patterns played.
Pattern Mode Signal Generation in the Wave Example
In the Wave example the data source for pattern mode is the software pattern generator. When a "Play" or "Load" pattern is selected, the pattern buffer is filled according to the settings.
If you have a multiple channel run, the wave is repeated for each channel in the data, one for each DAC output.
If you select "Single Channel" on the wave generator, all channels except the one selected will be zeroed.