Printable versions
This Page
All Pages
PDF

Index

Class
Port

Properties
List
Enabled
BaudRate
ComPort

Methods
Read
Write
Purge
Dispose

ByteArrayToString
StringToByteArray

Events
OnRead
OnWritten
OnDSR
OnCTS
OnRI
OnDCD
OnForceClose

More Properties
Parity
StopBits
ByteSize
StartTrigger
EndTrigger
BufferSize
Timeout

DSR
CTS
RI
DCD

Handshake
RTS
DTR
Break
InfraRed

MultiThreading
Parent
NoEvents

Port.Write SerialTools v1.00 and later

Writes data to the serial port. Write returns after data is written to the port. Write takes a string as an argument, to convert binary data to a string see Port.ByteArrayToString.

News in v1.20
Write returns the number of bytes actually written. If write fails zero is returned. Write will time out and return after the time specified in Port.Timeout

If an event handler for Port.OnWritten is specified, then Write will return instantly with zero as return code, and OnWritten will be called with the number of bytes actually written to the serial port driver. If the attempt to write timed out OnWritten will have zero as argument.

See also Port.Enabled and Port.OnWritten.

Syntax
BytesWritten = object.Write ( Value )

Part Type Description
object SerialXP.Port An object that evaluates to an SerialXP.Port object.
Value String (Variant) Data to be written to the serial port.
BytesWritten Long (Variant) Bytes written.



Windows
© 2016 Franson Technology AB, All rights reserved, Contact | | Affiliate | Login