Rockwell Automation 5370-CMPK User Manual

Bulletin 5370 Color CVIM Module MATH-PAK Option
(Catalog No. 5370–CMPK)
User’s Manual
ALLEN-BRADLEY
ALLEN-BRADLEY

Important User Information

Solid state equipment has operational characteristics differing from those of electromechanical equipment. “Application Considerations for Solid State Controls” (Publication SGI-1.1) describes some important differences between solid state equipment and hard–wired electromechanical devices. Because of this difference, and also because of the wide variety of uses for solid state equipment, all persons responsible for applying this equipment must satisfy themselves that each intended application of this equipment is acceptable.
In no event will the Allen-Bradley Company be responsible or liable for indirect or consequential damages resulting from the use or application of this equipment.
The examples and diagrams in this manual are included solely for illustrative purposes. Because of the many variables and requirements associated with any particular installation, the Allen-Bradley Company cannot assume responsibility or liability for actual use based on the examples and diagrams.
No patent liability is assumed by Allen-Bradley Company with respect to use of information, circuits, equipment, or software described in this manual.
Reproduction of the contents of this manual, in whole or in part, without written permission of the Allen-Bradley Company is prohibited.
1993 Allen-Bradley Company, Inc.

Table of Contents

Color CVIM MATH-PAK User’s Manual
A–B
Using This Manual
Introduction to the MATH–PAK Option
Installation
Chapter 1
Chapter Objectives 1–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Manual Contents 1–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Intended Audience 1–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Notice of Attention 1–2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Related Publications 1–2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Trademarks 1–2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 2
Chapter Objectives 2–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MATH-PAK Preview 2–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Definition of a Formula 2–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
How Formula Results Are Applied 2–2. . . . . . . . . . . . . . . . . . . . . . . . .
Accessing the MATH-PAK Features 2–4. . . . . . . . . . . . . . . . . . . . . . . .
Copy and Paste Functions 2–5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Runtime Displays 2–5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 3
Chapter Objectives 3–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Installing the MATH-PAK Option 3–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Defining Formulas
Chapter 4
Chapter Objectives 4–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Formula Definition: Basic Steps 4–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Selecting a Formula 4–2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Selecting the Formula Number(s) 4–3. . . . . . . . . . . . . . . . . . . . . . . . . .
Defining a Formula 4–4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Accessing the Formula Entry Keyboard 4–5. . . . . . . . . . . . . . . . . . . . .
Using the Formula Entry Keyboard 4–7. . . . . . . . . . . . . . . . . . . . . . . . .
Example Formula Entry 4–9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Edit / Control Keys 4–10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Example of Formula Editing 4–11. . . . . . . . . . . . . . . . . . . . . . . . . .
Operands 4–12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Entering Constants as Operands 4–16. . . . . . . . . . . . . . . . . . . . . . . .
Operators 4–17. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Operator Execution Hierarchy 4–20. . . . . . . . . . . . . . . . . . . . . . . . .
Operator Usage 4–21. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Mathematical Operators 4–21. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Statistical Operators 4–29. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Logical Operators 4–33. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Conditional Operators 4–35. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Additional Formula Examples 4–35. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Flagging Consecutive Rejects 4–35. . . . . . . . . . . . . . . . . . . . . . . . .
i
Table of Contents
Color CVIM MATH-PAK User’s Manual
Defining Formulas
Analysis Functions and Runtime Displays
Chapter 4 (continued)
Creating a Shift Register 4–36. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Naming a Formula 4–37. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Enabling / Disabling a Formula 4–38. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using Copy and Paste 4–39. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Example Copy and Paste 4–41. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Setting Range Limits and Assigning Outputs 4–41. . . . . . . . . . . . . . . . . . . .
Entering Range Limits for Formulas 4–43. . . . . . . . . . . . . . . . . . . . . . . .
Inspection Statistics Table 4–44. . . . . . . . . . . . . . . . . . . . . . . . . . . .
Example Range Limit Setting 4–45. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Assigning Range Limits to Results Output Lines 4–46. . . . . . . . . . . . . .
Enabling Results and Range Limits for Corresponding Tools 4–47. . . . .
Chapter 5
Chapter Objectives 5–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Analysis Functions 5–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Statistics (Learn Mode) for Failed Tools 5–2. . . . . . . . . . . . . . . . . . . . . . . .
Runtime Displays 5–3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Runtime Tools Displays 5–4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
I/O Page 5–4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Results and Stat1 Page Displays 5–5. . . . . . . . . . . . . . . . . . . . . . . . . . .
Color CVIM Communications with MATH-PAK Installed
ii
Appendix A
Objective A–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Formula Data Replaces Tool Data A–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Results Blocks A–2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuration Blocks A–6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Discrete Bits A–9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Index
Tables
1.A Chapter Descriptions 1–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.A Formula numbers and corresponding gage/window numbers 4–3. .
4.B Edit / Control Keys 4–10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.C Operand Definitions 4–14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.D Operator Definitions 4–18. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.1 Formula numbers and corresponding gage/window numbers A–1. .
A.2 Results Block 1 – Formula/Tool Results A–3. . . . . . . . . . . . . . . . . .
A.3 Results Block 2 – Formula/Tool Results A–4. . . . . . . . . . . . . . . . . .
A.4 Results Block 3 – Formula/Tool Results A–6. . . . . . . . . . . . . . . . . .
A.5 Configurations block numbering for formulas 1–56
(and corresponding tools) A–7. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents
Color CVIM MATH-PAK User’s Manual
Tables (continued)
A.6 Configuration blocks 46–77 – for formulas 9–16, 25–32, 41–56
(gages 1–32) – fault and warning ranges A–8. . . . . . . . . . . . . . . . . .
A.7 Configuration blocks (even numbered, 110–156) for formulas 1–8,
17–24, 33–40 (windows 1–24) – fault and warning ranges A–9. . . .
A.8 Discrete Input Bits for formulas and corresponding tools A–10. . . . .
Figures
2.1 Color image vs. gray-scale image 2–1. . . . . . . . . . . . . . . . . . . . . . .
2.1 Inspection results data handling without MATH–PAK formulas 2–2
2.2 Inspection results data handling when using a MATH–PAK
formula 2–3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3 Accessing the MATH-PAK features 2–4. . . . . . . . . . . . . . . . . . . . .
2.4 Copy and Paste functions 2–5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.5 Results Page displaying formula results 2–5. . . . . . . . . . . . . . . . . .
3.1 Inserting the MATH-PAK installation card 3–2. . . . . . . . . . . . . . . .
3.2 Title banner indicating the presence of the MATH-PAK option 3–3
4.1 Selecting the formula number 4–2. . . . . . . . . . . . . . . . . . . . . . . . . .
4.2 Using the Jump box and calculator pad 4–4. . . . . . . . . . . . . . . . . . .
4.3 Accessing the formula entry keyboard pad 4–5. . . . . . . . . . . . . . . .
4.4 Switching between the two key sets of the formula entry keyboard 4–6
4.5 Edit/control keys 4–10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.6 Operand keys 4–12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.7 Operator keys (initial key set) 4–17. . . . . . . . . . . . . . . . . . . . . . . . . .
4.8 Example application, using the subtraction operator 4–22. . . . . . . . .
4.9 Example of using the DST function 4–25. . . . . . . . . . . . . . . . . . . . .
4.10 Arcsine and arctangent operation results 4–26. . . . . . . . . . . . . . . . . .
4.11 Arccosine operation results 4–27. . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.12 Example application: Using the arctangent to calculate
an angle q 4–27. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.13 Example application: Using operands GAGE2 and GAGE2.3 4–28
4.14 Example application: Finding angular results greater than 90° 4–28.
4.15 Example application: Finding angular results greater than 270° 4–29
4.16 Example application, using three gages to find an
average measurement 4–30. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.17 Example application, using windows and the mode operator 4–32. .
4.18 Example application, using gages and the variance operator 4–33. .
4.19 Using the keyboard to set the formula name 4–37. . . . . . . . . . . . . . .
4.20 Enabling a formula 4–38. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.21 Copying a formula 4–40. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.22 Assigning range limits 4–43. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.23 Example: Range limits for linear gaging 4–45. . . . . . . . . . . . . . . . .
4.24 Example: Formula with conditional operation for comparing gage
results 4–46. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
iii
Table of Contents
Color CVIM MATH-PAK User’s Manual
Figures (continued)
4.25 Selecting output lines for range limits 4–47. . . . . . . . . . . . . . . . . . . .
4.26 Enabling the range limits and outputs for tools 4–48. . . . . . . . . . . . .
5.1 Selecting the Tool Display menu 5–1. . . . . . . . . . . . . . . . . . . . . . . .
5.2 The Range Fail box 5–2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.3 Runtime Display menu – setup mode 5–3. . . . . . . . . . . . . . . . . . . .
5.4 Display menu – run mode 5–3. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.5 Formulas displayed in Failed Tools display during run mode
operation 5–4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.6 Formulas displayed on I/O Page display during run mode
operation 5–5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.7 Calculator pad for entering number of displayed
formula/tool results 5–6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.8 Typical help message for the Disp. Windows option 5–7. . . . . . . . .
iv
Chapter

