SerialClose (Close Communication Port)

The SerialClose function is used to close a communications port that was previously opened by the SerialOpen function.

Syntax

SerialClose ( ComPort )

Remarks

This function returns True (-1) if the port was opened or False (0) if it was already closed.

Note that when executed, SerialClose will drop the DTR line on ComRS232.

Parameter

ComPort (Communication Port)

The communication port that will be used by the instruction. Note that beginning with OS 6.0, control ports C1 and C2 can be configured individually for transmit (Tx) or receive (Rx). Right-click to display a list.

Alphanumeric Description
ComUSB USB port of the datalogger
ComRS232 RS232 port of the datalogger
Com1 Datalogger's control ports 1 (TX) & 2 (RX)
ComC1_Tx Configures control port 1 for transmit only
ComC1_Rx Configures control port 1 for receive only
ComC2_Tx Configures control port 2 for transmit only
ComC2_Rx Configures control port 2 for receive only
ComRF Integrated RF communication

Type: Constant. For all instructions except SerialOpen, this parameter can also be a variable.