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

The text of a manual · part 11 of 25

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

Pages 80 to 88 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 80

Chapter 5 Using the RS–232 Ports

Lock Command (cont’d)

structure the CVIM module will return: ?[CR][LF]. Use the unlock command to enable the setup menu box.

Read Output Status

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 X-Y *

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

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

Read Configuration Blocks

Use the read configuration command to read configuration data for the specified blocks (Upload Configurations). This command has the following structure:

>RC,CBn[CR] Where n = 1 to 136 X-Y * 5–10

(individual blocks) (range of blocks X through Y) (all of the blocks)

Page 81

Chapter 5 Using the RS-232 Ports

This function can only be executed once per command. Refer to Appendix C for a description of the configuration blocks. You cannot use this command while the CVIM module is in the SETUP mode. Examples:

>RC,CB135[CR]

Reads configuration block 135.

>RC,CB99,CB7,CB1[CR] Reads configuration blocks 1, 7, then 99. >RC,CB1–135[CR]

Reads all the of configuration blocks (excluding templates).

>RC,CB*[CR]

Reads all the of configuration blocks (including templates).

After executing a command, the CVIM module will return: [CR][LF] followed by the data. If you do not have the proper command structure, the CVIM module will return: ?[CR][LF]. The format of the requested data is an ASCII representation of the specified block(s) in bytes. Each byte is represented by two hexadecimal characters (00 through FF) followed by a space. The first two words are the signature word indicating block type and number (Refer to Appendix D). Twenty bytes of data are transmitted in a line terminated with a [CR][LF]. The size of the configuration block(s) determines the number of lines that are returned. The template data (CB136) is the only configuration block size that can exceed 128 bytes and therefore may require more than a single block to output the data. Note: When you specify CB136, you are reading all of the template blocks. Word1, bits 8-15 of the first template block indicates the number of template blocks that are transmitted (all blocks except last block are 128 bytes long). Refer to Appendix D for block description and sizes. The following is an example of how the returned data appears for command >RC, CB-1–2 [CR]: Configuration Block Returned Data Format* [CR] [LF] 48_01_02_00_00_00_00_00_44_65_66_61_75_6C_74_00_00_00_00_00_[CR][LF] 00_00_00_00_00_03_00_00_00_00_00_00_04_00_00_01_00_01_00_00_[CR][LF] 00_02_06_01_00_00_00_00_00_00_00_00_00_00_00_00_00_00_06_01_[CR][LF] 00_00_00_01_00_00_00_00_00_00_00_00_00_00_00_01_01_00_01_01–[CR][LF] 00_0D_FC_5F_9A_0A_00_19_FB_D1_[CR][LF] Space Added Between Blocks for Clarity

48_02_FF_02_01_00_00_00_00_FA_00_10_00_01_01_00_00_00_00_00_[CR][LF] 00_00_00_3F_00_00_00_00_00_00_00_3F_00_00_00_00_00_00_00_64_[CR][LF] 00_32_01_2C_00_96_0A_62_00_01_00_00_00_01_00_00_00_01_00_00_[CR][LF] 00_01_00_00_00_01_00_00_00_01_00_00_00_64_00_32_01_2C_00_96_[CR][LF] 0A_62_00_01_00_00_00_01_00_00_00_00_80_00_00_00_00_00_00_00_[CR][LF] 00_00_00_00_00_00_00_01_00_00_00_00_00_00_00_00_00_00_00_01_[CR][LF] 00_00_00_00_00_00_49_CC_[CR][LF] 5–11

Page 82

Chapter 5 Using the RS–232 Ports

Read Inspection Results

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

>RRx,TSno,d [CR] Where:

x n

= = o

= d

=

>RRx, TS1 [CR]

Number of times command is repeated. Toolset number TS1, TS2, or S (CVIM module status) RL (specifies Reference Line) RW (specifies Reference Window) G (specifies Gage) W (specifies Window) LP (specifies Light Probe) Gage, Window, Reference Line, or Reference Window number.

Reads discrete bit results for toolset 1. x = Number of times command is repeated.

5–12

>RRx,TS2 [CR]

