Rockwell Automation 5370 Color CVIM Communications Manual User Manual

Page 123

Advertising
background image

Chapter 5
Using the RS–232 Ports

5–55

The data returned from the statistics block consists of:

Block signature

Number of samples, maximum, minimum, average, and standard
deviation for each tool configured in the block.

The block signature is 2 bytes long. The number of samples is a 2 byte
integer. The maximum and minimum values are each 4 bytes. The format of
the data depends upon the operation (e.g. pixel count is an integer and linear
gaging is a 16.16 fixed point value). Refer to page C–24 for data formats.
The average and standard deviation are also 4 bytes each but are always
16.16 fixed point values. Therefore, each tool statistic consists of 18 bytes
with the exception of reference windows and the light probe, which contain
18 bytes for each feature or a total of 54 bytes. The statistics block is
transmitted as two hexadecimal characters for each byte. The total number of
bytes including the block signature should not exceed 128 bytes. The
statistics block is read once for every number of specified samples. This
means that if you read the statistics block five times with a sample number of
50, 250 triggers will have to be processed before the five reads are
completed. The following shows the format of the returned data:

Figure 5.12
Statistics Block Returned Data Format*

*The example above is valid as shown for DF1 Return Data mode. In ASCII mode
there are no spaces.

Set/Read Configurable
Statistics (cont’d)

Advertising