Chapter Objectives

A–B
1
Using This Manual
Contents
Chapter Objectives 1–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Manual Contents 1–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Intended Audience 1–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Cautions 1–2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Related Publications 1–2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Trademarks 1–2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The objective of this chapter is to provide an overview of the contents and organization of this manual, to describe the intended audience, and to list related publications.

Manual Contents

The contents of this manual are briefly described in
Table 1.A Chapter Descriptions
Chapter/
Appendix
1 Using This Manual Provides an overview of the manual. 2
3 Installation
4 Defining Formulas
5
A
Analysis and Runtime
Communications with
MA TH-PAK Installed
Title Description
Introduction to the
MA TH-PAK Option
Displays
Color CVIM
Previews the main features and capabilities of the MA TH–PAK option.
Describes how to install the MA TH-PAK option into the Color CVIM module.
Describes how to access the MATH-PAK formula keyboard, lists and describes the formula operators and operands, discusses selecting and enabling/disabling formulas, discusses the Copy and Paste functions, and discusses setting range limits and assigning outputs.
Desribes the use of analysis functions and runtime displays with MA TH-PAK installed.
Lists the effects that MATH-PAK formulas have on the results and configuration blocks available through the serial and parallel ports.
Table 1.A below.

Intended Audience

Before using this manual, you should be familiar with the Color CVIM module features and the procedures used in configuring the Color CVIM module for operation.
For information regarding the Color CVIM module, refer to the Color
CVIM User’s Manual, Cat. No. 5370–ND009 (Series A).
1–1
Chapter 1
Using This Manual
If you plan to use Color CVIM communications, refer also to the Color
CVIM Communications Manual, Cat. No. 5370–ND0010 (Series A).
If you plan to use other software option packages along with the
MATH-PAK option, refer to the users manuals for the respective software package as necessary.

