Numerical Control Programming
Chapter 4
Feeding the Controller


Figure 4-2Hardware

The hardware required to encode a program into a paper tape can range from an electromechanical Teletype terminal, with a built-in tape reader and a tape punch, to micro- and larger computers. The electromechanical type (Figure 4-2) punches a hole in the tape each time a key on the keyboard is depressed. If the wrong key is depressed, the wrong character becomes punched into the tape. Fortunately, there is a way to back the tape up and delete the error. Depressing the delete key on the teleprinter keyboard punches holes in all eight channels. Tape readers recognize this as a "delete" character and ignore it.

Figure 4-3The more sophisticated N/C tape preparation systems are microprocessor-based and feature a memory. Some systems consist of an ordinary microcomputer (with a CRT screen display) connected to a a tape reader/punch and a printer (Figure 4-3). Other systems use a typewriterlike teleprinter connected to a combination microprocessor and tape reader/punch.

Figure 4-4With either system, the program is typed into the memory, or an existing N/C tape is read into the memory via the tape reader. The program can then be printed from the memory and scanned for errors. Errors can then be corrected in the memory. The content of blocks can be changed and they can be moved to new locations in the program. New blocks can be inserted and unwanted blocks deleted. Some microprocessor-based tape-preparation systems can, for example, change all of the +X character "strings" to X+ strings with a single command (called a global mass substitute command). After all of the errors have been corrected, all changes made, and the program is the way you want it, then the program is punched on tape and also printed out. The printout is called a hardcopy (Figure 4-4).

Click inside the image    
to open an ASCII file    
of a typical N/C program    
in a new browser window -> 


Back to the top of this page

N/C Tape Readers

A photoelectric tape reader (Figure 4.5) is a device that incorporates an array of eight photocells over which is situated a light source. The array of photocells is arranged to correspond to the eight channels of an N/C paper tape. When a blank paper tape is inserted into the tape reader and passed over the photocells, it blocks off the light to the photocells, deenergizing or turning them off. If the tape channels contains holes, the light passes through the holes and energizes the corresponding photocells. Each energized photocell sends a signal to the N/C controller, which the controller recognizes as characters according to the tape code it has been set to read.

Figure 4-5

Some tape readers have very sensitive photocells and may sense light passing through the paper itself. Sometimes pinholes in the tape may be interpreted as strange characters, causing the controller to act as though the program were faulty. Such problems are cured by using particularly opaque tape, such as high-quality black paper tape or Mylar tape.

Back to the top of this page

Magnetic Tape

Some controllers, primarily used on large 4- and 5-axis mills, use magnetic tape instead of paper tape. Eight-channel EIA or ASCII characters are recorded as magnetic "spots" instead of holes. The array of spots is the same as the array of holes used on paper tape, but the arrays can be more closely spaced along the magnetic tape. Paper-tape hole arrays are spaced 10 per inch; magnetic spot arrays are spaced 800 to 4800 per inch. Obviously, it doesn't require much magnetic tape to accommodate rather lengthy programs.

Some CNC controllers use cassette magnetic tapes for storing N/C programs. A program can be loaded into a CNC controller from a magnetic tape, edited while in the CNC's memory, and output as a new program on the same or another cassette. Some cassettes can hold only one N/C program per side; others can hold dozens of programs, virtually eliminating the storage problem for paper tapes. Magnetic tapes can usually be read by the magnetic read head much faster than the paper tape reader's photoelectric reader. Recording an edited CNC program on magnetic tape is similarly much faster than punching a paper tape. A magnetic tape can be reused over and over, while a paper tape, once the program has been changed, winds up in a trash can.

Magnetic tapes have certain disadvantages over paper tapes. They can be demagnetized and lose their program information. Care must therefore be exercised to keep tapes away from magnetic fields. This is not always an easy thing to do in machine shop environments. Motors have magnetic fields, machinists have magnetic tools, and even workpieces can become magnetized, especially if they have been held by a magnetic chuck, such as those used on surface grinders. Magnetic tape read heads are also more sensitive than photoelectric readers to contamination, such as the abrasive dust and chemical and oil vapors that are common in machine shops.

Paper tapes can be easily labeled for identification purposes. Some microprocessor-based N/C tape-preparation systems can output holes on a tape that are patterned to resemble traditional alphanumeric characters. These are punched on the front end of the tape--the leader--to label the tape. Since these can be directly read by a person, they are called manreadable characters.

Back to the top of this page

Next:  Review Questions for Chapter 4

Back to Contents Page


Updated Jan. 18, 2002
Copyright © 1988, 2002 by George Stanton and Bill Hemphill
All Rights Reserved