
PI1X Basic Programming Manual Ver. 1.10
117/156
END IF
END IF
END IF
STR1$=LINKPORT_READ_N$(1,1)
IF LEN(STR1$)<>0 THEN
PRINT STR1$;
END IF
WEND
…
A%=LINKPORT_CLOSE(1)
…
Description
:
After opening LinkingPort, you can read characters from that
LinkingPort.
A$
is a string variable to be assigned the characters is read from
that LinkingPort.
N1%
is an integer variable indicating LinkingPort’s port number.
The value is form 1 to 4.
N2%
is an integer variable indicating number of bytes to be read
from LinkingPort.
Purpose
:
Flush the LinkingPort data buffer.
Syntax
:
N1%=LINKPORT_FLUSH(N2%)
Example
:
Result%=LINKPORT_FLUSH(Port%)
Description
:
After opening LinkingPort, you can flush the LinkingPort’s read
and write data buffer.
N1% is an integer variable to be assigned to the result.
N2% is an integer variable indicating LinkingPort’s port
number. The value is form 1 to 4.
N1%
Meaning
-1
Close LinkingPort success.
-4
Parameter error.
-6
LinkingPort is not open.
-7
LinkingPort is not set.