11 display programming – Rice Lake iRite IDE User Manual
Page 71

920i
Programming Reference - API Reference
67
SetEntry
Sets the user entry for a programmed prompt. This procedure can be used to provide a default value for entry box
text when prompting the operator for input. Up to 1000 characters can be specified.
Method Signature:
procedure SetEntry (S : String);
5.11 Display Programming
ClearGraph
Clears a graph by setting all elements of a DisplayImage array to zero.
Method Signature:
procedure ClearGraph (VAR graph_array : DisplayImage);
Parameters:
[out]
graph_array
Graph identifier
DrawGraphic
Displays or erases a graphic defined in the bitmap.iri file incorporated into the user program source (.src) file.
See Section 6.6 on page 92 for more information about display programming.
Method Signature:
function DrawGraphic (gr_num : Integer; x_start : Integer; y_start : Integer;
bitmap : DisplayImage; color : Color_type; height : Integer; width : Integer) :
SysCode;
Parameters:
[in]
gr_num
Graphic number
[in]
x_start
X-axis starting pixel location
[in]
y_start
Y-axis starting pixel location
[in]
bitmap
Graphic bitmap
[in]
color
Color type
[in]
height
Graphic height
[in]
width
Graphic width
SysCode values returned:
SysDeviceError
The value specified for gr_num is greater than 100.
SysOK
The function completed successfully.
Setting up a graph requires several functions that must be performed in the following order:
•GraphCreate assigns storage and defines the type of graph
•GraphInit sets the location of the graph on the display
•GraphScale sets the value bounds for the graph
•GraphPlot is used to actually plot the graph on the display
GraphCreate
GraphCreate assigns storage and defines the graph display type for use by other graphing functions.
Method Signature:
function GraphCreate (graphic_no : Integer; bitmap : DisplayImage; color :
Color_type; kind : GraphType) : SysCode;
Parameters:
[in]
graphic_no
Graphic number
[in]
bitmap
Bitmap
[in]
color
Graphic color
[in]
kind
Graphic kind
SysCode values returned:
SysInvalidRequest
The DisplayImage specified by
bitmap
does not exist.
SysOK
The function completed successfully.