com_state (Statement) [Version 1.5 or later]


Gets the status of RS-232C or Ethernet port.


com_state [#<portnumber>,]<integervar>
When the port number has not been specified, controller RS-232C is selected.


This command gets bytes of data remaining in the transmission buffer, into the integer variable specified by <integervar>.
Note that -1 will be returned if a transmission port error occurs. At the time of Ethernet use, -1 will be also returned if network connection of the port is not established.


'!TITLE "<Title>"
PROGRAM sample
·
·
·
com_state #1,I280
'Gets data remaining in transmission buffer into I280
·
·
·
END


Top