Mode, Mode -5, Purpose – Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual

Page 241

Advertising
background image

Publication 1746-RM001A-US-P

Setup Functions 14-5

MODE

Purpose

Use the MODE command to set the port parameters of ports PRT1, PRT2, and
DH485.

The module applies the following rules when hardware handshaking is enabled.
The module:

does not transmit until CTS becomes active

examines DSR following the receipt of a character. If the DSR is active, the
character is placed in the input queue. If DSR is inactive, the character is
assumed to be noise and is discarded.

IMPORTANT

You must ensure that buffer space is available anytime that you
are printing data out of the serial port using hardware
handshaking or software handshaking (Xon/Xoff). Failure to do
so causes the BASIC program to stop executing while awaiting
buffer space. When space is available in the buffer, the module
resumes execution from the point where it left off. The output
buffer of each port is capable of holding 256 characters. See
descriptions of CALLs 36, 37, 95, and 96 for more information.

Table 14.5 PRT1 and PRT2 Port Parameters

Port Parameters

Selections

Default
Settings

Baud rate

300, 600, 1200, 2400, 4800, 9600, 19200

1200

arg1 (parity)

None (N), Even (E), Odd (O)

N

arg2 (number of data bits)

7 or 8

8

arg3 (number of stop bits)

1 or 2

1

arg4 (handshaking)

No handshaking (N)
Software handshaking (S)
Hardware handshaking (H)
Hardware and software handshaking (B)

S

arg5 (storage type)

Store information in user ROM and RAM (E).
Store information in battery backed RAM (R).

R

IMPORTANT

If any argument (other than port name and baud rate) is left
blank, then that argument defaults to the previously specified
value for that argument.

Advertising