Unlock command, Read output status – Rockwell Automation 5370 Color CVIM Communications Manual User Manual

Page 81

Advertising
background image

Chapter 5
Using the RS–232 Ports

5–13

Use the unlock command to enable the setup menu box so that a user can
access the SETUP mode using the light pen. Use the following command:

>U[CR]

This function can only be executed once per command. There is no object
associated with this command. After executing a command, the Color CVIM
module will return: [CR][LF]. No data is returned. If you do not have the
proper command structure, the Color CVIM module will return: ?[CR][LF].

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 Color CVIM module will return: [CR][LF]
followed by the data. If you do not have the proper command structure, the
Color 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 Color CVIM module will terminate the data with: [CR][LF]. The
following is an example of returned data from three outputs.

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

Unlock Command

Read Output Status

Advertising