Daqarta
Data AcQuisition And Real-Time Analysis
Scope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!
The following is from the Daqarta Help system:

Features:

Oscilloscope

Spectrum Analyzer

Signal Generator
(Absolutely FREE!)

Spectrogram

True RMS Voltmeter

Sound Level Meter

Frequency Counter

Period Counter

Event Counter

Spectral Event Counter

Waveform Averager

Histogram

Post-Stimulus Time
Histogram (PSTH)

Macro System

Multi-Trace Arrays

Trigger Controls

Auto-Calibration

Spectral Peak Track

Direct-to-Disk Recording

Accessibility

Applications:

Frequency response

Distortion measurement

Speech and music

Microphone calibration

Loudspeaker test

Musical instrument tuning

Animal sound

Evoked potentials

Rotating machinery

Vehicle pass-by noise

Product test

Contact us about
your application!

Macro IF Statements

A control that sets a value or state (not text entry) can be tested in a macro IF statement to determine if it is equal to, greater than, or less than a specified constant.

An IF statment always starts with an IF. prefix (note the period after any prefix) before the command to be tested, then a list of commands to perform if that statement is true. An optional ELSE. branch lists commands to be performed if the IF statement was false. An ENDIF. must be used to close each IF structure:

 
 IF.L.0.ToneFreq=1000
     Msg="1 kHz"
 ELSE.
     Msg="Not 1 kHz"
 ENDIF.
 

The above example shows the "true" and "false" branches indented for clarity. Indenting is not required, but it is strongly recommended. (You can use CTRL+Tab in the Macro Definition editor to move to the next 4-character tab stop.)

To test for greater than or less than, use > or < after the equal sign:

 
 IF.L.0.ToneFreq=1000
     Msg="Exactly 1 kHz"
 ELSE.
     IF.L.0.ToneFreq=>1000
         Msg="Above 1 kHz"
     ELSE.
         Msg="Below 1 kHz"
     ENDIF.
 ENDIF.
 

The above shows a single nested IF. IF statements can contain nests up to 4 levels deeper (more indented) than the main IF. You can have an arbitrary number of IF statements at each level.

See Macro Variables for an example that uses IF statements to provide a system of prompts for novice users, which can be toggled off by experienced users.

GO:

Questions? Comments? Contact us!

We respond to ALL inquiries, typically within 24 hrs.
INTERSTELLAR RESEARCH:
Over 25 Years of Innovative Instrumentation
© Copyright 2007 - 2008 by Interstellar Research
All rights reserved