Reads discrete bit first results for toolset 2. x = Number of times command is repeated.

>RRx,TS1RB,d [CR]

Reads results block(s) for toolset 1 x = Number of times command is repeated. d = Block number.

>RRx,TS2RB,d [CR]

Reads results block(s) for toolset 2. x = Number of times command is repeated. d = Block number.

>RRx, S [CR]

Reads CVIM module status.

Page 83

Chapter 5 Using the RS-232 Ports

The read operation can be executed more than once per command by specifying an x times value. The data in the read results block commands indicate which results block (1, 2, 3, or 4) is being read (refer to Appendix C).

>RR0,TS1[CR]

This command continuously reads the first discrete bit results for toolset 1. (24 bytes returned)

>RR,TS2RB,3[CR]

This command reads results block 3 for toolset 2. This operation is only performed once in this example. (128 bytes returned)

>RRx,TS1RL,1[CR]

Reads the results of toolset 1 reference line #1. (4 bytes returned)

>RRx,TS2RW,3[CR]

Reads the results of toolset #2 reference window #3. (28 bytes returned)

>RRx,TS1G,21[CR]

Reads the results of toolset #1 gage #21. (4 bytes returned)

>RRx,TS2W,11[CR]

Reads the results of Toolset #2 window #11. (4 bytes returned)

>RRx,TS1LP[CR]

Reads the results of toolset #1 light probe. (12 bytes returned)

>RRx,S[CR]

Reads the CVIM module status. (2 bytes returned)

Note: Refer to Appendix B, Table B.1, RS–232 word 0 for a definition of CVIM module status. After executing a command, the CVIM module will return: [CR][LF] followed by the data. If you do not have the proper command structure, the CVIM module will return: ?[CR][LF]. After reading the results, the CVIM module will return the requested data. The format of the requested data is in an ASCII representation of the specified block(s) in bytes. If you requested results blocks, each byte is represented by two hexadecimal characters (00 through FF) followed by a space. Twenty bytes of data are transmitted in a line terminated with a [CR][LF]. Since the results blocks are 128 bytes in size, each block requires seven lines. Refer to Appendix C for block descriptions. The following is an example of the returned data format: 5–13

Page 84

Chapter 5 Using the RS–232 Ports

Read Inspection Results (cont’d)

Numerical Results Block Returned Data Format

[CR] [LF] 61_01_04_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00~00_[CR][LF] 00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00~00_[CR][LF] 00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_01_00_00_[CR][LF] 00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_32_00_00_00_00_[CR][LF] 00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_[CR][LF] 00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_[CR][LF] 00_00_00_00_00_00_00_CC_[CR][LF]

If you requested discrete bit information, the returned data will contain two counters and the discrete bit results. Each counter has 12 positions (10 characters, 2 spaces) reserved for a maximum value of 4,294,967,295. Note: Counters are decimal values. All other fields are hexadecimal values. The counter data is left justified and the remaining field is filled with spaces. The first counter contains the total number of triggers processed. The second counter contains the total number of faults. Both counters are expressed as decimal values. The results bit information (128 bits), which follows the counters, is 16 bytes long. Each byte is represented by two hexadecimal characters (00 through FF) followed by a space. The following is an example of the returned data format: Discrete Bit Results Returned Data Format [CR][LF] 1234567890__1234567890__80_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_[CR][LF] Refer to Appendix B for a description of the returned bytes.

Save Configuration

Use the Save command to transfer 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 one of the following commands:

5–14

>S[CR]

Transfers configuration data from the CVIM module RAM to the EEPROM.

>S,CC,X [CR]

Transfers configuration data from the CVIM module RAM to the RAM card area X (01 –16).

Page 85

Chapter 5 Using the RS-232 Ports

For example:

>S,CC,13 [CR]

Transfers configuration data from the CVIM module RAM to the RAM card area 13.

You cannot use this command when the CVIM module is in the SETUP mode. After executing a command, the CVIM module will return: [CR][LF]. No data is returned. If you do not have the proper command structure, the CVIM module will return: ?[CR][LF].

Select Image Displayed