Notice of Attention

Related Publications

Notices of attention are included when the COLOR CVIM module or peripheral equipment could be damaged if the listed procedure is not followed. The following format is used:
ATTENTION: Identifies information about practices or circumstances that can lead to personal injury or death, property
!
damage, or economic loss.
Attentions help you:
identify a hazard
avoid the hazard
recognize the consequences
Important: Identifies information that is especially important for successful
application and understanding of the product.
The following manuals are cited for reference in this manual:
User’s Reference Manual, Bulletin 5370–CVIMC, Cat. No. 5370–ND009
(Series A), also referred to as the Color CVIM Users Manual in this publication.

Trademarks

1–2
Communications Manual, Bulletin 5370–CVIMC, Cat. No. 5370–ND010
(Series A), also referred to as the Color CVIM Communications Manual in this publication.
The following trademarks apply to products mentioned in this manual:
Color CVIMModule – Allen–Bradley Cat. No. 5370–CVIMC MATH–PAKOption – Allen–Bradley Cat. No. 5370–CMPK
Chapter

Chapter Objectives

MATH-PAK Preview

A–B
2
Introduction to the MATH–PAK Option
Contents
Chapter Objectives 2–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MATH-PAK Preview 2–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
This chapter briefly describes the features and capabilities available with the MATH–PAK option package installed in the Color CVIM module.
The MATH–PAK option enables your Color CVIM module to automatically perform a variety of mathematical and/or logical operations, using formulas that you define, on inspection data from any of the module’s analysis tools.
The MATH-PAK option is designed to give you much greater flexibility in the use and application of the Color CVIM modules inspection capabilities, allowing you to quickly perform complex data manipulation on the fly. Also, because these calculations are handled within the Color CVIM module itself, the MATH-PAK option can help simplify the programming of, or help eliminate the need for, an external system host computer or controller.

Definition of a Formula

A MATH-PAK formula is defined by the user. A formula consists of one or more mathematical or logical operators, and one or more operands, which combine to provide a mathematical or a logical (1 or 0) result.
Note: The term operator refers to the mathematical, logical, or other operation performed, such as add, multiply, square root, cosine, AND, etc. The term operand refers to the initial data value upon which the operations are performed, such as a gage result, or a constant.
You can define up to 56 different formulas, each consisting of a number of different components (operators and operands).
MATH-PAK formulas can perform a variety of operations, from simple arithmetic to more complex trigonometric functions, square roots or statistics values, and a number of other mathematical or logical operations. Operators can be used alone in a formula, or in combination.
MATH-PAK formulas can perform operations on a variety of operands, including the numerical results from a tool, tool pass/fail status, object contour analysis results, statistics based on a tools results, and even the results from other formulas.
Formula results can be logical (1 or 0), integer, or fixed point (decimal).
2–1
Chapter 2
Introduction to the MATH-PAK Option
Example formulas: This simple formula scales a window’s results by a constant multiplier (using the multiply operator (
*) and 2 operands –
window 4 and the constant, 0.75):
WINDOW4 * 0.75
The formula below averages the results from gages 1, 2, and 3 (using the add operator (+) and the 3 gage operands, then using the divide operator ( / ) and the constant, 3):
(GAGE1 + GAGE2 + GAGE3) / 3

