The text of a manual · part 27 of 47
Bulletin 2803 VIM Vision Input Module User Manual: 12 - Using Math Tools, pages 227 to 236
Pages 227 to 236 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 227
Chapter
12 Using Math Tools
Chapter Objectives
The objective of this chapter is to show how to use the Math Tool menu icons to configure math tools as part of a VIM2 module configuration for an inspection application (Note: This chapter assumes you have already read and understand the previous chapters in this manual, especially Chapters 9, 10, and 11, which discuss line gages and windows).
Some Questions and Answers about Math Tools
This section introduces the topic of math tools by posing some questions about math tools, and answering them. What are math tools? Math tools are really formulas, which you create, to combine or adjust the results ofone or more inspection tools, through either arithmetic or logical operations. How many math tools are there? There are 12 math tools in all - numbered for you to configure.
1-12 - available
How do math tools work? Math tools use an operator (such as + , -, X , or logical OR) to perform an operation on one or more operands (e.g., line gage results, other math tool results, and/or constants) in order to obtain a result. This result is then compared to a preset acceptance range, just as window and line gage results are, in order to help provide the basis for accept or reject decisions (Note: The logical operators AND and OR are exceptions). What kinds of math tool ‘toperators” are there? Math tool operators include: + (add): add together the operands - (subtract): subtract one operand from another x (multiply): multiply one operand times another + (divide): divide one operand by a constant (logical) AND: AND result status of the listed operands (logical) OR: OR result status of the listed operands Minimum: the minimum result amongst the listed tools Muxim~m: the maximum result, amongst the listed tools How do you set up a math tool? Using the Math Tool menu icons, you first select the math tool number (l-12), and enable the math tool. You then configure the math tool: you select the operator (such as + , -3 X , etc.); you select the operands (line gages, and/or windows, an&or math tools, and/or constants) which will be used in the math tool; and you then set an acceptance runge for the math tool results - during inspection this range helps provide the basis for an accept or reject decision.
Page 228
Chapter 12-2
Some Questions and Answers about Math Tools (continued)
12
Using Math Tools
What can you do with math tools? Using math tools you can, for example: l Use addition to sum tool results l Use multiplication or division to scale tool results l Use subtraction to find the difference (distance or area) between two tool results l Use addition and division to average tool results l Use AND or OR operators to group the accept / reject results of different tools 0 Use maximum or minimum to compare results When do you set up a math tool? Set up a math tool after you have: l Set up the workstage, and have a workpiece in the nominal or ideal position (see Chapter 4), so that the workpiece features to be inspected are shown clearly in the field of view (and on the monitor). l Set up all the line gages and windows (see Chapters 9 and 10 for information), or other math tools you will use as the operands when configuring the math tool.
Accessing the
Math Tool Menu
Your Action Pick titleSetup icon on the Main menu to access the Setup menu.
To begin to set up a math tool, first access the Math Tool menu as described below. Comments If the Main menu is displayed, access the Setup menu by picking the Setup icon (the “open padlock”). If the Setup menu is already displayed (as shown below), skip this step. d
Pick the Math Tool icon.
Math Tool Icon
Picking the Math Too2 icon on the Setup menu displays the first part of the Math Tool menu:
Note: You cannot access the Math Tool menu unless at least one window is enabled, or at least one line gage (numbered from l-22 only) is enabled.
Page 229
Chapter
12
Using Math Tools 12-3
Accessing the Math Tool Menu (continued)
Comments
Your Action Pick the second (enable/disable) icon to enable the math tool.
Picking the enable /disable icon toggles the icon between enabled and disabled (indicated by the diagonal slash across the icon. When this icon is set to enabled, this allows you to pick other icons on the Math Tool menu. the diagonal
When you pick this icon -
Pick the ETC icon.
slash disappears.
Picking the ETC icon displays the second part of the Math Tool menu (picking ETC on the second part of the menu redisplays the first part of the menu).
Note: If the only tools enabled are line gages (other than math tools), the first and second part of the Math Tool menu appear as follows, when first accessed, after you have enabled the math tool (Le., line gage upper function icons replace the window icons):
The line gage upper function icon r
Page 230
Chapter 12-4
I2
Using Math Tools
Accessing the Math Tool Menu
Math Tool Menu
Below are descriptions of the icons on the first part of the Math Tool menu (other than the ETC and OK icons):
+-x/ 1
I
X l!Bl +X/ IUI
Math Tool Enable -Pick this icon to enable or disable the selected math tool. This icon, when picked, toggles between enabled or disabled (disabled is indicated by diagonal slash across the icon). You must enable a selected math tool in order to use the remaining Math TooE icons to configure a math tool. Also, a math tool must be enabled in order to be part of your inspection configuration. Operator -Pick this icon to select the type of operator the math tool will use. Picking the icon repeatedly toggles the icon through eight different operator icons, in the following order -AND (shown at left), OR, Minimum, Maximum, Add, Subtract, Multiply, and Divide.
la
First Operand Type -Pick this icon to select which type of tool the math tool will use as the first operand. Picking the icon repeatedly toggles this icon through the available selection of operand types - window (shown at top left), line gage upper function, line gage lower function, and/or math tool (a constant operand is also available for operands other than the first). This icon works in conjunction with the First Operand Number icon. Note: If no windows are enabled, the Line Gage Upper Function icon is displayed (shown at left) when the math tool is enabled.
ml
El
El
Math Tool Select-Pick this icon to select the math tool from a choice of numbers 1-12. Numbers 1-12, then back to 1 again, etc., are displayed in sequence as you repeatedly pick the icon, or hold the light pen tip down against the icon.
*
First Operand Number-This icon works in conjunction with the First Operand Type icon. Pick this icon to select the specific number of the tool whose type-is indicated by the First Operand Type icon. Picking this icon repeatedly toggles this icon through the available numbers for the tool all numbers of tools of the selected type which are ena bled comprise the selectable operand numbers. Note: The asterisk-shaped icon shown at left selects all tools of the type indicated by the First Operand Type icon.
Page 231
Chapter
Accessing the Math Tool Menu (continued)
12
Using Math Tools 12-5
The second part of the Math Tool menu consists of three more operand type and operand number icons, the Acceptance Range icon, and the ETC icon. Below are descriptions of these icons (other than the ETC icon):
Thir‘d Opkrand Type and Operand Number Icons
Second Operand Type and Operand Number Icons
Fourth Operand Type and Operand Number Icons
Second Operand Type -Pick this icon to select which type of vision tool the math tool will use as the second operand. This icon works in conjunction with the Second Operand Number icon to select the second operand; this icon works just like the First Operand Type icon, with some exceptions.
1111
Second Operand Number -This icon works in conjunction with the Second Operand Type icon to select the second operand. This icon works just like the First Operand Number icon, with some restrictions.
mEl
Third Operand Type and Number - Pick these icons to select the third operand of the vision tool. These icons work just like the Second Operand Type and Number icons, with some exceptions.
msEl
Fourth Operand Type and Number - Pick these icons to select the fourth operand of the vision tool. These icons work together just like the Third Operand Type and Number icons, with some exceptions.
m HI
LO
Acceptance Range -Pick this icon to access the Acceptance Range menu for the selected math tool. Use the Acceptance Range menu to set the upper and lower limits for the math tool results, and to read the current math tool result. Note: The next section, “Math Tool Components,” discusses the Operator Type, Operand Type, and Operand Number icons further.
Page 232
Chapter 12-6
Math Tool Components
12
Using Math Tools
Wh en you configure a math tool, you create a formula consisting of a combination of operator and operands that act together to produce a result. The three terms, operator operand, and result, are defined below: Operator - A symbol (such as + ) or a term (such as AND) that represents an arithmetic or logical operation performed upon one or more operands (all eight of the operators are described under “The Operators” heading in this section). Operand -A quantity or value (such as a constant, or the measured result from a specific window, or the accept / reject result from a line gage function) upon which the operator acts (all of the operands are described under ‘The Operands” heading in this section). Result-The value generated by the math tool as a consequence of the operator acting upon the operands. This result is compared to a preset acceptance range, just as window and line gage results are, in order to help provide the basis for an accept or reject decision (Note: The logical operators AND and OR are exceptions to this). To review the math tool components, first access the Math Tool menu as described on pages 12-2 and 12-3.
The Operator5
For each math tool you configure, you select a single operator; the choice of operator determines the type of operation the math tool will perform involving the selected operands. Select the operator by picking the Operator icon.
Math Tool Menu
\
Your Action Pick the Operator icon.
AND
OR
Operator Icon
Comments When the math tool is first selected, the Operator icon is set to AND. Picking the icon repeatedly will cycle the icon through eight operator icons, as shown below:
Minimum
Maximum
Add
Subtract
Multiply
Divide
Page 233
Chapter
The Operators (continued)
ml I’I
32
Using
Math Tools 12-7
Here are brief descriptions of the operators (the operators are each described more fully later in this chapter, under the “Math Tool Examples’” heading). AND -The AND operator checks the decision status (accept/ reject) of each of the selected tools (operands). The AND result is always O*; the AND decision status is: 0 - (accept) if all selected tools had accept decisions 1 - (reject) if at least one tool had a reject decision OR -The OR operator checks the decision status (accept / reject) of each of the selected tools (operands). The OR result is always O*; the OR decision status is: 0 - (accept) if at least one tool had an accept decision 1 - (reject) if all tools had rejectdecisions *Note: For AND and OR, the decision status is displayed as the current result value in the acceptance range display. The range limits have no meaning and are ignored.
+/ III
Minimum -The Minimum operator compares the numerical (measured) results of each of the selected tools (operands); the Minimum result indicates the lowest value measured amongst the results of the selected tools.
I/r+
Maximum -The Maximum operator compares the numerical (measured) results of each of the selected tools (operands); the Maximum result indicates the highest value measured amongst the results of the selected tools.
I+
Add - The Add operator adds the numerical (measured) results of each of the selected operands; the Add result indicates the sum of the measured results of the operands.
El
IX I ElI
Subtract-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. Multiply -The MuZtipZy operator multiplies the numerical (measured) result of one tool (operand) by that of another (only two operands are allowed; the second can be a constant); the MuZtipZy result is the product of the operands. Divide -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 result indicates the quotient of the first operand divided by the second.
Page 234
Chapter 12-8
12
Using Math Tools
After selecting the math tool operator, you select the math tool operands by using two types of icons - the Operand Type and Operand Number icons (there are four of each of these icons in the Math Tool menu). The two icon types work together to select the operand; you might consider these eight icons to be four Operand icon pairs. Diagrammed below is a typical Math. Tool menu (both parts), showing the four Operand icon pairs:
The Operands
Operand Number icon
Operand Type icon Example Math Tool Menu first part
\
~-;/~~~I Four Operand
+ Brig Icon Pairs
J
I m ETC pa ir1st ODerand
Example Math Tool Menu second pat-t
Operand Type /cons -Picking an Operand Type icon selects the type of operand - Window, Line Gage Upper, Line Gage Lower, Math Tool, Constant, or No Selection. Note: The selection of operand type is subject to restrictions, Not all types are available in all cases (see “Operand Type and Number Restrictions” on page 12-10). Your Action Pick the First Operand Type icon.
Window
Comments Picking the icon repeatedly cycles the icon through the available Operand Type icons (not all operands are available in all cases). All of the Operand Type icons are shown below:
Line Gage (upper function)
Line Gage (lower function)
Math Tool
Constant
No Selection
Note: When you pick either an operand type icon or operand number icon on the Math Tool menu, the selected line gage or window is displayed on the monitor over its respective threshold image. If you select a math tool as the operand, all enabled windows are displayed over threshold image 1; if no windows are enabled, all enabled line gages are displayed over threshold image 1. If the third or fourth operands are
Page 235
Chapter
The Operands (con timed)
I2
Using Math Tools 72-9 selected, then disabled, the second operand will be displayed. If the second operand is a constant, the first operand is displayed. If the third or fourth operand is a constant, the second operand is displayed. Operand Number Icon -After selecting the Operand Type, picking the Operand Number icon selects the specific tool number (or constant value, if constant is operand type). The range of selectable numbers depends on the Operand Type icon selected l
Window (l-4, *)
l
Line Gage Upper or Lower (l-22, *)
l
Math Tool (l-12)
l
Constant (l-30,50, or 100)
where “*” selects all enabled tools of the selected type. Note: The selection of operand number is subject to restrictions. Not all numbers are available in all cases (see “Operand Type and Number Restrictions” on the next page). For example, you are not allowed to choose a number to select a specific tool unless that tool is enabled. Your Action Pi& the First Operand Number icon.
Comments Picking the icon repeatedly cycles the icon through the auaiZabZe operand number icons (the illustration shown below assumes all four windows are enabled): First Operand Number Icon
First Operand Type Icon (Window) Example Math Tool Menu first part
\u
J this icon cycles through the k Picking numbers of all the enabledwindows.
1c
Page 236
Chapter 72-10
The Operands (con timed)
I2
Using Math Tools
Operand Type and Number Restrictions - You will encounter the following restrictions when selecting the Operand Type and Operand Number icons: The VIM2 module does not allow you to select an operand type if no tools of that type are currently enabled (for example, if no windows are enabled, the Window icon is not an option for any of the four Operand Type icons). You are not allowed to select either the constant or the No Selection icon as the First Operand Type icon. You are not allowed to select the No Selection icon as the Second Operand Type icon. If you select either the AND or OR operator, you are not allowed to select the constant icon as an operand type. You are not allowed to select a Fourth Operand Type icon if the Third Operand Type icon is No Selection. Also, the VIM2 does not allow you to pick No Selection as the Third Operand Type if a Fourth Operand Type other than No Selection is selected. You are not allowed to pick an operand number representing a tool which is disabled. For example, if only windows 1 and 2 are currently enabled, and Window is the selected operand type icon, you are allowed only to select 1,2, or, in some cases, the all tools (asterisk) icon. You can select the all tools (asterisk) icon only for the AND, OR, Minimum and Maximum operators. You can select the all tools (asterisk) icon only for the First Operand Number icon; once you select all tools for the First Operand Number icon, the VIM2 does not allow you to select any other operands for that math tool (all other operand icon pairs appear the same as the first). If you select Math Tool icon as an operand type, you cannot select the all tools icon for operand number. Also, you are not allowed to select the number for the same math tool you are configuring. And, you are not allowed to select a particular math tool as an operand if that particular math tool contains the math tool you are configuring as an operand, or if it contains a tool which contains the math tool, etc. If you select the Multiply operator, you are allowed only to select two operands (you are allowed to use only the first and second operand icon pairs). You are not allowed to use the all tools icon as an operator number. If you select the Divide operator, you are allowed to select two operands only (you use only the first and second operand icon pairs). You can not use the all tools icon as the operator number. For the second operand type you are only allowed to use the constant icon.