This function is used in Python Scripting.

Description

Read numberOfBytes bytes from a serial port.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

system.serial.readBytes(port, numberOfBytes, [timeout])

  • Parameters

String port - The previously configured serial port to use.

Integer numberOfBytes - The number of bytes to read.

Integer timeout - Maximum amount of time, in milliseconds, to block before returning. Default is 5000. [optional]

  • Returns

List[Byte] - A list containing bytes read from the serial port.

  • Scope

Gateway, Vision Client, Perspective Session

Code Examples

There are no code examples for this function.

Keywords

system serial readBytes, serial.readBytes