[LogoShip]

Home

Daqarta for DOS Contents

Introduction

Downloads

Free Registration

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

From the Daqarta for DOS Help system:
 

SOUND-TRIGGERED SPECTROGRAMS:

Suppose you want to view spectrograms of transient events, and you want good time resolution. That will require running with Trig toggled off (Free-run mode) so you can get maximum overlap between successive spectra. You could set up a macro so that a trigger event toggled Trig off and Sgram on and acquired a Singl spectrogram sweep. But if you want to see the leading edge of the transient, you will have to use the previous PreStart DDisk methods.

But that's not all bad: One huge advantage of viewing a data file with DskRd is the ability to use the Overlap control. You can get any amount of overlap that you want during playback, without the system speed limitations that might reduce overlap while recording. So the solution here is to create a macro series that records the transient, then immediately reads the file back with DskRd and a high Overlap setting. You can set the DskRd Overlap so that a brief event is spread out over the entire spectrogram screen, as much as desired.

There are some tricks that can simplify this. When you use PreStart, the recording will typically contain an area of silence before the triggering event. If you are using a high overlap to spread out a brief transient, you don't want to waste screen space on the silence: You need a way to advance the DskRd file position to the start of the trigger event before you start the spectrogram. For any given system this will usually start at a more-or-less constant number of samples from the beginning of the file, so you COULD use the direct DskRd Go To option to advance to that position... after you first determine exactly where it is for your system.

But there is a simpler way that is even better: You have just recorded the file with Norm triggering set to detect this event, so you can use that same trigger setup again to advance to the event in the file. Once the file is on the screen via DskRd, a Singl command will instantly advance to show the first trigger event.

Actually, that's not entirely true: During DskRd PLAY mode (which you get when you unPause or run Singl), the samples are read from the file at a rate that approximates the original sample rate. Set the Speed Factor in the DskRd menu (CTRL-D) to some high value like x1000, and the sample rate will be as fast as possible. Then the first trigger event will appear (almost) instantly after a Singl command.

But you want your spectrogram to start just before this event, not at the current file location just after it. So use the ALT-< key (ALT-comma) to go back one screen (N data points).

Typically, you will want your recording trigger threshold set high enough to avoid false triggers, which means that you miss the first few samples while the signal is rising to the threshold. After backing up one screen, those first samples will appear at the right end of the trace (since the next screen will be starting with the trigger level). You can thus back up by a few more samples (unshifted comma key) until those just slide off the right end of the trace.

Now hit Trig to toggle that off to Free-run (needed for DskRd Overlap to work) followed by FFT and Sgram (ALT-S). The expanded spectrogram will appear. Note that this will take a few seconds on slow systems, and is unrelated to the DskRd Speed Factor mentioned above... it is the time to process and display 512 vertical time-slice spectra. This runs as fast as possible for your system, since you are still in Pause mode. The Speed Factor would only apply if you unPaused to see a replay of the spectrogram for the rest of the file.

The macro is thus:

    unPause, unRTime, unBoard, DskRd, Singl, ALT-comma,
      {commas as needed}, unTrig, FFT, Sgram.
 
The first three keys are needed since you will be using this macro immediately after your DDisk macro ends with a Paused trace. You have to unPause in order to get out of RTime and then disable the Board before you can give DskRd. (That's because the file will be the data source, not the board.)

This assumes that you have set the desired DskRd Overlap already. But the best value for that may be unknown at first, and you will have to "tweak" it to your preference. After the spectrogram is displayed from the above macro, change the Overlap value and use the comma or period (unshifted < > keys) to force a new spectrogram to be redrawn at nearly the same file point. Use the opposite key after the next trial Overlap change and you will be back to the same point. (This is easier than using the direct Go To to start at the same point each time.)

Alternatively, you can enter the desired time-width of the expanded spectrogram directly, using the Sgram Width control (just below the Overlap control). This accepts time values, performs the needed computations, and updates the Overlap setting.

If you want to make this into an ongoing process for screening or monitoring, you can use WaitS to only display the spectrogram for a fixed time, then re-arm the trigger and repeat the whole macro in an infinite Loop. In that case, you should keep IncNm off so that you repeatedly overwrite the same "working" file. Hitting ESC will break out of the infinite loop macro when you see a "keeper" spectrogram, and you can then promote the working file to a permanent file by moving on to another file name before restarting the process.

As always, try to build up these complex macros from smaller self-contained "subroutine" macros to make is easy to change things around without re-keying everything from scratch.

GO:

Questions? Comments? Contact us!

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