How Formula Results Are Applied

Figure 2.1 illustrates how the inspection tool results are range-checked and applied to discrete outputs, without MATH-PAK installed.
Color CVIM Inspection
Inspection results data from one or more tools
No
Appropriate
fault/warning bit(s)
cleared
fault/warning bit(s) set
Figure 2.1 Inspection results data handling without MATH–PAK formulas
Without MATH-PAK formulas, tool results data and pass/warn/fault status are
available for use Range limits exceeded or tool failed?
Yes
Appropriate
directly – as is.
To: Chassis backplane
2–2
Results data stored
in Color CVIM memory
Bit(s) sent to assigned output(s)
To: 1771 Remote I/O port
To: RS-232 port
Upon completion of each inspection cycle, the Color CVIM module stores the resulting inspection data from each analysis tool used in the inspection. This information is accessible to host devices connected to the Color CVIM through the backplane, 1771 Remote I/O port, or RS-232 port.
Color CVIM Inspection
Inspection results
from one or more tools
Chapter 2
Introduction to the MATH-PAK Option
When the MATH-PAK option is installed, the results information for each inspection is also available for use in MATH-PAK formulas. You can define formulas to combine or manipulate, in any number of ways, the inspection data gained from one or more tools used in the inspection.
Figure 2.2 illustrates how the inspection results can be manipulated by formulas with MATH-PAK installed.
Figure 2.2 Inspection results data handling when using a MA TH–PAK formula
No
Appropriate
fault/warning bit(s)
cleared
fault/warning bit(s) set
Range limits exceeded or tool failed?
Yes
Appropriate
Bit(s) sent to assigned output(s)
Formula manipulates data from tool(s)
Results from formula
Results data stored in Color CVIM memory
2: Formula results can replace, or be provided along with, tool results.
Using MATH-PAK formulas, tool results can be combined or
1
manipulated.
1: Formula results can be range-checked instead of, or along with, tool results.
To: MATH–PAK formula(s) (if applicable)
To: Chassis
2
backplane
To: 1771 Remote I/O port
To: RS-232 port
Range limits and output assignment: For each formula you define, as with the inspection tools, you can set warning and fault range limits for the results, and assign the range limits to discrete outputs (see Figure 2.2).
2–3
Chapter 2
Introduction to the MATH-PAK Option
Depending on your requirements, you can configure the Color CVIM module so that it range-checks formula results instead of, or in addition to, the initial tool results.
Data communication: The formula results information is, as with inspection tool results, also accessible to devices connected to the Color CVIM module through the backplane, 1771 Remote I/O port, or RS-232 port. Depending on your requirements, you can configure the Color CVIM module so that formula results are accessible instead of, or in addition to, the initial tool results.

Accessing the MATH-PAK Features

With the MATH-PAK option installed, the MATH-PAK features are accessed through the added Config. Results box on the Archival menu. To access the Config. Results (MATH-PAK) menu, you would:
Pick MiscArchival to access the Archival menu (see Figure 2.3).
Pick Config. Results on the Archival menu.
To define a formula, you would pick Set Formula on the Archival menu. When you do, the formula entry keyboard appears (see Figure 2.3). You then enter a formula by picking the appropriate boxes on the formula keyboard.
Figure 2.3 Accessing the MA TH-PAK features
Formula entry keyboard
2–4
Chapter 2
Introduction to the MATH-PAK Option

Copy and Paste Functions

You can copy the definition of one formula to another using the Copy and Paste menu items which are part of the new MATH–PAK menus (see
Figure 2.4). After you copy one formula to another, for example, you can make changes to the formula as necessary. This can save time and effort during setup, especially when you want to try out different variations of a formula you have defined, or if two or more formulas will be very similar.
Figure 2.4 Copy and Paste functions
Config. Results menu
Copy and Paste boxes

Runtime Displays

With the MATH-PAK option installed, the runtime displays can accommodate the MATH-PAK formulas. For example, the Results page can list the formula results along with other tool results (see Figure 2.5).
Figure 2.5 Results Page displaying formula results
2–5
Chapter

Chapter Objectives

Installing the MATH-PAK Option

