Sie sind auf Seite 1von 48

1

Introduction
to

CNC
Machines

INTRODUCTION
Numerical control for machines .tools were introduced in 1950s by Prof.John T Parsons. The first NC machine
was built at the Massachusetts institute of Technology in 1953 by joint efforts of US Air Force, the MIT and
parsons cooperation. NC is control by numbers .NC is control recorded information called part program, which
is set of coded instructions given as numbers for automatic control of am machine in a pre-determined
sequence.
Numerical control can be defined as a technique of controlling a machine tool by the direct insertion of
numerical data at some point of the system .The functions that are controlled on the machine tool are
displacement of the slide members, spindle speeds ,tool selection etc.At first ,the numerical control was used to
produce geocentrically complex parts ,but later used for added efficiency in medium batch production of turned
and milled parts presently, Numerical control is employed in all sectors of production .
Rapid development in the field of electronics such as integrated circuit, large scale integrated circuits and
development of minicomputer lead to the development of minicomputers based CNC systems. Further
development and the electronic chip revolution have ushered in the current generation compact and
powerful Microprocessor based CNC systems.
Development of computer numerically controlled (CNC) machines is an outstanding contribution to the
manufacturing industries. It has made possible the automation of the machining process with flexibility to
handle small to medium batch of quantities in part production.
Initially, the CNC technology was applied on basic metal cutting machine like lathes, milling machines, etc.
Later, to increase the flexibility of the machines in handling a variety of components and to finish them in a
single setup on the same machine, CNC machines capable of performing multiple operations were developed.
To start with, this concept was applied to develop a CNC machining centre for machining prismatic components
combining operations like milling, drilling, boring and taping. Further, the concept of multi-operations was also
extended for machining cylindrical components, which led to the development of turning centers.

Computer Numerical Control (CNC) is a specialized and versatile form of Soft Automation and its
applications cover many kinds, although it was initially developed to control the motion and operation of
machine tools.
Computer Numerical Control may be considered to be a means of operating a machine through the use of
discrete numerical values fed into the machine, where the required 'input' technical information is stored on a
kind of input media such as floppy disk, hard disk, CD ROM, DVD, USB flash drive, or RAM card etc.
The machine follows a predetermined sequence of machining operations at the predetermined speeds
necessary to produce a workpiece of the right shape and size and thus according to completely predictable
results. A different product can be produced through reprogramming and a low-quantity production run of
different products is justified.

ADVANTAGE OF CNC MACHINES

Higher flexibility
Increased productivity
Consistent quality
Reduced scrap rate
Reliable operation
Reduced non productive time
Reduced manpower
Shorter cycle time
High accuracy
Reduced lead time
Just in time (JIT) manufacture
Automatic material handling
Lesser floor space
Increased operation safety
Machining of advanced material

The definition of CNC given by Electronic Industry Association (EIA) is as follows:


A system in which actions are controlled by the direct insertion of numerical
data at some point. The system must automatically interpret at least some
portion of this data.
In a simple word, a CNC system receives numerical data, interpret the data and then control the action
accordingly.

CNC SYSTEMS
INTRODUCTION
Numerical control (NC) is a method employed for controlling the motions of a machine tool slide and its
auxiliary functions with input in the form of numerical data. A computer numerical control (CNC) is a
microprocessor-based system to store and process the data for the control of slide motions and auxiliary
functions of the machine tools. The CNC system is the heart and brain of a CNC machine which enables the
operation of various machine members such as slides, spindles, etc. as per the sequence programmed into it,
depending on the machining operations.
The main advantage of a CNC system lies in the fact that the skills of the operator hitherto required in the
operation of a conventional machine is removed and the part production is made automatic.
The CNC systems are constructed with a NC unit integrated with a programmable logic controller (PLC) and
some times with an additional external PLC (non-integrated). The NC controls the spindle movement and the
speeds and feeds in machining. It calculates the traversing path of the axes as defined by the inputs. The PLC
controls the peripheral actuating elements of the machine such as solenoids, relay coils, etc. Working together,
the NC and PLC enable the machine tool to operate automatically. Positioning and part accuracy depend on the
CNC system's computer control algorithms, the system resolution and the basic mechanical machine accuracy.
Control algorithm may cause errors while computing, which will reflect during contouring, but they are very

negligible. Though this does not cause point to point positioning error, but when mechanical machine
inaccuracy is present, it will result in poorer part accuracy.
Computer Numerical Control (CNC) is a specialized and versatile form of Soft Automation and its
applications cover many kinds, although it was initially developed to control the motion and operation of
machine tools.
Computer Numerical Control may be considered to be a means of operating a machine through the use of
discrete numerical values fed into the machine, where the required 'input' technical information is stored on a
kind of input media such as floppy disk, hard disk, CD ROM, DVD, USB flash drive, or RAM card etc. The
machine follows a predetermined sequence of machining operations at the predetermined speeds
necessary to produce a work piece of the right shape and size and thus according to completely predictable
results. A different product can be produced through reprogramming and a low-quantity production run of
different products is justified.

Control Systems
Open Loop Systems :
Open loop systems have no access to the real time data about the performance of the system and therefore no
immediate corrective action can be taken in case of system disturbance. This system is normally applied only to
the case where the output is almost constant and predictable. Therefore, an open loop system is unlikely
to be used to control machine tools since the cutting force and loading of a machine tool is never a constant. The
only exception is the wirecut machine for which some machine tool builders still prefer to use an open loop
system because there is virtually no cutting force in wirecut machining.

Block Diagram of an Open Loop System

Close Loop Systems:


In a close loop system, feedback devices closely monitor the output and any disturbance will be corrected in the
first instance. Therefore high system accuracy is achievable. This system is more powerful than the open loop
system and can be applied to the case where the output is subjected to frequent change. Nowadays, almost all
CNC machines use this control system.

Block Diagram of a Close Loop System

CONFIGURATION OF THE CNC SYSTEM


Fig.1 shows a schematic diagram of the working principle of a NC axis of a CNC machine and the interface of a
CNC control.
Spindle Head

CNC system
PL
C

Servo Drive

Servo Motor
Encoder

NC

Command
value

Tacho
Generator

Velocity
Feedback

Lead
Screw

Table

Position Feedback

Tape Reader
Tape Punch
Other Devices
Inputs
Outputs

Machine
Elements

Proximity switches
Limit switches
Relay coils
Pressure switches
Float switches

Fig.1 Schematic diagram of a CNC machine tool


A CNC system consists of the following 6 major elements:
a.
b.
c.
d.
e.
f.

Input Device
Machine Control Unit
Machine Tool
Driving System
Feedback Devices
Display Unit

Input Devices
a. Floppy Disk Drive

Work piece

Floppy disk is a small magnetic storage device for CNC data input. It has been the most
common storage media up to the 1970s, in terms of data transfer speed, reliability, storage
size, data handling and the ability to read and write. Furthermore, the data within a
floppy could be easily edited at any point as long as you have the proper program to read it.
However,this method has proven to be quite problematic in the long run as floppies have
a tendency to degrade alarmingly fast and are sensitive to large magnetic fields and as well
as the dust and scratches that usually existed on the shop floor.

b. USB Flash Drive


A USB flash drive is a removable and rewritable portable hard drive with compact
size and bigger storage size than a floppy disk. Data stored inside the flash drive are
impervious to dust and scratches that enable flash drives to transfer data from
place to place. In recent years, all computers support USB flash drives to read and
write data that make it become more and more popular in CNC machine control
unit.

c. Serial communication
The data transfer between a computer and a CNC machine tool is often accomplished
through a serial communication port.

International standards for serial communications are

established so that information can be exchanged in an orderly way. The most common
interface between computers and CNC machine tools is referred to the EIA Standard RS-232.
Most of the personal computers and CNC machine tools have built in RS232 port and a
standard RS-232 cable is used to connect a CNC machine to a computer which enables the
data transfer in reliable way.

Part programs can be downloaded into the memory of a

machine tool or uploaded to the computer for temporary storage by running a


communication program on the computer and setting up the machine control to interact with the

communication software.

Direct Numerical Control is referred to a system connecting a set of numerically


controlled machines to a common memory for part program or machine program
storage with provision for on-demand distribution of data to the machines. (ISO
2806:1980) The NC part program is downloaded a block or a section at a time into the
controller.

Once the downloaded section is executed, the section will be discarded to

leave room for other sections. This method is commonly used for machine tools that do not
have enough memory or storage buffer for large NC part programs.
Distributed Numerical Control is a hierarchical system for distributing data between a
production management computer and NC systems. (ISO 2806:1994) The host computer is
linked with a number of CNC machines or computers connecting
machines

for

downloading

part

programs.

to

the

CNC

The communication program in the host

computer can utilize two-way data transfer features for production data communication
including: production schedule, parts produced and machine utilization etc.

10

Serial communication in a Distributed Numerical Control system

Machine Control Unit (MCU)


The machine control unit is the heart of the CNC system. There are two sub-units in the machine control unit:
the Data Processing Unit (DPU) and the Control Loop Unit (CLU).

a. Data Processing Unit


On receiving a part programme, the DPU firstly interprets and encodes the part programme into internal
machine codes. The interpolator of the DPU then calculate the intermediate positions of the motion in terms
of BLU (basic length unit) which is the smallest unit length that can be handled by the controller. The calculated
data are passed to CLU for further action.

11

b. Control Loop Unit


The data from the DPU are converted into electrical signals in the CLU to control the driving system to
perform the required motions. Other functions such as machine spindle ON/OFF, coolant ON/OFF, tool
clamp ON/OFF are also controlled by this unit according to the internal machine codes.

Machine Tool
This can be any type of machine tool or equipment. In order to obtain high accuracy and repeatability, the
design and make of the machine slide and the driving lead screw of a CNC machine is of vital importance. The
slides are usually machined to high accuracy and coated with anti-friction material such as PTFE and Turcite in
order to reduce the stick and slip phenomenon. Large diameter recirculating ball screws are employed to
eliminate the backlash and lost motion. Other design features such as rigid and heavy machine structure; short
machine table overhang, quick change tooling system, etc also contribute to the high accuracy and high
repeatability of CNC machines.

12
Ball Screw in a CNC machine

Ball screw structure

Driving System
The driving system is an important component of a CNC machine as the accuracy and repeatability depend very
much on the characteristics and performance of the driving system. The requirement is that the driving system
has to response accurately according to the programmed instructions. This system usually uses electric motors
although hydraulic motors are sometimes used for large machine tools. The motor is coupled either directly or
through a gear box to the machine lead screw to moves the machine slide or the spindle. Three types of
electrical motors are commonly used.

a. DC Servo Motor

This is the most common type of feed motors used in CNC machines. The principle of operation is based on the
rotation of an armature winding in a permanently energized magnetic field. The armature winding is
connected to a commutator, which is a cylinder of insulated copper segments mounted on the shaft. DC current is
passed

to

the

commutator

through

carbon

brushes,

which

are

connected

to

the

machine terminals. The change of the motor speed is by varying the armature voltage and the control of
motor torque is achieved by controlling the motor's armature current. In order to achieve the necessary
dynamic behaviour it is operated in a closed loop system equipped with sensors to obtain the velocity and
position feedback signals.

13

DC Servo Motor

b. AC Servo Motor
In an AC servomotor, the rotor is a permanent magnet while the stator is equipped with 3-phase
windings. The speed of the rotor is equal to the rotational frequency of the magnetic field of the stator, which is
regulated by the frequency converter. AC motors are gradually replacing DC servomotors. The main reason is
that there is no commutator or brushes in AC servomotor so that maintenance is virtually not required.
Furthermore, AC servos have a smaller power-to-weight ratio and faster response.

14

AC Servo Motor

c. Stepping Motor
A stepping motor is a device that converts the electrical pulses into discrete mechanical rotational
motions of the motor shaft. This is the simplest device that can be applied to CNC machines since it can
convert digital data into actual mechanical displacement. It is not necessary to have any analog-todigital converter nor feedback device for the control system. They are ideally suited to open loop systems.

However, stepping motors are not commonly used in machine tools due to the following drawbacks: slow
speed, low torque, low resolution and easy to slip in case of overload. Examples of stepping motor application
are the magnetic head of floppy-disc drive and hard disc drive of computer, daisy-wheel type printer, X-Y tape
control, and CNC EDM Wire-cut machine.

15

Stepping Motor

Feedback Device
In order to have a CNC machine operating accurately, the positional values and speed of the axes need to be
constantly updated. Two types of feedback devices are normally used positional feedback device and velocity
feedback device.

a. Positional Feed Back Devices


There are two types of positional feedback devices: linear transducer for direct positional measurement and
rotary encoder for angular or indirect linear measurement.

16

Linear Transducers
A linear transducer is a device mounted on the machine table to measure the actual displacement of the
slide in such a way that backlash of screws; motors, etc would not cause any error in the feedback data. This
device is considered to be of the highest accuracy and also more expensive in comparison with other measuring
devices mounted on screws or motors.

Linear Transducer

Rotary Encoders
A rotary encoder is a device mounted at the end of the motor shaft or screw to measure the angular
displacement. This device cannot measure linear displacement directly so that error may occur due to the
backlash of screw and motor etc. Generally, this error can be compensated for by the machine
builder in the machine calibration process.

17

Incremental and Absolute Rotary Encoder

18

b. Velocity Feedback Device


The actual speed of the motor can be measured in terms of voltage generated from a tachometer mounted at the
end of the motor shaft.DC tachometer is essentially a small generator that produces an output voltage
proportional to the speed. The voltage generated is compared with the command voltage corresponding to the
desired speed. The difference of the voltages can is then used to actuate the motor to eliminate the error.

Tachogenerator

19

Display Unit
The Display Unit serves as an interactive device between the machine and the operator. When the machine is
running, the Display Unit displays the present status such as the position of the machine slide, the spindle
RPM, the feed rate, the part programmes, etc. In an advanced CNC machine, the Display Unit can show the
graphics simulation of the tool path so that part programmes can be verified before the actually
machining. Much other important information about the CNC system can also displayed for maintenance and
installation work such as machine parameters, logic diagram of the programmer controller, error massages and
diagnostic data.

Servo Drive
A servo drive consists of a servo amplifier and a servo motor. The main task of a servo amplifier (also called
amplifier, servo controller, or just controller) is the control of the motor current. In addition, ESR servo
amplifiers offer a broad spectrum of functionality
While most of the electrical drives are operated at constant speed, a servo drive has a rather "hectic" life. Often
it has to accelerate to the rated speed within a few milliseconds only to decelerate a short time later just as
quick. And of course the target position is to be reached exactly with an error of a few hundredths of a milli
-meter.
Compared to other controlled drives servo drives have the advantage of high dynamics and accuracy, full stall
torque, and compact motors with high power density.
Servo drives are used where high dynamics (i. e. fast acceleration and deceleration) and good accuracy at
reaching target positions are important. The good control behaviour allows the optimal adaptation to the
application (e. g. positioning without overshoot). But also the smooth run (due to sinusoidal commutation) and
the possibility of exact synchronisation of two or more drives open a wide field. Because of their wide speed
range servo drives can be used in a huge number of applications.

20

