beautypg.com

Set/read configurable statistics – Rockwell Automation 5370 CVIM Communications Manual User Manual

Page 115

background image

Chapter 5

Using the RS-232 Ports

5–45

Use the read command to read statistical data for the light probe, reference
windows, gages, and windows. Use the separate set command to set the
number of samples and configure the statistics block.

The set configurable statistics command has the following structure:

16

00

nn

x

Flags (16 Bytes)

Where nn specifies the number of samples and x specifies the toolset (04 =
toolset 1, 05 = toolset2).

Note: If nn is 00, the CVIM module will continue to use the sample count
configured during setup. Any other value will change the sample count.

The flags indicate which items are placed in the statistics block. Refer to
Table C.5 in Appendix C. Set the bits to 1 for the statistics you need.

The read configurable statistics command has the following structure:

Where nn specifies the number of times the statistics block is read.

Statistics are accumulated until the number of samples is reached, at which
point the statistics begin to reaccumulate The number of samples for each
toolset are accumulated separately. For example, if the toolset is toolset #2,
the statistics are accumulated based upon the number of triggers for toolset
#2.

Example of Set Command:

16

00

32

04

Flags (16 Bytes)

This example sets the number of samples to 50 using toolset 1.

16

00

64

05

Flags (16 Bytes)

This example sets the number of samples to 100 using toolset 2.

Example of Read Command:

This example reads the statistics block five times.

The data returned from the statistics blocks consists of:

Block signature

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

Set/Read Configurable
Statistics