User`s guide

Chapter
5
BASIC
Commands
49
ON READER ... GOSUB ...
Purpose
To activate the "READER Event Trigger" that executes a specific subroutine when
data is received from the reader ports.
Syntax
ON READER(N%) GOSUB SubName|SubLabel
Remarks
"N%" is an integer variable, indicating the reader port.
It is 1 for portable terminals.
"SubName|SubLabel" is the name or line label of a subroutine to be called when the
event is triggered.
Example
ON READER(1) GOSUB BcrData_1
...
BcrData_1:
OFF READER(1)
BEEP(2000,5)
Data$ = GET_READER_DATA$(1)
...
See Also
General Reader commands, OFF READER
ON TCPIP GOSUB... WLAN
Purpose
To activate the "TCP/IP Event Trigger" which executes a specific subroutine when
data is received from any of the TCP/IP connections or some error is taking place.
Syntax
ON TCPIP GOSUB SubLabel
Remarks
"SubLabel" is the line label of a subroutine.
The GET_TCPIP_MESSAGE routine is used to identify the status of TCP/IP
connections.
Example
ON TCPIP GOSUB TCPIP_Trigger
...
TCPIP_Trigger:
MSG = GET_TCPIP_MESSAGE
...
See Also
OFF TCPIP, TCP/IP Networking commands