SetSerialPortStatus()

Syntax

SetSerialPortStatus(#SerialPort, Attribute, Value)
Description
Changes the specified serial port status.

Parameters

#SerialPort The serial port to use.
Attribute The attribute to set. It can be one of the following value:
  #PB_SerialPort_DTR: set DTR signal status (value can be 0 or 1)
  #PB_SerialPort_RTS: set RTS signal status (value can be 0 or 1)
  #PB_SerialPort_TXD: Set TXD signal status (value can be 0 or 1)
  #PB_SerialPort_XonCharacter : Character used for Xon/Xoff handshaking sequence (value can be between 1 and 255). Default value is $11.
  #PB_SerialPort_XoffCharacter: Character used for Xon/Xoff handshaking sequence (value can be between 1 and 255). Default value is $13.
Value The attribute value to set. See 'attribute' description to see which value is applicable.

Return value

None.

Example

  If OpenSerialPort(0, "COM1", 300, #PB_SerialPort_NoParity, 8, 1, #PB_SerialPort_XonXoffHandshake, 1024, 1024)
    SetSerialPortStatus(0, #PB_SerialPort_XonCharacter, 8)
    SetSerialPortStatus(0, #PB_SerialPort_XoffCharacter, 9)
    Debug "Success"
  Else
    Debug "Failed"
  EndIf

See Also

OpenSerialPort()

Supported OS

All

<- SerialPortTimeouts() - SerialPort Index - WriteSerialPortData() ->