A–B
3
Installation
Contents
Chapter Objectives 3–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Installing the MATH-PAK Option 3–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
This chapter describes how to install the MATH-PAK option in the Allen–Bradley 5370–CVIMC Color CVIM module.
The MATH-PAK option is provided on the supplied memory card. This section describes how to install the MATH-PAK option. Please note the following considerations:
Required Firmware: The Color CVIM module must have the Revision A02 (or higher) firmware before the MATH-PAK option can be installed (the firmware revision is listed on the title banner on the monitor screen following powerup).
OneTime Installation: You need only install the MATH-PAK option once; once installed, the MATH-PAK option remains installed for all subsequent powerups.
To install the MATH-PAK option in your Color CVIM module:
Remove DC power from the Color CVIM module.
Insert the MATH-PAK installation card into the Archive Memory slot on
the Color CVIM module. Insert the end with the metal strip facing right (see Figure 3.1, page 3–2).
Restore DC power to the Color CVIM module – this starts the loading
sequence.
ATTENTION: Do not remove power to the Color CVIM module during loading of the MATH-PAK option. Doing so may
!
damage the Color CVIM module.
3–1
Chapter 3
Installation
MATH-PAK installation card
Figure 3.1 Inserting the MA TH-PAK installation card
Color CVIM module
Archive Memory slot
Card Label
Metal Strip
The loading process requires about 45 seconds. The LEDs near the top of the face of the Color CVIM module indicate the progress of the three–phase loading process (with each phase taking about 15 seconds):
LEDs
Pass/Fail
Trigger 1 Green Green Off Trigger 2 Off Green Green
1
Red–to–yellow–
to–green
MA TH-PAK Loading Phase
2 3
Green
Red–to–yellow–
to–green
When the loading process is complete, the Color CVIM module initiates its normal powerup sequence.
Once the powerup sequence is complete, you can verify that the
MATH-PAK option is installed by checking for the MATH-PAK indication on the powerup title banner on the monitor; if the MATH-PAK option is installed, it is listed as on of the “Packages” on the title banner, along with other installed options, if any.
Remove the MATH-PAK installation card from the Archive Memory slot.
At this point, the MATH-PAK option has been successfully installed, and can be used as required in your Color CVIM module configurations.
3–2
Chapter

Chapter Objectives

A–B
4
Defining Formulas
Contents
Chapter Objectives 4–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Formula Definition: Basic Steps 4–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Selecting a Formula 4–2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Defining a Formula 4–4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Naming a Formula 4–37. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Enabling/Disabling a Formula 4–38. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using Copy and Paste 4–39. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Setting Range Limits and Assigning Outputs 4–41. . . . . . . . . . . . . . . . . . . .
This chapter describes how to configure MATH-PAK formulas, including how to select formulas, how to access and use the formula entry keyboard to define a formula, and how to copy formulas.

Formula Definition: Basic Steps

The MATH–PAK option enables your Color CVIM module to automatically perform a variety of mathematical and/or logical operations, using formulas that you define, on inspection data from any of the module’s analysis tools.
A MATH-PAK formula is defined by the user. A formula consists of one or more mathematical or logical operators, and one or more operands, which combine to provide a mathematical or a logical (1 or 0) result.
The result of the formula can be assigned range limits, and the range limits can be assigned to outputs.
You can define up to 56 different MATH-PAK formulas. Listed below are the basic steps involved in initially defining a formula:
1. Select formula – Select the number of the formula to define, taking into
consideration that results from enabled formulas can replace output from corresponding tools.
2. Define and save formula – Define the formula by selecting and placing,
in logical sequence, the appropriate components (operands and operators) using the formula entry keyboard, accessed through the Set Formula box.
3. Name formula – Enter a descriptive name for the formula, if desired, by
picking the Set Name box and using the character entry keyboard.
4. Enable formula – Enable the formula, if appropriate, by picking the
Formula #: Disabled box.
5. Set range limits and assign outputs – Set range limits and assign
outputs for the formula, as required, by picking the Range/Outputs box.
4–1
Chapter 4
Defining Formulas

Selecting a Formula

The first step in defining a formula is to select, by number (from 1–56), the formula you want to define. The current formula number is listed in the Formula #: box on the Config. Results menu (see Figure 4.1).
Figure 4.1 Selecting the formula number
Formula # box
Previous / Next boxes
In selecting the formula(s) you want to define, and also when selecting windows and gages to define, consider the following points:
Formulas are evaluated in numerical order: If you define formulas
which require results information from some other formula(s) from the current inspection, make sure the formulas providing the required results precede (in terms of numerical order) the formula requiring those results.
Formulas prevent the use of corresponding gage and window
outputs: Any formula you select and enable will disable the use of results outputs from a corresponding gage or window, as listed in Table 4.A, page 4–3. Note that gages 33–64 and windows 25–48 are not listed in Table 4.A; they are not affected by the use of formulas.
Warning message: Whenever you enable a formula, a warning message appears, identifying the corresponding tool that is being prevented from driving an output (see Enabling / Disabling a Formula on page 4–38).
Formula results replace the results of the corresponding gage and
window in the results blocks: When you enable a formula, its inspection results are listed in the results block, in place of the corresponding gage or window results (as listed in Table 4.A, page 4–3). Results blocks contain the comprehensive inspection results available by transfer through the Color CVIM backplane, or through one of the Color CVIM serial ports (see Appendix A for communications information).
When any formula is enabled, the Color CVIM module disables the Range/Outputs box on the Range/Reference menu for the corresponding tool (see Setting Range Limits and Assigning Outputs on page 4–41).
4–2
Chapter 4
Defining Formulas
To avoid losing the use of particular window or gage outputs or results, when defining formulas, select formula numbers which do not correspond to any gages or windows you have previously defined (see Table 4.A, page 4–3), or that you intend to define. Or, define a formula to provide the result value for a tool for which there is a conflict (see “Operands” in this chapter).
Otherwise, during setup of gages and windows, select gage and window numbers that will not conflict with the formulas you intend use. One way to do this is to select only gages numbered from 33–64, or windows numbered from 25–48, which are not affected by the use of formulas.
Use Copy and Paste functions: If you define a formula that turns out to correspond to a gage or window whose output or results block information you wish to use, you can copy that formula to another formula number that does not conflict (see Using Copy and Paste on page 4–39).
See Appendix A for communications information: Appendix A provides more information on the specific effects that using formulas has on the results blocks, on the configuration blocks, and on the discrete input bits.
Table 4.A Formula numbers and corresponding gage/window numbers
Formula Tool Formula Tool Formula Tool Formula Tool
1 Window 1 15 Gage 7 29 Gage 13 43 Gage 19 2 Window 2 16 Gage 8 30 Gage 14 44 Gage 20 3 Window 3 17 Window 9 31 Gage 15 45 Gage 21 4 Window 4 18 Window 10 32 Gage 16 46 Gage 22 5 Window 5 19 Window 11 33 Window 17 47 Gage 23 6 Window 6 20 Window 12 34 Window 18 48 Gage 24 7 Window 7 21 Window 13 35 Window 19 49 Gage 25 8 Window 8 22 Window 14 36 Window 20 50 Gage 26
9 Gage 1 23 Window 15 37 Window 21 51 Gage 27 10 Gage 2 24 Window 16 38 Window 22 52 Gage 28 11 Gage 3 25 Gage 9 39 Window 23 53 Gage 29 12 Gage 4 26 Gage 10 40 Window 24 54 Gage 30 13 Gage 5 27 Gage 11 41 Gage 17 55 Gage 31 14 Gage 6 28 Gage 12 42 Gage 18 56 Gage 32

Selecting the Formula Number(s)

There are two ways to select the formula number:
Use the Previous / Next boxes to decrement / increment the formula
number, until the desired number appears (see Figure 4.1, page 4–2).
Use the Jump box to enter the desired formula number directly (see
Figure 4.2, page 4–4).
4–3
Chapter 4
Defining Formulas
To use the Jump box to select the formula number:
Pick Misc Config. Results to access the Config. Results menu.
Pick the Jump box on the Config. Results menu. The calculator pad
appears (see Figure 4.2).
Pick the appropriate numeric key boxes on the calculator pad to select the
desired formula number.
When the desired formula number appears in the calculator pad display,
pick Enter on the calculator pad. This changes the selected formula to the number on the calculator pad display.
Figure 4.2 Using the Jump box and calculator pad

Defining a Formula

Jump box
Calculator pad
Formulas can be defined in a variety of ways to perform a variety of calculations.
Multiple operators, of different types, can be combined in different ways within a formula. “Nesting” of operations within a formula can be employed through the use of the parentheses. Or, a formula can consist of a single operand, with no operators.
A first step in formula definition is to review the available operators and operands – this information is listed in the sections Entering Operands and Entering Operators in this chapter.
4–4
The next step in formula definition is to decide on the formula content, and results desired from the formula – that is, determine what you want the formula to do, based on your application requirements.
Once you have decided on the formula requirements, to define a formula, use the formula entry keyboard, which is described in the following two sections.
Set Formula box
Chapter 4
Defining Formulas

Accessing the Formula Entry Keyboard

In order to define a formula you have selected, access the formula entry keyboard by selecting the Set Formula box. To do this:
Pick Misc Config. Results to access the Config. Results menu.
(see Figure 4.3).
Pick Set Formula on the Config. Results menu. The formula entry
keyboard appears.
Figure 4.3 Accessing the formula entry keyboard
Keyboard display area
Formula name field
Formula entry field
Key Area
The formula entry keyboard enables you to select the various operands, operators, and other elements that will make up the formula you are defining. The keyboard has two main areas – the key area, and the display area (see Figure 4.3).
Display area: The display area lists the formula name (which can be user-assigned), and lists the formula components as you select them.
Key area: You pick the keys in the key area in order to select components (operators and operands) to define the formula. The keys fall into several general categories – operand keys, operator keys, numeric keys, edit keys, and miscellaneous other keys.
Accessing the two key sets: The formula entry keyboard actually has two different key sets, in order to accommodate all of the formula elements. You can easily switch between the two key sets as necessary (see Figure 4.4).
4–5
Chapter 4
Defining Formulas
Figure 4.4 Switching between the two key sets of the formula entry keyboard
Initial key set
Secondary key set
Picking the up or down arrow key switches between the two key sets
To switch between key sets, use the and arrow keys (see Figure 4.4):
Pick the up () arrow key to switch from the initial key set to the
secondary key set.
Pick the down (↓) arrow key to switch back to the initial key set.
The initial key set contains all of the available operand keys, along with various operator keys, the numeric keys, and the edit/control keys. Each of these key types is discussed in later sections in this chapter.
4–6
The secondary key set offers additional operator types, replacing the initial operands and some of the operators. It retains some of the initial keys, including the numeric keys, the arithmetic keys, and the edit/control keys.
Formula is displayed
Chapter 4
Defining Formulas

Using the Formula Entry Keyboard

