Lof Function

Checks whether the specified RS-232 or TCP/IP port has any lines of data in its buffer.

Syntax
Lof ( fileNumber As Integer )

Parameters

fileNumber As Integer
Specify the number specified in the OpenCom (RS-232C) or OpenNet (TCP/IP) statement.

Return Values
The number of lines of data in the buffer. If there is no data in the buffer, Lof returns “0”.

Description
Lof checks whether or not the specified port has received data lines. The data received is stored in the buffer irrespective of the Input# instruction. You can wait for the return value of Lof function by executing Wait.

Note


  • About the Controllers to use

    For T/VT series, an error will occur at operation when RS-232C port of the Controller is specified.

    When using PC COM port (1001 to 1008), you cannot use Lof function with Wait command.


See Also
ChkCom, ChkNet, Input#, Wait

Lof Function Example
This Command window example prints out the number of lines of data received through the communication port number 1.

>print lof(1)
 5
>