The method used to load an N/C program into a controller depends on whether the controller is one of the later models that has its own memory into which the entire program can be loaded, or whether it is one of the earlier models that must read an encoded paper or magnetic tape and execute the commands one block at a time.
If the controller is a later model with its own built-in memory (a CNC type of N/C machine), the program can usually be loaded into the controller by one of three methods. The first method is by keying in the program directly into the controller through the controller's keyboard. The problem with this method is that it ties up a multithousand dollar controller and machine tool while the program is being keyed in one command at a time. Obviously, the CNC machine cannot be machining workpieces while a programmer is keying in the program. (In effect the CNC machine is being used as a very expensive data-entry terminal.) A much more cost effective method of programming is to use one of the other off-line programming methods (see below) to generate the program, transfer the program into the controller and make only minor changes to the program during debugging or set up (e.g., inputting TLOs). The operator must remember to update the original source code to incorporate all of the debugged or modified program statements. Failure to save the final program could be the source of some unnecessary and expensive headaches later.
The second method of loading a program into a CNC's memory is to connect the controller to a computer or a network that contains a previously written program. Programming CNC code using a personal computer (PC), often called "off-line programming," can be accomplished either manually or using a Computer Aided Manufacturing (CAM) software application. Once the program is complete, the computer can output the program in the form of ASCII (or EIA) characters (more on that later). To transfer the files, both the computer and controller must be equipped with a means to be connected together, such as a network interface (e.g., Ethernet, Token Ring, etc.) or serial port (sometimes referred to as a RS-232-C serial interface port or communications port). By setting the proper communications parameters (sometimes called communications protocols), the program can be transfered between the computer and the CNC controller. Such file transfer activity is commonly referred to as downloading (Computer to CNC controller) or uploading (CNC controller to computer).
Communications parameters usually include the data transmission rate in characters per second (called baud rate); the number of bits per character; whether each character must have an even or odd number of bits (parity); and the handshaking method (software controlled, hardware controlled, or no control). The "ancient" method of setting the parameters was usually by a gang of small pencil-actuated switches called DIP switches. More commonly with newer machines, the parameters are software controlled.
The third method is to connect the CNC controller to a data storage peripherial device such as a paper tape punch/reader, magnetic tape recorder or magnetic floppy disk drive through the serial port. The program, previously encoded on the tape or disk, is "read" into the CNC's memory. As with the computer, the communications protocols must be properly set for the reader and controller.
If the N/C controller is one of the earlier models that has a built-in tape reader to read a paper or magnetic tape, reading and executing the commands one block at a time, the program must be encoded in the tape in some format the controller recognizes.
|Next: Of Bits & Bytes in the Digital Age
Back to Contents Page
Updated Jan. 18, 2002
Copyright © 1988, 2002 by George Stanton and Bill Hemphill
All Rights Reserved