Skip to main content
Skip table of contents

SendToComPort

Purpose

Send a string of characters out a communications port.The port must have been previously opened with theOpenComPortorOpenComPortExcall.

 Some devices that you are communicating with require a special character to terminate the string of characters you are sending to it.  For example, a modem needs a carriage-return (CR) at the end of the string you send to it before it will be recognized.  Some devices may require a carriage-return and a line-feed character, others perhaps something entirely different.  Please be aware of the requirements of the device you are communicating with.  If you require hardware handshaking on the communications port, please see the SetComPortRTSDTR command.


Parameters

Parameter: port
Type: integer
Description: This is the COM port to send the data on or the resource number of the port to send data on if OpenComPortEx was used to open it.  

Parameter: data
Type: 
string
Description: This is t
he actual data to send out the COM port.


Returns

None


Example

Sample Code

VB
None


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.