Rockwell Automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User Manual User Manual

Page 111

Advertising
background image

Chapter 7

Using the Serial Ports

7-3

ATTENTION: With

eor

and

eof

set to 0, any readln() call

you make in applications never terminates. Use the raw read()
call to read from the serial ports.

Use the OS-9 system management utilities

tmode

and

xmode

to set

up or view the communication parameters for the control-coprocessor
serial ports.

Use this mode:

To display or:

tmode

temporarily change the operating parameters of the current terminal session;

tmode

affects

open paths and not the device descriptor; when the path is closed, the changes are lost

xmode

change the initialization parameters of any control coprocessor serial port; these changes will be

inherited by any process that subsequently opens the path; the changes persist as long as the

control coprocessor is running (even when paths to the device are repetitively opened and

closed;

xmode

updates the device descriptor for the port; use the CC_VALCOMM utility (page

7Ć4) to make changes persist through reset/power cycles.

If you have an application that was designed prior to release 1.3 and you
require the original settings of the serial port COMM1, for example,
include

xmode

commands in the startup file with the following argument:

xmode /t1 normal

This returns the serial-port settings to the settings used before firmware
release 1.30. See the next section for a description of CC_VALCOMM, a
utility that saves the changes made after an

xmode

operation and retains

the changes over power cycles.

See Figure 7.1 for the default settings for

tmode

and

xmode

.

Figure 7.1

Set Up Communication Parameters

Advertising