Class
SerialPort
Warning
This item was deprecated in version 2019r2. Please use SerialDevice as a replacement.
Description
Used to get the properties of any serial port.
Properties
Name |
Type |
Read-Only |
Shared |
---|---|---|---|
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
Property descriptions
SerialPort.InputDriverName
InputDriverName As String
The name of the input driver.
This property is read-only.
This example gets the name of serial device 0.
TextField1.Text = System.SerialPort(0).InputDriverName
SerialPort.MaximumSpeed
MaximumSpeed As Integer
The maximum speed (baud).
This property is read-only.
This example reads the maximum speed of the serial device at port 0.
TextArea1.Text = Str(System.SerialPort(0).MaximumSpeed)
SerialPort.Name
Name As String
The name of the serial port.
This property is read-only.
This example gets the name of serial device 0.
TextArea1.Text = System.SerialPort(0).Name
SerialPort.OutputDriverName
OutputDriverName As String
The name of the output driver.
This property is read-only.
This example gets the name of the output drive for serial device 0.
TextArea1.Text = System.SerialPort(0).OutputDriverName
SerialPort.RatedSpeed
RatedSpeed As Integer
The rated speed (baud).
This property is read-only.
This example reads the rated speed of serial device 0.
TextArea1.Text = Str(System.SerialPort(0).RatedSpeed)
Sample code
See the example for the System module. You get the values of SerialPort properties by accessing the properties of the System module. For example,
TextField1.Text = System.SerialPort(0).InputDriverName
Compatibility
All project types on all supported operating systems.
See also
Object parent class; SerialConnection class; System module, Connecting to a Serial Device