User Tools

Site Tools


jvs:cigal:manual:chapter3:sweep

CIGAL Reference Manual, Chapter 3 (Functions): SWEEP

SWEEP -- Record a number variable and display as on an oscilloscope

usage: tgt = sweep(varb,col,intrvl,npts,x0,xscl,y0,yscl,varb2,col2,y20,y2scl)

SWEEP displays the value of a number variable across the graphics screen as though the monitor were an oscilloscope screen, allowing you to watch as the value of the variable changes. The input variable, VARB, can be any CIGAL number variable; however, the command only really makes sense for variables with externally controlled values, such as analog to digital converters, or a number variable assigned to a serial input line.

Two variables (VARB and VARB2) can be displayed simultaneously in different colors (COL and COL2), with separate vertical offsets (Y0 and Y20) and scales (YSCL and Y2SCL).

The horizontal axis (the timebase) of the display can be specified by the following command options:

     INTRVL     - the time interval between samples in clock ticks (16 ms).  If
                  INTRVL is 0, the sweep runs as fast as possible (default=0.0).
     
     NPTS       - the number of samples per sweep (default is the width of the
                  display region in pixels).
     
     X0         - the horizontal offset for the start of the sweep (default=0).
     
     XSCL       - the horizontal scale factor (default=1.0).

If assigning to a target array (TGT), the last NUMPTS values of VARB are stored in the array variable. (Note: VARB2 data cannot be stored.)

Pressing any key terminates the sweep.

Note: The sweep display is restricted to the graphics drawing window (see WINDOWS(1)) as defined by matrix variable ^^4. Offset values (X0, Y0, and Y20) are relative to the origin of this window. Data values that would be displayed outside of this window (above or below) are clipped to the maximum or minimum legal value.

See Also:
WINDOWS(1)

CIGAL Home, CIGAL Manual, Functions List, Manual Help

jvs/cigal/manual/chapter3/sweep.txt · Last modified: 2023/02/23 18:43 (external edit)