User program examples
PCD7.D250
Page 8-20
SAIA-Burgess Electronics Ltd.
(D25-08-E.DOC)
26/770 E1
8.4.3
Recognition of a pressed key with a following action
in GRAFTEC
;+-----------------------------------------------------------------------+
;|
|
;|
User program example 8.4.3 for the industrial terminal PCD7.D250
|
;|
==================================================================== |
;|
The program is structured in GRAFTEC
|
;|
|
;|
File:
NDEMO43.SRC
|
;|
|
;|
Creation:
29.01.97
U.Jäggi/T.Hofer
|
;|
Modified:
07.02.00
C. Bruegger
|
;|
|
;+-----------------------------------------------------------------------+
TEXT
1
"<12>"
; Clear display
"<27><84>"
; Cursor off
"
Main menu
F1<10><13>"
"
I/O
0..23
F2<10><13>"
"
BCD-Switch
F3<10><13>"
"
Date/Time
F4"
TEXT
2
"<12>"
; Clear display
"
Input Status <10><13>"
"
I0..7
:$I0000 <10><13>"
"
O16..23:$O0016 <10><13>"
"
Main menu
F1"
TEXT
3
"<12>"
; Clear display
"
BCD-Value I0...7 <10><13>"
"
---------------- <10><13>"
"
Value
: $R0010 <10><13>"
"
Main menu
F1"
TEXT
4
"<12>"
; Clear display
"
Date : $D<10><13>"
"
Week : $W<10><13>"
"
Time : $H<10><13>"
"
Main menu
F1"
TEXT
5
"<27><64><77><49>"
; Display mode:4 x 20
TEXT
10
"<ESC>@B"
; Poll command
TEXT
100
"UART:9600,8,E,1;MODE:MC0;DIAG:O16,R100"
; Symboldefinitions
;===========================================================================
; Diagnostic outputs serial interface
;------------------------------------
RBSY
EQU
O
16
; Receiver Busy
RFUL
EQU
O
RBSY+1
; Receive Buffer Full
RDIA
EQU
O
RBSY+2
; Receiver Diagnostic
TBSY
EQU
O
RBSY+3
; Transmitter Busy
TFUL
EQU
O
RBSY+4
; Transmit Buffer Full
TDIA
EQU
O
RBSY+5
; Transmitter Diagnostic
XBSY
EQU
O
RBSY+6
; Text Busy
NEXE
EQU
O
RBSY+7
; Not Executed
;--------------------------------
; Function/Program blocks
;--------------------------------
READ
EQU
FB
0
; Read character
SEND
EQU
FB
1
; Send text
COMPARE
EQU
PB
0
; Compare received character
;--------------------------------
; Register
;--------------------------------
RBUF_R
EQU
R
1000
;
.