Omron SYSMAC C200H-ASC02 Operation Manual page 72

Ascii unit
Hide thumbs Also See for SYSMAC C200H-ASC02:
Table of Contents

Advertisement

BASIC Language
LOC Function
PEEK Function
TIME$ Function
62
<port> is the port number (1 or 2).
Example:
A$ = INPUT$(10,#1)
Remarks:
All characters except CTRL+X can be read, including CR and LF: CR and LF
cannot be read with the LINE INPUT statement.
The BASIC LED indicator on the ASCII Unit will blink indicating that the Unit
is waiting for input. It will continue blinking until the specified number of char-
acters is entered.
Example Program:
10
CLS
20
A$ = INPUT$ (1)
30
A$ = HEX$ (ASC(A$))
40
PRINT A$
50
GOTO 20
Remarks:
Displays key character codes.
Purpose:
To return the number of data items in the specified port buffer.
Format:
x = LOC(<port#>)
Example:
A = LOC(2)
Remarks:
The port specified must already be open and in input mode. The number of
data items in the buffer of the specified port is given in byte units.
Purpose:
To read the contents of a specified memory address
Format:
PEEK(<I>)
<I> is the memory location and must be in the range of 0 to
65535 (&HFFFF).
Example:
A = PEEK(&H3000)
Remarks:
If the specified address is not an integer, it is converted into one.
Do not try to read reserved system addresses &H0000 through &H1FFF and
&H8000 through HFFFF.
Note For details of memory structure, refer to Appendix E ASCII Unit Memory
Map.
Purpose:
Sets or gives the time
Format:
TIME$ = <x$>
<y$> = TIME$
<x$> is a string expression indicating the time to be set. The fol-
lowing formats may be used:
hh: sets the hour (minutes and seconds 00)
Section 4-2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents