Monday, December 8, 2008

program makeup and programmable functions

As stated programs are made up of commands and commands are made up of word. Each word has a letter address and a numerical value. The letter address tells the control the word type. CNC control manufacturers do vary with regard to how they determine word names (letter addresses) and their meanings. The beginning CNC programmer must reference the control manufacturer's programming manual to determine the word names and meanings. Here is a brief list of some of the word types and their common letter address specifications.

    * O - Program number (Used for program identification)
    * N - Sequence number (Used for line identification)
    * G - Preparatory function
    * X - X axis designation
    * Y - Y axis designation
    * Z - Z axis designation
    * R - Radius designation
    * F - Feedrate designation
    * S - Spindle speed designation
    * H - Tool length offset designation
    * D - Tool radius offset designation
    * T - Tool Designation
    * M - Miscellaneous function (See below)

As you can see, many of the letter addresses are chosen in a rather logical manner (T for tool, S for spindle, F for feedrate, etc.). A few require memorizing.

There are two letter addresses (G and M) which allow special functions to be designated. The preparatory function (G) specifies is commonly used to set modes. We already introduced absolute mode, specified by G90 and incremental mode, specified by G91. These are but two of the preparatory functions used. You must reference your control manufacturer's manual to find the list of preparatory functions for your particular machine.

Like preparatory functions, miscellaneous functions (M words) allow a variety of special functions. Miscellaneous functions are typically used as programmable switches (like spindle on/off, coolant on/off, and so on). They are also used to allow programming of many other programmable functions of the CNC machine tool.

To a beginner, all of this may seem like CNC programming requires a great deal of memorization. But rest assured that there are only about 30-40 different words used with CNC programming. If you can think of learning CNC manual programming as like learning a foreign language that has only 40 words, it shouldn't seem too difficult.
Decimal point programming

Certain letter addresses (CNC words) allow the specification of real numbers (numbers that require portions of a whole number). Examples include X axis designator (X), Y axis designator (Y), and radius designator (R). Almost all current model CNC controls allow a decimal point to be used within the specification of each letter address requiring real numbers. For example, X3.0625 can be used to specify a position along the X axis.

On the other hand, some letter addresses are used to specify integer numbers. Examples include the spindle speed designator (S), the tool station designator (T), sequence numbers (N), preparatory functions (G), and miscellaneous functions (M). For these word types, most controls do NOT allow a decimal point to be used. The beginning programmer must reference the CNC control manufacturer's programming manual to find out which words allow the use of a decimal point.

Other programmable functions

All but the very simplest CNC machines have programmable functions other than just axis motion. With today's full blown CNC equipment, almost everything about the machine is programmable. CNC machining centers, for example, allow the spindle speed and direction, coolant, tool changing, and many other functions of the machine to be programmed. In similar fashion, CNC turning centers allow spindle speed and direction, coolant, turret index, and tailstock to be programmed. And all forms of CNC equipment will have their own set of programmable functions. Additionally, certain accessories like probing systems, tool length measuring systems, pallet changers, and adaptive control systems may also be available that require programming considerations.

The list of programmable functions will vary dramatically from one machine to the next, and the user must learn these programmable functions for each CNC machine to be used. In key concept number two, we will take a closer look at what is typically programmable on different forms of CNC machine tools. 

No comments: