beautypg.com

Read output status, Read configuration blocks – Rockwell Automation 5370 CVIM Communications Manual User Manual

Page 80

background image

Chapter 5

Using the RS–232 Ports

5–10

structure the CVIM module will return: ?[CR][LF]. Use the unlock
command to enable the setup menu box.

Use the read data command to read the status of the local I/O. This command
has the following structure:

>Rx,On [CR]

Where n = 1 to 14

(individual outputs)

X-Y

(range of outputs X through Y)

*

(all of the outputs)

This function can be executed more than once per command by specifying an
x times value.

For example:

> R,O14 [CR]

This example reads the status of output
#14 once.

Another example:

> R0,O*[CR]

This example continuously reads the
status of all fourteen outputs.

After executing a command, the CVIM module will return: [CR][LF]
followed by the data. If you do not have the proper command structure, the
CVIM module will return: ?[CR][LF]. The format of the requested data is
an ASCII representation of the output state (1 = ON and 0 = OFF). Each
character is followed by a space. The output conditions are transmitted in
numerical order (output #1 then #2, etc.). The number of characters returned
depends upon the number of outputs that are read. Since there are fourteen
outputs, up to 28 data characters can be returned. After the data is sent, the
CVIM module will terminate the data with: [CR][LF]. The following is an
example of returned data from the three outputs.

[CR][LF]1 0 0 [CR][LF]

Use the read configuration command to read configuration data for the
specified blocks (Upload Configurations). This command has the following
structure:

>RC,CBn[CR]

Where n = 1 to 136

(individual blocks)

X-Y

(range of blocks X through Y)

*

(all of the blocks)

Lock Command (cont’d)

Read Output Status

Read Configuration Blocks