50
<DV
n,m,p,q,r
>
Define Variable
Mapped Variables
Description
This command specifies how a process variable is written to the screen
Parameters
n
= 1 to 8
- the input number
IN_1
to
IN_8
m
= 1 to 10
- the total variable string length
p
= 0 to 4
- the maximum number of digits after the decimal point (Over-ridden by
m
)
q = 0 or 1
- Alignment. 0 = left align, 1 = right align in the defined field.
r = 0 or 1
- Strict Format 0 = Precision reduces to fit field width
1 = Display over-range if specified format not available for variable
Initial Value
None
Modes
Row Mode only
Notes
The variable defined by this command is written at the current cursor position and in the current font.
The variable is automatically updated as new cyclic data is received.
Data with “bad” status is written in “inverse” i.e. White numbers on a Black background.
Only one instance of a particular input can be displayed at a time. If the command is issued when
there is already a variable from 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 variable is
off-screen.
Uses
The <DV> command allows:
•
Up to 8 process variables to be shown and continuously updated on screen
•
The status condition of the variable to be indicated
•
Variable definitions to be saved with text and graphics using the <SF> command
Example
<SD>
Start from a known screen
<CM1,10>
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>
Move cursor to the right
<WT100>
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!
Parameter “
m
” overrides parameter “
p
”
A Defined Variable cannot be removed by a Clear Screen or Screen Defaults command – Use the
<EV> Erase Variable command instead
See Also
EV
Erase Variable
DB
Define Bargraph