Error! No text of specified style in document. DNS-24, DNT-T103, & DNT-T221 Application Guide
Page 34 of 35
Document Edition 3.1
B. Programming Notes
The following provides additional important programming information.
1. C
ONFIGURATION VARIABLES (AV12 & AV21-23): These variables should never be commanded
on-the-fly from a GCL program (or user command). They must be configured in the proper
sequence and they radically alter operation too much to make frequent changes. Besides, changing
the application configuration from an OWS requires that you reset the BACstat (either locally or
via user command). Also refer to page 30 for further information.
2. C
OMMANDING VARIABLES: When commanding all other variables (particularly Setpoints and
other setup parameters) from GCL in an Application Controller on LINKnet, write your programs
so they are not being commanded on every program scan. Use I
FONCE or DOEVERY statements to
key execution to specific events or time intervals, and thereby limit the frequency of such
commands. Otherwise you may severely diminish the life of the BACstat in terms of storing these
values in memory (since EEPROM only allows a finite number of writes).
N
OTE: This is not quite the same issue when controlling the LCD display by commanding
properties of the LCD object in GCL programming. You may command these values and
properties as often as you require, but it is still recommended practice to use D
OEVERY statements.
And of course, you may read any object value as often as you can – there is no issue with reading.
3. C
OMMAND PRIORITY: Note that both GCL programs and user commands (i.e., manual mode) have
the same write priority for all objects in a BACstat. There are no priority arrays or command
hierarchy. Whatever commands the object last is the value the object will have. Therefore, write
your GCL programs so as to minimize any conflicts with acceptable user commands (such as
temporary or fixed overrides).
4. GCL
PROGRAMMING WITH TEMPERATURE UNITS: It is possible in GCL programming to specify
the temperature units when writing to lines 2 and 3 of the LCD display. Here is a table of example
programming, which is dependent on the firmware version loaded in the Application Controller.
Description GCL used with V3.22 Firmware GCL used with V3.30 Firmware
Temperature on line 2
with º symbol:
LCD101.LINE2 = AI101 & “^” LCD101.LINE2 = AI101
LCD101.LINE2UNITS = 1
Temperature on line 3
with ºC symbol:
LCD101.LINE3 = AI101 & “^C” LCD101.LINE3 = AI101
LCD101.LINE3UNITS = 2
Temperature on line 3
with ºF symbol:
LCD101.LINE3 = AI101 & “^F” LCD101.LINE3 = AI101
LCD101.LINE3UNITS = 3
5. GCL PROGRAMMING & KEYPRESS VALUES: In GCL programming you can evaluate the
KeyPress object (AV4) to determine which BACstat button has been pressed, or any 2-button
combination. Where two buttons are pressed, the first button represents the hundreds digit and the
second button represents the units digit of a 3 digit number. Note that processing KeyPress values
is disabled when using the Configuration or Service Tool menu. Here is the list of KeyPress values.
Butto
n
Val
ue
Button
Value
Button
Value
Button
Value
Button
Value
O 1 O + I 102 I + O 201
▼ + O
301
▲ + O
401
I 2
O +▼
103
I +▼
203
▼ + I
302
▲ + I
402
▼
3
O + ▲
104
I + ▲
204
▼+▲
304
▲ +▼
403
▲
4
6. GCL PROGRAMMING TO RESET THE KEYPRESS VALUE TO 0: Normally the KeyPress value
(AV4) only changes when a new button or button-combination is pressed, and under these
conditions it is not possible to detect that the same button has been pressed again. With Release 3
firmware you can now reset the KeyPress value after you have read it, allowing you to detect when
the same button gets pressed again. The following is an example of resetting the KeyPress value
back to zero (using a mapped AV in the DAC), assuming you have already read the value.