User Tools

Site Tools


jvs:cigal:manual:chapter6:r_sweep

CIGAL Reference Manual, Chapter 6 (RealTime): r_sweep

r_sweep -- Display an array of values as if on an oscilloscope

usage1: r_sweep opflg eflag ltime Flag Tstart Tend dT Rect XSc Ysc X0 Y0
usage2: r_sweep opflg eflag ltime Databuf Intens Npts Xo [Dx ScalVec NChans Chanoff]

Usage 1

R_SWEEP plots data variable values against time. In can sweep any number of independent data variables, all of which must have been previously specified using the R_SETSWEEP command.

The arguments to R_SWEEP have the following meaning:

  • Flag - Display options (see below)
  • Tstart - display left margin start time
  • T_end - update display values between T_start and T_end time (20 us ticks)
  • dT - time interval per horizontal pixel
  • Rect - display region (default is entire window)
  • XSc - time (horizontal) scale factor
  • YSc - data (vertical) scale factor
  • X0 - time axis pixel offset (left margin – within Rect)
  • Y0 - data pixel offset (bottom margin – within Rect)

The FLAG argument can be used to select display options. It is a bit-flag, where the following bits are interpreted by the R_SWEEP command:

  • 10o - autoscale Y values for variables
  • 20o - don't smooth curves (ignore Weighting factors specified by R_SETSWEEP)
  • 40o - reset X values
  • 07007o - user flags, used by Showplay (see below)
  • 10000o - don't display (for debugging)

Other FLAG bits are ignored by R_SWEEP, but can have meaning within the calling realtime programs. In Showplay, the following FLAG options are recognized:

  • 1 - run R_SWEEP in realtime program if using dual screen display
  • 2 - run R_SWEEP even if using single screen display
  • 4 - don't display while a response is expected
  • 1000o - display a background image whenever the screen is erased (SWEEPIMAGE in SWEEPBOX)
  • 2000o - single-use, single-screen (like 2 but rests after one use)
  • 4000o - ready to display (turned on/off automatically)

Usage 2 (older version)

The original version of this command is self-contained, it does not use R_SETSWEEP to specify which variables to display. It can display only a single data variable, but it can display multiple data channels stored in that variable. It is primarily intended for monitoring multi-channel analog data collected by the R_AREAD command.

If NChans is greater than 1, multiple channels can be swept simultaneously. In this case INTENS must be an array with NCHANS elements (1 color for each channel) and the CHANOFF argument indicates the offset (in short words) between each channel in DATABUF (default: NCHANS = 1,CHANOFF = 1).

If DATABUF is auto-incremented the pointer is advanced past all of the data points that were plotted, and the XO variable is advanced beyond the last X position; in this case XO must be a data variable, rather than a constant.

If SCALEVEC is specified it is assumed to be a short integer array of 6 * NCHANS elements indicating how to scale each Y value before plotting. For each channel, the contents of SCALEVEC are 6 contiguous integers specifying:

        { yoff0   ymult   ydiv   yoff1   ymin   ymax }

The resulting Y value is:

        Ynew = (Yold - yoff0) * ymult / ydiv + yoff1

and if ymax is greater than ymin, then Ynew is clipped if necessary to stay within those bounds.

When the X position reaches the right edge of the screen it is reset to the left edge.

See Also:
CIGAL Home, CIGAL Manual, RealTime List, Manual Help

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