Use the display object commands to select the information that is displayed on the monitor:

>W,D,d [CR] Where d is the data that specifies both the toolset and display to be viewed: d = XY Where X = 1 (Toolset 1 displayed) or 2 (Toolset 2 displayed) Y = 1 (Image only displayed) or 2 (Failed tools displayed) or 3 (All tools displayed) or 4 (I/O page displayed) or 5 (Results page displayed) or 6 (Stats 1 page displayed) or 7 (Stats 2 page displayed) or 8 (Page up same display) or 9 (Page down same display)

>W,F,d [CR] d = XY Where X = 1 (Toolset 1 displayed) or 2 (Toolset 2 displayed) Y = 1 (Go on reject) or 2 (Freeze on 1st reject) or 3 (Freeze on all rejects) or 4 (Freeze on next inspection) or 5 (Halt on reject)

>w,DC,d [CR] d = XY Where X = 1 (Toolset 1 displayed) or 2 (Toolset 2 displayed) Y = 1 (Resume) or 2 (Reset stats) or 3 (Reset counters) or 8 (Page up) or 9 (Page down) 5–15

Page 86

Chapter 5 Using the RS–232 Ports

Select Image Displayed (cont’d)

Example:

>W,D,2[CR]

This example will display toolset 1 failed tools.

After executing the command, the CVIM module will return: [CR][LF]. No data is returned. If you do not have the proper command structure, the CVIM module will return: ?[CR][LF].

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:

>SR,TSxd,TSxd, etc.[CR] Where x = 1 or 2 (specifies toolset #1 or #2) d = G1, G2, G3, G1–G3, etc. W1, W2, W3, W2–5, etc. RL1, RL2, etc. RLW, RW2, etc. LP

(specifies Gages) (specifies Windows) (specifies Reference Lines) (specifies Reference Windows) (specifies Light Probe)

The returned results block will be 128 bytes including the block signature (2 bytes) and trigger counter (last 4 bytes). Refer to page C–14, the ordering of the tools and data lengths are the same as the Remote I/O configurable results block. Example:

>SR,TS1G1,TS1W2–5[CR]

This command places the results for gage 1 and Windows 2 through 5 in results block #4.

>RR,TS1RB,4[CR]

This command reads results block #4 for toolset 1.

After executing the command, the CVIM module will return: [CR] [LF]. If you do not have the proper command structure, the CVIM module will return: ?[CR][LF]. Refer to Read Inspection Results command for a description of the returned data format.

5–16

Page 87

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 statistics command has the following structure:

>SSn,TSxd,TSxd,etc.[CR]

(Set command)

Where n = Number of samples

Note: If n is 0, the CVIM module will continue to use the sample count configured during setup. Any other value will change the sample count. Where x = 1 or 2 (specifies toolset #1 or #2) d = G1, G2, G3, G1–G3, etc. W1, W2, W3, W2–5, etc. RL1, RL2, etc. RLW, RW2, etc. LP

(specifies Gages) (specifies Windows) (specifies Reference Lines) (specifies Reference Windows) (specifies Light Probe)

The read statistics command has the following structure:

> RSn[CR]

(Read Statistics Command)

Where n = Number of times 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 latest toolset specified is toolset #2, the statistics are accumulated based upon the number of triggers for toolset #2. Examples of Set Statistics Command:

>SS50,TS1LP,TS1RW2[CR]

This example sets the number of samples to 50,configures the block to contain light probe and reference window #2 statistics (both from toolset #1).

>SS100,TS2G5,TS2W12[CR]

This example sets the number of samples to 100, configures the block to contain gage #5 and window #12 statistics (both from toolset #2.

5–17

Page 88

Chapter 5 Using the RS–232 Ports

Set/Read Configurable Statistics (cont’d)

Example of Read Statistics Command:

> RS5[CR]

This example reads the statistics block five times.

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. Standard deviations are also 4 bytes each but are always 16.16 fixed point values. Averages are 24.8 fixed point values. Therefore, each tool statistic consists of 18 bytes with the exception of reference windows 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: Statistics Block Returned Data Format

5–18