Example program for accessing results data – Rockwell Automation 5370 Color CVIM Communications Manual User Manual

Page 58

Advertising
background image

Chapter 4
Using the Remote I/O Link

4–21

You must use the discrete I/O bits in conjunction with block transfers to
inform the Color CVIM module of the Block Transfer Type, Block Number
and, Last Block by setting discrete bit information using simple ladder
programming (refer to Table 4.C):

Set bit 1 of output word 3 to indicate a CONFIGURATION block transfer.

Use bits 10 through 17 of output word 3 to indicate which block to
transfer. Refer to Appendix D for block numbers.

Set bit 3 in output word 3 to tell the Color CVIM to send the last block.
This bit must be set one full scan before sending the last block. If you
forget to set this bit, the Color CVIM module will wait for an indefinite
period of time for more data.

Note: Later in this chapter we provide an example PLC program for
accessing configuration data.

The following program illustrates one way to read Results Blocks from the
Color CVIM. It does the following:

1. Initializes the bits needed to do the Block Transfer of Results Block 1 and

posts the Data Value of the tool on the RIO channel.

2. Triggers the Color CVIM

3. Waits for Data Valid signal for the inspection (Note that the Trigger must

go low before Data Valid can go high).

4. If the Block Transfer enables, resets the enable bit.

5. After the Block Transfer is complete, moves the number of missed

triggers to N7:70.

6. Compares the new value of missed triggers with the old value, and turns

off the output if they are equal.

7. Compares the number of missed triggers with the stored value. If they are

not equal, turns on an output and transfers the output.

Note: We offer the following example only to show you how to use discrete
bits via Remote I/O with a Color CVIM even though using the Data Valid
signal via Remote I/O is not necessarily the preferred method. Due to
real–world timing considerations, you will normally use a hard–wired Data
Valid signal from the 2801–JMB board to your control device.

Note: Be sure to reset the counters on the Color CVIM and set N7:200 to
zero.

The program begins on the next page.

Transferring Configuration
Blocks (cont’d)

Example Program for
Accessing Results Data

Advertising