Home
        5370-ND005, Bulletin 5370 CVIM MATH
         Contents
1.                                                                                      D ALLEN BRADLEY    Db QUALITY d A ROCKWELL INTERNATIONAL COMPANY    User s Manual       40062 194 01 A  Catalog No  5370 ND005  Series A     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 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   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
2.         Archival Calculator             Snapshot  Analysis    Registration    Camera A          Pick each digit of the upper As you pick each digit  it appears in the calculator  display    fault limit value  Thus  for a value of 7 5  pick    7         decimal      and    5        Pick the Enter key  When you pick the Enter key  the new value will appear in  the upper box under FAULT RANGE     Pick the middle box under This is the fault range lower   Low   limit   FAULT RANGE     Pick each digit ofthelower As you pick each digit  it appears in the calculator  display    fault limit value        CVIM MATH PAK  Installation and Configuration Pp  7       Assigning Range Limits  and Outputs  continued   Your Action Comments    Pick the Enter key  When you pick the Enter key  the new value will appear in  the middle box under FAULT RANGE     Pick the upper box under This is the warning range upper     High     limit   WARNING RANGE     Pick each digit ofthe upper As you pick each digit  it will appear in the calculator  warning limitvalue     display      Pick the Enter key  When you pick the Enter key  the new value will appear in  the upper box under WARNING RANGE     Pick the middle box under This is the warning range lower   Low   limit   WARNING RANGE     Pick each digit of the lower As you pick each digit  it will appear in the calculator  warning limitvalue     display      Pick the Enter key  When you pick the Enter key  the new value will appear in  the middle box under W
3.        Keyboard Select Keys t and                  Using Operator and Operand Keys                 ABS KEY  esi  e a AAA eae oe    MED Key nana Aha acters oh    VAR ROY  AA tints Slo ducas band       Page     uuo HPN        Table of Contents             Title Page   Parenthesis Keys                            55   Modulo Operator Key  96                   56   Unary Operator Key                        56   Comma Key                                 56   Logic Operator Keys                         56   Setting Formula Name                         59   Enabling Formula                              60   Assigning Range Limits and Outputs             62   Results Data  Size and Rounding Constraints     68   MATH PAK Application Examples                  69   Figure Title Page  List of Figures   1 1 CVIM System Without MATH PAK Formulas              2   1 2 CVIM System With MATH PAK Formulas                 3   Title Page   Appendix A CVIM Communications With MATH PAK    Objectives                                         CVIM With MATH PAK Communications             Location of Formula Results                         Data Formats For Formula Results                   Obtaining Formula Results and Statistics  Statistics Block                                     Configuration Blocks                               Fail Warning Ranges  Formulas   9 16  25 32    41 56 in Toolset 1                                 Fail Warning Ranges  Formulas   1 8  17 24    33 4010 Toolset T en  ena A av
4.      Gage  32 Value        A 6    Appendix A    WIM Communications With MATH PAK       Data Formats For The data type for each formula is determined by the  Formula Results equation     Obtainin  Results an    e Ifthe formula contains any items that are fixed point    values  the formula results will be a fixed point value   16 16          Ifthe formula only contains integer values  the  formula results will be an integer value  32 0        Form ula Obtain formula results and statistics the same way you  Statistics  would toolset results  Refer to Publication 5370 ND002 and  Addendum  40062 191 01 A          Statistics Block When using the statistics block and formulas are enabled     please note that an enabled formula takes the place of the  corresponding tool in the statistics block     Forexample   Ifyourequest statistics for Gage  1 and  formula   9 is enabled  the statistics for the  formula will appear in the statistics block        Appendix A cvim Communications With MATH PAK       Configuration Blocks When the corresponding formula is enabled  the  configuration block fail and warning ranges are applied to  the formula results     Table A 4 lists Fail Warning Range  Toolset 1  data  locations for Formulas 9 16  25 32  and 41 56   Configuration blocks 10 41      Table A 5 lists Fail Warning Range  Toolset 1  data  locations for Formulas 1 8  17 24  and 33 40   Configuration blocks 42 65      Table A 6 lists Fail Warning Range  Toolset 2  data  locations for Formulas 9
5.      The largest positive integer that the system can accept is  32 767  The system blocks any attempt to enter a larger  positive integer         The largest negative integer that the system can accept is   32 767  The system blocks any attempt to enter a    larger     negative integer         The largest positive fixed point number that the system can  accept is 32 767 999  The system blocks any attempt to enter      a larger positive fixed point number         The largest negative fixed point number that the system  can accept is  32 767 999  The system blocks any attempt to  enter a    larger    negative fixed point number     CVIM MATH PAK  Installation and Configuration       Definitions  Formula Entry Operand Keys  Key Functions  continued     These keys are used to enter operands  variable data  intoa  formula  When entered into a formula  these operands can  supply inspection results data from specific analysis tools   results data from the operation of specific formulas  and  statistical data from the operation of specific formulas     The following table lists these operands and briefly describes  their functions     Name  TS Tool set Used with the following operands  G  W  RL  etc   to obtain  change results data from the alternate  non active  tool set   Provides inspection results data from one of the 32 gages   Provides inspection results data from one of the 24 windows     RL Reterencalina Provides inspection results data from one of the three  reference lines
6.    54    CVIM MATH PAK  Installation and Configuration       Using Operator and  Operand Keys  continued     Your Action    Pick these two keys   5   comma      Enter the remaining operands   with a comma between each      8 10     Pick the    close parenthesis     key  mper    Pick the Ret  return  key     Look at the message box    in the upper left corner  of the screen     VAR Key  continued     Comments    This enters the first value in the list  along with a comma   The display should now appear as follows     Formula       VAR  5 A         The display should now appear as follows     Formula     VAR  5  8  10A        This completes the VAR formula entry     Formula       VAR 5  8  10  a       This causes the system to display the    result     In this case   the result is 4 221  which is the variance value for this list     Formula  result   4 221      VAR 5  8  10  A       Because of rounding errors that sometimes occur with fixed  point calculations  the result is 4 221 instead of 4 222  as  shown earlier  Normally  this will not affect the usefulness of  these calculations     The    Formula saved    message indicates that the CVIM  system has saved the formula in its memory     This completes the procedure for entering and saving the  VAR formula     CVIM MATH PAK  Installation and Configuration p  5    a  009 2 gg     Using Operatorand Arithmetic Operator Keys            Operand Keys  continued   The arithmetic operators are used between two values to  perform add
7.    Le    9   Window 1   4    CVIM MATH PAK  Installation and Configuration         The following table relates each formula number to the  number of the gage or window whose results it replaces            Tool  Gage 19  Gage 20  Gage 21  Gage 22  Gage 23  Gage 24  Gage 25  Gage 26  Gage 27  Gage 28  Gage 29  Gage 30  Gage 31  Gage 32    Tool    45    Window 10  Window 12    Window 17  Window 18    47    Window 20  Window 21  Window 22  Window 23  Window 24    50  51  52  53  54  55  56    Window 14  Window 15  Window 16           Comments    When you pick the Formula XX menu box     XX    is the  formula number   a warning message appears in the  message box  as follows        WARNING  Enabling this formula will  prevent Window  1 from being range  checked or assigned to outputs    Reselect to confirm         Note  Window  1    in the box  The actual tool and number  depend on which formula number is currently selected     When you pick the Formula XX menu box again  the warning  message disappears  and  Enabled  replaces  Disabled  in  the menu box     NOTE  If you decide to disable a currently enabled formula   another warning message will appear when you pick the  Formula XX menu box  as follows     WARNING  Disabling this formula will  allow Window   1 to be range checked     The range for this window must be enabled   Reselect to confirm        To disable the formula  you must pick the Formula XX menu  box a second time     62    CVIM MATH PAK  Installation and Configura
8.    RW Reference Provides inspection results data from one of the three  window reference windows   Light probe   Provides inspection results data from the light probe                Provides results data from the operation of one of the 56  Results      possible formulas or inspection tools   oe Provides statistical data from the operation of one of the 56  Statistics    possible tools and formulas     Digits Provide integer or fixed point constants in a formula        The operands are further defined according to the specific  type of results data to be supplied to a formula  As an  example  you can specify that a particular gage operand  one  of 32  supply its basic measurement value  number of pixels   number i pon and so on   or its pass fail result for the  warning or fault range  1 or 0   or a second coordinate  for X  and Y position functions only      You can specify results data in a formula by appending a  decimal point and a number to the operand number s   For  example  if you select the gage  1 operand  GAGE1 1  returns the pass fail result for the warning range  GAGE1 2  returns the pass fail result for the fault range  and so on     NOTE  Some inspection results are always returned in fixed  point format  linear gaging  luminance   while others are  always returned in integer format    white pixels    edges    In all cases  if one of the operands in a formula returns fixed  pon  results  the formula will always return a fixed point  result     20    CVIM MATH P
9.   Pick the SQR key        Pick these two keys   4 8     Pick the    close parenthesis     key  O        Pick the Ret  return  key     Look at the message box  in the upper left corner  of the screen     CVIM MATH PAK  Installation and Configuration 25       SQR Key  continued     Comments  The SQR operator is on this keyboard     When you pick the SQR key  the following entry appears in  the upper box of the keyboard     Formula       SQR A         The display should now appear as follows     Formula       SQR 48  A          This completes the SQR formula entry     Formula       SQR 48 A       This causes the system to display the  result   In this case   the result is 6 927  which is the square root of 48     Formula  result   6 927    SQR  48  a       The    Formula saved    message indicates that the CVIM  system has saved the formula in its memory     This completes the procedure for entering and saving the  SQR formula     5 CVIM MATH PAK  Installation and Configuration  5    RR AA AA AA AASA CC a IE EF LE TE SIE EEE ID    Using Operatorand SQ Key  Operand Keys  continued   The SQ  square  function computes the square of a value  It  returns an integer if the value squared is an integer  and  returns a fixed point number if the value squared is a fixed  point number     For example  if the value to be squared is 7  the SQ function  returns 49  If the value to be squared is 7 000  the SQ  function returns 49 000     In a MATH PAK formula  the SQ operator requires one  ope
10.   The tangent of unknown angle 9  in a right angle triangle  is  the ratio between the side opposite the angle and the side  adjacent to the angle       Line      gt         Y  Side opposite 0     Tangent of 0   Side Y   Side X    X   Side adjacent to 0     Arc Tangent   The angle  8  whose tangent   Side Y   SideX        and the arc tangent is the angle  8  whose tangent is  equal to a given number  In the illustration above  that  number is the length of Y divided by the length of X     Using Operator and  Operand Keys  continued     CVIM MATH PAK  Installation and Configuration 3i       ATN Key  continued     In order to compute the tangent of 0  and from that the arc  tangent  0 itself   the ATN operator must be given the length  of the two sides  Y and X  ofthe right triangle formed  between a line and the X axis of the image field     Thus  if you can supply the length of Y and X  the ATN  function can compute the tangent of the unknown angle 0  and  consequently  the arc tangent   the angle 0 itself     In a MATH PAK formula  the ATN operator requires the two  operands  AY and AX  The basic formula takes this form     ATN AY AX     The AY operand represents the length of side Y  and the AX  operand represents the length of side X  Values for AY and  AX must be computed and made available to the ATN  formula     Example  The objective of this example is to use the ATN  operator to determine the angle 0 between line AB and the X  axis in the illustration below     The fi
11.   close parenthesis    This completes the ATN formula entry   ke     9         Formula          GAGE2   GAGE1  GAGE2 3   GAGE1 3 Ja       Pick the Ret  return  key  This causes the system to display a    result     however  the  number displayed is not correct since the    GAGEn 3     operands cannot operate correctly except in the run mode   Thus  you should disregard the    result    number in this case     Formula  result    90 000       GAGE2   GAGE1  GAGE2 3   GAGE1 3  A       Look at the message box The  Formula saved    message indicates that the CVIM  in the upper left corner system has saved the ATN formula in its memory   of the screen   This completes the procedure for entering and saving the  ATN formula     Using Operator and  Operand Keys  continued     Your Action    Select the second formula  entry keyboard     Pick the ANG key     Pick these three keys      comma      Enter the remaining five  operands  and inserta  comma between each   49 36 15  20 114     CVIM MATH PAK  Installation and Configuration pa       AVG Key    The AVG  average  function causes a list of operands to be  added together and divided by the number of operands in the  list    If all operands in the list are integers  the result will also be  an integer  rounded down  If any operand in the list is a fixed  point number  such as 2 000   the result will also be a fixed  point number  rounded to three places  such as 53 833      The following procedure shows you how to set up a formula  usi
12.   equal    operator     returns a logic  1  when placed  between two operands whose results are equal  Thus  if the  GAGE1 and GAGE  results are both 6 in the following  formula       GAGE1   GAGE2        the formula will return a logic    1    result  since the two  gage results are equal     If the two gage results were not equal  the formula would  return a logic    0         lt  gt   The    not equal    operator   lt   gt   returns a logic    1     when placed between two operands whose results are not  equal  Thus  if the GAGE1 result is 5 and the GAGE2 result  is 3 in the following formula       GAGE1  lt   gt  GAGE2        the formula will return a logic    1    result  since the two  gage results are not equal     If the two gage results were equal  the formula would return  a logic    0        58    CVIM MATH PAK  Installation and Configuration       Using Operator and  Operand Keys  continued     Logic Operator Keys  continued      gt   The    greater than    operator   gt   returns a logic    1    when  placed between two operands where the left operand result is  greater than the right operand result  Thus  if the GAGE1  result is 8 and the GAGE2 result is 7 in the following  formula       GAGEI  gt  GAGE2        the formula will return a logic  1  result  since 8 is  greater than 7     If the GAGEI result were equal to  or less than  the GAGE2  result  the formula would return a logic    0         lt   The  less than  operator   lt   returns a logic  1  when  pla
13.   true    otherwise  return a logic 0  false         Formula  1 adds the three expressions  thus  if all three  expressions are true  logic 1   the formula returns a result of  3  In this example  the result is acceptable if any two  expressions are true  that is  the formula result is at least 2     74       MATH PAK Application  Examples  continued     CVIM MATH PAK  Installation and Configuration    In formula  2  the first expression makes the statement     If  WINI is greater than 100  then return a logic 1  otherwise   return a logic 0   The second expression makes the  statement   If RSLT1 is greater than or equal to 2  then  return a logic 1  otherwise  return a logic 0  Note that RSLT1  is the result from formula  1     Formula  2 ANDs the expressions  WIN1  gt  100  and   RSLT1  gt   2   If all range limits are set to 1 and both  expressions are true  logic 1   the formula returns a result of  logic 1  true  and the inspection passes  otherwise  the  formula returns a logic 0  false  and the inspection fails     Appendix A CVIM Communications  With MATH PAK       Objectives This appendix describes    e CVIM Communications with MATH PAK   Location and format of formula results   Formula statistics     Setting formula range limits     How to access formula results and set configuration        CVIM With MATH PAK The CVIM Communications Manual  Catalog No  5370   Communications   ND002  with Addendum  40062 191 01 A   describe how to  access results data  With MATH PAK 
14.  16  25 32  and 41 56   Configuration blocks 72 103      Table A 7 lists Fail Warning Range  Toolset 2  data  locations for Formulas 9 16  25 32  and 41 56   Configuration blocks 104 127      Appendix A CVIM Communications With MATH PAK  A 8       Faill Warning Ranges   Formulas     9 16  25 32  41 56   in Toolset 1    Table A 4 lists the fail and warning range data locations for  Formulas 9 through 16  25 through 32  and 41 through 56   blocks 10 41   Refer to the following for the block number  of each formula  Table A 4 provides the word   of the data in    Remote I O  8 RS 232    each block     Formula 9  Block 10  Formula 10  Block 11  Formula 11  Block 12  Formula 12  Block 13  Formula 13  Block 14  Formula 14  Block 15  Formula 15  Block 16  Formula 16  Block 17  Formula 25  Block 18  Formula 26  Block 19  Formula 27  Block 20  Formula 28  Block 21  Formula 29  Block 22  Formula 30  Block 23  Formula 31  Block 24  Formula 32  Block 25    Table A 4    Formula 41  Block 26  Formula 42  Block 27  Formula 43  Block 28  Formula 44  Block 29  Formula 45  Block 30  Formula 46  Block 31  Formula 47  Block 32  Formula 48  Block 33  Formula 49  Block 34  Formula 50  Block 35  Formula 51  Block 36  Formula 52  Block 37  Formula 53  Block 38  Formula 54  Block 39  Formula 55  Block 40  Formula 56  Block 41    Confiquration Blocks  10 41 Fail Warnin    Warning Range Low   Integer     Words 17 and 18 represent a  16  bit   16  bit  fixed point    decimal value or 32 bit  integer    
15.  The up arrow     and down arrow      are used to display the  alternate formula entry keyboard     The up arrow   1   appears on the first keyboard   this is the  one that appears right after you pick the Set Formula menu  box     First    Formula Entry  fets      lt l an  Keyboard     Up Arrow  Key       When you pick the up arrow key  the second keyboard  appears  This keyboard contains the down arrow                 Second    Formula Entry   Keyboard     Down Arrow  Key    You may need to alternate between the two keyboards  occasionally as you enter your MATH PAK formulas     28    CVIM MATH PAK  Installation and Configuration       Using Operator and  Operand Keys    Your Action    Select the second formula  entry keyboard     Pick the ABS key        This section provides detailed information for using the  operator and operand keys to enter formulas  Most of these  keys require that you observe certain procedures and  limitations in order to use them correctly     Note that the limitations applying to the digit keys  0 to 9    when these keys are used to enter constant numeric values   were described earlier under the Digit Keys  0 to 9 heading     The following operator key procedures are presented in the  order of their appearance in the preceding Operator Function  tables  These procedures use example formulas to illustrate  using the operator and operand keys  and to suggest possible  applications     For the purpose of these procedures  it is assumed that you  hav
16.  Warning Flag  1      nmn vn    ormula 52 0  ault Flag 1    Formula 53 0   Pass  Warning Flag   1    nm    ormula 53 0   Pass  ault Flag 15                 nm m    Formula 54 0  1    1  22  22  23  23  23  23  23  23  23  23  23  23  23   Warning Flag  3    w    ormula 54 0   Pass  ault Flag 1 F    nm            PIN    Appendix A CVM Communications With MATH PAK  A 20       Discrete Bit Inputs     continued     a Be A 8    pp ND Dn j nueg  7 T    Backplane   Definition Notes  dM i un  7    12 a 55    Warning Flag    7 1 Formula 55   Pas   Fault Flag   Fail  7 1 16   Formula 56 0   Warning Flag        7 15   17   Formula 56   Pass   Fault Flag   Fail                Ww    D       D  ALLEN BRADLEY    u 39 6 ROCKWELL INTERNATIONAL COMPANY    With offices in major cities worldwide     WORLD HEADQUARTERS  1201 South Second Street  Milwaukee  WI 53204 USA  Tel   414 382 2000   Telex  43 11 016   FAX   414 382 4444    EUROPE MIDDLE EAST   AFRICA HEADQUARTERS  Allen Bradley Europe B V   Amsterdamseweg 15   1422 AC Uithoorn   The Netherlands   Tel   31 2975 43500   Telex   844  18042   FAX   31 2975 60222    Catalog No  5370 ND005 Series A    A subsidiary of Rockwell International  one of the world s largest technology companies     Allen Bradley meets today s automation challenges with over 85 years of practical plant floor    experience  More than 13 000 employees throughout the world design  manufacture and  apply a wide range of control and automation products and supporting servic
17.  Window  1 Value   314 315 26 27  0 15  Formula  2 Results   Window   2 Value   316 317 28 29  0 15  Formula   3 Results   Window   3 Value   318 319 30 31 0 15 Formula  4 Results   Window  4 Value   320 321 32 33 0 15 Formula  5 Results   Window  5 Value   322 323 34 35  0 15  Formula  6 Results   Window  6 Value   324 325 36 37 10 15  Formula  7 Results   Window  7 Value   326 327 38 39 10 15  Formula  8 Results   Window  8 Value   328 329  15 Formula  9 Results   Gage  1 Value   330 331 42 43  15 Formula  10Results   Gage  2 Value   332 333 44 45  0 15   Formula  11 Results   Gage  3 Value   334 335 46 47  15 Formula  12 Results   Gage  4 Value   336 337 48 49  15 Formula  13 Results   Gage  5 Value   338 339 50 51 0 15 Formula  14 Results   Gage  6 Value   340 341 52 53  15  Formula  15 Results   Gage  7 Value   342 343 54 55 10 15  Formula  16 Results   Gage  8 Value                       eo    o    e    o    eo          Appendix A CVIM Communications With MATH PAK       Location of Formula  Results   continued     Table A 2  Block 2 Formula Results    Bit              Definition With  MATH PAK   without MATH PAK     ormula  17 Results  Window  9 Value     F     F     F    Backplane                      Toolset  2    354 355 E 0 15  356 357 ormula  18 Results  Window  10 Value   358 359   ormula  19 Results   Window 411 Value   360 361   Formula  20 Results   Window  12 Value   362 363 Formula  21 Results   Window  13 Value   364 365 12 13  15 Formula  22 Results   Windo
18.  Words 19 and 20 represent a  16  bit  16  bit  fixed point    decimal value or 32 bit  integer     Words 21 and 22 represent a  16  bit  16  bit  fixed point    decimal value or 32 bit  integer     Words 23 and 24 represent a  16  bit  16  bit  fixed point    decimal value or 32 bit  integer           Appendix A CVIM Communications With MATH PAK    Fail  Warning Ranges   Formulas     1 8  17 24  33 40   in Toolset 1    A 9       Table A 5 lists the fail and warning range data locations for    Formulas 1 through 8  17 through 24  and 33 through 40     blocks 42 65   Refer to the following for the block number  for each formula  Table A 5 provides the word   of the data    in each block     Formula 1  Block 42  Formula 2  Block 43  Formula 3  Block 44  Formula 4  Block 45  Formula 5  Block 46  Formula 6  Block 47  Formula 7  Block 48  Formula 8  Block 49  Formula 17  Block 50  Formula 18  Block 51  Formula 19  Block 52  Formula 20  Block 53    Formula 21  Block 54  Formula 22  Block 55  Formula 23  Block 56  Formula 24  Block 57  Formula 33  Block 58  Formula 34  Block 59  Formula 35  Block 60  Formula 36  Block 61  Formula 37  Block 62  Formula 38  Block 63  Formula 39  Block 64  Formula 40  Block 65    Table A 5  Configuration Blocks  42 65 Fail Warning Ranges  T51        Remote I O   amp  RS 232    Words 28 and 29 represent a  16  bit   16  bit  fixed point  decimal value or 32 bit  integer     Words 30 and 31 represent a  16  bit  16  bit  fixed point  decimal value or 32 
19.  output boxes labeled    1 Results     or  2 Results   if  appropriate   When you pick the appropriate box  the shaded  square shifts to it     In addition  the output number appears in the lower box  under WARNING RANGE     From the Output Selection popup menu  pick one of the  available output boxes labeled    1 Results     or    2 Results     if  appropriate   When you pick the appropriate box  the shaded  square will shift to it     In addition  the output number appears in the lower box  under FAULT RANGE     The limits on the size of formula results data   the numbers  resulting from a formula s operation   are a function of the  memory space allocated to those results     Here are the specific limits       The  largest  positive fixed point result value that the  system can return is 32 767 999         The  largest  negative fixed point result value that the  System can return is  32 768 000         The largest positive integer result from a formula s  operation cannot exceed 2       1  or 2 147 483 647         The largest negative integer result from a formula s    operation cannot exceed  2    or  2 147 483 648     e Results from fixed point calculations sometimes contain  rounding errors  Normally  these errors will not affect the  usefulness of the results for your applications        CVIM MATH PAK  Installation and Configuration T       MATH PAK Application This section provides three MATH PAK application  xamples examples the main purpose of which is to give you 
20.  p3       Definitions  Formula Entry Operator Keys  Key Functions  continued   The operator keys are used to select the mathematical   logical  and other operators in a formula  The next two tables  list these operators and briefly describe their functions        mETM nu Operator Functions  Part 1 of 2   ABS   Absolute value   INT FP Computes the absolute value of a number  negates the  value if itis negative      Computes an angle  in degrees  from operands A X and A Y   ATN Arc tangent FP which are the changes in the X and Y coordinates of a point   such as an edge  that has moved within the image field     AVG Average INT FP   Computes the average of a list of operands     EP Computes the cosine of an angle  in degrees   Returns a  fixed point number     Computes distance  given the four operands X4  Y1  X2  and  Y2  by computing the square root of the sum of the squared  differences     INT FP   Finds the maximum numeric value in a list of operands     Finds the middle numeric value in a list of operands by  sorting the list in ascending order and returning the value  located at the center position in the sorted list        COS Cosine            DST Distance    o         MAX Maximum       MED Median INT FP    MIN Minimum    INT FP   Finds the minimum numeric value in a list of operands     INT FP Finds the value in a list that appears most often  If no value  appears more than once  MOD returns the lowest value     Computes the sine of an angle  in degrees   Returns a fix
21.  run mode  when you select the Results  Page  or Stat 1 Page  display table  you must pick the Page     page down  box one or more times in order to see the results   or statistics  from any formula whose number is beyond the  number that you selected in the Disp  Formulas menu box     For example  if you want to see the results from formula  12  and you selected  5  in the Disp  Formulas menu box    formulas  1 through  5 will appear on page one of the   Results Page display table  formulas  6 through  10 will  appear on page two  and formulas  11 through 715 will i  appear on page three  Thus  you must pick the Page   box   two times to reach page three and see the results  or   statistics  from formula  12     HO Page Display    A second page has been added to the I O Page display table in  order to display the I O status of all 56 formulas  The  formula display box on page two provides the same kind of  pass warn fail status information as the gage and window  display boxes on page one  You can access page two by  picking the Page    page down  box once   The   O Page  display table is described fully in Chapter 10 of the CVIM  User s Manual      All Tools Display    When you select the All Tools display function for the run  mode  the names of all of the enabled formulas appear on the  monitor screen  starting in the upper left corner  On a color  monitor  the color indicates the pass warn fail condition of  each formula     Note that disabled formulas will not appear in
22.  the screen   listing  Thus  if formulas  1 and  56 are the only ones 7  enabled  only those two formulas will appear in the list  with  formula  1 on top     CVIM MATH PAK  Installation and Configuration pa       Configuring MATH PAK Asindicated earlier  the MATH PAK option adds a menu  Formulas box called Config  Results  and it is your entry point for    Your Action    configuring MATH PAK formulas   Use the following steps to configure MATH PAK formulas     Comments    Pick the Misc menu box When you pick the Misc menu box in the Main Menu  the  in the Main Menu  Misc popup menu shows the Config  Results menu box  as    follows     Config  Results c00        Config  Results              Menu Box  Snapshot eoo     Snapshot     Misc  Registration eco    Pick the Config  Results When you pick the Config  Results menu box  the Config   menu box  Results popup menu appears  as follows                  Range Outputs eee  Set Formula coo    Set Name  7 Config  Results    Formula 1  Disabled Popup Menu  Jump eee  Snapshot       4 Misc  Analysis Popup Menu    Registration             Camera A   Ref  Line   Ref  Win   Gage   Window    When no formula has been configured for the current  formula number  the Config  Results popup menu appears as  shown above  In this case  the Set Name menu box has no  name in it  and the Formula   menu box shows that the  selected formula number is Disabled  In addition  the menu  boxes labeled Range Outputs  Set Name  and Formula   appear in black 
23.  this information still  applies with the following exceptions         Results for Windows 1 8 and Gages 1 8  Block 1   are replaced by    Formulas 1 16        Results for Windows 9 24 and Gages 9 22  Block 2   are replaced by  Formulas 17 46        Results for Gages 23 32  Block 3   are replaced by  Formulas 47 56        Fail Warning Ranges apply to formulas       Warning and Fault Flags apply to formulas     Note  The formula results only replace window or gage  results if the formula is enabled  If you want to obtain  window or gage results that are replaced by formula  results  use the configurable results block  block  4         Location of Formula When enabled  the formula results replace window and gage  Results results         Table A 1 shows the location of the Block 1 formula  results       Table A 2 shows the location of the Block 2 formula  results       Table A 3 shows the location of the Block 3 formula  results     Note  You cannot program the programmable results block   block  4  to contain formula results     A 2    Location       pa    48 49    50 51    52 53    54 55    56 57    58 59    62 63    64 65    66 67    68 69    70 71    72 73    74 75    76 77    78 79    Word   Bit    Backplane RS 232  and  Toolset   Toolset   Remote  2 1 0    Appendix A CVIM Communications With MATH PAK       of Formula  Results   continued     Table A 1  Block  1 Formula Results          Definition With  MATH PAK   without MATH PAK     312 313 24 25 0 15 Formula  1 Results  
24.  windows displayed  would be reduced     Stat 1 Page Display    The following illustration is an example showing page one of  the Stat 1 Page display table     GAGE Samples Mean Std  Dev  Min Reading Max  Reading    WINDOW Samples Mean Std  Dev  Min Reading Max  Reading    3179 105 2 063 3171 3186    FORM  Samples Std  Dev  Min Reading Max  Reading    122 284 121 000 124 000  133 182 127 000 137 000  152 000 152 000 152 000       The statistics data appearing in the GAGE  WINDOW  and  FORM  boxes have the following significance         Gage  1 is enabled  however  gage  1 statistics cannot  be accumulated because formula   9  which is on page two  is  enabled  Thus  statistics data are not displayed for gage  1     12    CVIM MATH PAK  Installation and Configuration       Exit Popup Menu  continued     Stat 1 Page Display  continued       Window  1 is enabled and has returned results data  Its  results are ranged checked  and  since formula  1 is not  enabled  statistics data are displayed for window  1   Window   2 is disabled  thus  no data appear         Formulas  1 and  2 are disabled  thus  no data appear   Formula   3 is named Y POS 1  formula   4 is named  Y POS 2  and formula  5 is named X POS 1     Note that statistics data from the light probe are not  displayed in the example  the Disp  Probe menu box reads     Disabled       If probe results were enabled for display  the  total number of formulas  gages  and windows displayed  would be reduced     NOTE  During the
25.  written permission of the Allen Bradley Company is  prohibited       1991 Allen Bradley Company    Table  of Contents    CVIM MATH PAK  Installation and    Configuration    MATH PAK User Manual  Objectives                  MATH PAK Option  Definition                       User Experience    onn Sa Lak a naa eee P ate   MATH PAK Option  Overview                       Installing MATH PAK Option                         MATH PAK Option  Menu Display Changes          Gages and Windows  Range Reference   Popup Menu  made reece at ee ease ds   Misc Popup Menu                                Exit Popup Menu                                 Range Fail Menu Box                          Disp  Formulas Menu Box                      Results Page Display                           Stat 1 Page Display                            VO Page Display                               All Tools Display                              Configuring MATH PAK Formulas                    Definitions  MATH PAK Terms and Concepts       Definitions  Formula Entry Key Functions          Digit Keys  0to9                             Operand Keys                                Operator Keys consue NA ek steed LAA   Control Keys  oce ax Nau Ehe RE E EN   Using Control Keys                                Del  Delete  Key                              Clr  Clear  Key sos uec ei RA IH eph   Ret  Return  Key                              Esc  Escape  Key                               Cursor Keys   e  and   gt                  
26. 0 to be a negative angle   36 3     which in the 1st quadrant     NOTE  The ATN operator in this example uses the same  frame of reference for measuring an angle that the reference  windows and reference lines use for measuring rotation  angles     The following procedure shows you how to set up a formula  using the ATN operator  The procedure uses the preceding  formula  ATN GAGE2   GAGE 1  GAGE 2 3   GAGE 1 3   to  demonstrate the entry of an ATN formula     Comments    The ATN operator is on this keyboard     When you pick the ATN key  the following entry appears in  the upper box of the keyboard        Using Operator and  Operand Keys  continued   Your Action    Select the first formula entry  keyboard  then pick the    G      for Gage  key     Pick the    2    key     Pick these four keys     minus  G 1   comma      Pick these four keys   G 2   decimal  3     CVIM MATH PAK  Installation and Configuration 53       ATN Key  continued     Comments    This is the first step in assigning a gage operand  The display  should appears as follows     Formula       ATN   GAGEOA       This assigns gage   2 as the first operand  When configured  as GAGE2  this operand returns gage  2 measurement data  to the formula  In this example  it returns Y position data   since gage  2 would have been configured earlier for that  gage operation     Formula       ATN GAGE2A         This sets up gage  1 as the second operand  and thereby  completes the requirement for  AY  in the ATN formula   G
27. 1 Page  display tables     10    CVIM MATH PAK  Installation and Configuration       Exit Popup Menu  continued     TRIGGERS    Accepted     Missed   Total     GAGE  1     WINDOW Faults Fail Low    1   2     FORM   1   2   Y POS 1  Y POS2  X POS 1       Disp  Formulas Menu Box  continued     By picking the Disp  Formulas menu box  you can specify the  number of formulas whose results are to be displayed on each  page of the Results Page and Stat  Page 1 display tables    This menu box operates in the same manner as the other   Disp   menu boxes  which are described in Chapter 10 of the  CVIM User Manual     If you pick the help message icon              the help message box will appear in the upper left corner  of the monitor screen and contain a message  such as the  following                      Select the number of formulas per page  to be displayed on both the Results Page  and Statistics Page 1    Current maximum  8 formulas       that indicates the current maximum number of formulas  that can appear on each page of the Results Page and Stat 1  Page display tables  The number varies according to how  many gages and windows been selected in the Disp  Gages  and Disp  Windows menu boxes  and whether or not the light  probe results are to be displayed     Results Page Display    The following illustration is an example showing page one of  the Results Page display table     FAULTS Reference Lines   Windows  1  1  2     3     123456   Master Fault    0   Light Probe   12345
28. 5      56    CVIM MATH PAK  Installation and Configuration       Using Operator and  Operand Keys  continued     Modulo Operator Key       The modulo operator is used between two values to return a  remainder  if any resulting from the division operation     For example  by placing the modulo operator  96  between  the following two integers       52 Jo 34        the system divides the left integer by the right integer   then returns the remainder from the division operation   Since 34 goes into 52 once  the remainder is 52   34   18   Thus  the system returns a result of 18     Unary Operator Key       The unary operator can be entered just ahead of an operand  in a formula in order to negate the value of the operand     For example  when entering the following list of integers     15  27 133 6        press the unary key     to place a minus sign     before  entering the integer 27  This causes 27 to become a negative  integer     Comma Key       The comma is used to separate the operands in a list  such as  in an AVG formula     AVG  21 54 101 3     Logic Operator Keys    The logic operators can perform logical operations when  placed between two values in a formula  The result from  these operations is either a logic  1  or logic  0   according to  whether or not the logic condition is satisfied for the  particular logic operator and values used     The following examples show how the logic operators work   AND  Assume that the inspection result from GAGE1 is 6    and the 
29. 6  Warn Low Warn Hi Fail Hi    Faults Fail Low    0    Reading  127 000    Warn Hi  3300    Fail Hi  3400    Warn Low  3100    Reading    0 3000 3182    Faults Faillow Warn Low Warn Hi Fail Hi    Reading    110 000  105 000  130 000    120 000  115 000  140 000    127 000  124 000  152 000    140 000  135 000  160 000    150 000  145 000  170 000    CVIM MATH PAK  Installation and Configuration         Exit Popup Menu  continued  Results Page Display  continued     In the illustration  the data appearing in the GAGE   WINDOW  and FORM  boxes have the following significance         Gage  1 is enabled and has returned results data   however  gage  1 results data are not ranged checked  because formula  9  which is on page two  is enabled  Thus   fail and warning range limits are not displayed for gage  1       Window  1 is enabled and has returned results data  Its  results are ranged checked  since formula   1 is not enabled   Window  2 is disabled  thus  no data appear         Formulas  1 and  2 are disabled  thus  no data appear   Formula   3 is named Y POS 1  Note that its results are the  same as the results from gage  1  shown above  but since   Y POS 1 is a formula  its results are range checked  Formula   4 is named Y POS 2  and formula  5 is named X POS 1     Note that the results data from the light probe are not  displayed in the example  the Disp  Probe menu box reads   Disabled     If probe results were enabled for display  the  total number of formulas  gages  and
30. 7   Formula 24  Fault Flag ai    Formula 33 0   Pass  Warning Flag  1   F    Formula 33 0   Pass  Fault Flag 1   Fail    rmula 22 Q   Pass  arning Flag   1   Fail    co  E                   Ww   nmm         co  N N N  N N N  E E  E       N  m n  sg   3                  Formula 34 0  Warning Flag   1    Formula 35 0  Warning Flag 11    ai   Formula 35 0   Pass   Fault Flag 1   Fail   283 3 Formula 36 0   Pass  Warning Flag   1   Fail    RO      w  E  NO  oj  nn  B  o  a3  mt  D t  O w  rss  O  uoa  Tm Q  o D  Low  wu    Appendix A CVIM Communications With MATH PAK       Discrete Bit Inputs   continued     Table A 8       Definition    ormula 36  ault Flag    mn m    Formula 37  Warning Flag    13   15   Formula 39  Fault Flag    Formula 40  Warning Flag    Formula 10  Warning Flag    3   Formula 10 0  Fault Flag 1    Appendix A CVIM Communications With MATH PAK  A 16       Discrete Bit Inputs     continued     Table A 8          ete H Dn  Word    Definition    No  Formula 11  Warning Flag    Formula 12  Warning Flag             Formula 14  Warning Flag    Formula 14  Fault Flag    Formula 15  Warning Flag    Formula 16  Warning Flag    ormula 16  ault Flag    Formula 25  arning Flag    ormula 25  ault Flag    Appendix A CYM Communications With MATH PAK          Discrete Bit Inputs   continued     Table A 8       Word      Formula 26  arning Flag    21   ormula 26  ault Flag     21 Formula 28  arning Flag  21 ormula 28  ault Flag  21 rmula 29  arning Flag    ormula 29  ault Fla
31. 9 46 47  0 15   Formula  39 Results   Window  23 Value   136 137   400 401 48 49  0 15   Formula  40 Results   Window  24 Value   138 139   402 403 50 51 Formula  41 Results   Gage  17 Value   404 405 52 53 10 15   Formula  42 Results   Gage  18 Value        142 143   406 407 54 55  0 15   Formula  43 Results   Gage  19 Value     144 145   408 409 56 57  0 15  146 147   410 411 58 59 10    15   Gage   21 Value   15    148 149   412 413 0  Formula  46 Results   Gage   22 Value          Formula  44 Results   Gage   20 Value        Formula  45 Results       Appendix A CVIM Communications With MATH PAK  A 5       Location of Formula  Results   continued     Table A 3    SINCE U                           Definition With  MATH PAK   without MATH PAK     0 15  Formula  47 Results   Gage  23 Value     5 Formula  48 Results   Gage  24 Value     422 423  15 Formula  49 Results   Gage  25 Value   424 425  15  Formula  50 Results   Gage  26 Value   426 427 10 11 0 15  Formula  51 Results   Gage  27 Value   428 429 12 13  0 15  Formula  52 Results   Gage  28 Value   430 431 14 15 10 15   Formula  53 Results   Gage  29 Value   432 433 16 17 10 15   Formula  54 Results   Gage  30 Value   434 435 18 19  0 15   Formula  55 Results   Gage  31 Value   436 437 20 21 0 15             Backplane    Toolset  2    Notes    Toolset  1          154 155    156 157    E    158 159    o       160 161    eo    162 163    164 165       166 167         168 169    170 171          172 173 Formula   56 Results
32. AK  Installation and Configuration       Definitions  Formula Entry Operand Keys  continued   Key Functions  continued     The following table lists the key code and subcodes for each  operand  along with a brief description of the type of results  data that each code subcode combination returns when used  within a formula     Ka P  Sub   Ka Operand Name Type of Results Data Returned to Formula    Gage measurement value    of pixels    of edges  etc                               GAGEn s Pass fail condition for warning range  1   pass  0   fail     n   1 to 32  Pass fail condition for fault range  1   pass  O   fail     s   0 to 3  Second coordinate value  Y coordinate for X Position gage     X coordinate for Y Position gage                 WINn s Window measurement value    of pixels    of objects  etc      n   1 to 24  Pass fail condition for warning range  1   pass  0   fail     s   0to2  Pass fail condition for faultrange 1   pass  O   fail             X coordinate value of edge position on reference line          REFLn s Y coordinate value of edge position on reference line    n 2 1to3  Pass fail condition for reference line  1   pass  O   fail     s   0to3  Theta from a reference line configured for  X X then Y  or     Y Y then X  rotation compensation                   Cumulative position  X coordinate value   Cumulative position  Y coordinate value   Cumulative angle  9     Cumulative pass fail condition  1   pass  O   fail    Active feature  1 position  X coordinate v
33. ARNING RANGE     Pick the lower box under When you pick this box  a variation of the Output  WARNING RANGE  Assignment popup menu appears on the screen  as follows                             Output Selection     Popup Menu    0 000 eee 0 000 eee  0 000 eee 0 000 eee                    Range Output  Setup Table    Previous                                      eee    Analysis       Registration eec       68    CVIM MATH PAK  Installation and Configuration       Assigning Range Limits  and Outputs  continued     Your Action    Pick the output number for  the WARNING RANGE     Pick the lower box under  FAULT RANGE     Pick the output number  for the FAULT RANGE        Results Data  Size and  Rounding Constraints    Comments    This is the Output Selection popup menu  It shows the  output functions that you assigned to the Output  Assignment popup menu   Refer to the CVIM User s Manual   Chapter 4  Operating Environment      NOTE  This menu shows that only the outputs that you  designated in Chapter 4 as    1 Results     or  2 Results  if this  formula is in tool set 42  are available to this formula  The  available outputs appear in light type  and all others appear  in black type  meaning that you cannot pick them      Note also that the No Output box in the Output Selection  popup menu has a shaded square  O   This indicates that no  output is currently assigned to carry WARNING RANGE  signals for this formula     From the Output Selection popup menu  pick one ofthe  available
34. ATH PAK  Installation and Configuration       Since the MATH PAK option adds functions to the basic  CVIM system  installing the option changes the appearance  of some of the menus and display tables in the user interface     This section describes the changes resulting from the  installation of the MATH PAK option        When you pick the Range Reference menu box in the Gage   or Window  popup menu  the Range Reference popup menu  appears with a new menu box  as follows                Range  Menu Box            Range Reference  Popup Menu    Nominal    111 B Pixels    Enabled    4       Gage  Popup Menu           The Range menu box indicates the status of range checking  for the currently selected gage or window  When  Disabled   appears in the menu box  the CVIM system does not perform  range checking for the tool  This is true in any ofthe  following situations       When the currently selected tool is disabled         When the selected tool is enabled  but you intentionally  select  Disabled  in the Range menu box       When an enabled formula preempts range checking for the  selected tool  Thus  when formula   1 is enabled  range  checking for window  1 is disabled      Enabled  appears in the Range menu box  and the CVIM  system performs range checking for the currently selected  tool  only when you complete the following steps         Disable the formula number that can preempt range  checking for the currently selected tool  Thus  when formula   1 is disabled  range c
35. Initially  only the Set Formula  Jump  and Previous Next  menu boxes are accessible  they are in light type   These  boxes enable you to select the formula number that you want  to configure  The other boxes are not accessible at this time   they are in black type      Here is a summary list of the steps you will normally take to  configure MATH PAK formulas     1  Select the formula number using the Jump  Previous   and or Next menu boxes     2  Configure the formula using the Set Formula menu box   3  Select a formula name using the Set Name menu box   4  Enable the formula by toggling the Formula   menu box     5  Set the range limits and select the outputs for the enabled  formula using the Range Outputs menu box     The Configuring MATH PAK Formulas section of this  manual describes these steps in detail     When you pick the Analysis menu box in the Misc popup  menu and the Tool Display menu box in the Analysis popup  menu  the Tool Display popup menu appears  as follows                   Continuous S amp A  Snap  amp  Analyze  Analyze Image    Config  Results ooo  Snapshot coo    Analysis Tool Display  Popup Menu Popup Menu    O All Tools                                Included in the Tool Display popup menu is the Formulas  menu box  which enables you to analyze the process time for  all enabled formulas     When you pick Formulas  all enabled tools appear on the  monitor screen  as they do when you pick All Tools   When  you then pick the Continuous S amp A  Snap  am
36. Key  continued     Comments    The  Formula saved  message indicates that the CVIM  system has saved the DST formula in its memory     This completes the procedure for entering and saving the  DST formula     MAX  MIN Keys    The MAX  maximum  and MIN  minimum  functions find the  largest and smallest values  respectively  in a list of  operands     In a MATH PAK formula  the MAX and MIN operators  require two or more operands  The basic formulas take this  form     MAX list  and MIN list   The following procedure shows you how to set up a formula  using the MAX or MIN operator  The procedure uses a list of  integers to demonstrate the entry of these formulas   Comments  The MAX and MIN operators are on this keyboard     When you pick the MAX key  the following entry appears in  the upper box of the keyboard     Formula       MAX A         This enters the first operand in the list  along with a comma   The display should now appear as follows     Formula     MAX 12 A         The    unary        operator is on this keyboard     CVIM MATH PAK  Installation and Configuration  42       Using Operatorand MAX  MIN Keys  continued   Operand Keys  continued     Your Action Comments    Enter three more operands  This enters the remaining operands in the list  Use the  5 89  100  unary key     to enter the minus     sign ahead of the    100      The display should now appear as follows     Formula     MAX 12  5  89    1004         Select the second formula The parenthesis keys are on t
37. The following procedure shows you how to use the Del key   The example shows the entry of a formula that adds two  integers  then changes the formula to subtract two integers  by changing the add     operator to a subtract     operator     Comments    The Del key is on both keyboards     This enters a simple  formula  for adding 4 and 2  Note that  the cursor  A  is to the right of the number 2        Now  suppose you want the formula to subtract 2 from 4   This means you must change the add      operator to a  subtract     operator  Continue as follows     This moves the cursor     to the left one space  It should now  be to the left of the add     operator        24    CVIM MATH PAK  Installation and Configuration       Using Control Keys   continued     Your Action  Pick the Del  delete  key     Pick the    minus  key     Del  Delete  Key  continued     Comments    This deletes the add     operator and moves the cursor  A  to  the right of the number 4     Formula    4A 2       NOTE  Although the Del key can delete formula items from  the box  it does not delete the item from memory if the  formula was previously saved using the return  Ret  key  If  you change your mind after picking the Del key  you can  restore the entire last saved formula by picking the Esc key     This enters the subtract       operator into the formula     Formula      4 a2          The formula is now reconfigured to subtract 2 from 4     Cir  Clear  Key    The Clr  clear  key can delete an entire f
38. a       SIN A         48    CVIM MATH PAK  Installation and Configuration       Using Operator and  Operand Keys  continued     Your Action    Pick these two keys   3 0     Pick the    close parenthesis     key      idi    Pick the Ret return  key     Look at the message box  in the upper left corner  of the screen     SIN Key  continued     Comments    This enters the value of the positive angle in degrees  The  display should now appear as follows     Formula     SIN  30n         This completes the SIN formula entry     Formula     SIN  30  A       This causes the system to display the    result     In this case   the result is 0 500  which is the sine of an angle of 30       Formula  result   0 500      SIN  30  a       The    Formula saved    message indicates that the CVIM  system has saved the formula in its memory     This completes the procedure for entering and saving the SIN  formula     SQR Key    The SQR  square root  function computes the square root of a  value  It always returns a fixed point number  regardless of  whether the original value was an integer or a fixed point  number     For example  if the value entered is 49  the SQR function  returns 7 000     In a MATH PAK formula  the SQR operator requires one  operand  The basic formula takes this form     SQR value     The following procedure shows you how to set up a formula  using the SQR operator     Using Operator and  Operand Keys  continued   Your Action    Select the second formula  entry keyboard   
39. a operation  upon which a  mathematical or logical operation 1s performed   Operands  are listed in a table under the Operand Keys heading      e Result  the value generated by operators acting upon  operands     The following examples demonstrate the use of various  operands and operators  and the results they produce  in  arithmetic and logical formulas     Definitions  MATH PAK  Terms and Concepts   continued     CVIM MATH PAK  Installation and Configuration T       Arithmetic examples  Here are a few examples of how the  terms operand  operator and result are used within various  arithmetic formula constructions      1  GAGE1   GAGE2    In this formula  GAGE1 and GAGE2 are operands that  represent results data from gages  1 and  2  and   isan  arithmetic operator      2   3   WIN1    WIN2    In this formula   3   WIN1  and WIN2 are both operands  and    is an arithmetic operator     The expression  3   WIN1  is itself an operand representing  the multiplication of the window   1 results data by the  constant 3  WIN 1 and 3 are operands in the expression    and   is an arithmetic operator      3  MAX GAGE1 WIN1 750     In this formula  GAGE1 WIN1 and 750 are all operands  and  MAX is an arithmetic operator     In the expression  the MAX operator causes the values of the   three operands  gage  1 and window  1 measurements  and  the constant 750  to be compared  The formula result will be   the largest value     Logic examples  Results from logic formulas are either  true  
40. able to MATH PAK  formulas         Definitions  Formula Entry Key Functions describes  briefly the specific functions of the keys in each category   control  operand  and operator keys        Using Control Keys describes  in detail  the procedure for  using each control key  Simple examples are included to  illustrate the procedures         Using Operator and Operand Keys describes  in detail  the  procedure for using each operand and operator key  Simple  examples are included  where appropriate  to illustrate these  procedures     This section briefly defines some of the key terms and  concepts as they apply to the MATH PAK option     MATH PAK formulas consist of combinations of operators  and operands that act together to produce a result         Operator  a symbol  such as           or a term  such as     AND   that represents a mathematical or logical  operation upon one or more operands   All of the operators  are listed under the Operator Keys heading      Operators are further classified as arithmetic  logical  and  conditional  as follows     Arithmetic operators  such as            and TAN perform  addition  subtraction  multiplication  division  tangent   and other operations     Logical operators  such as AND  along with conditional  operators  such as  lt  5  not equal   produce Boolean results   where the results are always either true  logic 1  or false   logic 0         Operand  a quantity or value  such as a constant  a tool  result  or a result from a formul
41. age   1 returns Y position data     Formula       ATN GAGE2   GAGE1  A         This sets up gage  3 as the third operand  The    2 3    causes  gage  2 to return second coordinate data to the formula  In  this case  itis X position data   For more information  refer  to the    result data types  table under the Operand Keys  heading      Formula       ATN GAGE2   GAGE1  GAGE2 3          3 CVIM MATH PAK  Installation and Configuration  4       Using Operator and ATN Key  continued   Operand Keys  continued     Your Action Comments    Pick these five keys  This sets up gage  1 as the fourth operand  and thereby    minus  G 1   decimal  3  completes the requirement for the    AX    in the ATN formula     In this case  the  1 3  causes gage  1 to return second  coordinate data to the formula  Since gage   1 is configured  for the Y position gage operation  it returns X position data  to the formula     Formula          GAGE2   GAGE1  GAGE2 3   GAGE1 3A         NOTE  A left arrow        has appeared at the left side of the  display  and the  ATN    has disappeared  This indicates that  the remainder of the formula has been shifted off the display  because of space limitations     Generally  any time a formula is too large to be displayed  completely  a left or right arrow appears in the left or right  side of the display  indicating the location of the remainder  of the formula     Select the second formula The parenthesis keys are on this keyboard   entry keyboard        Pick the
42. alue   Active feature  1 position  Y coordinate value   Active feature  1 score value               REFWn s Active feature  1 pass fail condition  1   pass  0   fail     n   1 to 3  Active feature  2 position  X coordinate value    s   Oto 15  Active feature  2 position  Y coordinate value     Active feature  2 score value    Active feature  2 pass fail condition  1   pass  O   fail    Active feature  3 position  X coordinate value    Active feature  3 position  Y coordinate value    Active feature  3 score value     Active feature  3 pass fail condition  1   pass  O   fail                     LPRB s   s   Oto 2     Light probe brightness value   Pass fail condition for warning range  1   pass  O   fail    Pass fail condition for fault range  1   pass  0   fail                             RSLTn s Formula  n  results data value    n   1 to 56  Pass fail condition for warning range  1   pass  O   fail     s   0 to 2  Pass fail condition for fault range  1   pass  O   fail                   Formula tool  n  statistics  Number of samples taken   Formula tool  n  statistics  Minimum reading value   Formula tool  n  statistics  Maximum reading value   Formula tool  n  statistics  Mean value   Formula tool  n  statistics  Standard deviation value   The letter n   operand number  s   operand subcode  The Operand Name column shows how  each operand appears when entered into a formula          STATn s   n   1to 56    s   0to4                CVIM MATH PAK  Installation and Configuration
43. bit  integer     Warning Range High   Integer    Words 32 and 33 represent a  16  bit  16  bit  fixed point  decimal value or 32 bit  integer     Warning Range Low    Words 34 and 35 represent a   Integer     16  bit   16  bit  fixed point  decimal value or 32 bit  integer     Appendix A CVIM Communications With MATH PAK  A 10       Faill Warning Ranges   Formulas     9 16  25 32  41 56   in Toolset 2    Table A 6 lists the fail and warning range data locations for  Formulas 9 through 16  25 through 32  and 41 through 56    blocks 72 103   Refer to the following for the block number  for each formula  Table A 6 provides the word   of the data    in each block     Formula 9  Block 72  Formula 10  Block 73  Formula 11  Block 74  Formula 12  Block 75  Formula 13  Block 76  Formula 14  Block 77  Formula 15  Block 78  Formula 16  Block 79  Formula 25  Block 80  Formula 26  Block 81  Formula 27  Block 82  Formula 28  Block 83    Formula 41  Block 88  Formula 42  Block 89  Formula 43  Block 90  Formula 44  Block 91  Formula 45  Block 92  Formula 46  Block 93  Formula 47  Block 94  Formula 48  Block 95  Formula 49  Block 96  Formula 50  Block 97  Formula 51  Block 98  Formula 52  Block 99    Formula 29  Block 84  Formula 30  Block 85  Formula 31  Block 86  Formula 32  Block 87    Table A 6  Configuration Blocks  72 103 Fail Warning Ranges  T52     Formula 53  Block 100  Formula 54  Block 101  Formula 55  Block 102  Formula 56  Block 103             Remote I O   amp  RS 232 Bit   Defi
44. ced between two operands where the left operand result is  less than the right operand result  Thus  if the GAGEI result  is 7 and the GAGE2 result is 8 in the following formula       GAGE1    GAGE2        the formula will return a logic    1    result  since 7 is  greater than 8     If the GAGE1 result were equal to  or greater than  the  GAGE  result  the formula would return a logic  0       gt    The    greater than or equal to  operator   gt     returns  a logic  1  when placed between two operands where the left  operand result is greater than  or equal to  the right operand  result  Thus  if the GAGEI result is 46 and the GAGE2  result is 45 in the following formula       GAGEI  gt    GAGE2        the formula will return a logic    1    result  since 46 is  greater than 45  The result would be the same  in this case  if  the two gage results were both 45 or 46    If the GAGEI result were less than the GAGE  result  the  formula would return a logic    0         lt    The  less than or equal to  operator   lt     returns a  logic    1    when placed between two operands where the left  operand result is less than  or equal to  the right operand  result  Thus  if the GAGE1 result is 32 and the GAGE2  result is 33 in the following formula       GAGE1  gt    GAGE2        the formula will return a logic    1    result  since 32 is less  than 33  The result would be the same  in this case  if the two  gage results were both 32 or 33    If the GAGE  result were greater than t
45. cesses the  results data from the formula s operation in the same way  that it handles results data from tools     Figure 1 2 shows how the CVIM system handles inspection  results data when the MATH PAK option is installed and  formulas are configured to manipulate results data from one  or more tools     Figure 1 2 CVIM System With MATH PAK Formulas    CVIM Inspection    Inspection Results  Data from One or  More AnalysisTools    Formula Manipulates  Results Data from Tools  Results Data from  Formula Manipulation    Range Limit s   Exceeded or  Tool Failed                        MATH PAK affects  this part of the  results data  handling process             Appropriate  Fault Warning Bit s     Cleared  Appropriate  Fault Warning Bit s  Set  Bit s  Sent to  Assigned Output s           To  Chassis  Backplane        Results Data Stored  in CVIM Memory    To  1771 Remote  IO Port        To  RS 232 Port    CVIM MATH PAK  Installation and Configuration       Installing MATH PAK The MATH PAK option is provided on a memory card  You  Option can install the option in your CVIM system by inserting the   memory card into the Archive Memory slot on the CVIM   module s front panel and applying power to the module     NOTE  The CVIM system must have Revision C01  or  higher  firmware before the MATH PAK option can be  installed   The firmware revision can be seen in the banner  message on the monitor screen following powerup      The following steps assume that the CVIM system contains  R
46. ch character of the  new name     Pick the Ret key to enter  the new formula name     Enabling Formula    CVIM MATH PAK  Installation and Configuration    Comments    The preceding keyboard illustration shows the first  keyboard  while the following illustration shows the second  keyboard        As you pick the characters  they will appear after New  name     When you pick the Ret key  the new name will appear in the  Set Name menu box in the Config  Results menu     Note also that the    Formula saved    message appears in the  message box on the monitor screen     Formula saved     This indicates that the name has been saved in memory     Use this function to enable the currently selected formula     NOTE  When you enable a formula  the CVIM system  prevents an associated gage or window from sending its  results to the discrete outputs     For example  if you enable formula  1  the results of its  operation will be available to the discrete outputs instead of  the results from a window  1 inspection  The CVIM system  will use the range limits and discrete outputs assigned to  formula  1 and send the results of its operation to those  outputs   Window  1 results data are still available through  the other I O ports  however      Enabling Formula   continued        Window 1  Window 2  Window 3  Window 4  Window 5  Window 6  Window 7  Window 8               Your Action    Pick the Formula XX  menu box     Pick the Formula XX menu  box again  tf appropriate       Formula      0
47. ch window is one   black object   the only correct sum is six  Thus  all range  limits for the formula would be set to six     MATH PAK Application  Examples  continued     CVIM MATH PAK  Installation and Configuration sa       Example  3  Making Complex Inspection Decisions  Using MATH PAK Logic Operators Some inspection  decisions require more than using inspection results data  from tools as the direct basis for making the decision     With the MATH PAK option  as shown in Examples  1 and    2  results data from several tools can be combined in a   mathematical formula  and the results from the formula   a along with range checks  as the basis for a GO NOGO  ecision     Some applications  however  can make use of one or more  MATH PAK logical formulas to produce a GO NOGO    decision     In this example  the requirement is to measure the distance  across a trianglular object at three different angles  If two of  the three measurements meet or exceed the minimum  distance of 15 units  the part s shape is considered to be  uniform  In addition  a window is used to measure the  object s area  If the area meets or exceeds 100 square units   the part s area is considered to be adequate              gt   Window  S79   2    Workpiece       Two formulas are used  as follows    1   GAGE1  gt  15     GAGE2  gt  15     GAGES3  gt  15    2   WIN1  gt  100  AND  RSLT1  gt    2     In formula  1  each expression makes the statement     If  GAGEn is greater than 15  then return a logic 1
48. cribed in the following table     wee BA       OOO  Mar  oeer tomua  Ceartheenivefomile SS   Re  Return  Cauesir Tomua to besed iamen      tic  tape  Restores the formola tots condition whentantaved    RS                    Key  Clr  Ret  Esc       Using Control Keys    Your Action    Select either formula  entry keyboard     Pick these three keys   4  2     Pick the left arrow     key     CVIM MATH PAK  Installation and Configuration 25       The control keys enable you to edit a formula and store it  in memory     This section describes the use of the control keys and  provides the requirements and limitations for using them   The keys are discussed in the order of their appearance in  the preceding table Where appropriate  an example is  provided to illustrate the use of a key     It is assumed at this point that you have selected an unused  formula number  and the first formula entry keyboard is on  the screen  as described earlier in the Configuring MATH   PAK Formulas section     Del  Delete  Key    The Del key operates as a backspace delete key  It can delete  an item previously entered into a formula  When you pick  the Del key  the CVIM system deletes the item to the left of  the cursor     and moves the cursor one space to the left     To use the Del key  you must first position the cursor  using  the left arrow     or right arrow       key  to the immediate  right of the formula item to be deleted  You then pick the Del  key to delete the item from the formula     
49. dure shows you how to set up a formula  using the COS operator  The procedure uses a positive angle   stated in degrees  to demonstrate the entry of a COS formula     CVIM MATH PAK  Installation and Configuration       38  Using Operatorand COS Key  continued   Operand Keys  continued   Your Action Comments  Select the second formula The COS operator is on this keyboard   entry keyboard     Pick the COS key  When you pick the COS key  the following entry appears in  the upper box of the keyboard     Formula       COS A           Pick these two keys  This enters the value of the positive angle in degrees  The  6 0  display should now appear as follows     Formula       COS 60          Pick the    close parenthesis    This completes the COS formula entry   key  ee a    Formula       COS  60  A       Pick the Ret  return  key  This causes the system to display the    result     In this case   the result is 0 500  which is the cosine of an angle of 60       Formula  result   0 500       Look at the message box This indicates that the CVIM system has saved the COS  in the upper left corner formula in its memory   of the screen   This completes the procedure for entering and saving the  COS formula     Using Operator and  Operand Keys  continued     CVIM MATH PAK  Installation and Configuration 35       DST Key    The DST  distance  function computes the distance from one  position in the image field to another position     It performs the distance computation by using the  Pythago
50. e CVIM system will respond with this  message     WARNING  A formula error will cause deletion   Reselect to confirm        NOTE  Before picking the Ret key  check the formula fora  question mark      If the formula is correct  so far as the  system is concerned   the question mark will not be present     26    CVIM MATH PAK  Installation and Configuration       Using Control Keys   continued     Esc  Escape  Key  The Esc  escape  can restore the last saved formula  It deletes  all items entered since the last time you picked the Ret key     Thus  if your formula appeared like this the last time you  picked the Retkey       Formula  result   2     4  2a           and you enter the following items  but do not pick the Ret  key after entering them        Formula   s 4 276 712A           and then pick the Esc key  the formula will delete the new  items and return to its previous state     Formula  result   2     4  2A       Cursor Keys        and   gt      These keys can reposition the cursor  A  within a formula  without deleting any item in the formula  For example   when you pick the left arrow key   lt    the cursor moves one  item to the left  If your formula looks like this initially        Formula     24 2  6   12            and you pick the left arrow key  the cursor will move to  the left of the add      operator     Formula    4  2  6  a 12       Using Control Keys     continued     CVIM MATH PAK  Installation and Configuration 55       Keyboard Select Keys   t and    
51. e Set Formula When you pick the Set Formula menu box  the first of two  menu box   formulaentry  keyboards  appears on the monitor screen     Range Outputs eee    Config  Results                    ees 3 Formula Entry            Formula 1  Disabled    Jump coo    Previous Next    Camera A    The upper box in the keyboard displays the name of the  currently selected formula and the formula itself  In this  case  no formula has been configured nor formula name  entered           The lower box in the keyboard displays the    keys    that are  used to select the digits  0   9   the mathematical  logical  and  tool operators  and the operands  The remaining keys are for  editing and saving formulas     Pick the up arrow 1  inthe When you pick the up arrow   1   the up arrow changes to a  lower right corner  down arrow      and a second formula entry keyboard  appears in which the rightmost six columns of keys have  different functions than in the first keyboard        Second    Formula Entry   Keyboard           16       GanngunnG  MATH PAK  ormulas  continued     Definitions  MATH PAK  Terms and Concepts    CVIM MATH PAK  Installation and Configuration    As stated earlier  most of the keys in both keyboards are  used to select the various elements that make up a formula   The remaining keys are used to edit and store a formula     The next four sections contain the following information         Definitions  MATH PAK Terms and Concepts describes  the key terms and concepts applic
52. e X    X   Side adjacent to 0     In a MATH PAK formula  the TAN operator requires one  operand  The basic formula takes this form     TAN angle in degrees     CVIM MATH PAK  Installation and Configuration  52    PA el    Using Operatorand TAN Key  continued   Operand Keys  continued     The following procedure shows you how to set up a formula  using the TAN operator  The procedure uses a positive angle   stated in degrees  to demonstrate the entry of a TAN formula     Your Action Comments  Select the second formula The TAN operator is on this keyboard   entry keyboard     Pick the TAN key  When you pick the TAN key  the following entry appears in  the upper box of the keyboard     Formula     TAN A         Pick these two keys  This enters the value ofthe positive angle in degrees  The  45  display should now appear as follows     Formula       TAN  45A               Pick the  close parenthesis    This completes the TAN formula entry   ey  ud    Formula       TAN  45  a       Pick the Ret  return  key  This causes the system to display the    result     In this case   the result is 1 000  which is the tangent of an angle of 45       Formula  result   1 000    TAN  45  A       Look at the message box The Formula saved    message indicates that the CVIM  in the upper left corner system has saved the formula in its memory   of the screen   This completes the procedure for entering and saving the  TAN formula     CVIM MATH PAK  Installation and Configuration kg    a    Using Ope
53. e box  in the upper left corner  of the screen     CVIM MATH PAK  Installation and Configuration Sa       ABS Key  continued     Comments  The    unary    operator     is on this keyboard     When you pick the   key  the following entry appears in the  display     Formula       ABS  A           This will negate the value that follows it     This enters the value   45  in the formula  The display  should now appear as follows        Formula     ABS   45A        The parenthesis keys are on this keyboard   This completes the ABS formula entry     This causes the system to display the  result   Note that the  original value   45  is converted to the absolute value 45        Formula  result   45  z ABS   45  A       The  Formula saved  message indicates that the CVIM  system has saved the ABS formula in its memory     This completes the procedure for entering and saving the  ABS formula     j CVIM MATH PAK  Installation and Configuration  3        HD                                              H                                                    m    ni      Using Operatorand ATN Key  Operand Keys  continued     The ATN operator computes the angle 0  in degrees  of a line   relative to the X axis of the image field  as follows             Line Direction    Negative Angles   0   to  180     X Axis of  Image Field    gt     Positive Angles   O   to   180      Line Direction    Line Origin          The ATN function computes the angle 0 by first computing  the tangent of the angle   
54. e just selected an unconfigured formula number and  picked the Set Formula menu box  which displays a clear  formula entry box and the first formula entry keyboard on  the monitor screen  as described earlier under the Keyboard  Select Keys heading      NOTE  In the following procedures  you will occasionally  need to alternate between the two keyboards in order to  configure some of the formulas  You can select the alternate  keyboard by picking the up arrow  1  or down arrow      in  the lower right corner of the keyboard     ABS Key    The ABS  absolute value  function converts a negative  number to its absolute value  Thus     45 is converted to 45     In a MATH PAK formula  the ABS operator requires one  operand  The basic formula takes this form     ABS value   The following procedure shows you how to set up a formula  using the ABS operator  The procedure uses a negative  integer to demonstrate the entry of an ABS formula   Comments  The ABS operator is on this keyboard     When you pick the ABS key  the following entry appears in  the upper box of the keyboard     Formula       ABS A            Note that the open parenthesis symbol       appears with the  ABS operator     Using Operator and  Operand Keys  continued     Your Action    Select the first formula  entry keyboard     Pick the     key     Pick these two keys     45     Select the second formula  entry keyboard     Pick the    close parenthesis     key  ee      Pick the Ret  return  key     Look at the messag
55. ed  point number     FP Computes the square root of the operand   INT FP   Computes the square of the operand     FP Computes the tangent of an angle  in degrees   Returns a  fixed point number     MOD Mode    v  z    Sine  SQR Square root  SQ Square    TAN Tangent       Computes the variance of a list of operands  The variance is  equal to the sum of the square of the difference between  each operand in the list and the average value of the  operands  divided by the number of operands in the list     Open Used to set the order of evaluation of a formula  Can be      INT FP  parenthesis nested         VAR Variance       D         Closed INT FP   Used to close an open parenthesis  parenthesis    Add INT FP   Adds the right operand to the left operand    Subtract    INT FP   Multiplies the left operand by the right operand  INT FP   Divides the left operand by the right operand    Produces the remainder of the division of the left operand  INT FP    by the right operand      Result types  INT   integer  FP   fixed point  INT FP   either integer or fixed point     Multiply    Divide    INT FP   Subtracts the right operand from the left operand       Modulo    CVIM MATH PAK  Installation and Configuration  22       Definitions  Formula Entry Operator Keys  continued     Key Functions  continued      Result Operator Functions  Part 2 od 2   Type    Unary minus INT FP   Negates a numeric value     Decimal point FP Used to enter a fixed point number  Also used to designate  an opera
56. er source you  selected     As the inspections continue  the Stat  Page 1 table displays  accumulated    results    data for each enabled gage  window   and or formula     Picking the Setup menu box stops the run mode and returns  the CVIM system to the configuration mode     At this time  the final data appearing in the Stat  Page 1  table are recorded in the Inspection Statistics table for the  currently selected formula  You will see this when you pick  the Range Outputs menu box for the appropriate formula     These columns show the mean  standard deviation   minimum reading  and maximum reading statistics for the  trial inspection series     These statistics are your basis for configuring the range  limit values for the currently selected formula     This restores the Misc popup menu   This restores the Config  Results popup menu     CVIM MATH PAK  Installation and Configuration ak          Assigning Range Limits Use the following steps to configure the appropriate range  and Outputs  continued  limits for your MATH PAK formulas     Your Action Comments    Pick the Range Outputs menu When you pick the Range Outputs menu box  two tables will  box in the Config  Results  appear on the screen  as follows   popup menu               0 000 eee 0 000 eee    0 000 eee 0 000 eee                           Inspection  Statistics Table         Range Qu                EU UR INE ES EE Range Output  Setup Table    Config  Results    Formula 1  Disabled ag                Popup Menu  Jum
57. er to display statistics from at  least one formula  per page  in the Stat Page 1 table     For example  if you enter  1  and you want to see the  statistics from formula  5  after activating the run mode you  must  page down  the Stat Page 1 table four times in order to  see the formula  5 statistics     This menu box enables you to specify the number of  inspections that you want the CVIM system to perform  before it displays accumulated statistical data in the Stat  Page 1 table     64    CVIM MATH PAK  Installation and Configuration       Assigning Range Limits  and Outputs  continued     Your Action    Pick the Stat  Samples  menu box  if appropriate     Pick the Runtime menu  box in the Exit menu     Pick the Goto Runmode menu  box in the Runtime menu     Look the Stat  Page 1 table     When the desired number  of inspections appears under     samples    in the Stat  Page 1   table  pick the Setup menu  box to stop the run mode     Look at the four statistics  columns in the Stat   Page 1 table     Pick the Misc menu box     Pick the Config  Results  menu box     Comments    When you pick the box  the    calculator    pad appears  Enter  the number of inspections to be performed for each sample     When you pick the Runtime menu box  the Runtime popup  menu appears     When you pick the Goto Runmode menu box  the CVIM  system begins running inspections if you selected  Auto Internal as the trigger source  If not  the system will  await trigger inputs from whatever trigg
58. es to help our    customers continuously improve quality  productivity and time to market  These products and    services not only control individual machines  but also integrate the manufacturing process  while providing access to vital plant floor data that can be used to support decision making    throughout the enterprise     ASIA PACIFIC HEADQUARTERS  Allen Bradley  Hong Kong  Limited  Room 1006  Block B  Sea View Estate  2 8 Watson Road  Hong Kong   Tel   852 887 4788  Telex   780  64347  FAX   852 510 9436    CANADA HEADQUARTERS  Allen Bradley Canada Limited  135 Dundas Street  Cambridge  Ontario N1R 5X1  Canada   Tel   519 623 1810   FAX   519 623 8930       LATIN AMERICA  HEADQUARTERS   1201 South Second Street  Milwaukee  WI 53204 USA  Tel   414 382 2000   Telex  43 11 016   FAX   414 382 2400    40062 194 01 A     
59. evision C01  or higher  firmware and is currently powered  up  Use these steps to install the MATH PAK option in your  CVIM system     Your Action Comments  Pull the DC PWR LOCK This removes DC power from the CVIM module     handle out as far as it will go     Insert the memory card into the The metal strip  and the arrow on the card label  must be  Archive Memory sloton the facing right   CVIM module     CVIM Module 1 73    MATH PAK Memory Card       Card Label    Arrow    Metal Strip    PushintheDC PWR LOCK Be sure the lock handle is in as far as possible  This applies  handle  DC power to the CVIM module and begins loading the  MATH PAK software     CVIM MATH PAK  Installation and Configuration       Installing MATH PAK  Option continued     Your Action    Comments    Observe the LEDs during The top three LEDs on the CVIM module indicate the    software loading     progress of the three phase software loading process  as  follows     Vision Processor        Pass Fail    Trigger 1    CL   CJ    Trigger 2    MATH PAK Loading Phase  Pass Fail Red to yellow  one Red to yellow   to green  to green     Trigger 1 Green O  Trigger  Green    The MATH PAK software loading process requires about 45  seconds  with each phase taking about 15 seconds  When the  loading process is complete  the CVIM system begins its  normal powerup sequence        MATH PAK Option   MenulDisplay Changes    Gages and Windows   RangelReference  Popup Menu          CTT wwe        Learn     Gage 1     CVIM M
60. formula result will be true  logic 1   ig the gage  1  result is not equal to the expression result  the formula  result will be false  logic 0       4  GAGE1 1 AND GAGE2 1    In this formula  the left operand  the warning range result  from gage  1  is ANDed with the right operand  the warning  range result from gage  2   These operands will always be  either true  logic 1  or false  logic 0      If both warning range results are logic 1  the formula result  will be true  logic 1   If either warning range result is logic 0   the formula result will be false  logic 0       5   GAGE1   7  OR  GAGE1   12     In this formula  the left operand  the first expression   compares the measurement result from gage  1 to 7  The  expression result is then ORed with the right operand  the  second expression   which compares the gage  1 result with  12  The expression result will always be either true  logic 1   or false  logic 0      If either measurement result is logic 1  the formula result  will be true  logic 1   If both measurement results are logic 0   the formula result will be false  logic 0      Definitions  Formula Entry    This section briefly defines the function of each formula  Key Functions entry key  The Using Control Keys and Using Operator and  Operand Keys sections describe the use of each key in detail     Digit Keys  0to9    These keys are used to enter all of the numeric values to be  used in a formula     Here are some limitations on entering and using constants    
61. g    Formula 30  Warning Flag    ormula 30  ault Flag    Pa  Fa    Ss  il  ss    Formula 31 a  Fault Flag i    ormula 32  arning Flag    ormula 32  ault Flag    Appendix A CVIM Communications With MATH PAK  A 18       Discrete Bit Inputs   continued     Table A 8           Backplane  Toolset   Toolset  1 2   22                     22 286 1 1 JFormula41 0   Pa  Fault Flag 1   Fail  22 286 Formula 42 0   Pass  Warning Flag  1   Fail  22 286 3 3  Formula42 0   Pass  Fault Flag 1   Fail  22 286 Formula 43 0   Pass  Warning Flag   1   Fail  22 ormula 43 0   Pass  ault Flag 1   Fail  22 286 Formula 44 0   Pass  Warning Flag   1   Fail  22 286 Formula 44 0   Pass  Fault Flag 1   Fail    286            2    nN  N      eo    NJ  N  0o  eo    N  N  Ng      e    Formula 47 0   Pass  arning Flag  1   F    Formula 47 0   Pass  Fault Flag 1   Fail    N  N  oo  a       Formula 45 0   Pass  Fault Flag 1   Fail    N N  N N N N   N        o       Appendix A CVM Communications With MATH PAK                                    A 19  Discrete Bit Inputs   continued   Table A 8  Di ete Bi ale  On j nue  Bit    Definition Notes  Toolset  PLC       Formula 48 Pass    Warning Flag    aQ  Ul    M    F  Pass  ault Flag 1   Fail    ormula 48 0    Tm n    Formula 49 0   Pass  Warning Flag   1      ormula 49 0  ault Flag 1    N  m m    Formula 50 0   Pass  Warning Flag   1   Fail    m mn    ormula 50 0  ault Flag 1    Formula 51 0  Warning Flag   1  5 ormula 51 0   Pass  ault Flag 1    Formula 52 0   Pass 
62. he GAGE  result   the formula would return a logic    0           CVIM MATH PAK  Installation and Configuration T                                                     H I AA                   Setting Formula Name Use this function to name the current formula  You can  choose any name consisting of up to seven alphanumeric   punctuation  and miscellaneous printable characters   including the  space  character     Your Action Comments    Pick the Set Names menu When you pick the Set Name menu box  a    keyboard     box ifappropriate  appears alongside the Config  Results popup menu  as  follows              Range Outputs Config  Results    Set Formula Popup Menu     Keyboard     Formula 1  Disabled       The default name is always the number of the current  formula  In the example above  itis F1     The keyboard has five function keys     1  The backspace key     deletes the last character entered  and moves the cursor  1  left one space     2  The Esc   escape   key returns to the Set Archive Names  popup menu without changing the current name  if any     3  The CI   clear   key sets the  New name  line to all blanks     4  The Ret   return   key enters the new name into the  appropriate menu box in the Set Archive Names popup menu     5  The shift keys  1    select alternate  keyboards  by  causing several of the keyboard keys to change  The alphabet  characters  however  remain the same on both keyboards     60       Setting Formula Name   continued     Your Action    Pick ea
63. hecking for window   1 can be  enabled   For more information about this subject  refer to  the Enabling Formula heading in this manual          Enable the selected tool       Enable range checking for the selected tool     CVIM MATH PAK  Installation and Configuration       Gages and Windows  When either of the first two conditions is not satisfied   RangelReference    Disabled    appears in the Range menu box in black type   Popup Menu  continued  indicating that you cannot toggle the menu box to    Enabled        Thus  you cannot enable range checking for the selected tool     When the first two conditions are satisfied  you can enable  range checking for the selected tool by picking the Range  menu box so that it reads    Enabled     Picking the menu box  repeatedly causes it to toggle between Enabled and Disabled     Misc Popup Menu When you pick the Misc menu box in the Main menu  the    Misc popup menu appears with a new menu box called  Config  Results     Config  Results     Config Results eee fe Menu Box  000  eee                          Misc  Popup Menu    Registration       When you pick the Config  Results menu box in the Misc  menu  the Config  Results popup menu box appears  This is  the menu that you use to configure MATH PAK formulas     Range Outputs  Set Formula  IUE Config  Results  Formula 1  Disabled Popup Menu  Jump    Previous    006  eee                       Misc    Misc Popup Menu   continued     CVIM MATH PAK  Installation and Configuration       
64. his formula uses the DST  distance  operator  which  calculates the distance between the two edges by using the  Pythagorean theorem  refer to the discussion of the DST  operator under the DST Key heading      CVIM MATH PAK  Installation and Configuration  gt i       MATH PAK Application  Examples  continued     In this formula  operands GAGE 1  GAGE1 3  GAGE2  and  GAGE2 3 function as follows         GAGE 1 returns the X position of the first edge        GAGEL 3 returns the Y position of the first edge    e GAGE 2 returns the X position of the second edge   e GAGE2 3 returns the Y position of the second edge     NOTE  The GAGE1 3 and GAGE2 3 operands are  functional only during the run mode  During the setup mode   these operands always return a 0  zero      The effect of the DST formula is to return the length of the  hypotenuse of a right angle triangle  In the present example   this hypotenuse is also the  distance  between two sides of  the object        a  GAGE2   X Position  GAGE2 3   Y Position         Object to be  Measured    GAGE1   X Position  GAGE1 3   Y Position    Note that the DST formula is functionally equivalent to the  following formula       SQR SQ GAGE 1   GAGE 2    SQ GAGE1 3   GAGE2 3          but it is both faster and more compact than the    SQR     formula     Example  2  Determining Areas of Odd Shapes Using  Multiple Widows Without the MATH PAK option  the  CVIM system would normally require using a polygon  window to count pixels or objects on  o
65. his keyboard   entry keyboard     Pick the    close parenthesis    This completes the MAX formula entry   key  er    Formula     MAX 12  5  89    100  a       Pick the Ret  return  key  This causes the system to display the    result     In this case   the result is 89  which is the maximum value in the list     Formula  result   89    MAX   12  5  89    100 Ja       Look at the message box This indicates that the CVIM system has saved the formula  in the upper left corner inits memory   of the screen   This completes the procedure for entering and saving the  MAX formula     Now  use the following steps to change to the MIN operator  and demonstrate its operation     Pick the left arrow  lt      key This causes the cursor  A  to move to the left  The display  repeatedly until thecursor should appear as follows   ts to the right of MAX       Formula       MAX    12  5  89    100        Using Operator and  Operand Keys  continued     Your Action    Pick the Del  delete  key     Pick the MIN key     Pick the Ret  return  key     Look at the message box  in the upper left corner  of the screen     CVIM MATH PAK  Installation and Configuration us       MAX  MIN Keys  continued     Comments    This deletes the MAX operator and moves the cursor     to  the left as follows     Formula         12   5  89    100        When you pick the MIN key  the MIN operator appears  The  display should now appear as follows     Formula       MIN  A 12  5  89    100        This causes the system t
66. ial series of inspections using a representative sample of  workpieces in order to accumulate a statistical basis for  setting the range limits for the formulas     Comments    Refer to the CVIM User s Manual  Chapter 10  Runtime  Operations  for more details about the following steps     For these trial inspection series  you should have on hand a  sufficiently large quantity of representative workpieces     If you cannot use the actual factory floor setting to perform  these trial inspections  you can manually position each  workpiece in front of the camera and use a manual trigger   or use some type of automatic positioning and triggering  mechanism that approximates the factory floor situation     When you pick the Exit menu box  the Exit popup menu  will appear     When you pick the Runtime Display menu box  the Runtime  Display popup menu will appear     This causes the Stat  Page 1 statistics table to appear on the  monitor screen when you activate the run mode  Stat  Page 1  can be configured to display  results  statistics for all  enabled formulas  gages  and windows     When you pick the Runtime Init  menu box  the Runtime Init   popup menu appears     If  Standard  appears  pick the box once to toggle to  Learn    This activates the  learn  mode during the trial inspection  series and ensures the accumulation of  results  data for this  formula in the Stat  Page 1 table     If  0  appears  pick the box to display the  calculator  pad   Enter  1   or higher  in ord
67. ion  40       Using Operatorand DST Key  continued   Operand Keys  continued     Your Action Comments  Select the second formula The DST operator is on this keyboard   entry keyboard     Pick the DST key    When you pick the DST key  the following entry appears in  the upper box of the keyboard     Formula       DST A        Pick these four keys  This enters the X position of the first point in the image  100   comma   field  The display should now appear as follows     Formula       DST   100A         Enter the values for Y  X  This enters the Y position of the first point and the X and Y  and Y   with commas between positions of the second point  The display should now appear  them  150 175 100  as follows     Formula       DST  100  150  175  100          Pick the    close parenthesis    This completes the DST formula entry   key  7      Formula       DST   100  150  175  100  a       Pick the Ret  return  key  This causes the system to display the    result     In this case   the result is 90 138  which is the distance  in pixels  between  the two points     Formula  result   90 138      DST 100  150  175  100  A       Using Operator and  Operand Keys  continued   Your Action    Look at the message box  in the upper left corner  of the screen     Your Action    Select the second formula  entry keyboard     Pick the MAX key        Pick these three keys   12   comma      Select the first formula  entry keyboard     CVIM MATH PAK  Installation and Configuration di       DST 
68. ition  subtraction  multiplication  and division  functions  as shown in the following examples     Addition  By placing the addition operator     between the  following integers       52   34        the system adds the two integers and computes a result of  86     Subtraction  By placing the subtraction operator      between the following integers       52 34        the system subtracts the right integer from the left  integer and computes a result of 18     Multiplication  By placing the multiplication operator      between the following integers       52   34        the system multiplies the two integers and computes a  result of 1768     Division  By placing the division operator     between the  following two integers       52 34        the system divides the left integer by the right integer  and computes a result of 1  the result is truncated    If one of  the two numbers were fixed point  the result would also be  fixed point  1 529      Parenthesis Keys        The parenthesis are used to enclose an arithmetic or logical  expression within a formula  This ensures that the formula  will evaluate the contents of the expression as an entity     For example  in the following formula     3 6 5        the formula evaluates    6   5    first  thus  in this case the    result is 33  6  5   30  and 30   3   33    By placing parenthesis around    3   6         3   6  5        the formula evaluates it as a single entity  3   6   9    thus  in this case the result is 45  9  5   4
69. logic 1   if the logic condition is satisfied  or false  logic  0   if the logic condition is not satisfied     NOTE  From the standpoint of the discrete outputs  a  true    logic 1  result is equivalent to a  pass  condition  and a   false   logic 0  is equivalent to a  fail  condition     Here are a few examples of how the terms operand  operator  and result are used within various logical formula  constructions      1  GAGE1   5    In this formula  the left operand  the measurement result  from gage   1  is compared to the right operand  the constant  5   If the gage  1 result is less than 5  the formula result will  be true  logic 1   If the gage   1 resultis equal to or greater  than 5  the formula result will be false  logic 0       2  GAGE1 5 GAGE2    In this formula  the left operand  the measurement result  from gage  1  is compared to the right operand  the  measurement result from gage  2   If the gage  1 resultis  greater than the gage  2 result  the formula result will be  true  logic 1   If the gage  1 result is equal to or less than the  gage  2 result  the formula result will be false  logic 0      CVIM MATH PAK  Installation and Configuration       Definitions  MATH PAK  3  GAGE1    GAGE2 4   Terms and Concepts   continued  In this formula  the left operand  the measurement result  from gage  1  is compared to the right operand  the  expression in which the gage  2 measurement result is  divided by 4   If the gage  1 result equals the expression  result  the 
70. mula The MED operator is on this keyboard   entry keyboard     Pick the MED key  When you pick the MED key  the following entry appears in  the upper box of the keyboard        Formula     MED           Pick these three keys  The display should now appear as follows   8 2   comma      Formula     MED 82           Select the first formula The    unary    operator     is on this keyboard   entry keyboard     Pick the     key  whee you pick the   key  the following entry appears in the  display     Formula       MED 82             This will negate the value that follows it     CVIM MATH PAK  Installation and Configuration ae       Using Operator and  Operand Keys  continued     Enter the remaining operands   with a comma between each    15 3 86 2 8     Select the second formula  entry keyboard     Pick the    close parenthesis     key  rp ad    Pick the Ret  return  key     Look at the message box  in the upper left corner  of the screen     MED Key  continued     The display should now appear as follows     Formula       MED  82    15  3  86  2  8A        The parenthesis keys are on this keyboard   This completes the MED formula entry     Formula       MED 82    15  3  86  2  8            This causes the system to display the  result   In this case   the result is 8  which is the  median  value in this list     Formula  result   8    MED 82    15  3  86  2  8 a       The    Formula saved    message indicates that the CVIM  system has saved the formula in its memory     This com
71. n KALA GUN  Fail Warning Ranges  Formulas   9 16  25 32    41 56 in Toolset 2                                A 10  Fail Warning Ranges  Formulas   1 8  17 24    33 40 in Toolset 2  Discrete Bit Inputs     gt   gt  PP PP PEPD  NERANG      o       CVIM    MATH PAK    Installation and Configuration       MATH PAK User Manual   Objectives    MATH PAK Option   Definition    User Experience    The objectives of this manual are to introduce you to the  MATH PAK   option for the Allen Bradley 5370 CVIM   Configurable Vision Input Module  machine vision system  and provide the information and procedures you need to  install the MATH PAK option in your CVIM system and  configure the system for mathematics applications     Here are the major sections in this manual     MATH PAK Option  Overview describes briefly how the  CVIM system handles inspection results data when using  MATH PAK formulas     Installing MATH PAK Option shows you how to install the  MATH PAK option on your CVIM system     MATH PAK Option  Menu Display Changes shows you how  the MATH PAK option affects the menus and display tables     Configuring MATH PAK Formulas describes the  mathematical and logical operators available with the  MATH PAK option and shows you how to use them to  construct MATH PAK formulas     MATH PAK Application Examples shows you how MATH   PAK formulas can be used in various combinations to solve  real world application problems     NOTE  It is beyond the scope of this manual to show you  how 
72. nd subtype     Equal INT FP Produces a 1    result if the left operand is equal to the right  operand  otherwise  produces a    O    result     Producesa    1    result if the left operand is not equal to the  Noregual EEE right operand  otherwise  produces a    O    result     Greater than   INT FP Produces a    1   result if the left operand is greater than the  right operand  otherwise  produces a  O  result     Leathan INT FP Produces a 1    result if the left operand is less than the right  operand  otherwise  produces a    O    result     Great  rlan Produces a  1  result if the left operand is greater than or  INT FP   equal to the right operand  otherwise  produces a    0     or equal  result   Less than or INT FP Producesa    1    result if the left operand is less than or equal             Key                      equal to the right operand  otherwise  produces a  0  result     Comma INT FP   Used to separate the operands in a list of operands     Logical AND   INT FP Produces a    17 result if both the left and right operands are  nonzero  otherwise  produces a    0    result     Logical OR INT FP Produces a  1  result if either the left or right operand is  nonzero  otherwise  produces a    O    result     NOT   Logical NOT   INT FP   Used to invert a logical result        Result types  INT   integer  FP   fixed point  INT FP   either integer or fixed point        Control Keys    Both keyboards contain the same set of control keys  whose  functions are briefly des
73. nected to the chassis  backplane  the 1771 remote I O port  the RS 232 port  and  the discrete output port     When operating without MATH PAK formulas  the CVIM  system compares the results data from each tool to the tool s  specific warning and fault limits  Whenever the results data  are above or below one of these limits  the system sets a  discrete bit and routes it to the assigned output      Note that range limits do not apply to reference tools  These  tools either pass or fail according to whether they find their  edge or feature  If a reference tool fails  the CVIM system  sets a discrete bit and routes it to the assigned output      Figure 1 1 shows  symbolically  how the CVIM system  handles inspection results data when operating without    using MATH PAK formulas   Figure 1 1 CVIM System Without MATH PAK Formulas    CVIM Inspection  Inspection Results Data  from One AnalysisTool    Range Limit s   Exceeded or  Tool Failed        Appropriate  Fault Warning Bit s     Cleared    Appropriate      i P To  Ch  Fault Warning Bit s  Set o Paasa    Results Data Stored To  1771 Remote  in CVIM Memory   O Port    Bit s  Sent to To  RS 232 Port  Assigned Output s        CVIM MATH PAK  Installation and Configuration       MATH PAK Option  When the MATH PAK option is installed in the CVIM  Overview continued  system  you can configure formulas to perform mathematical  and or logical operations on the inspection results data from  one or more analysis tools  The CVIM system pro
74. ng the AVG operator  The procedure uses a list of six  integers  then changes one of them to a fixed point equivalent  to demonstrate the entry of an AVG formula     Comments    The AVG operator is on this keyboard     When you pick the AVG key  the following entry appears in  the upper box of the keyboard        Note that the open parenthesis symbol       appears with the  AVG operator     This enters the first operand  89  in the list  The upper box  should now appear as follows     Formula     AVG  89  A        When you finish  the display should appear as follows     Formula     AVG  89  49  36  15  20  114A        CVIM MATH PAK  Installation and Configuration       36  Using Operatorand AVG Key  continued   Operand Keys  continued   Your Action Comments  Pick the    close parenthesis    This completes the AVG formula entry   key   ps       Formula     AVG  89  49  36  15  20  114 A        Pick the Ret return  key  This causes the system to compute the average and display  the  result   53  in the box as follows     Formula  result   53      ANG  89  49  36  15  20  114 a       Note that since all operands in the list are integers  the  result is also an integer  that is  the result is truncated     Pick the left arrow   lt      key  This causes the cursor     to move to the left one item  It  should now be to the left of the close parenthesis  Note that  the  result  has disappeared     Formula     AVG  89  49  36  15  20  1144        Pick the Del  delete  key  This dele
75. nition Notes  Word     Formula Enable       4    Fail Range Low  Fraction          Fail Range High  Integer  Words 17 and 18 represent a  16  bit  16  bit  fixed point  decimal value or 32 bit    integer                        Fail Range High  Fraction              Fail Range Low  Integer  Words 19 and 20 represent a  16  bit  16  bit  fixed point  decimal value or 32 bit    integer           Words 21 and 22 represent a  16  bit   16  bit  fixed point  decimal value or 32 bit  integer     0 15   Warning Range High   Integer     0 15   Warning Range High   Fraction     0 15  Warning Range Low   Integer     0 15   Warning Range Low   Fraction        Words 23 and 24 represent a  16  bit  16  bit  fixed point  decimal value or 32 bit  integer        NN  RENE  NN  p  d  ba       Appendix A CVIM Communications With MATH PAK  A 11          FaillWarning Ranges  Table A 7 lists the fail and warning range data locations for  Formulas   Formulas 1 through 8  17 through 24  and 33 through 40  1 8  17 24  33 40  blocks 104 127   Refer to the following for the block number  in Toolset 2 for each formula  Table A 7 provides the word   of the data  in each block     Formula 1  Block 104 Formula 21  Block 116  Formula 2  Block 105 Formula 22  Block 117  Formula 3  Block 106 Formula 23  Block 118  Formula 4  Block 107 Formula 24  Block 119  Formula 5  Block 108 Formula 33  Block 120  Formula 6  Block 109 Formula 34  Block 121  Formula 7  Block 110 Formula 35  Block 122  Formula 8  Block 111 Fo
76. o display the  result   In this case   the resultis  100  which is the minimum value in the list     Formula  result    100      MIN  A 12  5  89    100         The    Formula saved    message indicates that the CVIM  system has saved the formula in its memory     This completes the procedure for entering and saving the  MAX  or MIN  formula     MED Key    The MED  median  function sorts a list of operands in  ascending order  then returns the value at the center position  for an odd number of operands  or the higher order of the two  center values for an even number of operands     For example  in a list with an odd number of operands     82 3  86  2  43        the MED function first sorts their values in ascending  order       2 3  43  82  86        then returns the center value  43     CVIM MATH PAK  Installation and Configuration       Using Operatorand MED Key  continued   Operand Keys  continued   In a list with an even number of operands     82  3  86  2  15  8      the MED function first sorts their values in ascending  order      15 2 3  8  82  86        then returns the high order value of the two center values   In the preceding list  the two center values are 3 and 8  thus   the high order value is 8     The basic formula takes this form   MED list     The following procedure shows you how to set up a formula  using the MED operator  The procedure uses a list of six  integers to demonstrate the entry of a MED formula     Your Action Comments  Select the second for
77. ormula  The cursor      position is not important     To use the Clr key  just pick the key  When you do  all items  currently entered in the formula will disappear  and the box  will be restored to its  clear  state     Formula      A         NOTE  Although the Clr key deletes the entire formula from  the box  it does not delete it from memory if the formula was  previously saved using the return  Ret  key  If you change  your mind after picking the Clr key  you can restore the  entire last saved formula by picking the Esc key     Using Control Keys   continued     CVIM MATH PAK  Installation and Configuration 25       Ret  Return  Key    The Ret  return  key performs two functions at the same  time  It performs a computation using a correctly entered  formula  and it stores the formula in the CVIM system s  memory     NOTE  When you pick the Ret key  a previously entered  formula is overwritten     To use the Ret key  be sure the formula is entered correctly   to the best of your knowledge  then pick the Ret key  Using  the example under the Del key  the result of the computation  appears in the box as follows     Formula  result   2     4 a 2       At the same time  a message box appearing in the upper left  corner of the screen indicates that the formula has been  saved in memory     Formula saved     At this point  a previously entered formula will have been  overwritten by the new formula     If you pick the Ret key with an incomplete or incorrectly  entered formula  th
78. ormula 2  ault Flag    nm    Formula 3  Warning Flag    ormula 3  ault Flag    Tm mn    Formula 4  Warning Flag    N    ormula 4  ault Flag    o  nm    Formula 5  Warning Flag       Appendix A CVIM Communications With MATH PAK    Discrete Bit Inputs    Word    Backplane  Toolset  1 2  kad Ba  Ek   Saks  I  Bs  m     continued        Table A 8    ZI   E          W  r   A    2            5         7    vi    nm    o         nm  a    o    TuS           1m    Definition    ormula 5  ault Flag    rmula 6  arning Flag    rmula 6  ult Flag    rmula 7  arning Flag    ormula 7  ault Flag    rmula 8  arning Flag    ormula 8  ault Flag    Formula 17  Warning Flag    nmn    ormula 17  ault Flag    Formula 18  Warning Flag    nm    ormula 18  ault Flag    Formula 19  Warning Flag    mm    ormula 19  ault Flag    Formula 20  Warning Flag    F  F    ormula 20  ault Flag    0   Pass  1   Fail  0   Pass  1   Fail  0   Pass  1   Fail  0   Pass  1   Fail  0   Pass  1   Fail  0   Pass  1   Fail  Q   Pass  1   Fail  0   Pass  1   Fail  0   Pass  1   Fail  0   Pass  1   Fail       o  2o  uon uon  nojn  f   u ty  Z4      wu u     a     0   Pass  1   Fail  0   Pass  1   Fail  0   Pass  1   Fail       Appendix A CVIM Communications With MATH PAK       Discrete Bit Inputs   continued     Table A 8           Backplane  Toolset   Toolset  1 2    18 282         ormula 22 0   Pass  ault Flag 1 F    rmula 23 0   Pass  arning Flag  1   Fail  282 2 13   15   Formula 23 0    Fault Flag 1z  18    18 282 15   1
79. p  Analyze  or  Analyze Image menu box  the process time for all enabled  formulas appears after    Time      in the box above the  Analysis popup menu   The color of the tools indicates their  pass warning fail status      CVIM MATH PAK  Installation and Configuration       Exit Popup Menu When you pick the Exit menu box in the Main menu  and  then pick the Runtime Init  menu box in the Exit popup menu   the Runtime Init  popup menu appears with two new menu  boxes  as follows        Range Fail  Stats Range Fail    Menu Box            Stat  Samples  0    Disp  Formulas  2 Disp  Formulas                 Menu Box  Disp  Windows  5  Disp  Gages  1      Me  Runtime Arm ecc Exit       Range Fail Menu Box    The Range Fail menu box gives you two options for  calculating inspection results statistics     1  Using results from all inspected parts  including those  that fail the range checks  or    2  Using results only from parts that pass the range checks     The Range Fail menu box displays either    Stats    or    No  Stats     When    Stats    appears in the menu box  statistics are  based both on results that pass the range checks and those  that fail  When    No Stats    appears  statistics are based only  on results that pass the range checks     If you pick the Range Fail menu box repeatedly  it will toggle  between Stats and No Stats     Disp  Formulas Menu Box    The Disp  Formulas menu box enables you to display formula  results and statistics on the Result Page and Stat 
80. p soo  Previous Next  Misc    000  ee    The Range Output Setup table is the one you will use to set  the range limits and assign the discrete outputs  The  numbers appearing in it now are the limits and outputs set  previously  Note that each box in the table has the three dots   eee   which indicates that you will need to pick each box  one  at a time  in order to set its value     The Inspection Statistics table shows    results    data from a  series of trial inspections performed while the CVIM system  ran inspections in the    learn    mode  These numbers can help  you choose the best values for the range limits  Refer to the  CVIM User s Manual  Chapter 10  Runtime Operations  for  more information about this subject     CVIM MATH PAK  Installation and Configuration       Assigning Range Limits The next steps show you how to select values for the range  and Outputs  continued  limits     NOTE  The order in which these steps are presented may  not be appropriate in all cases  If not  a message will appear  that says  VALUE OUT OF RANGE  For example  this  message will appear if you try to change the upper warning  range limit to a value below the lower warning range limit     Your Action Comments    Pick the upper box under This is the fault range upper     High     limit  When you  FAULT RANGE  pick this box  the calculator pad appears on the screen                   5000 L    00 one  0 000 eee         Inspection  Statistics Table         Range Output  Setup Table     
81. pletes the procedure for entering and saving the  MED formula     MOD Key    The MOD  mode  function finds the value in a list of  operands that appears most often  If no value appears any  more often than any other value  the MOD function returns  the lowest value in the list     For example  in the following list of operands     2  3 2 3 3        the MOD function returns 3  since it occurs more often  than 2     The basic formula takes this form   MOD  list     CVIM MATH PAK  Installation and Configuration  46    AA pe ra O TT ET             Using Operatorand MOD Key  continued   Operand Keys  continued   The following procedure shows you how to set up a formula  using the MOD operator  The procedure uses the preceding  list of five integers to demonstrate the entry of a MOD  formula     Your Action Comments    Select the second formula The MOD operator is on this keyboard   entry keyboard     Pick the MOD key  When you pick the MOD key  the following entry appears in  the upper box of the keyboard        Pick these two keys  The display should now appear as follows   2   comma      Formula       MOD 2 A        Enter the remaining operands The display should now appear as follows    with a comma between each       2 3 3   Formula       MOD  2  3  2  3  3A        Pick the    close parenthesis    This completes the MOD formula entry   key   yt    Formula       MOD 2 3 2 3  3         Pick the Ret  return  key  This causes the system to display the    result     In this case   
82. r in     odd shaped     objects   those that are not easily covered by a rectangular or  elliptical window     72       MATH PAK Application  Examples  continued     CVIM MATH PAK  Installation and Configuration    With the MATH PAK option  however  the CVIM system  can perform some of these odd shape applications by using  multiple windows and a MATH PAK formula     Potential benefits of this method are faster operation and  easier setup than polygon windows  Also  this method  provides greater flexibility in accommodating changing  applications  Thus  by simply adding  or subtracting   individual rectangular windows and changing the formula   you can change the application quickly and easily     The multiple window measurement can be set up by  positioning a window over a workpiece wherever pixel or  object counts are needed     This example uses an odd shaped part fastened to a  work piece with six rivets  These appear as small  black  circular objects on the part  as follows     Window  4 Window  5 Window  6          Window  1 Window  2 Window  2 Workpiece    The objective of this inspection is to determine whether or  not the six rivets are in place     Instead of a single polygon window  six rectangular windows  are positioned over the part as shown  Each is configured to  count black objects     The MATH PAK formula looks like this   WIN1   WIN    WIN3   WIN4   WIN5   WING    The formula sums the black object count from the six  windows  Since the correct count from ea
83. rand  The basic formula takes this form     SQ value   The following procedure shows you how to set up a formula  using the SQ operator   Your Action Comments  Select the second formula The SQ operator is on this keyboard     entry keyboard     Pick theSQ key  When you pick the SQ key  the following entry appears in the  upper box of the keyboard     Formula       SQ A        Pick these two keys  The display should now appear as follows   1    2   Formula        Q 12A        Pick the    close parenthesis    This completes the SQ formula entry     Formula        Q 12 a       Pick the Ret  return  key  This causes the system to display the    result     In this case   the result is 144  which is the square of 12     Formula  result   144       Q 12 A       CVIM MATH PAK  Installation and Configuration      D    Using Operatorand SQ Key  continued   Operand Keys  continued     Your Action Comments    Look at the message box The  Formula saved  message indicates that the CVIM  in the upper left corner system has saved the formula in its memory   of the screen   This completes the procedure for entering and saving the SQ  formula     TAN Key    The TAN  tangent  function computes the tangent of an  angle  where the angle is stated in degrees      The tangent of an unknown angle  in a right angle triangle   is the ratio between the side opposite the angle and the side  adjacent to the angle          Line      gt         Hypotenuse  Y  Side opposite 9     Tangent of 0   Side Y   Sid
84. rator and  Operand Keys  continued     Select the second formula  entry keyboard     Pick the VAR key     VAR Key    The VAR  variance  function computes the variance of a list  of operands  The variance is equal to the sum of the square of  the difference between the value of each operand and the  average value of all operands  divided by the number of  operands in the list     Using the following list of operands     5 8  10     the VAR function processes the list as follows     1  It computes the average value of all operands  Thus  5   8    10   23  and 23   3   7 667  the average value of the  three operands     2  It computes the difference between the value of each  operand and the list average  7 667  then computes the  square of each difference  as follows     5 7 667    2 667   2 667 x  2 667   7 113  8 7 667   0 333  0 333 X 0 333   0 111  10   7 667   2 333  2 333 X 2 333   5 443    3  It computes the average of the squared differences  as  follows     7 113   0 111   5 443   12 667  12 667   3   4 222  Thus  the variance is 4 222     In a MATH PAK formula  the VAR operator requires two or  more operands  The basic formula takes this form     VAR list     The following procedure shows you how to set up a formula  using the VAR operator  The procedure uses the preceding  list of integers to demonstrate the entry of a VAR formula     The VAR operator is on this keyboard     When you pick the VAR key  the following entry appears in  the upper box of the keyboard     
85. rean theorem  The square of the hypotenuse of a  right angle triangle is equal to the sum of the squares of the  two sides        Thus  to find the distance between two points in the image  field  the hypotenuse of a right angle triangle   the DST  function squares the distance along the X axis  one side of  the triangle  and the Y axis  the other side of the triangle    then computes the square root of the sum of the two squares     For example  if the first point has an X position of 100 pixels  and a Y position of 150 pixels  and the second point has an X  position of 175 pixels and a Y position of 100  the distance  between these points is equal to the square root of the sum of  the squared distance along the X axis and the squared  distance along the Y axis  as follows             Point 2  X position   100 m   Y iti   1 X position   175  a pa Y position   100  e Distance  Point 1 between points  Distance   e Point 2  V of 752  50       V of 8125   90 14 Side Y   50    Point 1    Side X   75    In a MATH PAK formula  the DST operator requires four  operands  The basic formula takes this form     DST X   Y   X  Y      In the formula  operands X  and Y  are the coordinates of  Point 1 in the illustration above  operands X  and Y  are the  coordinates of Point 2     The following procedure shows you how to set up a formula  using the DST operator  The procedure follows the example  above to demonstrate the entry of a DST formula     CVIM MATH PAK  Installation and Configurat
86. result from GAGE2 is 3  By placing the    AND     operator between GAGE1 and GAGE2       GAGE1 AND GAGE2        the formula will return a logic  1  result  since both  values are nonzero     If either value were zero  or if both values were zero  the  formula would return a logic  0  result        Using Operator and  Operand Keys  continued     CVIM MATH PAK  Installation and Configuration 27       Logic Operator Keys  continued     OR  Assume that the inspection result from GAGE1 is 0 and  the result from GAGE2 is 3  If you place the  OR  operator  between GAGE1 and GAGE2       GAGE1 OR GAGE2        the formula will return a logic  1  result  since at least  one value is nonzero     If both values were zero  the formula would return a logic  0   result     NOT  The  not  operator  NOT  is used with expressions  containing other logic operators  Its effect is to invert the  normal logic result  For example  if the normal result of an   AND  operation were a logic  1   the    NOT    operator will  invert it to a logic    0        Assume that the inspection result from WIN1 is 400 and the  result from WIN  is 500  Assume further that these tools are     ANDed    in a formula  If you place the  NOT  operator  ahead of the  AND  expression       NOT  WIN1 AND WIN2         the formula will return a logic  0    In this case  since  both values are nonzero  the normal  AND  operation result  is a logic  1   however  the  NOT  operator inverts the result  to a logic  0          The  
87. rmula 36  Block 123  Formula 17  Block 112 Formula 37  Block 124  Formula 18  Block 113 Formula 38  Block 125  Formula 19  Block 114 Formula 39  Block 126  Formula 20  Block 115 Formula 40  Block 127  Table A 7    Configuration Blocks  104 127 Fail Warning Ranges  TS2     Formula Enable 1   Enable    Fail Range High  Integer                         Remote I O   amp  RS 232        Words 28 EN 29 represent a  16  bit  16  bit  fixed point  decimal value or 32 bit  integer           Fail Range High  Fraction     Fail Range Low  Integer     Words 30 and 31 represent a  16  bit  16  bit  fixed point  decimal value or 32 bit  integer        Fail Range Low  Fraction     Warning Range High Words 32 and 33 represent a    Integer 16  bit  16  bit  fixed point  decimal value or 32 bit  integer     Warning Range High   Fraction    Warning Range Low   Integer     Words 34 and 35 represent a  16  bit  16  bit  fixed point   decimal value or 32 bit  integer        Warning Range Low   Fraction        Discrete Bit Inputs        ka       1 2  7 81             Appendix A cvim Communications With MATH PAK    When formulas are enabled  the Warning and Fault flags  apply to the corresponding formula  The formula bits only  take the place of the toolset bits if a formula is enabled   Table A 8 lists the location of the formula warning and fault  bits     Table A 8    aD ete Bitin  Bit   Definition  P    Formula 1  Warning Flag    B   A    ormula 1  ault Flag        nm    Formula 2  Warning Flag    
88. rst step is to find AY and AX  For this purpose  two  linear gages are configured for the  Y Position  gagin  operation and positioned vertically across line AB  as follows     Gage 2               Line AB    Y position   120  Gage 1 4  Xposition   320    Side Y        260  130    Y position  X position    Note that the Y position returned by Gage 1 is 260  pixels    and the Y position returned by Gage 2 is 120  The difference   or delta  A  is  140  since Y has    moved    from 260 to 140     Note also that each gage can return the second position  in   this case  the X position   The X position returned by Gage 1   is 130  pixels   and the X position returned by Gage 2 is 320    12 uii  or delta  A  is 190  since X has    moved    from  to      32       Using Operator and  Operand Keys  continued     Your Action    Select the second formula  entry keyboard     Pick the ATN key     CVIM MATH PAK  Installation and Configuration    ATN Key  continued     By altering the basic formula to compute AY and AX from  the differences in the two X and two Y positions  the formula  looks like this     ATN GAGE2   GAGE 1  GAGE 2 3   GAGE 1 3     In this formula  GAGE2   GAGE 1 returns AY  and GAGE 2 3    GAGE 1 3 returns AX  The AY value is  140  and the AX  value is  190     In general  the signs of AY and AX relate to the quadrant in  which the angle lies as follows      90      180           90      Since AY is negative and AX is positive in this example  the  ATN function calculates 
89. some   ideas about the types of CVIM inspection application  problems that you can solve with MATH PAK formulas     Example   1  Replacing Linear Measurement Gages  with Positional Gages Without the MATH PAK option  an  inspection application normally uses a single linear gage to  perform a distance measurement     With the MATH PAK option  however  some applications  could perform the same measurement using two  positional   line gages and    MATH PAK formula     A potential benefit of this method is faster measurement   particularly when the gaging mode is gray scale and the  measurement crosses most of the image field     The two gage measurement can be set up by positioning two  linear gages  each configured for either X  or Y position  operation  across the two edges on the object where the  measurement is to be made     This example compares the single gage method to the two   gage and formula method  The gages are positioned across  the object as shown in the following illustration     Gage   1   Linear Gaging  Edge  1  Edge  1     gt  Objectto ba  4    Edge  2    Measured        PA    Gage  2   X Position      Gage  3   X Position    Note that the measurement edges of the object are parallel to  each other     In the single gage method  gage  1 measures the distance  between edge  1 and  2 of the object  In the two gage  method  gages  2 and  3 return the X positions for edges  1  and  2  respectively  The formula then calculates the  distance between edge  1 and  2 b
90. tes integer 114 and moves the cursor     to the  right of the last comma     Formula       AVG  89  49  36  15  20            Pick these five keys  This reenters 114 as a fixed point number  114 0   114   decimal  O     Formula       AVG  89  49  36  15  20  114 0          Using Operator and   Operand Keys  continued   Your Action   Pick the Ret  return  key     Look at the message box  in the upper left corner  of the screen     CVIM MATH PAK  Installation and Configuration pa       AVG Key  continued     Comments    This causes the system to recompute the average and display  the    result     53 833  as a fixed point number  Note that the  result has three digits to the right of the decimal point  and  the number 114 0 now has two additional zeros     Formula  result   53 833    AVG  89  49  36  15  20  114 000A         The    Formula saved    message indicates that the CVIM  system has saved the formula in its memory     This completes the procedure for entering and saving the  AVG formula     COS Key    The COS  cosine  function computes the cosine of an angle   where the angle is stated in degrees      The cosine of an unknown angle  in a right angle triangle  is  the ratio between the side adjacent to the angle and the  hypotenuse          Line        Hypotenuse    Cosine of 0   Side X   Hypotenuse    X   Side adjacent to 9     In a MATH PAK formula  the COS operator requires one  operand  The basic formula takes this form   COS angle in degrees     The following proce
91. the result is 3  which is the    mode    value in this list     Formula  result   3      MOD 2 3 2 3 3         CVIM MATH PAK  Installation and Configuration T                                                 w                  sn                                                             H         J            Y    yy    Using Operator and MOD Key  continued   Operand Keys  continued     Look at the message box The    Formula saved  message indicates that the CVIM  in the upper left corner system has saved the formula in its memory   of the screen   This completes the procedure for entering and saving the  MOD formula     SIN Key    The SIN  sine  function computes the sine of an angle  where  the angle is stated in degrees      The sine of an unknown angle  in a right angle triangle  is  the ratio between the side opposite the angle and the  hypotenuse          Line             Hypotenuse X   Side opposite 9     Sine of   Side X   Hypotenuse    In a MATH PAK formula  the SIN operator requires one  operand  The basic formula takes this form     SIN angle in degrees     The following procedure shows you how to set up a formula  using the SIN operator  The procedure uses a positive angle   stated in degrees  to demonstrate the entry of a SIN formula     Your Action Comments    Select the second formula The SIN operator is on this keyboard   entry keyboard        Pick the SIN key  When you pick the SIN key  the following entry appears in  the upper box of the keyboard     Formul
92. tion       Assigning Range Limits  and Outputs    Range Limits   the term range limit  as it applies to a  MATH PAK formula  refers to a formula result above or  below which the CVIM system might not  or cannot   successfully perform an inspection     In general  range limits specify the upper and lower  boundaries of acceptable inspection results     The CVIM system provides two sets of range limits  warning  range limits  and fault range limits  Warning range limits  must always lie at or within fault range limits     The two sets of range limits have this relationship   LF lt   LW lt   NOMINAL lt  UW lt  UF    The NOMINAL value refers to a desired middle of the   range value  LW and UW are the lower and upper warning  limits  LF and UF are the lower and upper fault limits     Here is a general example  using a nominal value of 100  to  demonstrate the concept       The LW value  lower warning limit  could be set to 95       The UW value  upper warning limit  could be set to 105       The LF value  lower fault limit  could be set to 90        The UF value  upper fault limit  could be set to 110     During an inspection  if the formula result goes outside  either warning limit  the CVIM system will generate a  warning signal  If the formula result goes outside both a  warning limit and a fault limit  the CVIM system will  generate a warning signal and a fault signal     In a practical application  a warning signal can function as  an early indication of a deteriorating condi
93. tion  A fault  signal can indicate a    hard    failure  such as a broken part  In  each case  the signal that results when a range limit is  exceeded can be used to alert operations personnel to fix the  problem     Outputs   the term outputs refers to the 14 discrete outputs  that you can configure to carry various signals to your  production equipment  Of these signals  the    results    signals  indicate whether or not any of the warning and or fault  range limits have been exceeded     The CVIM User s Manual  Catalog No  5370 ND001    Chapter 4  Operating Environment  shows you how to assign  signal functions to the discrete outputs     In this section  you can select warning and fault limits for  your formula results and assign them to any of the discrete  outputs that you designated earlier for    results    outputs     CVIM MATH PAK  Installation and Configuration PA       Assigning Range Limits  and Outputs  continued     Your Action    Prepare to run a series  of  trial  inspections     Pick the Exit menu box in the  Main Configuration menu     Pick the Runtime Display  menu box in the Exit menu     Pick the Stat  Page 1 menu  box in the Runtime  Display menu     Pick the Runtime Init  menu  box in the Exit menu     Look at the Mode menu box  in the Runtime Init  menu     Look at the Disp  Formulas  menu  box in the  Runtime Init  menu     Look at the Stat  Samples  menu box in the  Runtime Init  menu     The following steps describe a procedure for performing a  tr
94. to configure the CVIM system for specific MATH PAK  applications     Appendix A provides information needed to access MATH   PAK results data using the CVIM communication ports   This information supplements the CVIM Communications  Manual  Catalog No  5370 ND002     MATH PAK is an option that enables your CVIM system to  perform mathematical and or logical operations  using  formulas that you specify  on results data from any of  CVIM   s analysis tools  Your inspection application can use  results data from these operations instead of  or in addition  to  results data from individual analysis tools  according to  your specific requirements     Before using MATH PAK  you should be familiar with the  CVIM system and its configuration procedures  The CVIM  User s Manual  Catalog No  5370 ND001  provides detailed  information about the system s configuration and operation  procedures  Chapters 9 and 10 are particularly relevant to  MATH PAK configuration and operation     If your application uses the CVIM communications ports on  the chassis backplane and or front panel  refer also to the  CVIM Communications Manual  Catalog No  5370 ND002     CVIM MATH PAK  Installation and Configuration       MATH PAK Option  Following each inspection  the CVIM system stores in its  Overview memory the inspection results data from each enabled  analysis tool  light probe  reference tools  gages  and  windows   These data are available  until overwritten by the  next inspection  to devices con
95. type  meaning that you cannot pick them    Only the Set Formula menu box is accessible at this time     CVIM MATH PAK  Installation and Configuration  14       Configuring MATH PAK  Formulas  continued     Your Action Comments    Look attheFormula  The Formula   menu box shows the selected formula number  menu box  and its current status  Disabled or Enabled      If the current formula number is not the one you want  select  the desired formula number by using the Previous or Next  function and or the Jump function  as follows     Pick the Next menu boxto Pick the Next menu box once for each increment in the  select the next higher formula number   formula number     or   Pick the Previous menu box Pick the Previous menu box once for each decrement in the    to select the next lower formula number   formula number        or     Pick the Jump menu box  When you pick the Jump menu box  a    calculator pad     appears on the monitor screen  as follows     Config  Results ae                 t    ee   oe   Analysis ecc  coo       Registration    Pick each digit ofthenew As you pick each digit  it appears in the calculator    display      formula number        Pick the Enter key  When you pick the Enter key  the new formula number in the    calculator display appears in the Formula   menu box  This  means that the new formula number has been selected     CVIM MATH PAK  Installation and Configuration         Configuring MATH PAK  Formulas  continued   Your Action Comments    Pick th
96. w  14 Value   366 367 14 15  15   Formula  23 Results   Window  15 Value     Toolset  1                      e e e o o o o e  un Ui Un wn Ww    100 101  102 103    104 105         106 107           2 3  4 5  6 7  368 369 16 17  15   Formula  24 Results   Window  16 Value   370 371 Formula  25 Results   Gage  9 Value   372 373 20 21 0 15  Formula  26 Results   Gage  10 Value     108 109          110 111   374 375 22 23  15   Formula  27 Results   Gage  11 Value    376 377 24 25 0 15 Formula  28 Results   Gage  12 Value    378 379 26 27  15 Formula  29 Results   Gage  13 Value    380 381 28 29  15 Formula  30 Results   Gage  14 Value    382 383 30 31 0 15 Formula  31 Results   Gage  15 Value     B    112 113    114 115         116 117    e o         118 119       Appendix A     VIM Communications With MATH PAK       Location of Formula  Results   continued     Table A 2        Word   Bit    Backplane  Toolset   Toolset  1 2  120 121   384 385 32 33 Formula  32 Results   Gage  16 Value   122 123   386 387 34 35 10 15   Formula  33 Results   Window  17 Value   124 125   388 389 36 37 Formula  34 Results   Window  18 Value   126 127   390 391 38 39 0 15 Formula  35 Results   Window  19 Value            Definition With  MATH PAK   without MATH PAK        o    128 129   392 393  15   Formula  36 Results   Window  20 Value   130 131   394 395 42 43 0 15   Formula  37 Results   Window  21 Value   132 133   396 397 44 45 10 15   Formula  38 Results   Window  22 Value   134 135   398 39
97. y subtracting the gage  2  X position from the gage  3 X position     70    CVIM MATH PAK  Installation and Configuration       MATH PAK Application  Examples  continued     Here are two example formulas that use the X position  results from gages  2 and  3 to calculate the distance  between edges  1 and  2      1  GAGE 3   GAGE 2    This formula produces a positive result since gage  2 is to  the right of gage  1  and the X position values increase from  left to right  0 to 511 pixels      2  ABS GAGE 2   GAGE 3    This formula does not depend on gage  2 being to the right  of gage  1  In the expression  GAGE 2   GAGE 3   the result  of the subtraction is a negative number  however  the ABS    operator causes the formula to return the absolute value of  the difference between the two gages     In some cases  a measurement must be made that is neither  horizontal nor vertical  such as measuring the distance  between edges  1 and   2 on the following object      lt      Gage  2    Edge  2       Object to be    Measured          Gage  1          Edge   1    The two  position  gages can still be used  but the formula  will be more complex since it must take into account the Y   axis component of the measurement distance in addition to  the X axis component     Here is an example formula that uses both the X axis and Y   axis results from gages  1 and  2 to calculate the distance  between edges   1 and   2 in the above illustration      3   DST GAGE 1 GAGE 1 3 GAGE2 GAGE2 3     T
    
Download Pdf Manuals
 
 
    
Related Search
    
Related Contents
Guía de usuario MONITOR LED  PCI PA DSS - Verifone Baltic  PQ - Big Ship    König & Meyer 26200  SB1000 Series Software Upgrade Instructions  Genie AWP Super Series Product Specifications  6 - SEW Eurodrive      Copyright © All rights reserved. 
   Failed to retrieve file