Skip to main content
Version: 7.9

system.serial.readBytes

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

TypeParameterDescription
StringportThe previously configured serial port to use.
intnumberOfBytesThe number of bytes to read.
inttimeoutMaximum amount of time, in milliseconds, to block before returning. Default is 5000. [optional]

Returns

byte[] - A byte[] containing bytes read from the serial port.

Scope

All