Printable versions
This Page
All Pages
PDF

Index

Class
VPort

Properties
Created
ComPort

Methods
DataFromPort
DataToPort
PortStatus
Dispose

Events
OnDataFromPort
OnOpened
OnClosed

More Properties
StartTrigger
EndTrigger
BufferSize
Timeout

MultiThreading
Parent
NoEvents

VPort.DataToPort SerialTools v2.00 and later

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

Note! The virtual port must be opened by an application using the port or else this method will generated an exception. The events VPort.OnOpened, VPort.OnClosed or the method VPort.PortStatus can be used to monitor if the port is opened or closed.

Case 1 (generating exception):
Your application creates a virtual port using VPort.Created.
Your application calls VPort.DataToPort()
An exception is thrown!!

Case 2 (no errors):
Your application creates a virtual port using VPort.Created.
3rd party application openes the port.
Your application calls VPort.DataToPort()
Data is transfered to 3rd party application.

See also VPort.Created.

Syntax
BytesWritten = object.Write ( Value )

Part Type Description
object SerialXP.VPort An object that evaluates to an SerialXP.VPort 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