Rockwell Automation 57C610 Enhanced Basic Language, AutoMax User Manual

Page 65

Advertising
background image

6Ć25

Differences Between Allocating Ports A and B
How you use the OPEN statement depends on whether it is being

used with port A or port B. For port A, the OPEN statement is only

used to change the default setup and baud rate for the port. For port

B, the OPEN statement is used to change the default setup and

baud rate and to allocate the port. Port B must be allocated using

the OPEN statement prior to using any of the serial port statements

to communicate through the port.

OPEN Statement Format Used To Modify Port Setup

Characteristics

OPEN device_name" AS FILE #logical_device_number,

SETUP=specs, baud_rate

OPEN Statement Format Used To Set Port Allocation Status

OPEN device_name" AS FILE #logical_device_number,

ACCESS=status

where:
device_name =

The preĆassigned name of the port; PORTA for port A or PORTB

for port B.

logical_device_number =

The number assigned to the port in the OPEN statement. The #

symbol is required. Range: 1Ć255.
The number used when referencing port A or port B in the

CLOSE statement. See Configuring and Using Port A and

Configuring and Using Port B, below.
The number used when referencing port B in the INPUT, PRINT,

GET, and PUT statements. See Configuring and Using Port B,

below.

specs =

A hexadecimal single word constant or integer expression bit

pattern that defines various characteristics for the port. The bit

positions are defined below. The parameters SETUP and

ACCESS cannot be specified in the same OPEN statement.
The default setting is 0D00 (hex). Bits 0Ć7 of the word specify the

terminating character for the INPUT statement as a hex value for

the ASCII character. The specified terminating character must be

an ASCII value between 20 hex and 7E hex. Using an ASCII

value outside this range causes the error message Invalid

string character received" to be logged when the INPUT

statement reads data from the serial port. If these bits are left at

zero (0), the default input termination character, a carriage return

( 0D hex), is used.
When software handshaking (XĆON, XĆOFF) is enabled, XĆOFF

(CTRLĆS, 13 hex) will be sent when more than nine characters

are in the receive buffer. When a task (INPUT or GET statement )

empties the receive buffer, XĆON (CTRLĆQ, 11 hex) will be sent.

The ASCII characters XĆOFF or XĆON can not be transmitted as

user data because they would be interpreted as flow control

commands, not user data.

Advertising
This manual is related to the following products: