Subscribe to CMM Quarterly



Sponsored Links

  • JoomlaWorks Simple Image Rotator
  • JoomlaWorks Simple Image Rotator
  • JoomlaWorks Simple Image Rotator
  • JoomlaWorks Simple Image Rotator
CMM Development Memories of Joe Watson Part 4
Written by Joe Watson   

Part 4 - The CMM Learns To Compute Nearly Anything

Even after we had begun to ship the first few servoed CMMs, manually operated CMMs remained our primary product for a while, mostly for financial reasons. A servoed CMM was substantially more expensive than a manually operated model.

 

By 1972, Sheffield had been shipping its original Cordax Measurement Monitor software for several years. That software did what it was designed to do but was just too limited in its scope to perform many computations desired by our CMM customers. Some of its more obvious limitations included:

· A part program always had to be read in from the teletypewriter's slow paper tape reader each time it was executed.

· It was not possible to direct it to compute anything other than its few canned up standard operations.

· It could not be directed to make any decisions.

· It could not perform repetitive program steps except by having those steps coded over and over in the part program.

It could not store any results for use in subsequent operations.

We knew that it would be very useful to have a software package that could do these things and more. So, in probably one of my best programming efforts ever, I designed a new software package to accomplish these things and more and crammed it all into a 4096 word PDP-8 minicomputer. The 4K version was called CMAP4. (CMAP stood for Cordax Measurement Analysis Program.)

Like its predecessor, the Cordax Measurement Monitor, CMAP read its part program from the paper tape reader of a teletypewriter machine. However, it was also able to read a part program from a high speed optical paper tape reader which could operate up to 30 times as fast as the slower reader.

The commands in the language were carefully chosen such that each command started with a different letter which allowed the CMAP command interpreter to be very simple. For example, the WRITE command was detected by the fact that it started with a "W". The ENTER command started with an "E". And so forth. If the part programmer wished to type in the entire command he/she could do that but only the first letter was required. Of course, few people ever did type the whole word in their part programs.

Symbolic names were assigned to represent the various elements of CMM measurement data. They could be visualized as being on a grid with X, Y, Z, A, R, D, and T running down the side and the categories Actual, Nominal, Plus Tolerance, Minus Tolerance, Deviation, and Out-Of-Tolerance running across the top as represented by the letters A, N, P, M, D, and O, respectively.
  

 

The A on the left side represents polar angle, R is polar radius, D is diameter, and T is true position. There is no such thing as true position actual, true position nominal is understood to be zero, and since true position deviation cannot be negative there is no need for a true position minus tolerance; hence the missing symbol combinations in the grid.

The A on the top that signified Actual was optional in use. Therefore, X Actual could be written either as XA or just X.

A command was provided that allowed the three machine axes of the CMM to effectively be relabeled. This turned out to be handy for some special jobs. The part offset angle (part misalignment angle) could be specified to be in any machine plane. The part's working plane (in which polar and true position calculations were done) could also be assigned to any two linear part axes. One normally thinks of the three major part planes as being XY, YZ, and ZX but CMAP also allowed YX, ZY, and XZ. This meant that it supported both right-handed and left-handed coordinate systems. Consequently, the part programming manual read very oddly because it could only say things like the polar angle is zero degrees toward the positive end of the first named axis of the working plane and reaches +90 degrees toward the positive end of the second named axis of the working plane.

There was no special command used to cause assignment of a value. For example, supposing that you wanted to assign a nominal value for X, there was no command word like the word "SET" in this example:

SET XN=1.2345


Instead, such an assignment would simply be written as:

XN=1.2345

However, since commands were detected only by their first letter, the letter X was not available for any command words except certain assignment statements, those that assigned values to X Actual, X Nominal, X Plus Tolerance, and X Minus Tolerance. The same was true for all the other letters along the left side of the grid above. This restricted the set of letters available for commands but a suitable command set was defined from those that remained.

Some of the symbols shown in the grid actually represent stored values. However, those in the deviation and out-of-tolerance columns are computed values. For example, XD represents X deviation. Its value is always dependent on the currently stored values of X nominal and X actual. Any place in a part program where XD was referenced, it was computed from X nominal and X actual. Similarly whenever XO (which represents X out-of-tolerance) was referenced in the part program, it was computed from X actual, X nominal, and either X plus tolerance or X minus tolerance depending on the sign of the deviation.

To cover the need of some general purpose storage variables for the part programmer, general purpose registers were included and were represented by the letter "G" followed by a number. In CMAP4, they ranged from G0 to G24 but only G0 to G14 were truly independent of the rest of the system. G15 held the probe diameter. G16 was the counter used for running loops a given number of times. G17 held the sequence number. G18 held the offset angle. G19, G20, and G21 held the part coordinate system reference location. G22, G23, and G24 held the scale factors used to scale the readings from the CMM counters and each was intially set to 0.0001 because that was the resolution of the CMM's counters for most of our systems in those days.

Here is an odd feature. Suppose you wanted to work with some unusual part characteristic not otherwise supported by CMAP. For example, suppose you wanted to compute and process the area of a triangle defined by three points taken from the part. On the part blue print, the triangle has a nominal area and even plus and minus tolerances. You could choose one of the G registers like G5 to store the actual area. You would perform your calculation to determine the area from the three measured points and store the result either in G5 or G5A which are, in fact, the same place. You could store the nominal value for the area in G5N and the plus and minus tolerances in G5P and G5M. Then you could get the area deviation simply by referencing G5D and the area out-of-tolerance value by referencing G5O. You had to be a little careful with this though as the nominal was always stored in the next register location after where the actual was stored. So G5A and G5 were the same place and G5N was actually in G6. Similarly, G5P was actually in G7 and G5M was actually in G8.

The inspection report generator produced formatted output reports. For example, if you executed this statement:

WRITE #NADO:X,Y,Z

you received a report such as this:

 

Of course, the word WRITE could have been just W since only the first letter is required. To include the area of your triangle in the report, it could be programmed as:

WRITE #NADO:X,Y,G5,Z


Then the report might look something like this:

 

CMAP4 included a small character buffer where a string of commands could be read in and then executed either a specified number of times or until some condition was met. This constituted its looping capability.

To accomplish something like a GOTO, there was a SEARCH command that would read forward until a specified character string was found in the part program and then execution would continue from that point. There was no way to loop backwards since that would require the paper tape reader that was reading the part program to go backwards and the reader hardware was not capable of doing that.

To perform calculations, CMAP supported arithmetic operators +, -, *, and /. It allowed ^ to raise a numeric expression to a power (including a fractional power). It also supported parentheses.

One of CMAP's limitations was that it did not have a priority of operations. That is, an expression like 2+3*4 resulted in 20, not 14. Binary math operations (those that combine two numeric values) were always done in order from left to right. The only way to alter this was to use parentheses. Therefore, 2+(3*4) would yield 14. CMAP also supported a few unary operators (+, -, !). Unary operators always operate on but a single numeric value. If one wanted to negate a value before it was used, it could be preceded by a minus sign (-). As an example, one could code this:

XN=4*-Y

In this case, the minus sign meant that the value in Y actual would be negated before being muliplied by 4 and stored in X nominal. This capability was what actually allowed for the assignment of negative numbers as in:

XN=-1.2345

The plus sign (+) was not really needed except that sometimes one just likes to be thorough and code a statement such as:

XN=+1.2345

We all know we could do without the plus sign in that statement but CMAP allowed it to pass anyway. The plus sign did not force a value to be positive, it just did not change its sign. The exlamation point (!) did serve that very purpose however. Therefore, if we wanted X nominal to be assigned the value in Y actual with its sign forced to positive, it could be coded this way:

XN=!Y

If we wanted X nominal to be assigned the value in Y actual with its sign forced negative, this did the job:

XN=-!Y

This caused the value in Y actual to have its sign first forced positive and then the result to be negated which meant it was forced negative in the end.

For more advanced operations, CMAP included a set of math functions that always were coded as the letter "F" followed by an indicator letter. For example, to take the square root of a value, just precede it with "FR". Here is how one could store the square root of 3 into X nominal:

XN=FR3

No doubt, some felt more comfortable with it coded this way:

XN=FR(3)

since that more closely resembles the syntax in algebra and most other computer languages. Since CMAP did support parentheses, this worked just as one would imagine.

The set of math functions included:

· FR - Square root

· FS - Trigonmetric Sine of an angle in degrees

· FC - Trigonometric Cosine of an angle in degrees

· FA - Trigonmetric Arctangent in degrees

· FL - Natural logarithm (base e)

· FE - Exponential (also called antilog)

· FI - Largest integer less than or equal the argument

CMAP included an IF statement that could make decisions using logical operators like >, <, and = as well as combinations of them.

Another programmer and I worked together to expand CMAP4 to an 8K program, CMAP8. Then it could store entire routines in a large buffer area in memory. A packing scheme was devised that permitted two characters of a part program to be stored in each 12-bit word of memory. The stored routines could be called up from a part program in a manner similar to subroutines or run as individual part programs by operator command. In CMAP8, loops were less restrictive with regard to size than in CMAP4. CMAP8 also added a very important new capability, a least squares best fit to a circle. When using CMAP8, additional general purpose registers were available from G25 to G249.

Here is a list of capabilities that CMAP could conduct with the CMM, each using a single part program command:

· Wait on the footswitch before continuing

· Wait on the footswitch, then read the CMM position

· Read the CMM position without waiting on the footswitch

· Reset any or all of the CMM axis counters to zero

· Read three points (waiting on the footswitch for each) and compute the circle that fits the points

· Read a specified number of points, waiting on the footswitch for each, and best fit a circle to them. *

· Wait for the footswitch, then rapidly read points one after the other while the operator carefully slid the ball probe around a circular feature. When the footswitch was tripped again, the best fit circle to all the points taken was found. *

Repeatedly read a specified number of three point circles, waiting on the footswitch for each point. Then best fit a circle to the set of center points computed from the three point circles. This was used for bolt circles. *

* = Not available in CMAP4 since it did not have the least squares best fit capability.

Yet another version of CMAP (CMAP12) was produced by 1974 that also allowed part programs to be read from disk files and output reports to be written to disk files.

Many hundreds of copies of CMAP4 and CMAP8 were shipped but only a few copies of the disk I/O version were ever shipped. No bugs were ever reported in CMAP4. Only one was ever found in CMAP8. It showed up when you tried to perform a best fit to a small circle located far from the origin. We quickly found a way around that.

It has long been felt that CMAP constituted the first ever CMM measurement language that also allowed a degree of general computation but as time would eventually reveal, it would certainly not be the last one from Sheffield.

 

 

 

Advertisement