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

The text of a manual · part 29 of 47

Bulletin 2803 VIM Vision Input Module User Manual: 12 - Using Math Tools, pages 247 to 256

Pages 247 to 256 of 404, from Bulletin 2803 VIM Vision Input Module User Manual

The original document is the PDF (26 MB). 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 2803-VIM2

Page 247

Chapter

Using Minimum (continued)

12

Using Math Tools 72-21

Example Minimum Operation (continued) Note: In the example, if the line gages 1-4 are the only line gages enabled for this inspection, you can use the all tools (asterisk) icon as the First Operand Number icon in order to select all line gage lower functions. You select the all tools icon as the First Operand Number icon; all other Operand Type and Operand Number icons are automatically set the same way, as shown below:

Line Gage -lower

Function

Example Math Tool Menu first part

Example Math Tool Menu second pat-t

The Maximum operator compares the selected operands (the operands are either the measured results of selected vision tools, or a selected constant value). The math tool outputs the maximum value among the selected operands. Example Maximum Operation Suppose you want to measure the height of a workpiece feature and that the height can vary in places, but if the height exceeds a certain measurement, the workpiece must be rejected. To do this, you can use several line gages to measure the height of the feature, then use math tool with the Maximum operator to determine the maximum result among the line gages. You can then set the acceptance range of the math tool to reject the workpiece if the height is too great at any point along the feature. In this case, for example, you decide to use line gages l-4 to measure the height of the black rectangle, at various points, in threshold image 2 (see diagram next page). Then you use a math tool to find the maximum result among the four line gages. If this result is too high, the part is rejected.

Page 248

Chapter 72-22

Using Maximum

12

Using Math Tools

Example Maximum Operation (continued

(continued)

Note: In this case, the line gages are each set to vertical, and the Color icon of each is set to black pixels. The function icon of each is set so that the line gage lower function counts the number of pixels across the black rectangle. The acceptance range for each of the line gages’ functions is set to extreme values, so that the line gages will not fail individually (instead, the acceptance range of the math tool with the Maximum operator is set to distinguish between acceptable or rejected workpieces).

H ._

Line Gages l-4 shown on threshold image2...

measuring the height of the black rectangle

-----_t

The math tool 5 shown below compares the results of the lower functions of line gages l-4. The math tool result is the maximum value among the line gage results. You set the acceptance range so that if the math tool result is too high, the math tool fails, and the VIM2 outputs a reject decision. Line Gage -Lower

Function

All Tools icon

Example Math Tool Menu first part

Example Math Tool Menu second part f

(-A-,

Line Gage 4

I

Note: As noted with the Minimzm example on page 12-21, if line gages l-4 are the only line gages enabled for this inspection, you can select the all tools (asterisk) icon for the First Operand Number icon to select all line gage lower functions.

Page 249

Chapter

Using Add

72

Using

Math

Tools 12-23

The Add operator adds the numerical results of all the selected operands; the math tool Add result indicates the sum of the numerical results of all the operands. Example Add Operation Suppose that your process includes packing cans into cartons, and that you must count the the number of cans in each carton at a certain point. The number of cans in a carton determines the line speed of the conveyor. In this case, you use line gages l-4, each counting the number of cans in a row in the carton (see diagram below). Then you use a math tool to total the results of the four line gages. The math tool total (the total number of cans) is used as a factor in determining the conveyor line speed. Note: In this case, the line gages are each set to horizontal. The cans appear white in the monitor image, against a black background, so the Color icon of each of the line gages is set to white. The function icon of each line gage menu is set to the ninth function icon - see Chapter 9 - so that the line gage upper function counts the number of blobs (each can is counted as a blob by the line gages). The acceptance range for each of the line gages’ functions is set to extreme values, so that the line gages will not fail individually.

Line Gages 1-4 shown.. .

. . . counting the number of cans (white blobs) in the carton

Page 250

Chapter 12-24

Using Add (continued)

12

Using Math Tools

Example Add Operation (continued) The math tool 6 shown below adds the results of the lower functions of line gages l-4. The math tool result is the total of the four line gage results.

Add operator line Gage - Upper Function k

Al

Example Math Tool Menu first part \

” LineGa/ge2

A yeFge3,,

,

/ Line Gage 1 f

-LineGaged

Example Math Tool Menu second part

Note: You can select a constant as the operand type for any but the First Operand Type icon. Also, you are not allowed to use the all took (asterisk) icon for the Operand Number icon with the Add operator.

Using Subtract El

The Subtract operator subtracts the numerical (measured) result of one operand from that of another (only two operands are allowed, and the second can be a constant); the Subtract result indicates the difference (in absolute value) between the results of the two operands. Example Subtract Operation Suppose you want to determine whether a label is attached correctly on a workpiece (that is, with the side of the label exactly perpendicular to the horizontal axis of the field of view of the camera). To do this, you can, for example, use two horizontal line gages to locate the edge of the label, one near the label top, and one near the bottom. Then you can use a math tool with the Subtract operator to find out if there is any difference in line gage edge location (Note: If the side of the label is perpendicular, then the two line gage results are identical; subtracting one from the other would yield a zero result). You can then set the acceptance range of the math tool to reject the workpiece if the result indicates the label is crooked beyond an acceptable tolerance.

Page 251

Chapter

Using Subtract (continued)

I2

Using Math Tools

Example Subtract Operation

72-25 (continued)

In this case, for example, let’s suppose that the white square in threshold image 2 represents a label (see diagram below). Suppose you decide to use line gages 1 and 2 to locate the edge of the label near the top and bottom. Then you use a math tool to subtract one result from the other. If the label is perfectly straight, the result is 0. Suppose you want to allow some variance -so that, if the result is, say, greater than 3, the part is rejected. You would set the math tool acceptance range so the upper limit is 3, the lower limit 0.

Note: In this case, the line gages are each set to horizontal, and the Color icon is set to white pixels. The function icon of each line gage menu is set to the first function icon - see Chapter 9 - so that the line gage upper function locates the left edge of the label. The acceptance range for each of the line gages’ functions is set to extreme values, so that the line gages will not fail individually (instead, the acceptance range of the math too.1with the Subtract operator is set to distinguish between acceptable or rejected workpieces).

Line gages 1 and 2 shown on threshold image2...

. , . locating the position of the left edge of the white square.

Note: When using the subtract operator, you are allowed to select only two operands; the Third and Fourth Operand Type icons are automatically set to No Selection. You are allowed to select a constant as the Second Operand Type icon, if desired. Also, you are not allowed to select the all tools (asterisk) icon for the Operand Number icon with the Subtract operator. The math tool 7 shown on the next page subtracts the result of the upper function of line gage 2 from the result of the upper function of line gage 1. The math tool result is the difference in absolute value between the two results. You set the acceptance range so that if the math tool result is too high, the math tool fails, and the VIM2 outputs a reject decision.

Page 252

Chapter 12-26

12

Using Math Tools

Example Subtract Operation

Using Subtract

(continue&

(continued)

Example Math Tool Menu first part

Subtract operator

Line Gage - Upper Function

+-xi 7

-age Line Ga/geZ

A

,

NTiectx

I , f

A

,No

Seiection

Example Math Tool Menu second part

The Multiply operator multiplies the numerical (measured) result of one operand by that of another (only two operands are allowed, and the second can be a constant); the Multiply math tool result indicates the product of the two operands. Example Multiply Operation Suppose you want to determine the area of a rectangular workpiece feature, and you have already used all of the four windows available. Using two line gages, and the math tool with the multiplier operator, you can compute the area of the rectangular feature. To do this, you can, for example, use a vertical line gage to measure the feature height, and use a horizontal line gage to measure the feature width. Then you can use a math tool with the Multiplier operator to multiply the two line gage measurements, and compute the feature area. You can then set the math tool acceptance range to accept or reject the workpiece based on the result. In this case, for example, let’s suppose we want to measure the area of the white square in threshold image 2 (see diagram on the next page). Suppose you decide to use line gages 1 and 2 to measure the height and width. Then you use a math tool to multiply one result by the other. Note: When using the multiply operator, you are allowed to select only two operands; the Third and Fourth Operand Type icons are set to No Selection. You are allowed to select a constant as the Second Operand Type icon, if desired. Also, you are not allowed to select the all tools (asterisk) icon for the Operand Number icon with the Multiply operator.

Page 253

Chapter

12

Using Math Tools 72-27

Example Multiply Operation (continued) In this case, one line gage is set to horizontal, and the other to vertical. The Color icon of each line gage is set to white pixels. The function icon of each line gage menu is set to the first function icon - see Chapter 9 - so that the line gage lower function counts the white pixels across the white square. The acceptance range for each of the line gages’ functions is set to extreme values, so that the line gages will not fail individually (instead, the acceptance range of the math tool with the Multiply operator is set to distinguish between acceptable or rejected workpieces).

lllsing Multiply (continued)

Line gages 1 and 2 shown on threshold image 2.. .

. . . measuring the height and width of the white square.

The math tool 8 shown below multiplies the result of the lower function of line gage 1 by the result of the lower function of line gage 2. The math tool result is the product of the two results. You set the acceptance range so that if the math tool result is too high, or too low, the math tool fails, and the VIM2 module outputs a reject decision. Multiply Example Math Tool Menu first part

Line Gage -Lower operator

// x +-x1 8

IElI ii,

Xl

111

1

Wage Line Ga/ge2 Example Math Tool Menu second part

A

Function

, No/Se’ec*x

I , f

A

,~o

Selection

Page 254

Chapter 72-28

Using Divide I-

I I

12

Using Math Tools

The Divide operator divides the numerical (measured) result of one tool (operand) by a constant (only two operands are allowed, and the second must be a constant); the Divide math tool result indicates the quotient of the first operand divided by the second (a constant). Example Divide Operation Suppose you want to determine the average of three line gage measurements of a certain workpiece feature. You can do this by using three line gages, and by using a math tool with the Add operator to total the results from the line gages. Then, using a second math tool, you can use the Divide operator to divide the result of the first math tool by three, and thus obtain the average measurement of the three line gages. You can then set the math tool acceptance range to accept or reject the workpiece based on the result. In this case, for example, let’s suppose we want to average three measurements of the height of the black rectangle in threshold image 2 (see diagram below). Suppose you decide to use line gages l-3 to measure the height. You use math tool 9 to add the three results. Then, you use math tool 10 to divide the result of the first math tool by three to obtain the average result. In this case, the three line gages are set to vertical, and positioned over the black rectangle in threshold image 2 (see diagram below). The Color icon of each line gage is set to black pixels. The function icon of each line gage menu is set to the first function icon - see Chapter 9 -so that the line gage lower function counts the black pixels across the black rectangle. The acceptance range for each of the line gages’ functions is set to allow some tolerance, so that a line gage will fail individually if a measurement is too extreme.

Line gages 1 -3 shown on threshold image 2.. .

. . . measuring the height of the black rectangle.

Page 255

Chapter

Using Divide (continued)

72

Using Math Tools 72-29

Example Divide Operation (continued) The math tool 9 shown below adds the results of the lower functions of line gage l-3. The math tool result is the total of the three results. You can set the acceptance range to extreme values so that the math tool will not fail. Line Gage -Lower

Add operator Example Math Tool Menu first part

Function

I/ myIpTli+

I=1

1

~ETcp~

*age Line Ga/ge2

,,

,

‘i;’

Gagx

I ,

~

,,

,No

Selection

Example Math Tool Menu second part

The math tool 10 shown below divides the result of math tool 9 by the constant 3. The math tool result is the average of the measurement of the three line gages. You set the acceptance range so that if the math tool 10 result is too high, or too low, the math tool fails, and the VIM2 module outputs a reject decision. Math Tool

Divide operator x

Example Math Tool Menu first part

I(

-Tool ConstayS

3

A

,

Nyx

9 ,

/

A

,No

Selection

Example Math Tool Menu second part

Note: When using the Diuide operator, you are allowed to select only two operands; the Third and Fourth Operand Type icons are set to No Selection. The Second Operand Type must be a constant (anchor icon). Also, you are not allowed to select the all tools (asterisk) icon for the Operand Number.

Page 256

Chapter 72-30

12

Using Math Tools

(This page intentionally left blank)