Daqarta for DOS Contents



Free Registration

Contact Us
Daqarta for DOS
Data AcQuisition And Real-Time Analysis
Shareware for Legacy Systems

From the Daqarta for DOS Help system:


While a Key Macro is running, you may halt it at any time by hitting the NUM-LOCK key or the grey Pause/Break key. The message
will appear near the upper right corner of the trace area.

Each additional NUM-LOCK or Pause/Break keystroke will single-step through the remainder of the macro, one key at a time.

Hitting ESC at any time will cancel the macro, as usual, while hitting any other key will resume normal KeyRn macro operation.

The halt option is intended to allow you to recover from certain problems during a long-running macro that you don't want to abandon completely. For example, suppose you are collecting spectral averages of engine or machine vibration at 100 different speeds, and during the 73rd test you notice that your sensor appears to be coming loose. You could hit ESC to exit the macro so you can fix the problem, but then you are faced with either re-running the entire series, or else manually running the remaining tests.

Instead, you can hit NUM-LOCK or Pause/Break to halt the macro, then fix the problem and resume. When the series is complete you can go back and repeat only the test or tests you suspect were compromised by the loose sensor.

You may want to use the single-step feature to advance past the end of the individual test you halted in the middle of, so that when you resume you will be starting the next test normally.

Halting and single-stepping are also powerful tools to aid in debugging a macro that you have just created, but which doesn't seem to be performing as desired.

If you are trying to examine steps near the start of a macro, you may not be able to hit Pause/Break or NUM-LOCK fast enough to halt it before the area of interest is executed. Instead, create a new macro that gives a long WaitS delay, then invokes the desired macro as a nested operation. When you run this, hitting the Pause/Break or NUM-LOCK key will end the delay, and you can then single-step through the very start of the macro under test.

Note that when no macro is running, the Pause/Break key will invoke a general Daqarta Pause just like the P-key option. If you use the Pause/Break key to single-step through a macro, you may "run off the end" into a general Pause state. If you want to avoid that, use the NUM-LOCK key instead... it has no effect after the macro is over.


The Key Macro system plays back pre-recorded keystrokes as fast as they can be processed. Besides saving all the keystrokes each time you use it, a macro allows major changes so quickly that you can flip between complex setups almost instantaneously. Part of the speed is due to the fact that keys are read one right after the other, without any intervening trace data display, or even any acquisition in Sequential mode.

But sometimes this rapid response can actually be a liability. Suppose you want to take an average and save the result to the next memory location. At first glance, this appears very straightforward: You use KeySt to start storing the macro, followed by the selected ID key. Then you hit the Avg key, and after the average is done hit the MemSv key, followed by the Enter key in response to the MemSv prompt. Then hit KeySt again to end the macro storage.

When you go to use this macro, however, what happens is that the MemSv follows the Avg key immediately, forcing the average to Pause before it even gets started! You need a way to tell the KeyRn macro handler to WAIT until the average is done.

Here is where the WaitP (ALT-W) option is used. This tells the handler to continue acquiring and processing trace data, and to wait for a Pause before proceeding with the rest of the macro keys. In this example, the Pause comes when the average is done, so this is just what we need. To use this option, you just hit ALT-W before or after you hit Avg when you are recording the macro. (The WaitP option will be shown with a highlight until the next Pause, when it will automatically go off.)

When you later run the macro, the key reader will read the WaitP key and set the option on. While it is on, the reader will not read any more keys if either an average is running or a single-sweep is in progress. As soon as the average or single-sweep completes and enters the Pause state (thereby turning WaitP off), the reader will continue reading keys from the macro.

Normally, you will probably want to record the WaitP just before the Avg key, especially if the average time is too short to hit it before the average reaches Done. But there may be occasions where you want to start an average, then do something else while the average is running. A good example of this would be starting a wave average, then hitting FFT to watch the spectrum of the wave average as it runs. If the rest of the macro requires further action on completion of the average, you will need to give the WaitP AFTER the FFT key. (You can't hit FFT before Avg, or you would get a spectrum average.)

When recording macros, if you want to give yourself plenty of time to hit keys between the time a short average starts and ends, here's a trick: Just for the purpose of recording the macro, set the averager Sweeps count way higher than you really need. Then record the macro at your leisure. Set the sweeps back down before you use the macro, and you're ready to go.

Besides averages, there are other applications for WaitP. Suppose, for instance, that you wanted a macro to collect several traces in rapid succession, saving each with MemSv. In normal operation, you would hit MemSv, which would Pause the trace and prompt for a memory ID. You would hit ENTER or END to save the trace, followed by unPause to go back to collecting trace data. You would repeat this sequence for each trace to be stored.

But a macro running those same keys would not wait for any data collection between the unPause and the next MemSv, so you would just get multiple copies of the same trace! Instead, you should give WaitP before MemSv to force data collection between keys. Since MemSv always sets a Pause state, the WaitP condition is removed automatically.

You can use WaitP in any macro where you want to force data collection and processing between key reads, even if you are not specifically waiting for a Pause state. The WaitP state can then be toggled off explicitly by a second WaitP command.

Note, however, that there is one place that WaitP does not work as you might expect: If your macro involves DDisk recording with a Preset size, and you want to wait until the Pause at the end of the recording before proceeding with the remaining macro steps. The reason WaitP won't work here is that a DDisk Pause is actually a special state that only stops the display updates, but not the recording process.

Instead, to force a wait for the end of the recording, when you are storing the macro you just toggle the D-key off to force the end of the DDisk operation. (With very short Preset sizes, you may need to temporarily increase the size to give yourself time to hit the key manually before the Preset ends.) The macro handler will note that a Preset DDisk recording was in process and will store a special code instead of the actual D-key. Then later, when the macro is running, that code will be interpreted as "wait for the end of the Preset DDisk".

One application of this technique is described in detail under Sound-Triggered Recording.


Questions? Comments? Contact us!

We respond to ALL inquiries, typically within 24 hrs.
25 Years of Innovative Instrumentation
© Copyright 1999 - 2006 by Interstellar Research