To define a formula, you would generally follow the steps listed below:
Pick Set Formula on the Config. Results menu to access the formula
entry keyboard (see Figure 4.3, page 4–5).
Enter your formula – Pick the keys on the keyboard which correspond to
the operators, operands, and other items (decimal points, commas, parentheses) you are using in the formula. As you pick your formula entries, they appear in the keyboard display:
A cursor indicates the point at which the next component entered will appear.
You can edit the formula as you enter it, using these edit keys:
← → Pick the arrows keys ( or) to move the cursor to the left or right
along the formula, in order to insert a component at a particular point in a formula, or to prepare to delete a particular component.
Del Pick the Del(ete) key to erase the entry to the left of the cursor. Clr Pick the Clr (clear) key to erase the entire formula.
When finished, you can pick the Ret key to save a formula, or pick the
Esc key, to restore the formula content to what it was when last saved.
When you pick the Ret key, the formula is saved, and a message appears:
You can continue to edit the formula after picking the Ret key – however, to save the changed formula, you must pick the Ret key when finished.
Saving the formula also enables the Set Name and Formula #: Disabled boxes on the Config. Results menu, which allow you to enable and name the formula.
4–7
Chapter 4
Defining Formulas
Results Display: When you pick the Ret key, and the formula is saved, the current result of the formula is listed in the keyboard display area:
The result format is either integer, or fixed decimal point, depending on the requirements of the operator(s) and/or operand(s) in the formula.
Question mark (?) incorrect syntax: The question mark (?) in the display, when present during formula entry, indicates that the formula is incomplete as entered, and/or that the syntax for one or more of the formula components is incorrect:
If you pick the Ret key while a (?) appears in the display, this warning message appears at the top of the screen:
To avoid losing your current formula entry, pick any key besides the Ret key (other than Clr or Esc). Otherwise, picking the Ret key at this point will clear the formula entry.
Using parentheses in formulas: Parentheses can be used when entering
formulas, in two different ways – Prioritizing operations – You can place parentheses around an operator
and its operands in order to prioritize that operation – that is, the operation in parentheses can be used as an operand by another operator. Nesting of operations within a formula can be employed, where a parenthetical portion is itself contained within another parenthetical portion of the formula.
4–8
Listing operands Some operators require that you enter one or more operands in a parenthetical list following the operator. In these cases, when you pick the operator, the “open” parenthesis is displayed. After you list the operand or operands (separated by commas), you then enter the close parenthesis.
Example Formula Entry
Chapter 4
Defining Formulas
To enter this formula:
AVG (GAGE1,GAGE2) * 0.250
Select an undefined formula (see “Selecting a Formula in this chapter),
and pick the Set formula box to access the formula entry keyboard.
Pick the AVG key on the formula entry keyboard (located on the
secondary key set). The formula keyboard display shows:
Formula:
Cursor
= AVG( ?
The “?” indicates the formula is incomplete to this point; the cursor indicates the point at which the next component will be entered.
Pick G (on the initial key set), to begin to enter the GAGE1 operand:
Formula:
= AVG( GAGE0 ?
Pick 1, to complete the entry of the GAGE1 operand:
Formula:
= AVG( GAGE1 ?
• Pick “ , ” (comma) , then G, then 2:
Formula:
= AVG( GAGE1, GAGE2 ?
Pick “ ) (close parenthesis) on the secondary key set. The formula is
now correct in syntax at this point; the “?” disappears:
Formula:
= AVG( GAGE1, GAGE2 )
Pick
Pick the Ret key to save the formula; a result is displayed:
” , then “.” (decimal point), then 2, then 5:
*
Formula:
= AVG( GAGE1, GAGE2 ) * 0.25
Formula: result: 602.000
= AVG( GAGE1, GAGE2 ) * 0.250
4–9
Chapter 4
Defining Formulas

Edit / Control Keys

You can edit the contents of a formula, using the edit/control keys, which are listed and described in Table 4.B.
Table 4.B Edit / Control Keys
Key
Del Delete Deletes the formula item to the left of the cursor.
Clr Clear Clears the entire formula.
Ret Return Causes the formula to be saved in memory.
Esc Escape Restores the formula to its condition when last saved.
↓ ↑
Name Edit / Control Function
Left arrow
Right arrow
Down arrow Selects the second keyboard from the first keyboard.
Up arrow Selects the first keyboard from the second keyboard.
Moves the cursor to the left. Picking and holding the light pen tip down moves the cursor continuously left.
Moves the cursor to the right. Picking and holding the light pen tip down moves the cursor continuously right.
All of the edit/control keys can be found on either of the two key sets (Figure 4.5 shows key locations).
Figure 4.5 Edit/control keys
4–10
Edit/control keys
To edit a formula:
Pick the arrows keys ( or) to move the cursor to the left or right
along the formula, in order to insert a component at a particular point in a formula, or to prepare to delete a particular component.
Del Pick the Del(ete) key to erase the entry to the left of the cursor. Clr Pick the Clr (clear) key to erase the entire formula.
Chapter 4
Defining Formulas
After editing a formula, pick either Ret or Esc:
Ret Pick the Ret key to save the formula as edited. Esc Pick the Esc key to restore the formula to the way it was when last saved.
Example of Formula Editing
To edit this formula: and change it to: AVG (GAGE1,GAGE3) * 1.250
AVG (GAGE1,GAGE2) * 0.250
Pick the arrows keys (← or) as necessary to move the cursor to the
right of the
Formula:
= AVG( GAGE1, GAGE2 ) * 0.250
GAGE2 operand:
Pick the Del key to erase the GAGE2 operand:
Formula:
= AVG( GAGE1, ? ) * 0.250
Pick G, then 3:
Formula:
= AVG( GAGE1, GAGE3 ) * 0.250
Move the cursor to the right of the 0.250 operand:
Formula:
= AVG( GAGE1, GAGE3 ) * 0.250
Pick the Del key; notice the entire 0.250 operand is erased:
Formula:
= AVG( GAGE1, GAGE3 ) * ?
• Pick 1, then . (decimal point), then 2, then 5:
Formula:
= AVG( GAGE1, GAGE3 ) * 1.25
After editing the formula, you can pick either Ret or Esc. Pick the Ret key to save the formula as edited. Pick the Esc key to restore the formula to the way it was when last saved.
4–11
Chapter 4
Defining Formulas

Operands

With respect to MATH-PAK formulas, an operand is a symbol (such as
GAGE1 or WINDOW3.2 or 32.45) that represents a mathematical or
logical value. Operands represent such values as tool results, statistics, constants, or formula results (see Table 4.C, starting on page 4–14, for operand listings and descriptions).
Figure 4.6 Operand keys
Initial key set
Operand keys
To enter a particular operand in a formula:
Pick the appropriate operand key on the formula entry keyboard – the
corresponding operand symbol appears in the display area of the keyboard (see Figure 4.6).
Typically you must then pick additional keys (decimal point and/or
numeric keys) to complete the operand entry.
For example, to enter the operand for gage 5 numerical results (number of pixels, number of edges, and so on), enter the operand
GAGE5, as follows:
Pick G on the formula entry keyboard – this will initially display the
operand
GAGE0 in the formula display area:
4–12
Formula:
= ? GAGE0
Pick 5 this will change the operand to GAGE5.
Formula:
= GAGE5
Loading...
+ 62 hidden pages