Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 14 of 25

Bulletin 5370 CVIM Configurable Vision Input Module Communications Manual: 5 - Using the RS-232 Ports, pages 107 to 115

Pages 107 to 115 of 202, from Bulletin 5370 CVIM Configurable Vision Input Module Communications Manual

The original document is the PDF (723 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Allen-Bradley 5370-CVIM

Page 107

Chapter 5 Using the RS-232 Ports

After reading the selected blocks, the CVIM module will return the requested data. Each word of a configuration block is sent as two bytes with the high byte transmitted first. A DLE (10 hex) is converted to DLE DLE (10 hex 10 hex). Refer to Appendix D for block descriptions and sizes. The following is an example of how the returned data appears (each pair of digits represents a single byte): Configuration Block Returned Data Format* 48 01 02 00 00 00 00 00 44 65 66 61 75 6C 74 00 00 00 00 00 00 00 00 00 00 03 00 00 00 00 00 00 04 00 00 01 00 01 00 00 00 02 06 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 06 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 01 00 01 01 00 0D FC 5F 9A 0A 00 19 FB D1 48 02 FF 02 01 00 00 00 00 FA 00 10 00 01 01 00 00 00 00 00 00 00 00 3F 00 00 00 00 00 00 00 3F 00 00 00 00 00 00 00 64 00 32 01 2C 00 96 0A 62 00 01 00 00 00 00 00 00 00 00 00 64 00 01 00 00 00 01 00 00 00 01 00 00 00 64 00 32 01 2C 00 96 0A 62 00 01 00 00 00 01 00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 49 CC *We have added spaces for clarity, data is returned without spacing.

5–37

Page 108

Chapter 5 Using the RS–232 Ports

Read Results Command

Use this command to read the results of the last inspection. Refer to Appendix C for a description of the results blocks. Use one of the following commands:

07

00 n times x y z

Where: 07 =

Read Command

00 =

Always 00 n times =

Value for repeat read x=

04 (Specifies Toolset #1) 05 (Specifies Toolset #1) 08 (Specifies CVIM module status) 10 (Specifies Results Block #1) 15 (Specifies Results Block #2)

y=

16 (Specifies Gage) 17 (Specifies Window) 18 (Specifies Reference Line) 19 (Specifies Reference Window) 1A (Specifies Light Probe)

z=

Number of window or gage being read or block result number.

07 00 n times

04

Use this command to read the discrete bit results of toolset 1.

07 00 n times

05

Use this command to read the discrete bit results of toolset 2.

07 00 n times

10

Data

Use this command to read results blocks for toolset 1. Where data = results block number.

07 00 n times

15

Use this command to read results blocks for toolset 2. Where data = results block number.

5–38

Data

Page 109

Chapter 5 Using the RS-232 Ports

The read results command can be executed more than once per command by specifying an n times value. This command is toolset dependent. Toolset 1 is specified by 04. Toolset 2 is specified by 05. Examples:

07

00

Operation

01

04

Count

18

01

Object

This command reads the results of toolset 1, reference line #1 (4 data bytes returned)

07

00

Operation

01

05

Count

17

0B

Object

This command reads the results of toolset 2, window #11 (4 data bytes returned).

07

00

Operation

01

04

Count

16

15

Object

This command reads the results of toolset 1, gage #21 (4 data bytes returned).

07

00

Operation

01

Count

04

1A

Object

This command reads the results of toolset 1, light probe (4 data bytes returned).

07

Operation

00

01

Count

04

Object

This command reads the results of toolset 1, light probe (4 data bytes returned). 5–39

Page 110

Chapter 5 Using the RS–232 Ports

Read Results Command (cont’d)

07

00

Operation

01

Count

08

Object

This command reads the CVIM module status (2 data bytes returned). Note: Refer to Appendix B, Table B.1, RS–232 word 0 for a definition of CVIM module status. If the BCC is not valid, the CVIM module will respond with a DLE NAK and the command will not be executed. If the BCC is valid, the CVIM module will respond with a DLE ACK. Then the CVIM module will validate the command structure. If the command is valid, the CVIM module will execute the command and return the data. If the command structure is invalid, the CVIM module will not execute the command or respond. The format of the requested data is an ASCII representation of the specified block(s) in bytes. Results Block Returned Data Format* 61 01 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 32 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 CC

Refer to Appendix C for Block Descriptions * We have added spaces for clarity, data is returned

Discrete Bit Results Returned Data Format*

Refer to Appendix B for a description of Returned Bytes *We have added spaces for clarity; data is returned without spacing.

5–40

Page 111

Chapter 5 Using the RS-232 Ports

Save Command

Use the Save command to save CVIM module configuration data to the local storage area (EEPROM) or the external RAM card (credit card memory). Note: Depending upon the card size, up to 16 configurations can be saved to the RAM card (512K card). Use the following commands:

Saves configuration to EEPROM.

XX

Where XX = card storage location (01 to 16). This function can only be executed once per command. You cannot use the commands when the CVIM module is in the SETUP mode. If the BCC is not valid, the CVIM module will respond with a DLE NAK and the command will not be executed. If the BCC is valid, the CVIM module will respond with a DLE ACK. Then the CVIM module will validate the command structure. If the command is valid, the CVIM module will execute the command. If the command structure is invalid, the CVIM module will not execute the command or respond.

Select Image Displayed

Use the display object command to control the image that is displayed on the monitor. Use the following commands:

The data in this command specifies both the toolset and the display to be viewed. 0B (hex) = Image only displayed – Toolset 1 0C (hex) = Failed tools displayed – Toolset 1 0D (hex) = All tools displayed – Toolset 1 0E (hex) = I/O page displayed – Toolset 1 0F (hex) = Results page displayed – Toolset 1 10 (hex) = Stats 1 page displayed – Toolset 1 5–41

Page 112

Chapter 5 Using the RS–232 Ports

Select Image Displayed (cont’d)

11 (hex) = Stats 2 page displayed – Toolset 1 12 (hex) = Page up same display – Toolset 1 13 (hex) = Page down same display – Toolset 1 15 (hex) = Image only displayed – Toolset 2 16 (hex) = Failed tools displayed – Toolset 2 17 (hex) = All tools displayed – Toolset 2 18 (hex) = I/O page displayed – Toolset 2 19 (hex) = Results page displayed – Toolset 2 1A (hex) = Stats 1 page displayed – Toolset 2 1B (hex) = Stats 2 page displayed – Toolset 2 1C (hex) = Page up same display – Toolset 2 1D (hex) = Page down same display – Toolset 2

0B

13

Data

The data in this command specifies both the toolset and the display to be viewed. 0B (hex) = Go on reject – Toolset 1 0C (hex) = Freeze on first reject – Toolset 1 0D (hex) = Freeze on all reject – Toolset 1 0E (hex) = Freeze on next inspection – Toolset 1 0F (hex) = Halt on reject – Toolset 1 15 (hex) = Go on reject – Toolset 2 16 (hex) = Freeze on first reject – Toolset 2 17 (hex) = Freeze on all reject – Toolset 2 18 (hex) = Freeze on next inspection – Toolset 2 19 (hex) = Halt on reject – Toolset 2

0B

14

Data

The data in this command specifies both the toolset and the display to be viewed. 0B (hex) = Resume – Toolset 1 0C (hex) = Reset Statistics – Toolset 1 0D (hex) = Reset counters – Toolset 1 12 (hex) = Page up – Toolset 1 13 (hex) = Page down – Toolset 1

5–42

Page 113

Chapter 5 Using the RS-232 Ports

15 (hex) = Resume – Toolset 2 16 (hex) = Reset Statistics – Toolset 2 17 (hex) = Reset counters – Toolset 2 18 (hex) = Page up – Toolset 2 19 (hex) = Page down – Toolset 2

Examples:

03

This example displays all tools in toolset 1.

01

This example selects go on reject in toolset 1.

0B

Operation

14

Object

05

Data

This example selects page down in toolset 2. If the BCC is not valid, the CVIM module will respond with a DLE NAK and the command will not be executed. If the BCC is valid, the CVIM module will respond with a DLE ACK. Then the CVIM module will validate the command structure. If the command is valid, the CVIM module will execute the command and return the data. If the command structure is invalid, the CVIM module will not execute the command or respond.

5–43

Page 114

Chapter 5 Using the RS–232 Ports

Set Configurable Results

Use this command to obtain a configurable results block. The results you want are specified by a list of tools and placed in results block #4. No data is returned until you use a read inspection results command for block #4. Use the following command:

The flags indicate which toolsets are specified. Refer to Table C.5 in Appendix C. Set the bits to 1 for the tools you want. Example:

This command configures results block #4 to contain Toolset 1, Window #9 and Window #18 data. If the BCC is not valid, the CVIM module will respond with a DLE NAK and the command will not be executed. If the BCC is valid, the CVIM module will respond with a DLE ACK. Then the CVIM module will validate the command structure. If the command is valid, the CVIM module will execute the command and return the data. If the command structure is invalid, the CVIM module will not execute the command or respond. Note: The set configurable results command only sets the contents of the configurable results block (block #4). You must use a read results command to obtain the data (07 00 nn 10 04, where nn specify the number of times the command is performed). Refer to Read Inspection Results command for the format of the returned data. The returned results bloc will be 128 bytes including the block signature (2 bytes) and the total number of triggers (last 4 bytes). Refer to page C–16. The ordering of the tools and data lengths are the same as the Remote I/O configurable results block.

5–44

Page 115

Chapter 5 Using the RS-232 Ports

Set/Read Configurable Statistics

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. 5–45