USEPORT        Specify the desired COM port and/or port settings

Top  Previous  Next

Syntax:

USEPORT

[ port ]  |  [ /options ]

Arguments:

[ port ]

Optional variable or string defining the COM port; COM1through COM48 are supported by FileLink; if this argument is omitted, the options apply to the current COM port

Options:

/baudrate=xx

Set the baud rate of the communications link; replace xx with one of the following:

 

 

1200

 

 

4800

 

 

9600

 

 

14400

 

 

19200

 

 

28800

 

 

33600

 

 

38400

 

 

57600

 

 

115200

 

/carrier=xx

Set the carrier setting of the communications link; replace xx with one of the following:

 

 

Constant

 

 

Ignore

 

 

Switched

 

/flowconrtrol=xx

Set the flow control setting  of the communications link;  replace xx with one of the following:

 

 

None

 

 

Both

 

 

Hardware

 

 

Xon/Xoff

 

/parity=xx

Set the parity of the communications link; replace xx with one of the following:

 

 

Even

 

 

Mark

 

 

None

 

 

Odd

 

 

Space

 

/stopbits=x

Set the number of stop bits used on the communications link; replace xx with one of the following:

 

 

1

 

 

2

 

/wordlength=x

Set the number of data bits per character used on the communications link; replace x with one of the following:

 

 

7

 

 

8

 

 

This script command defines the COM port and/or port settings to be used by FileLink. If the line is not connected, the COM port and settings apply the next time the communications port is opened. If the line is connected, the settings take effect immediately. Changing the COM port itself when the line is connected is prohibited.

 

The selection made in this command overrides any default selections set with the FileLink Configurator. If the specified COM port has not be previously configured, default settings for the port are created. Not all configuration options must be supplied with the USEPORT command - when omitted, the selection set at configuration time is used.

 

Consider the following example where COM2 is selected and configured.

 

       USEPORT "COM2" /baudrate=28800 /parity=none /wordlength=8

 

Consider the following example where the baud rate of the current port is changed.

 

       USEPORT /baudrate=9600

 

The following example restores the default settings for COM2.

 

       USEPORT "COM2"

 

Related Commands: PROTOCOL