Download 3 Programming the Handheld Terminal

Transcript
KeTop T40
Handheld Terminal
Serial Gateway Coupling
User’s Manual V 1.1
Notes on This Manual
At various points in this manual you will see notes and precautionary warnings regarding possible hazards. The meaning of the symbols used is explained below.
! DANGER
z
DANGER indicates an imminently hazardous situation which, if not avoided, will
result in death or serious injury.
! WARNING
z
WARNING indicates a potentially hazardous situation which, if not avoided,
could result in death or serious injury.
! CAUTION
z
CAUTION indicates a potentially hazardous situation which, if not avoided, may
result in minor or moderate injury.
CAUTION
z
CAUTION used without the safety alert symbol indicates a potentially hazardous
situation which, if not avoided, may result in property injury.
This symbol reminds you of the possible consequences of touching
electrostatically sensitive components.
Note
Notes on use of equipment and useful practical tips are identified by the
“Notice” symbol. Notices do not contain any information that draws attention to potentially dangerous or harmful functions.
© KEBA 2005
Specifications are subject to change due to further technical developments. Details presented may be subject to correction. All
rights reserved.
Document: version 1.1 / material no.: 62010
Filename: t40_gateway_en.doc, last saving on: 9. 12. 2004
KEBA AG, Postfach 111, Gewerbepark Urfahr, A-4041 Linz
Tel.: ++43 / 732 / 70 90-0, Fax: ++43 / 732 / 73 09 10, E-Mail: [email protected], www.keba.com
KEBA GmbH, Ulmer Straße 123, D-73037 Göppingen
Tel.: ++49 / 7161 / 97 41-0*, Fax: ++49 / 7161 / 97 41-40
KEBA Corp., 100 West Big Beaver Road, Troy, MI 48084
Tel. ++1 / 248 / 526 - 0561, Fax: ++1 / 248 / 526 - 0562, E-Mail: [email protected]
Handheld Terminal
Contents
History
Modification
from / to
V1.0
V1.0/V1.1
Date
8-2002
12-2004
Modified
pages
all
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Description
Author
First release
New Layout
sam
sam
3
Contents
4
KeTop T40
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Handheld Terminal
Contents
Contents
1
Introduction.....................................................................................................................................7
2
Connection ......................................................................................................................................8
3
Programming the Handheld Terminal ..........................................................................................9
Programming Software .............................................................................................................9
Configuration.............................................................................................................................9
4
HT Power-Up Phase after Turning On ........................................................................................10
5
Protocol .........................................................................................................................................11
MMI-COM................................................................................................................................11
Overview of Functions ............................................................................................................18
Serial Side (KeTop -> Gateway) .............................................................................................21
Structure of Telegrams ...........................................................................................................21
Bus Side (Gateway <-> SPS) .................................................................................................24
6
HT System Variables ....................................................................................................................25
7
HT Functions.................................................................................................................................27
Keypad ....................................................................................................................................27
LEDs .......................................................................................................................................35
Texts .......................................................................................................................................42
Text Monitor ............................................................................................................................53
PLC activates Signal Buzzer on KeTop T40...........................................................................55
Menu Access/Exit ...................................................................................................................56
System Reset..........................................................................................................................56
Graphic Functions...................................................................................................................57
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
5
Serial Gateway Coupling
Introduction
1 Introduction
This document is a supplement to the User's Manual "KeTop T40 Handheld
Terminal - General Information" and describes the serial gateway protocol.
For a detailed description of the programming, the special functions and the
key labelling of the HT, please refer to the User's Manual "KeTop T40
Handheld Terminal - General Information".
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
7
Connection
KeTop T40
2 Connection
The serial gateway box can be connected to the handheld terminal via the
serial interface COM2. By means of DIP switches, this interface must be
configured as:
COM2:
RS-422-A
See also User's Manual "KeTop T40 Handheld Terminal - General Information", chapter "Connection".
KETOP T40
KETOP
RS-422-A
KETOP CB320 for
KETOP CB233 for
KETOP CB234 for
KETOP CB235 for
KETOP CB236 for
MPI
PROFIBUS-DP
InterBus
DeviceNet
CAN oder CANopen
CP 450/C
DIAG
0
4
RX
DEBUG
TX
PCI2
PCI0
RX 450/A
RX 450/A
SI1
COMPACT FLASH
SI0
CT RL
RS 450/A
S TA TU S
12
8
SI1
1
PLC
USB1
BATTE RY
PCI3
PCI1
RX 450/A
RX 450/A
SIM 1
SIM 0
K-CAN
ETHERNET
USB0
9
Connection of HT via gateway box
8
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
Programming the Handheld Terminal
3 Programming the Handheld Terminal
Programming Software
For setting the device configuration and creating texts, we deliver a programming software which is executable under Windows.
The programming of the handheld terminal is described in detail (e.g. functions for editing the keypad assignment and for loading the program) in the
User's Manual "KeTop T40 Handheld Terminal - General Information" and
applies in general also to the serial gateway coupling.
Therefore the following chapter only describes the specific details of the
gateway coupling.
Configuration
Selection of protocol
After selection of the protocol „Seriell Gateway MMI-COM“ the following
parameters must be set:
Interface
Selection of required interface.
Baudrate
Selection of baud rate required for transmission: 9600, 19200, 38400,
57600, 115200 Baud.
Parity
The setting of priority is NO and cannot be changed.
Data bit
The number of data bits is 8 and cannot be changed.
Stop bit
The number of stop bits is 1 and cannot be changed.
Numbering of variables
For the serial use of the HT the following restriction must be taken into account in the text editing mode:
User variables may be defined only from variable number 100 on. The
range from 1 to 99 is reserved for the system variables (see also chapter
"HT System Variables").
EXCEPTION: string variables (numbering from 0 to 255)
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
9
HT Power-Up Phase after Turning On
KeTop T40
4 HT Power-Up Phase after Turning On
The handheld terminal carries out a self-test after turning on. For details on
the test steps, refer to the User's Manual "KeTop T40 Handheld Terminal General Information".
► The first part of the test is identical for all KeTop T40 couplings and
therefore described in the User's Manual "KeTop T40 Handheld
Terminal - General Information".
► Then the configuration data are loaded.
The following message is displayed:
Serial Gateway
Vx.x
Initializing...
In case of an error, the handheld terminal remains in this condition.
► After the configuration data have been loaded successfully, the
following mask appears on the display:
Serial Gateway
Vx.x
Profile: MMI-COM
Channel: COMn, mmmmm
ooooo,NO,8,1
x
n
m
o
program version
number of interface port
type of interface ( RS232 or RSxx2 for RS232/RS422)
baud rate (9600, 19200, 38400, 57600, 115200 Baud)
► After approx. 1 second, the display indicates:
Serial Gateway
Vx.x
Wait for
gateway connection
After successful establishment of the communication with the gateway box
and after successful loading of the serial configuration data, the interface
parameters will be displayed again.
This message remains displayed until it is overwritten by a text activated by
the PLC.
10
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
Protocol
5 Protocol
The coding of the telegrams is based on the MMI-COM profile which was
specified for operating and display panels used on the INTERBUS.
MMI-COM
MMI-COM signifies „Man Machine Interface-Communication“. This profile
definition standardizes the communication so that every station interprets
the data in the same way. Functions standardize some essential parameters of an MMI device.
The communication model of MMI-COM is based on the fact that data are
sent to objects or by objects. The objects are addressed with a number (index). In general, the connection with the index specifies how the data are to
be interpreted. The bitmap 01000001 can for example stand for the binarycoded number 65, for the BIT-coded number 41, for the ASCII character A,
for two keys pressed simultaneously or for the request to turn on the
buzzer.
Handshaking
The header consists of the following 16 bits:
Fault
Handshake
receiving
Handshake
sending
Standard
Index
Reserved
Reserved
Bit No.
On-line
Header
7
6
5
4
3
2
1
0
Byte 1
Index
7
6
5
4
3
2
1
0
Byte 2
The first header byte contains the handshake information for both applications.
The second header byte contains the index and describes the contents of
the subsequent data part.
The following description of the bits of byte 1 refers to both the PLC and the
KeTop T40. Therefore device may be the PLC or the KeTop T40 depending
on the direction.
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
11
Protocol
KeTop T40
On-line (bit 7)
This bit indicates that the device is ready for receiving. If the device is not
on-line, no messages should be sent to the device. Irrespective of that, the
device may send data. The on-line bit and the fault bit do not depend on
each other.
Fault (bit 6)
This bit indicates a fault on the device. If the device is on-line a fault code
can be requested.
Handshake receiving (bit 5)
This bit is set after a message is received. With each message received,
the state of this bit changes:
When the first message is received, the state changes from 0 to 1. When
the next message is received, the state changes from 1 to 0 again.
Handshake sending (bit 4)
This bit signalizes the sending of a new message. With each message
sent, the status of this bit changes:
When the first message is sent, the state changes from 0 to 1. When the
next message is sent, the state changes from 1 to 0 again.
Standard bit (bit 3)
This bit defines the assignment of the data field for the process data transmission. In this case, the significance of the PD index is standardized. If
this bit is not set, that means that the significance of the field is manufacturer-specific.
Index bit (bit 2)
This bit defines the existence of an index field in the byte 2 of the header
byte. Therefore it is always set to 1.
The following diagram shows an example of handshaking in the MMICOM protocol between PLC and KeTop T40.
12
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
The PLC is the client and
sends the 2nd message.
The state of the send bit
changes (1 -> 0).
The PLC is the server and
confirms the message by
changing the state of its
receive bit (0 -> 1).
At the same time the PLC
is the client again
and sends a message.
The state of the send bit
changes (0 -> 1).
The PLC is the server and
confirms the message by
changing the state of its
receive bit (1 -> 0).
On-line
Fault
Receiving
Sending
Standard
Index
The PLC is the client and
sends the 1st message.
The state of the send bit
changes (0 -> 1).
1 0 0 0 1 1 x x
1 0 0 0 1 1 x x
Situation
1 0 1 0 1 1 x x
Confirm
(Server)
1 0 0 0 1 1 x x
Confirm
(Server)
1 0 0 1 1 1 x x
Sending
(Client)
1 0 1 1 1 1 x x
Confirm
(Server)
1 0 1 0 1 1 x x
Sending
(Client)
Situation
Sending
(Client)
1 0 0 1 1 1 x x
Sending
(Client)
Sending
(Client)
Confirm
(Server)
KETOP T40
On-line
Fault
Receiving
Sending
Standard
Index
SPS
Protocol
The KETOP T40 is the server
and confirms the message by
changing the state of its
receive bit (0 -> 1).
1 0 0 0 1 1 x x
The KETOP T40 is still the server
and confirms the next message
again by changing its
receive bit (1 -> 0).
The KETOP T40 is the client
and sends a message. The
state of its send bit
changes (0 -> 1).
1 0 1 1 1 1 x x
The KETOP T40 is the server
again and confirms the
message by changing the state
of its receive bit (0 -> 1).
The KETOP T40 is the client
and sends a message. The
state of its send bit changes
(1 -> 0).
1 0 0 1 1 1 x x
Handshaking between PLC and KeTop T40
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
13
Protocol
KeTop T40
a) Receiving Data
MMICOM
Receive
Read IN-Data
ONLINE_BIT (IN) == 1
&
DISTURBANCE_BIT (IN) == 0
?
N
Y
SEND_BIT (IN)
<>
RECV_BIT (OUT) ?
N
Y
RECV_BIT (OUT) = SEND_BIT (IN)
ONLINE_BIT (OUT) = 1
DISTURBANCE_BIT (OUT) = 0
Write OUT-Data
INDEX_BIT (IN) == 1 ?
N
Y
Analyze Index
&
Execute Order
Error
Handling
END
Handshaking when receiving data
14
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
Protocol
b) Sending Data
The KeTop T40 tests if the receive bit of the partner station has the same
state as the own send bit. If this is the case the
device will be able to send data. The corresponding data and the index will be copied to the output buffer.
Notice
To avoid inconsistent data in the message at bus systems with cyclic data
transfer (e.g. PROFIBUS, InterBus), the first header byte containing the
toggled send bit must always be written as last byte.
Following that the send bit of the send station will be inverted to indicate the
sending. The handshake of the partner statioin is monitored. If the counterpart station does not respond within 1 s, the send bit will be toggled.
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
15
Protocol
KeTop T40
MMICOM
Send
Read IN-Data
ONLINE_BIT (IN) == 1 ?
N
Y
SEND_BIT (IN)
==
RECV_BIT (OUT) ?
N
MMICOM
Receive
Y
N
Timeout ?
RECV_BIT (IN)
==
SEND_BIT (OUT) ?
Y
N
Y
SEND_BIT (OUT) == 0 ?
N
Y
SEND_BIT (OUT) = 1
A
16
SEND_BIT (OUT) = 0
Error
Handling
B
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
Protocol
B
A
ONLINE_BIT (OUT) = 1
DISTURBANCE_BIT (OUT) = 0
INDEX_BIT (OUT) = 1
STANDARD_BIT (OUT) = 1 / 0
Copy Index & Data
Write OUT-Data
N
Read IN-Data
Timeout
1 sec ?
RECV_BIT (IN)
==
SEND_BIT (OUT) ?
Y
N
SEND_BIT (OUT) == 0 ?
N
Y
Y
SEND_BIT (OUT) = 1
SEND_BIT (OUT) = 0
Write OUT-Data
END
Handshaking when sending data
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
17
Protocol
KeTop T40
Overview of Functions
The following table shows an overview of the services that constitute the
base of the particular handheld terminal functions.
Services are request telegrams that are sent from a send station (client) to
a receive station (server). In the data fields, the user data defined by the index are transmitted.
Standard Objects
Header
Byte 1
Reserved
Byte 2
Index
(HEX)
Data fields
Byte 3
Byte 4
Byte 5
Byte 6
Key status
(group 2)
keys 9 to 16
Key status
(group 3)
keys 17 to 24
Key status
(group 4)
keys 25 to 32
Byte 7
Byte 8
Keypad
PLC <- HT
10: Send key
status
PLC <- HT
12:Send key
number
13: Send key
code
PLC <- HT
Key status
(group 1)
keys 1 to 8
Length=1
Key number
Length=2
Key code
LEDs
PLC -> HT
PLC -> HT
PLC -> HT
PLC -> HT
20: Send
LED status
21:Send LED
group
22: Set LED
color
23: Send
LED No.
LED status
(group 1)
Number of
groups n
LED status
(group 2)
LED group
No. x
LED attribute
LED attribute
LED No.
LED status
(group 3)
LED status
group x
LED status
(group 4)
LED status
group x+1
LED status
(group 5)
...
LED status
group x+ (n/8)
Texts
PLC -> HT
18
25: Display
text No.
Display
attribute
Text number
(binary-coded)
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
Header
Byte 1
Reserved
Byte 2
Index
(HEX)
Data fields
Byte 3
Protocol
Byte 4
Byte 5
Byte 6
Byte 7
Byte 8
Variables
PLC -> HT
PLC -> HT
PLC -> HT
PLC -> HT
PLC -> HT
PLC -> HT
PLC -> HT
PLC -> HT
PLC -> HT
PLC -> HT
PLC <-> HT
PLC <-> HT
PLC <-> HT
PLC <-> HT
PLC <-> HT
14: Send
1-byte
variable
15: Send
2-byte
variable
16: Send
4-byte
variable
17:
Send floating
point
18:
Send bytes
2A: Display
1-byte
variable
2B: Display
2-byte
variable
2C: Display
4-byte
variable
2D: Display
floating point
2E: Display
bytes
40: Request
1-byte
variable
41: Request
2-byte
variable
42: Request
4-byte
variable
43: Request
floating point
44: Request
bytes
b15
Variable No.
b0
b7
b0
Value of var.
b15
Variable No.
b0
b15
Value of variable
b15
Variable No.
b0
b31
Value of variable
b15
Variable No.
b0
1st byte
2nd byte
3rd byte
4th byte
1st byte
2nd byte
...
...
Length
b15
Variable No.
Variable No.
b0
b15
Variable No.
b0
b15
Value of variable
b15
Variable No.
b0
b31
Value of variable
b15
Variable No.
Length
b0
1st byte
2nd byte
3rd byte
4th byte
1st byte
2nd byte
...
...
Text
characters
...
...
...
Variable No.
b15
Variable No.
b0
b15
Variable No.
b0
b15
Variable No.
b0
b15
Variable No.
Length
b0
Variable No.
Number of
characters
Cursor
x-position
Display
attribute
Cursor
y-position
b0
b0
b7
b0
Value of var.
b0
b0
Text monitor
PLC -> HT
PLC -> HT
28:Send text
characters
29: Position
cursor
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
19
Protocol
KeTop T40
Manufacturer-Specific Objects
Header
Byte 1
Reserved
Byte 2
Index
(HEX)
Data fields
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7
Byte 8
Line
Display
attribute
Text number binary
Number of
follow-up
texts
0
x
y
x0
y0
x1
y1
x0
y0
x1
y1
fill
x
y
r
x
y
rx
ry
fill
x
y
len
Font size
Font attribute
Text
character
Bitmap of line
....
....
....
....
fg
bg
x0
y0
x1
y1
x
y
Texts
PLC -> HT
A0: Display text
number
Graphic functions
PLC -> HT
PLC -> HT
PLC -> HT
PLC -> HT
PLC -> HT
PLC -> HT
PLC -> HT
PLC -> HT
B0:
Pixel
B1:
Line
B2:
Rectangle
B3:
Circle
B4:
Ellipsis
B5:
Text 1
B6:
Text 2
BA: Set line
...
type
PLC -> HT
PLC -> HT
SPS -> HT
B9:
Set color
B8: Clear
window
BB: Display
Bitmap
Bitmap-No.
General functions
PLC -> HT
20
A4:
Clear screen
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
Protocol
Serial Side (KeTop -> Gateway)
Structure of Telegrams
Request Telegram
The request telegrams always have a length of 11 bytes. They consist of:
z
3 bytes of control characters (STX, ETX, BCC) and
z
8 bytes of MMI-COM data (2 bytes header und 6 bytes data part)
The first byte contains the handshake information between the handheld
terminal and the PLC.
The second byte in the header contains the index number which stands for
a certain command. The structure of the data fields (user data) is defined
by the corresponding index.
11 bytes request telegram
8 bytes MMI-COM data
2 bytes Header
Byte 1
Byte 2
STX
Handshake
Byte 3
Byte 4
6 bytes data
Byte 5
Byte 6
Byte 7
Byte 8
ETX
BCC
Index
Control character:
STX ... Start transfer
ETX ... End transfer
BCC ... Block check character
The description of the request telegram in the chapters "HT System Variables“ and "HT Functions" only refers to the MMI-COM data part without control characters.
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
21
Protocol
KeTop T40
Confirmation Telegram
After receipt of a message, the BCC wil be checked, and, depending
on the result, a positive or negative acknowledgement will be sent.
ACK
positive confirmation
(BCC correct)
NAK
negative confirmation
(BCC wrong)
If the confirmation telegram is negative (NAK) the request telegram must be
repeated.
Checksum Calculation
The value of the BCC byte is calculated by an XOR logic of the telegram
bytes from STX up to and including ETX.
Example
The red LED No. 34 on the handheld terminal should be turned on by using
the service 23H "Send LED No.".
PLC -> HT
Index
23: Send
LED No.
Data fields
LED attribute
LED No
23H
xx
xx
The service 23H "Send LED No." contains the following HEX values:
Header
Data fields
Bytes 1-2
Bytes 3-8
STX
Index
Send LED-No.
LED attribute
LED number
ETX BCC
1X000001
02H 00H 23H 81H 22H 00H 00H 00H 00H 03H 81H
XOR
22
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
Protocol
Example: Serial Protocol
Gateway box
PLC
KETOP T40
8
12
0
4
DI AG
TX
RX
PC I2
PC I0
RX4 50 /A
RX4 50 /A
SI 1
CO M PAC T FLAS H
SI 0
CTRL
RS 45 0/A
STA TUS
CP 45 0/C
SI 1
DE BU G
1
US B 1
B AT TE R Y
PC I3
PC I1
RX 45 0/A
RX 45 0/A
KETOP
S IM 1
S I M0
K- CA N
ET HER NE T
US B 0
9
PLC request: e.g. turn on LED
8 bytes MMI-COM data
STX
8 bytes MMI-COM data
ETX BCC
ACK
positive confirmation
KETOP request:
e.g. send key depression
STX
negative confirmation
NAK
ETX BCC
Repetition:
KETOP request:
send key depression
STX
positive confirmation
8 bytes MMI-COM data
8 bytes MMI-COM data
ETX BCC
ACK
8 bytes MMI-COM data
Example: serial protocol
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
23
Protocol
KeTop T40
Bus Side (Gateway <-> SPS)
The data transport between gateway and PLC depends on the bus system
used.
Notice
At bus systems with cyclic data transfer (PROFIBUS-DP, InterBus) the
consistency of the data to be sent must be ensured on the PLC side. That
means, the send bit in the MMI-COM header must only be toggled when
the complete subsequent data part is contained in the output buffer.
24
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
HT System Variables
6 HT System Variables
System variables offer additional functions to the user. If the system variables are sent with the corresponding index, they
can activate and deactivate certain functions on
the handheld terminal (e.g. automatic sending of
keycodes).
The system variables range from 1 to 99 and must not be used by the
user.
System variables distinguish 1-byte, 2-byte and 4-byte variables.
Var.
No.
Designation
Data
type
Access
HT PLC
Default
value
Description
1-byte variables
1
(01H)
2
(02H)
3
(03H)
4
(04H)
5
(05H)
6
(06H)
7
(07H)
8
(08H)
9
(09H)
10
(0AH)
11
(0BH)
12
(0CH)
13
(0DH)
14
(0EH)
15
(0FH)
16
(10H)
17
(11H)
18
(12H)
reserved
-
-
-
-
-
reserved
-
-
-
-
-
reserved
-
-
-
-
-
reserved
-
-
-
-
-
reserved
-
-
-
-
-
BEEP
BOOL
R/W
FALSE
Buzzer activation (permanent tone)
KEY_CLICK_PRESSED
BOOL
R/W
FALSE
Keyclick when a key is pressed
SEND_PRESSED_KEY_NR
BOOL
R/W
FALSE
SEND_RELEASED_KEY_NR
BOOL
R/W
FALSE
reserved
-
-
-
-
The HT sends the key number when a
key is pressed.
The HT sends the key number when a
key is released.
-
reserved
-
-
-
-
-
reserved
-
-
-
-
-
SEND_KBD_MAP
BOOL
R/W
FALSE
reserved
-
-
-
-
The HT sends the key bitmap when a
key is pressed or released.
-
reserved
-
-
-
-
-
reserved
-
-
-
-
-
SYSTEM_RESET
UINT8
W
-
System reset at bitmap 55H
FETCH_TEXT_VAR
BOOL
W
FALSE
19
(13H)
20
(14H)
21
(15H)
22
(16H)
SEND_PRESSED_KEY_CODE
BOOL
R/W
FALSE
ORDER_BOX
UINT8
W
-
KEY_CLICK_RELEASED
BOOL
R/W
FALSE
In case of a text call, the HT requests
once all output variables contained in
the text.
The HT sends the key code when a key
is pressed.
Order box of master station:
1 ... Request key bitmap
Keyclick when a key is released.
EVENT_VAR_NOT_ON_SCREE
N
BOOL
R/W
FALSE
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Event message indicating when a
variable is written, for which no output
field is provided on the display =>
EVENT_CODE
25
HT System Variables
KeTop T40
Var.
No.
Designation
Data
type
23
(17H)
DISABLE_MENU
BOOL
24
(18H)
25
(19H)
26
(1AH)
27
(1BH)
28
(1CH)
29
(1DH)
30
(1EH)
31
(1FH)
32
(20H)
DISABLE_EDITOR
BOOL
reserved
-
reserved
Access
HT PLC
Default
value
Description
R/W
FALSE
R/W
FALSE
-
-
-
Enabling (0) or disabling (1) the
activation of the main menu (activation
by pressing 1st and 4th key)
Enabling(0) or disabling(1) of variables
input on HT
-
-
-
-
-
-
reserved
-
-
-
-
-
EVENT_MENU
BOOL
R/W
FALSE
KBD_LOCKED
BOOL
R/W
FALSE
NEXT_FIELD_AFTER_ENTER
BOOL
R/W
TRUE
SEND_RELEASED_KEY_CODE
BOOL
R/W
FALSE
AUTO_KEY_REPEAT
BOOL
R/W
FALSE
Event message on menu access and
exit => EVENT_CODE
Enabling (0) or disabling (1) of the
keypad on the HT
Cursor appears in next input field after
pressing Enter.
The HT sends the key code when a key
is released.
Automatic repetition while key is
pressed.
-
-
-
2-byte variables
1
(01H)
2
(02H)
3
(03H)
4
(04H)
5
(05H)
6
(06H)
7
(07H)
8
(08H)
reserved
-
-
FETCH_TEXT_VAR_CYCLE_TI
ME
BEEP_TIME
UINT16
R/W
0
UINT16
R/W
0
APPLICATION_SW_VERSION
UINT16
R
-
DEVICE_TYPE
UINT16
R
-
Cycle time in ms at which the HT
requests all output variables displayed.
Buzzer activation (duration of beep in
ms)
Version of HT application software
Vx.y: High Byte -> x, Low Byte -> y
40 ... KeTop T40
reserved
-
-
-
-
-
reserved
-
-
-
-
-
AUTO_KEY_DELAY_TIME
UINT16
R/W
250
Repetition rate in ms.
4-byte variables
1
(01H)
2
(02H)
ERROR_CODE
UINT32
W
R
EVENT_CODE
UNIT32
W
R
Error message HT -> PLC
(not used at present)
Event message HT -> PLC:
Bit 24 - 31: event number
Bit 0 – 23: event-related information
Access
R
W
Read
Write
Value ranges of data types used
BOOL
UINT8
UINT16
UINT32
26
Boolean Number (0 = FALSE, 1 = TRUE)
integral number without sign (0...255)
integral number without sign (0...65535)
integral number without sign (0...4294967295)
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
HT Functions
7 HT Functions
The request telegrams always have a length of 11 bytes (2 bytes header +
6 bytes data fields=8 bytes MMI-COM data and 3 bytes control characters).
The description of the request telegrams in the following chapters only refers to the 8-byte MMI-COM data.
Keypad
The following drawing shows the physical grouping of the HT keys and the
assignment of the particular keys to the bits of the parameter "key group n".
At the KeTop T40 this grouping and assignment is identical for the LEDs of
the keypad.
Physical Grouping
Bitmap key group 1
1
2
3
4
5
6
7
8
7 6 5 4 3 2 1 0
Key group 1
= Bit number
Bitmap
key groups 2, 3, 4
Key group 2
9
10
11
12
13
14
15
16
Key group 3
17
18
19
20
21
22
23
24
Key group 4
25
26
27
28
29
30
31
32
7 6 5 4 3 2 1 0
= Bitnumber
Key groups of KeTop T40 keypad
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
27
HT Functions
KeTop T40
Audible Keyclick
When the 1-byte system variable No. 7 (07H) "KEY_CLICK_PRESSED" is
set, the handheld terminal confirms the pressing of a key with an audible
signal. When the system variable No. 21 (15H) "KEY_CLICK_RELEASED"
is set, the HT confirms the releasing of a key with an audible signal.
The telegram required for setting the system variable is structured as follows:
for KEY_CLICK_PRESSED:
PLC -> HT
Index
14: Send
1-byte
variable
Data fields
b15
Variable No.
14H
00H
b0
07H
b7
b0
Value of var.
01H
for KEY_CLICK_RELEASED:
PLC -> HT
Index
14: Send
1-byte
variable
Data fields
b15
Variable No
14H
00H
b0
15H
b7
b0
Value of var.
01H
For deactivating the keyclick, the corresponding system variable must be
reset. The telegram is sent once again, but this time with the variable value
00H.
Variable No.
Value of variable
28
This parameter identifies the variable.
This parameter contains the value of the variable.
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
HT Functions
Sending Key Status to the PLC
When the 1-byte system variable No.14 (0DH) "SEND_KBD_MAP" is set
on the HT, the key bitmap is automatically sent to the PLC when a key is
pressed or released on the HT.
The telegram required for setting the system variable is structured as follows:
PLC -> HT
Index
14: Send
1-byte
variable
Data fields
b15
Variable No.
14H
00H
b0
0DH
b7
b0
Value of var.
01H
From that time on, a telegram with the current key status will be sent to the
PLC each time a key is pressed or released on the handheld terminal (service 10H: "Send key status"):
PLC <- HT
Index
10: Send key
status
Data fields
Key status
(group 1)
Key status
(group 2)
Key status
(group 3)
Key status
(group 4)
10H
xx
xx
xx
xx
Key status
(group n)
This parameter contains the key status of the corresponding key
group. For the assignment of the keys, see drawing in chapter
„Keypad“.
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
29
HT Functions
KeTop T40
Requesting Key Status from the HT
When the value 1 is written to the 1-byte system variable No. 20 (14H)
"ORDER_BOX" on the HT, the HT sends the current key bitmap once to
the PLC.
The telegram required for requesting the HT key status is structured as follows:
PLC -> HT
Index
14: Send
1-byte
variable
Data fields
b15
Variable No.
14H
00H
b0
14H
b7
b0
Value of var.
01H
After receiving the telegram, the HT responds once using the service 10H
"Send key status":
PLC <- HT
30
Index
10: Send key
status
Data fields
Key status
(group 1)
Key status
(group 2)
Key status
(group 3)
Key status
(group 4)
10H
keys 1-8
xx
keys 9-16
xx
keys 17-24
xx
keys 25-32
xx
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
HT Functions
Sending Key Number to the PLC
2 possibilities are available for sending a key number to the PLC:
When the 1-byte system variable No. 8 (08H)
"SEND_PRESSED_KEY_NR" is set on the HT, the HT sends the key number to the PLC each time the corresponding key is pressed on the HT. The
variable must be set once only (e.g. in the power-up phase).
PLC -> HT
Index
14: Send 1byte variable
Data fields
b15
Variable No.
14H
00H
b0
08H
b7
b0
Value of var.
01H
When the 1-byte system variable No. 9 (09H)
"SEND_RELEASED_KEY_NR" is set on the HT, the HT sends the key
number each time the corresponding key is released on the HT. The variable must be set once only (e.g. in the power-up phase).
PLC -> HT
Index
14: Send 1byte variable
Data fields
b15
Variable No.
14H
00H
b0
09H
b7
b0
Value of var.
01H
After receiving one of the two telegrams, the HT sends, each time a key is
pressed or released, the key number (1-32) to the PLC using the service
12H "Send key number":
PLC <- HT
Index
12:Send key
number
Data fields
Length=1
Key number
12H
01H
xx
Key number
This parameter contains the corresponding physical key number
(see drawing in chapter "Keypad“) when the status of a key changes
(key is pressed or released). The key number ranges from 1 to 32.
The highest-order bit contains the information indicating whether the
key has been pressed or released:
1 Byte
Key number 1-32
1...Key pressed
0...Key released
Sending Key Code to the PLC
When the 1-byte system variable No. 19 (13H)
"SEND_PRESSED_KEY_CODE" is set on the HT, the HT automatically
sends the logic key code defined during programming to the PLC each time
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
31
HT Functions
KeTop T40
a key is pressed on the HT. For sending, the service 13H "Send key code"
is used. The variable must be set once only (e.g. in the power-up phase).
PLC -> HT
Index
14: Send
1-byte
variable
Data fields
b15
Variable No.
14H
00H
b0
13H
b7
b0
Value of var.
01H
When the 1-byte system variable No. 31 (1FH)
"SEND_RELEASED_KEY_CODE" is set on the HT, the HT sends the key
number each time the corresponding key is released on the HT. The variable must be set once only (e.g. in the power-up phase).
PLC -> HT
Index
14: Send 1byte variable
Data fields
b15
Variable No.
14H
00H
b0
1FH
b7
b0
Value of var.
01H
After receiving one of the two telegrams, the HT sends, each time a key is
pressed or released, the key number (1-32) to the PLC using the service
13H "Send key code":
PLC <- HT
Index
13: Tastencode senden
Data fields
Länge=2
Tastencode
13H
02H
xx
Key code
xx
When the key status changes (key is pressed or released), this parameter contains the logic key code (according to the configured keypad
layout).
1st byte
2nd byte
Logic key code 0 - 255
1 ... Key pressed
0 ... Key released
32
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
HT Functions
Example: Sending Key Status of HT to the PLC
The handheld terminal should send the entire key bitmap to the PLC each
time a key is pressed and released.
This function is for example suitable for a jogging mode to be executed via
the handheld terminal. The pressing and releasing of the key is transmitted
to the process data image (memory) of the PLC.
PLC
KETOP T40
CP 4 50 /C
D IA G
0
4
CTRL
RX
D EBU G
TX
PC I 2
PC I 0
RX 45 0/A
RX 45 0/A
SI 1
C OM PA CT F LAS H
SI 0
RS 45 0 /A
STA TUS
12
8
SI 1
1
U SB 1
BATTERY
PC I 3
PC I 1
RX 45 0 /A
RX 45 0 /A
Header
Data fields
Bytes 3-8
Bytes 1-2
Bytes 3-8
Index
Data fields
value of variable
1 14H 00H 0DH 01H
Variable no.
0DH (13) -> SEND_KEYMAP
Send bit
0
Header
*)
Receive bit
Client
KETO P
Bytes 1-2
Send bit
*)
Receive bit
SIM 1 SIM 0
K- C AN
ET HE RN ET
U SB 0
9
1
0
Server
Confirmation
Send 1-byte variable
Index
Pressing a key
Key status
1 1 10H 01000000 00000000 00000000 00000000 00000000
Client
Send key status
Server
1
0
Confirmation
Index
Releasing
a key
Key status
1 0 10H 00000000 00000000 00000000 00000000 00000000
Client
Send key status
Server
0
1
Confirmation
st
*) To get a better overview, only the receive bit and the send bit of the 1 byte of the control/status word
are shown.
Example: Sending key status of the KeTop T40 to the PLC
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
33
HT Functions
KeTop T40
After turning on, the HT does NOT send the key bitmap automatically when
the key status changes. For activating this function, the PLC must set the 1byte control variable with number 13 in the KeTop T40 to 1 (=TRUE).
The handheld terminal confirms the receipt of the telegram by sending back
a telegram to the PLC. From that time on, the function "SEND KEY MAP" is
activated.
When a key is pressed now, the handheld terminal sends the current key
bitmap to the PLC which acknowledges the receipt. When the key is released, the handheld terminal sends the key bitmap again, and the PLC
acknowledges the receipt again.
34
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
HT Functions
LEDs
The following drawing shows the physical grouping of the LEDs on the KeTop
T40 keypad and the assignment of the particular LEDs to the bits of the parameters "LED group n".
Physical Grouping
Bitmap
LED group 5
7 6 5 4 3 2 1 0
LED group 5
33
1
2
3
34
4
5
6
7
8
9
10
15
16
Bitmap
LED group 1
LED group 1
LED group 2
11
12
13
14
7 6 5 4 3 2 1 0
17
18
19
20
21
22
23
24
LED group 4
25
26
27
28
29
30
31
32
= Bit number
Bitmap
LED group 2, 3, 4
7 6 5 4 3 2 1 0
LED group 3
= Bit number
= Bit number
LED groups of KeTop T40
Notice
The LEDs of the keys „Shift Lock“, „Ctrl Lock“ and „Alt Lock“ are activated
internally and cannot be activated by the PLC.
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
35
HT Functions
KeTop T40
Activating Particular LEDs on the HT
For activating LEDs on the handheld terminal, the service 23H is used.
Using this service, the PLC sends the number of the LED to be activated
and the LED attribute to the handheld terminal.
PLC -> HT
Index
23: Send
LED No.
Data fields
LED attribute
LED No.
23H
xx
xx
LED attribute
This parameter sets the switching attribute, the flashing attribute
and the LED color. This LED attribute is only valid for the service
23H.
Switching attribute:
0:
off
1:
on
Flashing attribute:
00:
not flashing
01:
flashing
10:
flashing
11:
flashing
LED colour:
0001: red
0010: green
LED No.
36
This parameter contains the number of the LED to be activated.
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
HT Functions
Example: Defining LED Attribute in Service 23H
Using the service 23H, the red LED Number 34 should be activated first
and then the green LED number 33 switched
over to the flashing mode. The corresponding
LED attributes must be defined as follows:
LED attribute for activating the red LED No. 34:
23H: Send LED No.
KETOP T40 keyboard
1:
on
00:
not flashing
0001: red
34
LED No. 34
23H 1
0 0 0 0 0 1 22H
LED attribute
LED attribute for flashing mode of green LED No. 33
23H: Send LED No.
1:
on
01:
flashing
0010: green
KETOP T40 keyboard
33
LED No. 33
23H 1
0 1 0 0 1 0 21H
LED attribute
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
37
HT Functions
KeTop T40
Activating LED Groups and All LEDs on the HT
The LEDs can be activated group by group or all at once. In both cases, the
LED attribute must be defined before.
LED-Attribut
The LED attribute differs to that of service 23H (see previous chapter).
Only the flashing attribute and the LED color are defined. The switching
attribute cannot be set here as it is contained in the parameters "LED
groups No.x" (service 21H) and "LED status group x" (service 20H).
Flashing attribute:
00:
not flashing
01:
flashing
10:
flashing
11:
flashing
LED colour:
0001: red
0010: green
The LED attribute defines the status of the selected LEDs and what status
of the active LEDs should be deactivated again.
Notice
The attribute "flashing" has the priority over "not flashing".
When the LEDs are switched off, the LED attribute must contain the actual
LED status (lighting or flashing).
The service 20H "Send LED status" behaves like the service 21H "Send
LED groups" whereby the service 20H always sends all LED groups.
38
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
HT Functions
a) Activating LED Groups on the HT
For activating LED groups on the handheld terminal, the service 21H "Send
LED group" is used. Before a LED group is activated, the LED attribute
must be defined and sent to the HT using the service 22H "Set LED color":
PLC -> HT
Index
Data fields
22:
Set LED color
LED attribute
22H
xx
Color and flashing attribute of the LED group are set now, and therefore the
LED group is ready for being activated.
Notice
The parameter LED color is relevant for LED No. 34 only, because this LED
is the only 2-color LED.
PLC -> HT
Index
21:Send LED
group
Data fields
Number of
LEDs n
LED group
No. x
LED group x
LED group
x+1
...
LED group
x+ (n/8)
21H
xx
xx
xx
xx
...
xx
Number of LEDs n
This parameter contains the number of LEDs (n=8, 16, 24 or
32) to be activated (max. 4 groups).
LED group No. x
Specifies the first LED group No. to be activated.
LED group x
This parameter contains the status of the corresponding LED
group. The assignment of the particular LEDs to the bits of this
parameter is shown in the drawing one page before.
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
39
HT Functions
KeTop T40
b) Activating All LEDs on the HT
For activating all LEDs on the handheld terminal, the service 20H is used.
This service contains the LED statuses of all LED groups. Before all LEDs
can be activated, the LED attribute must be defined and sent to the HT using the service 22H "Set LED color":
PLC -> HT
Index
22: Set LED
color
Data fields
LED attribute
22H
xx
The color and the flashing attribute of all LEDs are set now, and therefore
the LEDs are ready for being activated.
PLC -> HT
40
Index
20: Send
LED status
Data fields
LED status
(group 1)
LED status
(group 2)
LED status
(group 3)
LED status
(group 4)
LED status
(group 5)
20H
xx
xx
xx
xx
xx
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
HT Functions
Example: Activating LED Groups Using the Service 21H
a)
The first LEDs of the groups 1 to 3 should light:
PLC
KETOP T40
CP4 50/C
1 2
DI AG
8
STATUS
0
4
PC I0
R X 45 0/ A
PC I2
PC I3
R X 45 0/ A
PC I1
RX
R X 45 0/ A
TX
SI 1
CO MPA CT FLASH
R S 45 0/ A
SI 0
CT RL
SI 1
DE BUG
1
US B1
BA TT ER Y
KETOP
R X 45 0/ A
SI M 1
SI M 0
K- CAN
ETH ERNE T
US B0
9
Data fields
Bytes 1-2
Bytes 3-8
Client
Header
Bytes 1-2
Data fields
Bytes 3-8
Index
Send bit
*)
Receive bit
Header
0 1 22H
00000001
LED attribute
Set LED colour
1 0
1
2
4
5
6
8
9
10
16
17
18
24
group 1
Index
Confirmation
Client
0
0 21H 18H 0000000100000001 00000001 00000001
LED group x+3
LED group x+2
LED group 1
LED group no. 1
Number of LEDs n
group 2
group 3
Send LED group
0 0
Confirmation
Client
All LEDs lit should be turned off.
Index
Send bit
*)
Receive bit
b)
0 0 22H
00000011
LED attribute
Set LED colour
0 0
Confirmation
0
2
4
5
6
8
9
10
16
17
18
24
group 1
Index
Client
1
1 21H 18H 00000001000000000000000000000000
LED group x+3
LED group x+2
LED group 1
LED group no. 1
Number of LEDs n
group 2
Send LED group
group 3
1 0
Confirmation
st
*) To get a better overview, only the receive bit and the send bit of the 1 byte of the control/status word are shown.
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
41
HT Functions
KeTop T40
Texts
Texts are created on a PC using the programming software and loaded into
the handheld terminal. The PLC can call texts line by line by sending text
and line number to the HT where these numbers will be displayed.
Furthermore the handheld terminal offers the possibility to display and alter
variables directly on the device. In the programming software, input and
output fields for the variables can be defined in the text lines.
The KeTop T40 provides 192kByte memory space for variables and texts.
Memory requirements
text
variable
24 bytes
6 bytes
e.g.: when 5000 texts are created, memory space for about 12500 variables is left.
Text Variables
The numbers of text variables range from 100 to 65535 (for system variables, the range from 1 to 99 is reserved). The following variables are
distinguished:
z
Input variable (HT -> PLC)
z
Output variable (PLC -> HT)
z
Input/output variable (PLC <-> HT)
Displaying texts on the KeTop T40
a) Standard object
For displaying a text on the handheld terminal, the service 25H is used.
This telegram contains the text number under
which the text to be displayed is stored in the text
memory of the HT.
PLC -> HT
Index
25: Display
text No.
25H
Data fields
Display
attribute
Text number
(binary-coded)
01H
xx
xx
After receiving this telegram, the handheld teminal displays the corresponding text.
42
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
HT Functions
Display attribute
Text number (binarycoded)
For displaying a text, this parameter must be set to 01H.
Besides the text number, this parameter specifies the line in
which the text should be displayed and the text length (eventually several lines). The binary coding is defined as follows:
Data field
Byte 5
Bit: 15 14 13 12 11 10
Data field
Byte 6
0
11 Bits for text No.
2 Bits for FT
3 Bits for Ypos
Text No.
FT
Ypos
Actual text number. The maximum value depends on the
number of defined variables, because they are stored in the
same memory space.
Number of follow-up texts (text numbers in ascending order).
Selection of display line in which the text should be displayed
(0 -> 1st line, 1 -> 2nd line, etc.).
Example 1
Text number 0064H -> Text No.=100, FT=0, Ypos=0.
The text with number 100 is displayed in the 1st display line.
0064H
0000000001100100
Bit: 15 14 13 12 11 10
0
Example 2
Text number 4803H -> Text No.=3, FT=1, Ypos=2. ==> In this case the text
with number 3 is displayed in the 3rd display line
and the text with number 4 in the 4th line.
4803H
0100100000000011
Bit: 15 14 13 12 11 10
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
0
43
HT Functions
KeTop T40
b) Manufacturer-Specific Object
If a text display on the handheld terminal is activated with the manufacturerspecific service A0H the text number must be specified directly. The line
and the quantity of follow-up texts are specified in a byte especially provided for that purpose.
Index
PLC <- HT
A0: Display text
number
A0H
44
Data fields
Line
xx
Display
attribute
Text number binary
Quantity of
follow-up
texts
xx
xx
xx
xx
0
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
HT Functions
Displaying a Text with Output Variables
a) Single Request of Output Variables
When the 1-byte system variable No. 18 (12H) "FETCH_TEXT_VAR" is set
on the KeTop T40, the handheld terminal automatically requests this
(these) variable(s) from the PLC (single request) before a text with output
variable(s) is displayed.
PLC -> HT
Index
14: Send
1-byte
variable
Data fields
b15
Variable No.
14H
00H
b0
12H
b7
b0
Value of var.
01H
If necessary, this automatic request of a variable can be deactivated by resetting the system variable No. 18 (12H) "FETCH_TEXT_VAR".
After the text has been displayed, the output variables contained in the text
are requested once:
PLC <- HT
Index
40: Request
1-byte
variable
Data fields
b15
Variable No.
40H
xx
b0
xx
Following that, the PLC must continuously update the value of the variable.
The telegram required for updating the 1-byte system variable is structured
as follows:
PLC -> HT
Index
14: Send
1-byte
variable
Data fields
b15
Variable No.
14H
xx
b0
xx
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
b7
b0
Value of var.
xx
45
HT Functions
KeTop T40
b) Cyclic Request of Output Variables
When the 2-byte system variable No. 2 (02H) "FETCH_TEXT_VAR_CYCLE_TIME" is set on the KeTop T40, the handheld terminal automatically requests this variable cyclically from the PLC while a text with output
variable(s) is displayed.
For setting and resetting this system variable, the service 15H "Send 2-byte
variable" is used. If the service 15H contains a cycle time > 0 ms as value
of the variable, the system variable will be set. For resetting the system
variable, a cycle time of 0 ms is transmitted.
Notice
Very small cycle times increase the workload of the bus and also affect the
performance of the HT.
PLC <- HT
Index
15: Send
2-byte
variable
Data fields
b15
Variable No.
15H
00H
b0
02H
b15
Value of variable
xx
b0
xx
According to the data type of the variable, the request is performed with
one of the following services: 40H: "Request 1-byte variable", 41H: "Request 2-byte variable" or 42H: "Request 4-byte variable".
If the text to be displayed contains an output variable of data type UINT16,
for example, the request telegram sent to the PLC will be structured as follows:
PLC <- HT
Index
41: Request
2-byte
variable
Data fields
b15
Variable No.
41H
xx
b0
xx
Following that, the PLC sends the value of the variable to the handheld
terminal using the service 15H "Send 2-byte
variable".
PLC -> HT
Index
15:Send
2-byte
variable
Data fields
b15
Variable No.
15H
xx
b0
xx
b15
Value of variable
xx
b0
xx
When the 1-byte system variable No.22 (16H)
"EVENT_VAR_NOT_ON_SCREEN" is set on the KeTop T40, the handheld
terminal will be able to send an event message (EVENT_CODE) to the
PLC.
46
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
HT Functions
The event message will be sent when a variable has been sent from the
PLC to the HT, but this variable cannot be displayed any more since it has
already been overwritten by another text.
PLC -> HT
Index
14: Send
1-byte
variable
Data fields
b15
Variable No.
14H
00H
b0
16H
b7
b0
Value of var.
01H
The automatic sending of an event message can be deactivated by resetting the system variable.
The telegram for event messages is structured as follows:
PLC <- HT
Index
16: Send
4-byte
variable
Data fields
b15
Variable No.
16H
xx
b0
xx
Value of variable
xx
b0
xx
xx
xx
In this case this value contains the EVENT_CODE. The
EVENT_CODE consists of 4 bytes with the following coding:
Event number
Bit:
b31
Value of variable
31
24 23
Information depending on event
16 15
8
7
0
These bytes contain the variable
number in case of event number 1.
Type of variable:
1 ... 1-byte variable
2 ... 2-byte variable
3 ... 4-byte variable
4 ... Floating point variable
5 ... String variable
Event number 1
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
This event message is triggered when the PLC sends a user
variable (variable number ≥ 100) to the handheld terminal where
the variable should be displayed although no output field for the
variable is contained in the current text mask.
47
HT Functions
KeTop T40
Example: Displaying a Text on the KeTop T40
The PLC should activate a text display on the handheld terminal. The text
contains a variable the handheld terminal requests from the PLC (once).
The texts are stored in the text memory of the handheld terminal in numbered order. Therefore the PLC must send a text number to the handheld
terminal. The handheld terminal reads the corresponding text from its text
memory.
The text contains a variable of which the value is stored in the PLC. Before
displaying the text, the handheld terminal requests the variable from the
PLC which, following that, sends back a telegram including the value of the
variable.
Now the handheld terminal can display the text with the value of the variable.
PLC
KETOP T40
12
0
4
D IA G
CTRL
text memory (programming software)
TX
RX
PC I 2
PC I 0
RX 45 0/A
RX 45 0/A
SI 1
C OM PA CT F LAS H
SI 0
8
RS 45 0 /A
STA TUS
CP 450 /C
SI 1
D EBU G
U SB 0
PC I 3
PC I 1
RX 45 0 /A
RX 45 0 /A
Bytes 3-8
0 1 25H
01H 00H 04H
Display Text No.
Send bit
Textnumber binary coded
Display attribute
Index
Send bit
*)
Receive bit
Client
### cm
Data fields
*)
Receive bit
Header
Var.No.: 100
Data type: UINT8
Format:DEC
I/O-type:OUT
U SB 1
BATTERY
ET HE RN ET
SIM 1 SIM 0
K- C AN
0
1
2
55 cm
3
4 Height:
:
1999
Height:
KE TO P
Bytes 1-2
Text
Nr.
1
9
1 0
Server
Index
Confirmation
Variable No.
1 1 40H 00H 64H
Client
Request 1-byte variable
Server
1 1
Confirmation
Index
Value of variable
Variable No.
Client
1
0 14H 00H 64H 55H
Send 1-byte Variable
0 1
Server
Confirmation
st
*) To get a better overview, only the receive bit and the send bit of the 1 byte of the control/status word are shown.
Example: Displaying a text on the KeTop T40
48
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
HT Functions
Displaying a Text with Input Variable
The handheld terminal has already received a telegram from the PLC for
displaying a text. The text to be displayed contains an input variable. The
HT user types in a value and presses ENTER. Now the HT sends the value
of the variable to the PLC. According to the data type of the variable, the
service "Send x-byte variable" (14H, 15H, 16H) or "Send floating point"
(17H) is used.
HT display
Weight:
_ _ _ kg
<ENTER>
Is sent automatically with service 14D, 15D, 16D
or 17D, according to data type.
PLC
If for example the data type of the input variable is UINT8, the service 14H
"Send 1-byte variable" will send the variable to the PLC.
PLC <- HT
Index
14: Send
1-byte
variable
Data fields
b15
Variable No.
14H
xx
b0
xx
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
b7
b0
Value of var.
xx
49
HT Functions
KeTop T40
Example: Displaying a Text with Input Variable
The PLC should activate a text on the display of the handheld terminal. The
text to be displayed contains an input variable. The user types in a value
and presses ENTER to confirm the entry. Following that, the HT sends the
value of the variable to the PLC.
PLC
KETOP T40
8
12
0
4
D IA G
SI 0
CTRL
text memory (programming software)
RX
D EBU G
TX
PC I 2
PC I 0
RX 45 0/A
RX 45 0/A
SI 1
C OM PA CT F LAS H
RS 45 0 /A
STA TUS
CP 4 50 /C
No.
0
1
2
55 cm
3
4 Height:
:
1999
SI 1
1
U SB 1
BATTERY
PC I 3
PC I 1
RX 45 0 /A
Text
Var.No.: 100
Data type: UINT8
Format:DEC
I/O-type:OUT
### cm
Data fields
Bytes 3-8
01H 00H 03H
Display Text No.
Header
Data fields
Bytes 1-2
Bytes 3-8
Send bit
Textnumber binary coded
Display attribute
Index
0 1 25H
Height:
KET OP
*)
Receive bit
Client
Send bit
*)
Receive bit
Header
Bytes 1-2
RX 45 0 /A
SIM 1 SIM 0
K- C AN
ET HE RN ET
U SB 0
9
Confirmation
1 0
Server
HT-Display
Index
Weight:
225 kg
<ENTER>
Variable No.
Value of variable
1 1 14H 00H 65H E1H
Client
Send 1-byte variable
Server
1 1
Confirmation
st
*) To get a better overview, only the receive bit and the send bit of the 1 byte of the control/status word are shown.
Example: Displaying a Text with Input Variable
50
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
HT Functions
Displaying a Text with String Variable (Input or Output)
Character strings entered or to be displayed in a text are transmitted with
the MMI-COM telegrams "Send bytes" and "Display bytes".
E.g. service 18H "Send bytes"
PLC <-> HT
Index
18:
Send bytes
Data fields
Length
Variable No.
18H
xx
xx
Length
Byte 1
Byte 2
...
...
This parameter defines the length (in bytes) of the string variable to be
transmitted. If the length of the string variable exceeds the length of the
available data field, the variable will be transmitted in blocks. The transmission is completed when the length of the value entered is smaller than or
equal to the length of the data field. String variables can be numbered from 0
to 255.
Notice
The transmission of a string variable may only start when the transmission
of the previous string variable is completed (=> see below).
PLC
HT
PLC
HT
Var A 1nd part
Var A 1st part
ACK
ACK
Var A 2nd part
Var B 1st part
ACK
ACK
Var B 1st part
Var A 2nd part
ACK
ACK
Var B 2nd part
Var B 2nd part
ACK
NOT PERMITTED !
ACK
CORRECT
Correct transmission of string variables
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
51
HT Functions
KeTop T40
Example: Displaying a Text with String Variable
The PLC should activate a text on the display of the handheld terminal. The
text to be displayed contains a string variable. The user types in a text on
the handheld terminal and presses ENTER. The handheld terminal sends
the text characters entered to the PLC using the service 18H "Send bytes".
If 8 characters are to be transmitted, the sending process must be performed twice.
PLC
KETOP T40
CP4 50/C
1 2
STATUS
8
DI AG
0
4
SI 0
text memory (programming software)
RX
DE BUG
TX
PC I2
PC I0
R X 45 0/ A
R X 45 0/ A
SI 1
CO MP ACT FLASH
R S 45 0/ A
CT RL
No.
0
1
:
47 Name:
:
:
1999
SI 1
1
US B1
B ATT ER Y
ETH ERN ET
US B0
9
PC I3
PC I1
R X 45 0/ A
R X 45 0/ A
Name:
Data fields
Bytes 3-8
01H 00H 2FH
Display Text No.
Send bit
Index
0 1 25H
Text
Var.No.:102
Data type: STRING
Format: TEXT
I/O type: IN
Textnumber binary coded
Display attribute
*)
Receive bit
Client
Header
Bytes 1-2
Send bit
*)
Receive bit
S IM 1
SI M 0
K- CAN
KE TOP
Confirmation
1 0
Server
HT display
Name:
GERALD
<ENTER>
Index
Length
Variable No.
Value of variable
1 1 18H 08H 66H 20H 20H 47H 45H
' '
' '
'G'
Client
'E'
Send Bytes
Server
1 1
Confirmation
Index
(remaining)Length
Variable No.
Variable value
1 0 18H 04H 66H 52H 41H 4CH 44H
'R'
'A'
'L'
Client
'D'
Send Bytes
Server
0 1
Confirmation
st
*) To get a better overview, only the receive bit and the send bit of the 1 byte of the control/status word are shown.
Example: Displaying a text with string variable
52
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
HT Functions
Text Monitor
The text monitor functions comprise two services. First the cursor must be
positioned correctly on the display using the service 29H. Then the service
28H enables sending text characters displayed from this cursor position on
to the HT.
Notice
A text mask with input or output fields will be overwritten when a text monitor function is executed. The cursor positions stored in the handheld terminal for the input and output fields are preserved.
=> Risk of inconsistent display.
Positioning the Cursor
For positioning the cursor on the HT display, the PLC uses the service 29H.
This service contains the x- and y-position of the cursor.
PLC -> HT
Index
29: Position
cursor
Data fields
Cursor
x-position
Cursor
y-position
29H
xx
xx
Cursor x- position/
Cursor y- position
These parameters contain the x- and y-position of
the text cursor:
x
0 1 2 3 4 5 .....
... n
0
y
1
2
:
m
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
53
HT Functions
KeTop T40
Displaying Text Characters from Current Cursor Position
When the cursor has been positioned on the display, the service 28H
"Send text characters" enables sending a certain number of characters.
PLC -> HT
54
Index
28:
Send text
characters
Data fields
Number of
characters
Display
attribute
Text
characters
...
...
...
28H
xx
01H
xx
...
...
...
Number of characters
This parameter contains the number of characters to be
transmitted.
Display attribute
For displaying the text, this parameter must be set to 01H.
Text characters
This parameter contains one or more characters that are
displayed from the current cursor position on.
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
HT Functions
PLC activates Signal Buzzer on KeTop T40
When the 1-byte system variable No. 6 (06H) "BEEP" is set on the KeTop
T40, the PLC activates the signal buzzer on the handheld terminal:
PLC -> HT
Index
14: Send
1-byte
variable
Data fields
b15
Variable No.
14H
00H
b0
06H
b7
b0
Value of var.
01H
The buzzer remains active until it is turned off by resetting the system variable:
PLC -> HT
Index
14: Send
1-byte
variable
Data fields
b15
Variable No.
14H
00H
b0
06H
b7
b0
Value of var.
00H
The buzzer on the handheld terminal can also be activated by setting the 2byte system variable No. 3 (03H) "BEEP_TIME". In this case the duration of
the beep must be preset in milliseconds:
PLC -> HT
PD-Index
15: Send
2-byte
variable
Data fields
b15
Variable No.
15H
00H
b0
03H
b15
Value of variable
xx
b0
xx
Here the value of the variable contains the duration of the beep in milliseconds.
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
55
HT Functions
KeTop T40
Menu Access/Exit
When the 1-byte system variable 28 (EVENT_MENU) is set the HT sends
an event message to the PLC via the 4-byte system variable 2
(EVENT_CODE) upon access to / exit from the menu.
Structure of event variable
Information depending on event
Bit: 31
24 23
16 15
8
7
0
Event number=2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Access to menu
Exit from menu
System Reset
When the value 55H is written to the system variable No. 17 (11H), a reset
will be triggered on the KeTop T40. This reset corresponds to a turning
on/off of the device. All values set by the PLC get lost and must be set
anew.
PLC -> HT
56
Index
14: Send
1-byte
variable
Data fields
b15
Variable No.
14H
00H
b0
11H
b7
b0
Value of var.
55H
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
HT Functions
Graphic Functions
The graphic functions are activated from the control. The functions enable
displaying a text and drawing graphical elements (line, circle, rectangle and
ellipsis) at any position of the display (pixel-oriented).
x
y position
x position
0 1 2 3 4 5
y
0
1
2
3
4
5
6
7
Letter A in standard size at x/y position 0/0 of HT display
All graphic functions are transmitted with manufacturer-specific objects.
Graphical Elements
The elements circle, rectangle and ellipse can be represented as filled areas. To delete a graphical element, draw the same element of the same
size, at the same position and in inverse color.
If you position graphical elements over existing texts or bitmaps, these texts
and bitmaps will be overwritten.
Pixel
This command enables representing a single pixel at the specified x/y position of the HT display.
PLC -> HT
Index
B0:
Pixel
Data fields
x
y
B0H
xx
xx
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
57
HT Functions
KeTop T40
Line
This command enables representing a line on the HT display according to
the specified x/y coordinates.
PLC -> HT
Index
B1:
Line
Data fields
x0
y0
x1
y1
B1H
xx
xx
xx
xx
x0/y0
x1/y1
Set line type
This command is used to set a line type on which all other graphical elements are based. This setting remains valid until a new line type is defined.
PLC -> HT
Index
BA:
Set line type
BAH
Data fields
Type
xx
xx
Examples of line types:
Bitmap of line:
Pixels on display:
Line type:
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Bitmap of line:
Pixels on display:
Line type:
1 1 1 1 1 0 0 0 1 1 1 1 1 0 0 0
Bitmap of line:
Pixels on display:
Line type:
1 1 1 1 0 1 1 0 1 1 1 1 0 1 1 0
Notice
When defining a line type take care to arrange several identical bitmaps
one after the other. If you choose an unsuitable bitmap the line might get irregular.
58
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
HT Functions
Rectangle
This command enables representing a rectangle on the HT display according to the specified x/y coordinates.
PLC -> HT
Index
B2:
Rectangle
Data fields
x0
y0
x1
y1
fill
B2H
xx
xx
xx
xx
xx
x0/y0
x1/y1
fill
0H
1H
graphic not filled
graphic filled
Circle
This command enables representing a circle on the HT display at the specified x/y position with the radius r.
PLC -> HT
Index
B3:
Circle
Data fields
x
y
r
fill
B3H
xx
xx
xx
xx
x/y
r
fill
0H
1H
graphic not filled
graphic filled
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
59
HT Functions
KeTop T40
Ellipsis
This command enables representing an ellipse on the HT display at the
specified x/y position with the radiuses rx and ry.
PLC -> HT
Index
B4:
Ellipsis
Data fields
x
y
rx
ry
fill
B4H
xx
xx
xx
xx
xx
ry
x/y
rx
fill
0H
1H
graphic not filled
graphic filled
Clear window
This command enables clearing a rectangular area on the HT display according to the specified x/y coordinates.
PLC -> HT
Index
B8:
Clear
Window
Data fields
x0
y0
x1
y1
B8H
xx
xx
xx
xx
x0/y0
ABCDEFG
x1/y1
This command corresponds to the drawing of a filled rectangle with the set
background color.
60
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
HT Functions
Set colors
This command enables setting the foreground and background color (at
present only black or white) for all following graphical elements and graphical texts. The color remains active until another color is set.
PLC -> HT
Index
B9:
Set color
Data fields
fg
bg
B9H
xx
xx
fg (foreground)
0H
FFH
white
black
bg (background)
0H
FFH
white
black
Bitmaps
This command enables representing the content of a Windows bitmap file,
stored in the bitmap memory of the handheld terminal, on the HT display at
the specified x/y position.
The bitmap size is limited by the display size of the KeTop T40 (128x64
pixels).
SPS -> HT
Index
BB:
Display of
BMP
Data fields
Bitmap-
No.
x
y
BBH
xx
xx
xx
xx
x/y
The numbers of the bitmaps can be defined using the programming software.
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
61
HT Functions
KeTop T40
Graphical Text
These texts must be prepared in the PLC and can then be sent to the
handheld terminal with the indices B5 and B6.
The text can be positioned freely on the display. The text characters may
be represented in double height or double width. As standard the characters are displayed in the format 5 x 7 pixels (incl. space 6 x 8 pixels). So
characters with a double height have a format of 5 x 14 pixels (incl. space 6
x 16 pixels) and characters with a double width 10 x 7 pixels (incl. space 12
x 8 pixels).
Displaying a character means that the area for the character is cleared and
then the character is written into the empty field. An existing graphic or bitmap representation will be deleted at this position.
Notice
A) Programmed texts stored in the HT can only be displayed in lines or columns. These texts cannot be displayed at any pixel position or with a larger
size.
B) For graphical texts that are directly sent from the PLC to the handheld
terminal display, no editor function is available. That means the HT will not
correctly interpret symbols (___, ###) for the input and output of variables.
62
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
HT Functions
Text 1 / Text 2
This command enables representing a maximum of 40 text characters at
the specified x/y position of the HT display (provided the characters are not
displayed with a double width and begin at the pixel column 0).
The text is displayed up to the end of the line (no line folding and no continuation in the next line).
For displaying the text, at least two or more telegrams are required according to the length of the text. The first telegram (text 1) contains the position
of the text on the display, the length of the text, the font size and the font attribute. The actual text is contained in one or several follow-up telegrams
(text 2).
PLC -> HT
Index
B5:
Text 1
Data fields
x
y
len
font_size
font_attr
B5H
xx
xx
xx
xx
xx
x,y
Position of text on HT display
len
= length: specifies number of text characters to be transmitted.
font_size
= size of character: This parameter defines the size of the text characters
on the HT display. The following settings are possible:
0 ... normal
1 ... double height
2 ... double width
3 ... double height, double width
font_attr
This parameter contains the font attribute and specifies if the transmitted
text should be displayed normally, in inverse characters, normally flashing
or inverse flashing.
0 ... normal
1 ... inverse
2 ... normally flashing
3 ... inverse flashing
Follow-up telegram containing the text to be transmitted:
PLC -> HT
Index
B6:
Text 2
Data fields
Text
characters
...
...
...
...
...
B6H
xx
...
...
...
...
...
Text characters
This parameter contains one or several characters displayed from
the set cursor position on (cursor position set by means of telegram
„Text 1“).
Font sizes (font_size) possible on the HT display:
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
63
HT Functions
KeTop T40
6 pixels
8 pixels
8 pixels
font_size = 0
(Character: 5x7 pixels)
font_size = 2
(Character: 10x7 pixels)
6 pixels
12 pixels
16 pixels
font_size = 1
(Character: 5x14 pixels)
64
12 pixels
16 pixels
font_size = 3
(Character: 10x14 pixels)
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
Serial Gateway Coupling
HT Functions
Example of output of graphical text on HT display:
The following text should be displayed on the HT with „normal“ size at the
specified position:
0 1 2 3 4 5
0
1
2
3
4
5
6
7
8
9
10
Exchange of telegrams:
KETOP T40
PLC
CP4 50/C
DI AG
0
4
PC I2
PC I0
R X 45 0/ A
R X 45 0/ A
SI 1
RX
PC I1
TX
R X 45 0/ A
CO MP ACT FLASH
SI 0
CT RL
R S 45 0/ A
STATUS
1 2
8
SI 1
DE BUG
1
US B1
B ATT ER Y
PC I3
R X 45 0/ A
S IM 1
SI M 0
K- CAN
ETH ERN ET
US B0
9
Data fields
Bytes 3-8
Header
Bytes 1-2
Data fields
Bytes 3-8
*)
Receive bit
0 1 B5H 05H 0AH 10H 00H 00H
text 1
Send bit
x-position of text
y-position of text
len
font_size
font_attr
Index
Send bit
*)
Receive bit
Header
Bytes 1-2
Client
KETO P
Index
1 0
Client
Server
Confirmation
'T'
'e'
'm'
'p'
'e'
'r'
0 0 B6H 54H 65H 6DH 70H 65H 72H
text 2
Index
0 0
Client
Server
Confirmation
'a'
't'
'u'
'r'
':'
' '
0 1 B6H 61H 74H 75H 72H 3AH 20H
text 2
Index
1 0
Client
Server
Confirmation
'2'
'1'
'°'
'C'
0 0 B6H 32H 31H F8H 43H
text 2
0 0
Server
Confirmation
st
*) To get a better overview, only the receive bit and the send bit of the 1 byte of the control/status word are shown.
User's Manual, version: 1.1 / material no.: 62010
© KEBA 2005
65