Skip to main content
Version: 8.1

system.serial.writeBytes

This function is used in Python Scripting.

Description​

Write a List[Byte] to a serial port.

Client Permission Restrictions​

This scripting function has no Client Permission restrictions.

Syntax​

system.serial.writeBytes(port, toWrite)

Parameters​

TypeParameterDescription
StringportThe previously configured serial port to use.
List[Byte]toWriteThe List[Byte] to write.

Returns​

Nothing

Scope​

Gateway, Vision Client, Perspective Session

Code Examples​

Code Snippet
# This example will write a list of bytes to a port called "COM1"
port = "COM1"
toWrite = [1,1,0,0,1]

system.serial.writeBytes(port,toWrite)

Keywords​

system serial writeBytes, serial.writeBytes