42
<DB
n,m,p,q,r
>
Define Bargraph
Mapped Variables
Description
This command specifies how an input variable is written as a bargraph to the screen
Parameters
n
= 1 to 8
- the input variable number
IN_1
to
IN_8
m
= 5 to 120
- the total length of the bargraph in pixels
p
= 0 to 8
- Lower limit of bargraph
0 = use static limit defined by the <DL> command
1 - 8 = Use the process variable connected to the specified input
IN_1
to
IN_8
q
= 0 to 8
- Upper limit of the bargraph
0 = use static limit defined by the <DL> command
1 - 8 = Use the process variable connected to the specified input
IN_1
to
IN_8
r
= 0 or 1
- Alignment: 0 = Horizontal bar, 1 = Vertical bar.
Modes
Row Mode only
Notes
The bargraph variable defined by this command is drawn at the current cursor position. The variable
is automatically updated as new cyclic data is received.
An empty bargraph with a dotted outline indicates that data with “bad” status is being displayed, or
that the input value is outside the defined limits.
Only one instance of a particular input can be on the displayed at a time. If the command is issued
when there is already a bargraph of the specified input on-screen, the variable is moved from the old
to the new position.
The command will fail and a parameter error result is produced if any part of the defined bargraph is
off-screen
Uses
The <DB> command allows:
•
A process variable to be shown on screen as a continuously updated bargraph
•
Up to 8 bargraphs to be displayed on a single screen
•
Bargraph definitions to be saved together with on-screen text and graphics using the
<SF> command
Example
<SD><CM1,10>
Start from a known screen and move to Row 1
<DL1,0.0,100.0>
Define the bargraph limits for
IN_1
as 0.0 and 100.0
<DB1,100,0,0,0>
Define a horizontal bargraph 100 pixels long using
IN_1
, and the
limits specified by the DL command
<CM2,8><WT0>
Move to row 2 and write in the scale “0”
<CM2,101><WT100>
Move cursor to the right and write “100”
<F4>
Specify a large font (32x19 pixels)
<CM7,5>
Move to Row 7
<DV1,6,3,0>
Define a variable using
IN_1
, 6 character field, 3 chars after the
decimal point, and written left aligned
The process variable linked to
IN_1
in this example has a “good”
status and a value of “23.456”
Gotchas!
Only one instance of a particular input can be on the displayed at a time, although a bargraph can be
displayed along with its numeric value.
Bargraphs cannot be removed with the <CS> or <SD> commands.
See Also
DV
Define Variable
EB
Erase Bargraph