Servo drives run in large, highly automated installations with several dozens of axes as well as in machines with
only a few axes which perhaps operate independently.
Servo motor
Servo motors are electric motors that are designed specially for high dynamics. Servo motors by ESR
distinguish themselves by a compact design with high power density and a high degree of protection (up to IP
65). They come as AC servo motors (brush less) or DC servo motors (with brushes for the commutation). The
high power density is achieved by permanent magnets made of neodymium-iron-boron (NdFeB), samariumcobalt (SmCo), or ferrite material. The servo motor is equipped with a position sensor which provides the
controller with position and speed information.
As a standard, the AC servo motors are equipped with resolvers. In combination with the digital servo
amplifiers sincos encoders (absolute encoder, single-turn or multi-turn) and high-resolution incremental
encoders may be used as well, in case higher accuracy or dynamics is required. The DC servo motors can be
equipped with tacho generators and/or incremental encoders. For dimensioning the motor the following data
are important: the mass of the parts to be moved, the cycle time of the application, and the friction torque. With
these data the rated and peak torque (maximum acceleration or deceleration) and the rated speed can be
calculated. If required, gears are used to match the moment of inertia of the motor to the moment of inertia of
the application.

Servo amplifier
The servo amplifier (also called amplifier, servo controller, or just controller) controls the current of the motor
phases in order to supply the servo motor with exactly the current required for the desired torque and the desired
speed. The essential parts of a servo amplifier are the power section and the control loops.
The power section consists of a mains rectifier, a DC-bus, and a power circuit which supplies the individual
motor phases with current.

21

The control loops (analogue or digital) drive the power circuit and by constantly comparing setpoint with actual
values ensure that the motor keeps exactly to the desired motions even under varying load.

SINUMERIK

SIEMENS

SYSTEM 3

LSMLogic Sub
module

LSM2
LSM1

Emergency Stop

X+
Z-

Z+
Machine
Control
Panel

XPOWER
ON

Cycle
Machine
Control
Panel
Expansion

Power
Supply

PLC 2, external
NC

PLC1
Logic Unit

Tape Puncher

Fig.2Tape
Typical
Readernumerical control configuration of Hinumerik 3100 CNC system

22

Operator Control Panel

Fig.4 shows a typical Hinumerik 3100 CNC system's operator control panel. The operator control panel
provides the user interface to facilitate a two-way communication between the user, CNC system and the
machine tool. This consists of two parts:

Video Display Unit (VDU)

Keyboard

Video Display Unit (VDU)

The VDU displays the status of the various parameters of the CNC system and the machine tool. It displays all
current information such as:

Complete information of the block currently being executed

Actual position value, set or actual difference, current feed rate, spindle speed

Active G functions

Main program number, subroutine number

Display of all entered data, user programs, user data, machine data, etc.

Alarm messages in plain text

Soft key designations

In addition to a CRT, a few LEDs are generally provided to indicate important operating modes and status.
Video display units may be of two types:

23

1. Monochrome or black and white displays


2. Color displays
Operator's and machine panel

SINUMERIK

SIEMENS

SYSTEM 3

Emergency Stop

X+
Z-

Z+
X-

POWER
ON

Cycle

Control elements and indicators of the operator's panel

Program in progress
Feed hold
Position not yet reached
(Machine in motion)
Basic
Alarmdisplay
Tool compensation
CRT
Zero offset
Test
Part program

LED-indicator
For assignment
Of keys
Change to actual
value display
Change of display
Leaf forwards
Leaf backwards
Right-Left Cursor

Fig.4 Operator control panel of Hinumerik 3100 system

Address
Reset changeover
Keys/Numerical
keyboard
Assignment of keys
Cancel word
Alter word
Enter word
Change over to
customer display
Operator guidance
Yes,No
Delete input
Start

24

Keyboard
A keyboard is provided for the following purposes:

Editing of part programs, tool data, and machine parameters.

Selection of different pages for viewing.

Selection of operating modes, e.g. manual data input.

Selection of feed rate override and spindles speed override.

Execution of part programs.

Execution of other toll functions.

Machine Control Panel (MCP)


It is the direct interface between operator and the NC system, enabling the operation of the machine through the
CNC system. Fig.5 shows the MCP of Hinumerik 3100 system.
During program execution, the CNC controls the axis motion, spindle function or tool function on a machine
tool, depending upon the part program stored in the memory. Prior to the starting of the machine process,
machine should first be prepared with some specific tasks like,

Establishing a correct reference point

Loading the system memory with the required part program

Loading and checking of tool offsets, zero offsets, etc.

For these tasks, the system must be operated in specific operating mode so that these preparatory functions can
be established.

25

Control elements of the machine control panel


Rapid traverse activate
Mode selector
Switch

Spindle speed
override

Feedrate/rapid traverse
override

Emergency Stop

Direction keys

Spindle
OFF ON

X+
Z-

Z+
Feed
Hold/Start

X-

Cycle start

POWER
ON

NC ON

Key operated
switch for input
inhibit

Cycle
Single
block
Block search

Block Dry Run


Delete
Rapid Traverse
Override active

Manual encoder active


in
X-and Z-axis resp.

Fig.5 Machine control panel of Hinumerik 3100


system
Modes of operation
Generally, the CNC system can be operated in the following modes:

Manual mode

Manual data input (MDI) mode

Automatic mode

Reference mode

Input mode

26

Output mode, etc.

Manual mode:
In this mode, movement of a machine slide can carried out manually by pressing the particular jog button (+
or -). The slide (axis) is selected through an axis selector switch or through individual switches (e.g., X+, X-,
Y+, Y-, Z+, Z-, etc.). The feed rate of the slide movement is prefixed. CNC system allows the axis to be jogged
at high feed rate also. The axis movement can also be achieved manually using a hand wheel interface instead
of jog buttons. In this mode slides can be moved in two ways:

Continuous

Incremental

Continuous mode: In This mode, the slide will move as long as the jog button is pressed.

Incremental mode: Hence the slide will move through a fixed distance, which is selectable. Normally, system
allows jogging of axes in 1, 10, 100, 1000, 10000, increments. Axis movement is at a prefixed feed rate. It is
initiated by pressing the proper jog+ or jog- key and will be limited to the no of increments selected even if the
jog button is continuously pressed. For subsequent movement the jog button has to be released and once again
pressed.
Manual Data Input (MDI) Mode

In this mode the following operation can be performed:

Building a new part program

27

Editing or deleting of part program stored in the system memory

Entering or editing or deleting of:


------ Tool offsets (TO)
------ Zero offsets (ZO)
------ Test data, etc.

Teach-in
Some system allows direct manual input of a program block and execution of the same. The blocks thus
executed can be checked for correctness of dimensions and consequently transferred into the program memory
as part program.
Playback
In setting up modes like jog or incremental, the axis can be traversed either through the direction keys or via the
hand wheel, and the end position can be transferred into the system memory as command values. But the
required feed rates, switching functions and other auxiliary functions have to be added to the part program in
program editing mode.
Thus, teach-in and playback operating method allows a program to created during the first component prove
out.
Automatic Mode (Auto and Single Block)

In this mode the system allows the execution of a part program continuously. The part program is executed
block by block. While one block is being executed, the next block is read by the system, analyzed and kept
ready for execution. Execution of the program can be one block after another automatically or the system will
execute a block, stop the execution of the next block till it is initiated to do so (by pressing the start button).

28

Selection of part program execution continuously (Auto) or one block at a time (Single Block) is done through
the machine control panel.
Many systems allow blocks (single or multiple) to be retraced in the opposite direction. Block retrace is allowed
only when a cycle stop state is established. Part program execution can resume and its execution begins with the
retraced block. This is useful for tool inspection or in case of tool breakage. Program start can be effected at any
block in the program, through the BLOCK SEARCH facility.

Reference Mode

Under this mode the machine can be referenced to its home position so that all the compensations (e.g., pitch
error compensation) can be properly applied. Part programs are generally prepared in absolute mode with
respect to machine zero. Many CNC systems make it compulsory to reference the slides of the machine to their
home positions before a program is executed while others make it optional.

Input Mode and Output Mode (I/O Mode)

In this mode, the part programs, machine setup data, tool offsets, etc. can be loaded/unloaded into/from the
memory of the system from external devices like programming units, magnetic cassettes or floppy discs, etc.
During data input, some systems check for simple errors (like parity, tape format, block length, unknown
characters, program already present in the memory, etc.). Transfer of data is done through a RS232C or RS422C
port.

Other Peripherals

29

These include sensor interface, provision for communication equipment, programming units, printer, tape
reader/puncher interface, etc.

INTERFACING
Interconnecting the individual elements of both the machine and the CNC system using cables and connectors is
called interfacing.
Extreme care should be taken during interfacing. Proper grounding in electrical installation is most essential.
This reduces the effects of interference and guards against electronic shock to personnel. It is also essential to
properly protect the electronic equipment.
Cable wires of sufficiently large cross-sectional area must be used. Even though proper grounding reduces the
effect of electrical interference, signal cable requires additional protection. This is generally achieved by using
shielded cables. All the cable shields must be grounded at control only, leaving other end free. Other noise
reduction techniques include using suppression devices, proper cable separation, ferrous metal wire ways, etc.
Electrical enclosures should be designed to provide proper ambient conditions for the controller.
MONITORING
In addition to the care taken by the machine tool builder during design and interfacing, basic control also
includes constantly active monitoring functions. This is in order to identify faults in the NC, the interface
control and the machine at an large stage to prevent damages occurring to the work piece, tool or machine. If a
fault occurs, first the machining sequence is interrupted, the drives are stopped, the cause of the fault is stored

30

and then displayed as an alarm. At the same time, the PLC is informed that an NC alarm exits. In Hinumerik
CNC system, for example, the following can be monitored:

Read-in

Format

Measuring circuit cables

Position encoders and drives

Contour

Spindle speed

Enable signals

Voltage

Temperature

Microprocessors

Data transfer between operator control panel and logic unit

Transfer between NC and PLC

Change of status of buffer battery

System program memory

User program memory

Serial interfaces

DIAGNOSTICS

The control will generally be provided with test assistance for service purposes in order to display some status
on the CRT such as:

31

Interface signals between NC and PLC as well as between PLC and machine

Flags of the PLC

Timers of the PLC

Counters of the PLC

Input/output of the PLC

For the output signals, it is also possible to set and generate signal combinations for test purposes in order to
observe how the machine react to a changed signal. This simplifies trouble shooting considerably.

MACHINE DATA
Generally, a CNC system is designed as a general-purpose control unit, which has to be matched with the
particular machine to which the system is interfaced. The CNC is interfaced to the machine by means of data,
which is machine specific. The NC and PLC machine data can be entered and changed by means of external
equipment or manually by the keyboard. These data are fixed and entered during commissioning of the machine
and generally left unaltered during machine operations.
Machine data entered is usually relevant to the axis travel limits, feed rates, rapid traverse speeds and spindle
speeds, position control multiplication factor, Kv factor, acceleration, drift compensation, adjustment of
reference point, backlash compensation, pitch error compensation, etc. Also the optional features of the control
system are made available to the machine tool builder by enabling some of the bits of machine data.

Applications of CNC Machines

32

CNC machines are widely used in the metal cutting industry and are best used to produce
the following types of product:

Parts with complicated contours

Parts requiring close tolerance and/or good repeatability

Parts requiring expensive jigs and fixtures if produced on conventional

machines

Parts that may have several engineering changes, such as during

the development stage of a prototype

In cases where human errors could be extremely costly

Parts that are needed in a hurry

Small batch lots or short production runs

Some common types of CNC machines and instruments used in industry are as
following:

Drilling Machine

Lathe / Turning Centre

Milling / Machining Centre

Turret Press and Punching Machine

Wirecut Electro Discharge Machine (EDM)

Grinding Machine

Laser Cutting Machine

Water Jet Cutting Machine

33

Electro Discharge Machine

Coordinate Measuring Machine

Industrial Robot

PLC PROGRAMMING
Programmable Logic Controller (PLC)
A PLC matches the NC to the machine. PLCs were basically introduced as replacement for hard wired relay
control panels. They were developed to be reprogrammed without hardware changes when requirements were
altered and thus are reusable. PLCs are now available with increased functions, more memory and large
input/output capabilities. Fig.7 gives the generalized PLC block diagram.
In the CPU, all the decisions are made relative to controlling a machine or a process. The CPU receives input
data, performs logical decisions based upon stored programs and drives the outputs. Connections to a computer
for hierarchical control are done via the CPU.

34

The I/O structure of the PLCs is one of their major strengths. The inputs can be push buttons, limit switches,
relay contacts, analog sensor, selector switches, proximity switches, float switches, etc. The outputs can be
motor starters, solenoid valves, position valves, relay coils, indicator lights, LED displays, etc.
The field devices are typically selected, supplied and installed by the machine tool builder or the end user. The
voltage level of the field devices thus normally determines the type of I/O. So, power to actuate these devices
must also be supplied external to the PLC. The PLC power supply is designated and rated only to operate the
internal portions of the I/O structures, and not the field devices. A wide variety of voltages, current capacities
and types of I/O modules are available.

The principle of operation of a PLC is determined essentially by the PLC program memory, processor, inputs
and outputs.
The program that determines PLC operation is stored in the internal PLC program memory. The PLC operates
cyclically, i.e. when a complete program has been scanned, it starts again at the beginning of the program. At
the beginning of each cycle, the processor examines the signal status at all inputs as well as the external timers
and counters and are stored in a process image input (PII). During subsequent program scanning, the processor
the accesses this process image.
To execute the program, the processor fetches one statement after another from the programming memory and
executes it. The results are constantly stored in the process image output (PIO) during the cycle. At the end of a
scanning cycle, i.e. program completion, the processor transfers the contents of the process image output to the
output modules and to the external timers and counters. The processor then begins a new program scan.

Programming
Units

Tape
Reader

Tape
Puncher

Printers

35

Fig.6 System with peripheral devices

Inputs
Processor
Programmer

Logic
memory

Storage
memory

Power
Supply

Outputs
Power
Supply

Field
Devices

Fig.7 Generalized PLC block diagram

What does PLC mean?


A PLC (Programmable Logic Controllers) is an industrial computer used to monitor inputs, and depending
upon their state make decisions based on its program or logic, to control (turn on/off) its outputs to automate a
machine or a process.
PROGRAMMABLE LOGIC CONTROLLER

A digitally operating electronic apparatus which uses a programmable memory for the internal
storage of instructions by implementing specific functions such as logic sequencing, timing,

36

counting, and arithmetic to control, through digital or analog input/output modules, various types of
machines or processes.
Traditional PLC Applications
*In automated system, PLC controller is usually the central part of a process control system.
*To run more complex processes it is possible to connect more PLC controllers to a central computer.
Disadvantages of PLC control
- Too much work required in connecting wires.
- Difficulty with changes or replacements.
- Difficulty in finding errors; requiring skillful work force.
- When a problem occurs, hold-up time is indefinite, usually long.
Advantages of PLC control
* Rugged and designed to withstand vibrations, temperature, humidity, and noise.
* Have interfacing for inputs and outputs already inside the controller.
* Easily programmed and have an easily understood programming language.
Major Types of Industrial Control Systems
Industrial control system or ICS comprise of different types of control systems that are currently in operation in
various industries. These control systems include PLC, SCADA and DCS and various others:
PLC
They are based on the Boolean logic operations whereas some models use timers and some have continuous
control. These devices are computer based and are used to control various process and equipments within a
facility. PLCs control the components in the DCS and SCADA systems but they are primary components in
smaller control configurations.

37

DCS
Distributed Control Systems consists of decentralized elements and all the processes are controlled by these
elements. Human interaction is minimized so the labor costs and injuries can be reduced.

Embedded Control
In this control system, small components are attached to the industrial computer system with the help of a
network and control is exercised.

SCADA
Supervisory Control And Data Acquisition refers to a centralized system and this system is composed of various
subsystems like Remote Telemetry Units, Human Machine Interface, Programmable Logic Controller or PLC
and Communications.

Hardware Components of a PLC System


Processor unit (CPU), Memory, Input/Output, Power supply unit, Programming device, and other devices.

38

Central Processing Unit (CPU)


