This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
Description
Opens a serial port to begin communications.
Syntax
Status = COMM_Open(sComPort, hComm)
Returns
Zero if no error.
Any value different from zero means an error
Parameters
Name |
Type |
Optional |
Meaning |
sCommPort |
String |
No |
Identifies the serial port number, for example, "COM1", "COM4", etc. |
hComm |
Number |
No |
A number containing a free file number, typically provided by the COMM_FreeFile function. |
Remarks
If the port was not opened successfully, the return value is not zero.
Before actual communications through the port can commence, you must configure the communication parameters by using a COMM_Set statement for each parameter.
Restrictions
When opening ports above "COM9", Windows requires the port name to be specified using the following syntax:
COMM_Open("\\.\COM15", hComm)
See also
Examples