beautypg.com

8 initializing a bar graph, 9 drawing a bar graph – Matrix Orbital GLK12232-25-SM User Manual

Page 36

background image

Description

This command draws a solid rectangle in the specified color (0: White,
1: Black). The top left corner is specified by (x1,y1) and the bottom
right corner by (x2,y2). Since this command involves considerable
processing overhead, we strongly recommend the use of flow control,
particularly if the command is to be repeated frequently.

Remembered

No

8.8

Initializing a Bar Graph

Syntax

Hexadecimal

0xFE 0x67 [refID] [type] [x1] [y1] [x2] [y2]

Decimal

254 103 [refID] [type] [x1] [y1] [x2] [y2]

ASCII

254 “g” [refID] [type] [x1] [y1] [x2] [y2]

Parameters

Parameter

Length

Description

refID

1

Reference number

type

1

Type of bar graph.

x1

1

Left bounds.

y1

1

Top Bounds.

x2

1

Right Bounds.

y2

1

Bottom Bounds.

Description

This command initializes a bar graph referred to by number [reference
number] of type [type] with size from (x1,y1) (top left) to (x2,y2)
(bottom right). A maximum of 16 bar graphs with reference numbers
from 0 to 15 can be initialized as:

[type]

Direction

Bar Start Point

0

Vertical

Bottom

1

Horizontal

Left

2

Vertical

Top

3

Horizontal

Right

The bar graphs may be located anywhere on the display, but if
they overlap, they will not display properly.
It is important that [x1] is less than [x2], and [y1] is less than [y2]. This
command doesn’t actually draw the graph, it must be filled in using the
Fill Bar Graph command. The unit saves time by only drawing that part
of the bar graph which has changed from the last write, so the represen-
tation on the screen may not survive a screen clear or other corrupting
action. A write of value zero, followed by new values will restore the
proper look of the bar graph.

Remembered

No

8.9

Drawing a Bar Graph

Matrix Orbital

GLK12232-25-SM

31