CPU Microprocessor based, may allow arithmetic operations, logic operators, block memory moves,
computer interface, local area network, functions, etc.
CPU makes a great number of check-ups of the PLC controller itself so eventual errors would be discovered
early.
System Busses
The internal paths along which the digital signals flow within the PLC are called
busses.
The system has four busses:
- The CPU uses the data bus for sending data between the different elements,
- The address bus to send the addresses of locations for accessing stored data,
- The control bus for signals relating to internal control actions,
- The system bus is used for communications between the I/O ports and the I/O unit.
Memory
System (ROM) to give permanent storage for the operating system and the fixed data used by the CPU.
RAM for data. This is where information is stored on the status of input and output devices and the values of
timers and counters and other internal devices. EPROM for ROMs that can be programmed and then the
program made permanent.
I/O Sections
Inputs monitor field devices, such as switches and sensors.
Outputs control other devices, such as motors, pumps, solenoid valves, and lights.
Power Supply
Most PLC controllers work either at 24 VDC or 220 VAC. Some PLC controllers have electrical supply as a
separate module, while small and medium series already contain the supply module.

39

Programming Device
The programming device is used to enter the required program into the memory of the processor.
The program is developed in the programming device and then transferred to the memory unit of the PLC.

PLC OPERATIONS:
Input Relays
These are connected to the outside world. They physically exist and receive signals from switches, sensors, etc.
Typically they are not relays but rather they are transistors.
Internal Utility Relays
These do not receive signals from the outside world nor do they physically exist. They are simulated relays and
are what enables a PLC to eliminate external relays.
There are also some special relays that are dedicated to performing only
one task.
Counters
These do not physically exist. They are simulated counters and they can be programmed to count pulses.
Typically these counters can count up, down or both up and down. Since they are simulated they are limited in
their counting speed.
Some manufacturers also include highspeed counters that are hardware based.
Timers
These also do not physically exist. They come in many varieties and increments.
The most common type is an on-delay type.
Others include off-delay and both retentive and non-retentive types. Increments vary from 1ms through 1s.

40

Output Relays
These are connected to the outside world. They physically exist and send on/off signals to solenoids, lights, etc.
They can be transistors, relays, or triacs depending upon the model chosen.
Data Storage
Typically there are registers assigned to simply store data. Usually used as temporary storage for math or data
manipulation.
They can also typically be used to store data when power is removed from the
PLC.
The Simatic S5 PLC is an automation system based on PLC. It was manufactured and sold by Siemens. Such
automation systems control process equipment and machinery used in manufacturing.
STEP 5 programming language is used for writing user programs for SIMATIC S5 programmable controllers.
The program can be written and entered into the programmable controller as in:

Statement list (STL), Fig.12 (a)

Control system flowchart (CSF), Fig.12 (b)

Statement list
Ladder diagram
(LAD), Fig.12 (c)
STL

A I
A I
O I
= Q

2.3
4.1
3.2
1.6

I 2.3

A
N
D

(b) Control system flow


chart CSF

41

(a)

I 4.1
O
R
I 3.2

Operation

2.3

2.3

Q 1.6

(c) Ladder diagram LAD


Statement

I 2.3

I 4.1

Operand

2.3

Parameter
Operand identifier

I 3.2

Fig.12 Programmable controller


The statement list describes the automation task by means of mnemonic function designations.
The control system flowchart is a graphic representation of the automation task.
The ladder diagram uses relay ladder logic symbols to represent the automation task.
The statement is the smallest STEP 5 program component. It consists of the following:
Operation, i.e. what is to be done?
E.g.

A = AND operation (series connection)


O= OR operation (parallel connection)
S= SET operation (actuation)

Operand, i.e. what is to be done with?


E.g.

I 4.5, i.e. with the signal of input 4.5

The operand consists of:

Operand identifier (I = input, Q = output, F = flag, etc.)

Parameter, i.e. the number of operand identifiers addressed by the statement. For inputs, outputs and

flags (internal relay equivalents), the parameter consists of the byte and bit addresses, and for timers and
counter, byte address only.

42

The statement may include absolute operands, e.g. I 5.1, or symbolic operand, e.g. I LS1. Programming is
considerably simplified in the later case as the actual plant designation is directly used to describe the device
connected to the input or output.
Typically, a statement takes up one word (two bytes) in the program memory.
STRUCTURED PROGRAMMING
The user program can be made more manageable and straightforward if it is broken down into relative sections.
Various software block types are available for constructing the user program.
Program blocks (PB) contain the user program broken down into technologically or functionally related
sections (e.g. program block for transportation, monitoring, etc.). Further blocks, such as program blocks or
function blocks can be called from a PB.
Organization blocks (OB) contain block calls determining the sequence in which the PBs are to be processed. It
is therefore possible to call PBs conditionally (depending on certain conditions).
In addition, special OBs can be programmed by the user to react to interruptions during cyclic programming
processing. Such an interrupt can be triggered by a monitoring function if one or several monitored events
occur.
Function block (FB) is block with programs for recurrent and usually complex function. In addition to the basic
operations, the user has a extended operation at his disposal for developing function blocks. The program in a
function block is usually not written with absolute operands (e.g. I 1.5) but with symbolic operands. This
enables a function block to be used several times over with different absolute operands.
For even more complex functions, standard function blocks are available from a program library. Such FBs are
available, e.g. for individual controls, sequence controls, messages, arithmetic operations, two step control
loops, operator communications, listing, etc. These standard FBs for complex functions can be linked it the user
program just like user written FBs simply by means of a call along with the relevant parameters.

