Receive Data from COM port

txt, nbytes, timeo = cpo:rx( [ms], [max], [ms_last] )

Wait for and receive data.

Parameter Description
ms initial time to wait for the first bytes
max maximum number of bytes
ms_last time to wait for subsequent bytes
  • If ms_last is not included, then ms is used throughout.
  • If ms = 0 then there is no waiting - it returns what's currently in the FIFO
Returns Description
txt The text string
nbytes The number of bytes received
timeo true if a timeout occurred before max was received