RTScope
ActiveX Control
Description
Properties
Methods
Events Detailed
Description Example
Description:
The RTScope ActiveX Control
provides functionality required to display signal data as either a Oscilloscope
or Spectrum Analyzer style display. The Oscilloscope display will provide
positive/negative signal amplitude displayed over a preset number of units
(time), while the Spectrum display will provide signal strength displayed
over a preset number of units (frequency). Signal data can be scaled in
the vertical and horizontal axes allowing a complete signal sample to be
displayed in as few as two data points. The control supports display of
two separate signals when in Oscilloscope mode. In addition there are horizontal
& vertical marker bars provided. These bars are mouse ‘drag able’ and
provide feedback to the parent program as to their position in relation
to the displayed signal. The RTScope OCX fires an Event providing the position
of the vertical and horizontal marker bars. The control will function within
any ActiveX capable container. (VC++,VB, Etc)
TYPE/NAME | DESCRIPTION | DEFAULT |
Boolean Enabled | This allows enabling or disabling of the control. When the control is disabled it does not accept signal data nor does it accept mouse actions. Currently there is no change in the display when the control becomes disabled. | TRUE |
Boolean EnableHorzBar | Allows enabling or disabling the Horizontal drag able bar. | TRUE |
Boolean EnableVertBar | Allows enabling or disabling the Horizontal drag able bar. | TRUE |
Boolean EnableLine1 | Allows enabling or disabling of the input for trace #1 | TRUE |
Boolean EnableLine2 | Allows enabling or disabling of the input for trace #2 | FALSE |
Short Columns | Sets or retrieves the number of dividers across the horizontal axes. | 10 |
Short Rows | Sets or retrieves the number of dividers across the vertical axes. | 10 |
Double Xscale | Sets or retrieves the Scale value for the horizontal axis. | 1.0 |
Double Yscale | Sets or retrieves the Scale value for the vertical axis. | |
Short DataSetSize | Sets or retrieves the number of data points which describe’ the signal being displayed. This value is used to calculate the Xscale value. | 32 |
Boolean AutoScale | Allows enabling or disabling of the Auto Scale functionality. If Auto Scale is set to FALSE then the user program is responsible to calculate the appropriate scale values for both the Xscale (Horizontal Axis) and the YScale (Vertical Axis) | TRUE |
Short Height | Sets or retrieves the number of pixels tall the control is. | 200 |
Short Width | Sets or retrieves the number of pixels wide the control is. | 200 |
Short HorzBarPos | Sets or retrieves the position of the horizontal bar. (Pixels). When in Scope Mode the central axis is zero. The value becomes larger (positive or negative) when moving away from this central axis. When in Spectrum mode the value is zero at the bottom of the control and increases as the bar is moved vertically up the control. | 200 |
Short VertBarPos | Sets or retrieves the position of the vertical bar. The value increases as the bar moves in the horizontal axis from left to right. | 200 |
Bool ScopeMode | Sets or retrieves Scope mode. If this value is TRUE the control will use a Oscilloscope display. If FALSE then a Spectrum display will be used. | TRUE |
OLE_COLOR BackColor | Sets or retrieves the color used for the background of the control. | Black – RGB( ) |
OLE_COLOR ForeColor | Sets or retrieves the color used for the grid color. In addition this color is used for control name and size in design mode. | Dk Green – RGB( ) |
OLE_COLOR HorzBarColor | Sets or retrieves the color used for the Horizontal Bar color. | Yellow – RGB(FF,FF,FF ) |
OLE_COLOR VertBarColor | Sets or retrieves the color used for the Vertical Bar color. | Red – RGB( ) |
OLE_COLOR Line1Color | Sets or retrieves the color used for the Line #1 Trace. | Blue – RGB( ) |
OLE_COLOR Line2Color | Sets or retrieves the color used for the Line #2 Trace. | Blue – RGB( ) |
Double Value(Short LineNumber Short Index) | Sets or retrieves the value of the data point at the location specified by the LineNumber and Index parameters. | N/A |
TYPE/NAME | DESCRIPTION |
Void Refresh() | Causes the control to re-paint itself using the currently loaded signal data array. |
Void AboutBox() | Causes the control to display its AboutBox. |
Short StartTest() | Places the Control in the self test mode. This causes the control to internally generate a sine wave. This signal is injected into the control and the display is refreshed. The occurs 20 times a second. |
Short StopTest() | Terminates self test mode. |
Short SetSignalData(double* LineData short LineNumber) | NOTE: DAC Specific |
TYPE/NAME | DESCRIPTION |
Void HorzBarLine(long HorzBarValue) | The HorzBarLine event is fired whenever the Horizontal Bar is moved. |
Void VertBarLine(long VertBarValue) | The VertBarValue event is fire whenever the Vertical Bar is moved. |
Void BeginDraw(short LineNumber) | The BeginDraw event is fired at the start of the line draw routine. |
Void EndDraw(short LineNumber) | The EndDraw event is fired at the end of the line draw routine. |
Detailed
Description:
The RTScope Control has two primary modes,
Oscilloscope as depicted in Figure A and Spectrum as shown in Figure B.
Figure A - Oscilloscope Display
Figure B - Spectrum Display
Example:
Below is a typical Visual Basic implementation. To utilize the RTScope
Control merely add RTScope Control to the project.
Note: If the control does not appear on the list of available
controls, simply browse to the directory in which you installed the control
and select RTScope.ocx .
' Set number of rows and columns desired on the control
RTScope1.Rows = 10
RTScope1.Columns = 10
' Set colors for control
RTScope1.BackColor = RGB(0, 0, 0)
'Set Background color to Black
RTScope1.ForeColor = RGB(0, 128, 0)
'Set Foreground/Grid color to Dark Green
RTScope1.Line1Color = vbBlue
'Set the 'trace' color to Blue
RTScope1.HorzBarColor = vbGreen
'Set Horizontal Marker to Green
RTScope1.VertBarColor = vbGreen
'Set Vertical Marker to Green
' Set initial position of vertical and horizontal marker bars
RTScope1.VertBarPos = 75
RTScope1.HorzBarPos = 75
' Set data value
RTScope1.Value(1, 1) = 2.0
' Set Line #1, Point #1 to 2.0
RTScope1.Value(1, 2) = 3.0
' Set Line #1, Point #2 to 3.0
' Command control to paint itself
RTScope1.Refresh