43

The Sequence block (SB) contain the step enabling conditions, monitoring times and conditions for the current
step in sequence cascade. Sequence blocks are employed, for example, to organise the sequence cascade in
communication with a standard FB.
The data blocks (DB) contain all fixed or variable data of the user program.
CYCLIC PROGRAM PROCESSING
The blocks of the user program are executed in the sequence in which they specified in the organisation block.
INTERRUPT DRIVEN PROGRAM PROCESSING
When certain input signal changes occur, cyclic processing is interrupted at the next block boundary and an OB
assigned to this event is started. The user can formulate his response program to this interrupt in the OB. The
cyclic program execution is the resumed from the point at which it was interrupted.
TIME CONTROLLED PROGRAM EXECUTION
Certain Obs are executed at the predetermined time intervals (e.g. every 100ms, 200ms, 500ms, 1s, 2s, and 5s).
For this purpose, cyclic program execution is interrupted at the block boundary and resumed again at this point,
once the relevant OB has been executed. Fig.13 gives the organisation and execution of a structured user
program.

44

Structured programming

OB1

PB1

FB2

PB2

FB3

Program block (PB)

Organisation block (OB)

Function block (PB)

Cycle execution
OB

PB

FB

PB

FB

Interrupt-driven execution
OB

PB

Points at which interrupt-driven program can be inserted


Start and finish of interrupt-driven program execution

Fig.13 Organisation and execution of a structured user program

FB

45

EXAMPLES OF PLC PROGRAM


Before attempting to write a PLC program, first go through the instruction set of the particular language used
for the equipment, and understand the meaning of each instruction. Then study how to use these instructions in
the program (through illustration examples given in the manual). Once the familiarization task is over, then start
writing the program.
Follow the following steps to write a PLC program.

List down each individual element (field device) on the machine as Input/Output.

Indicate against each element the respective address as identifier during electrical interfacing of these
elements with the PLC.

Break down the complete machine auxiliary functions that are controlled by the PLC into individual, self
contained functions.

Identify each individual function as separate block (PBxx/FBxx)

Once the PBs and FBs for each function are identified, take them one by one for writing the program.

List down the preconditions required for the particular function separately.

Note down the address of the listed elements.

Write down the flow chart for the function.

Translate the flow chart into PLC program using the instructions already familiarized.

Complete the program translation of all individual functions in similar lines.

Check the individual blocks independently and correct the program to get the required results.

Organize all the program blocks in the organization block depending upon the sequence in which they are
supposed to be executed as per the main machine function flow chart.

Check the complete program with all the blocks incorporated in the final program.

46

Example 1: Spindle ON
Preconditions

Feedback elements Address

Fault indication

Address

Tool clamp
Job clamp
Door close
Lubrication ON
Drive ready

Pressure switch
Proximity switch
Limit switch
PLC output bit
Input signal from
Drive unit

Lamp
Lamp
Lamp
Lamp
Lamp

Q 2.1
Q 1.7
Q 4.0
Q 7.7
Q 0.4

I 2.4
I 3.2
I 5.7
Q 1.0
I 4.6

Remark

PB 12 written is the individual function module for spindle ON for all the preconditions checked and found
satisfactory. This function is required to be executed only when the spindle rotation is requested by the NC in
the form of a block in the part program.
Whenever NC decodes the part program block, it in turn informs the PLC through a fixed buffer location that
spindle rotation is requested. Say Flag bit F 100.0 is identified for this information communication. With this
data, spindle ON function module can be recalled in the organisation block OB1 as follows.
OB 1

A F 100.0
JC PB12

BE
Now, spindle ON function module PB12 will be executed only when F 100.0 is set. Otherwise the function
execution will be bypassed.

47

FLOW CHART
PB12
START
Comments
NO
INDICATE
FAULT

TOOL CLAMP

AN I 2.4
=
Q 2.1

Tool not clamped


Display fault lamp

YES
NO
INDICATE
FAULT

JOB CLAMP

AN I 3.2 Job not clamped


=
Q 1.7 Display fault lamp

YES

NO
INDICATE
FAULT

DOOR CLOSED

AN I 5.7
=
Q 4.0

Door not closed


Display fault lamp

AN Q 1.0
=
Q 7.7

Lubrication not on
Display fault lamp

YES

NO
INDICATE
FAULT

LUBRICATION
ON

YES
NO
INDICATE
FAULT

DRIVE READY

AN I 4.6
=
Q 0.4

Drive not ready


Display fault lamp

ON I
ON I
ON I
ON Q
ON I
R Q
BEC
A I
A I
A I
A Q
A I
S Q
BE

Tool not clamped


Job not clamped
Door not closed
Lubrication not on
Drive not ready
Reset spindle enable bit
Block end conditionally
Tool clamped
Job clamped
Door closed
Lubrication ON
Drive ready
Set spindle enable bit
Block end

YES
YES
Exit

STOP
SPINDLE

ANY FAULT

NO

DO SPINDLE
ON

END

2.4
3.2
5.7
1.0
4.6
67.3
2.4
3.2
5.7
1.0
4.6
67.3

48

Das könnte Ihnen auch gefallen