<< Prev        Next >>

ID : 3890

Comm.Count

Function

To return the number of data bytes readable from reception buffer of the data communication function.

Syntax

Comm.Count(line number)

Guaranteed Entry

Line number
Designate a line number by integer type data.

Return Value

Return the number of bytes by integer type data.

Description

The number of data bytes readable from reception buffer of the data communication function is returned.

Attention

-

Example

'!TITLE "Acquisition of the Number of Data Bytes Readable from Reception Buffer by Data
Communication Function" ' Acquire the number of data bytes readable from reception buffer of line number 1 Sub Sample_CommCount Dim aaa As Integer Dim bbb As String ' Open line number 1 (Assuming that the text mode is used) Comm.Open 1 Do ' Assign the number of data bytes readable from reception buffer of line number 1 to aaa aaa = Comm.Count( 1 ) If aaa > 0 Then ' Obtain if any received data exists bbb = Comm.Input( 1 ) PrintDbg bbb Exit Do End If Delay 10 Loop ' Close line number 1 Comm.Close 1 End Sub

ID : 3890

<< Prev        Next >>