Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

Introduction to cnc machines (1)

Introduction to CNC machines

  • Als Erste(r) kommentieren

Introduction to cnc machines (1)

  1. 1. 1Introduction to CNC Machines
  2. 2. 2INTRODUCTIONNumerical control for machines .tools were introduced in 1950’s by Prof.John T Parsons. The first NC machinewas built at the Massachusetts institute of Technology in 1953 by joint efforts of US Air Force, the MIT andparson’s cooperation. NC is control by numbers .NC is control recorded information called part program, whichis set of coded instructions given as numbers for automatic control of am machine in a pre-determinedsequence.Numerical control can be defined as a technique of controlling a machine tool by the direct insertion ofnumerical data at some point of the system .The functions that are controlled on the machine tool aredisplacement of the slide members, spindle speeds ,tool selection etc.At first ,the numerical control was used toproduce geocentrically complex parts ,but later used for added efficiency in medium batch production of turnedand 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 anddevelopment of minicomputer lead to the development of minicomputers based CNC systems. Furtherdevelopment and the electronic “chip” revolution have ushered in the current generation “compact andpowerful” Microprocessor based CNC systems.Development of computer numerically controlled (CNC) machines is an outstanding contribution to themanufacturing industries. It has made possible the automation of the machining process with flexibility tohandle 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 asingle 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 componentscombining operations like milling, drilling, boring and taping. Further, the concept of multi-operations was alsoextended for machining cylindrical components, which led to the development of turning centers.
  3. 3. 3Computer Numerical Control (CNC) is a specialized and versatile form of Soft Automation and itsapplications cover many kinds, although it was initially developed to control the motion and operation ofmachine tools.Computer Numerical Control may be considered to be a means of operating a machine through the use ofdiscrete numerical values fed into the machine, where the required input technical information is stored on akind 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 speedsnecessary to produce a workpiece of the right shape and size and thus according to completely predictableresults. A different product can be produced through reprogramming and a low-quantity production run ofdifferent 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
  4. 4. 4 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 SYSTEMSINTRODUCTIONNumerical control (NC) is a method employed for controlling the motions of a machine tool slide and itsauxiliary functions with input in the form of numerical data. A computer numerical control (CNC) is amicroprocessor-based system to store and process the data for the control of slide motions and auxiliaryfunctions of the machine tools. The CNC system is the heart and brain of a CNC machine which enables theoperation 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 theoperation 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) andsome times with an additional external PLC (non-integrated). The NC controls the spindle movement and thespeeds and feeds in machining. It calculates the traversing path of the axes as defined by the inputs. The PLCcontrols 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 theCNC systems 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 verynegligible. Though this does not cause point to point positioning error, but when mechanical machineinaccuracy is present, it will result in poorer part accuracy.
  5. 5. 5Computer Numerical Control (CNC) is a specialized and versatile form of Soft Automation and itsapplications cover many kinds, although it was initially developed to control the motion and operation ofmachine tools.Computer Numerical Control may be considered to be a means of operating a machine through the use ofdiscrete numerical values fed into the machine, where the required input technical information is stored on akind of input media such as floppy disk, hard disk, CD ROM, DVD, USB flash drive, or RAM card etc. Themachine follows a predetermined sequence of machining operations at the predetermined speedsnecessary to produce a work piece of the right shape and size and thus according to completely predictableresults. A different product can be produced through reprogramming and a low-quantity production run ofdifferent products is justified.
  6. 6. 6Control Systems Open Loop Systems :Open loop systems have no access to the real time data about the performance of the system and therefore noimmediate corrective action can be taken in case of system disturbance. This system is normally applied only tothe case where the output is almost constant and predictable. Therefore, an open loop system is unlikelyto be used to control machine tools since the cutting force and loading of a machine tool is never a constant. Theonly exception is the wirecut machine for which some machine tool builders still prefer to use an open loopsystem because there is virtually no cutting force in wirecut machining. Block Diagram of an Open Loop SystemClose Loop Systems:In a close loop system, feedback devices closely monitor the output and any disturbance will be corrected in thefirst instance. Therefore high system accuracy is achievable. This system is more powerful than the open loopsystem and can be applied to the case where the output is subjected to frequent change. Nowadays, almost allCNC machines use this control system. Block Diagram of a Close Loop System
  7. 7. 7 CONFIGURATION OF THE CNC SYSTEMFig.1 shows a schematic diagram of the working principle of a NC axis of a CNC machine and the interface of aCNC control.CNC system Spindle Head Servo Drive Servo Motor Encoder PL Command NC C value Lead Tacho Screw Work piece Velocity Generator Feedback Table Tape Reader Position Feedback Tape Punch Other Devices • Proximity switches Inputs • Limit switches Machine • Relay coils Elements Outputs • Pressure switches • Float switches Fig.1 Schematic diagram of a CNC machine tool A CNC system consists of the following 6 major elements: a. Input Device b. Machine Control Unit c. Machine Tool d. Driving System e. Feedback Devices f. Display Unit Input Devices a. Floppy Disk Drive 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
  8. 8. 8floppy 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 havea tendency to degrade alarmingly fast and are sensitive to large magnetic fields and as wellas the dust and scratches that usually existed on the shop floor.b. USB Flash DriveA USB flash drive is a removable and rewritable portable hard drive with compactsize and bigger storage size than a floppy disk. Data stored inside the flash drive areimpervious to dust and scratches that enable flash drives to transfer data fromplace to place. In recent years, all computers support USB flash drives to read andwrite data that make it become more and more popular in CNC machine controlunit.c. Serial communicationThe data transfer between a computer and a CNC machine tool is often accomplishedthrough a serial communication port. International standards for serial communications areestablished so that information can be exchanged in an orderly way. The most commoninterface 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 astandard RS-232 cable is used to connect a CNC machine to a computer which enables thedata transfer in reliable way. Part programs can be downloaded into the memory of amachine tool or uploaded to the computer for temporary storage by running acommunication program on the computer and setting up the machine control to interact with thecommunication software.
  9. 9. 9Direct Numerical Control is referred to a system connecting a set of numericallycontrolled machines to a common memory for part program or machine programstorage with provision for on-demand distribution of data to the machines. (ISO2806:1980) The NC part program is downloaded a block or a section at a time into thecontroller. Once the downloaded section is executed, the section will be discarded toleave room for other sections. This method is commonly used for machine tools that do nothave enough memory or storage buffer for large NC part programs.Distributed Numerical Control is a hierarchical system for distributing data between aproduction management computer and NC systems. (ISO 2806:1994) The host computer islinked with a number of CNC machines or computers connecting to the CNCmachines for downloading part programs. The communication program in the hostcomputer can utilize two-way data transfer features for production data communicationincluding: production schedule, parts produced and machine utilization etc.
  10. 10. 10 Serial communication in a Distributed Numerical Control systemMachine 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 UnitOn receiving a part programme, the DPU firstly interprets and encodes the part programme into internalmachine codes. The interpolator of the DPU then calculate the intermediate positions of the motion in termsof BLU (basic length unit) which is the smallest unit length that can be handled by the controller. The calculateddata are passed to CLU for further action.b. Control Loop Unit
  11. 11. 11The data from the DPU are converted into electrical signals in the CLU to control the driving system toperform the required motions. Other functions such as machine spindle ON/OFF, coolant ON/OFF, toolclamp ON/OFF are also controlled by this unit according to the internal machine codes.Machine ToolThis can be any type of machine tool or equipment. In order to obtain high accuracy and repeatability, thedesign and make of the machine slide and the driving lead screw of a CNC machine is of vital importance. Theslides are usually machined to high accuracy and coated with anti-friction material such as PTFE and Turcite inorder to reduce the stick and slip phenomenon. Large diameter recirculating ball screws are employed toeliminate the backlash and lost motion. Other design features such as rigid and heavy machine structure; shortmachine table overhang, quick change tooling system, etc also contribute to the high accuracy and highrepeatability of CNC machines. Ball Screw in a CNC machine Ball screw structure
  12. 12. 12Driving SystemThe driving system is an important component of a CNC machine as the accuracy and repeatability depend verymuch on the characteristics and performance of the driving system. The requirement is that the driving systemhas to response accurately according to the programmed instructions. This system usually uses electric motorsalthough hydraulic motors are sometimes used for large machine tools. The motor is coupled either directly orthrough a gear box to the machine lead screw to moves the machine slide or the spindle. Three types ofelectrical motors are commonly used. a. DC Servo MotorThis is the most common type of feed motors used in CNC machines. The principle of operation is based on therotation of an armature winding in a permanently energized magnetic field. The armature winding isconnected to a commutator, which is a cylinder of insulated copper segments mounted on the shaft. DC currentis passed to the commutator through carbon brushes, which are connected to themachine terminals. The change of the motor speed is by varying the armature voltage and the control ofmotor torque is achieved by controlling the motors armature current. In order to achieve the necessarydynamic behaviour it is operated in a closed loop system equipped with sensors to obtain the velocity andposition feedback signals.
  13. 13. 13 DC Servo Motor b. AC Servo MotorIn an AC servomotor, the rotor is a permanent magnet while the stator is equipped with 3-phasewindings. The speed of the rotor is equal to the rotational frequency of the magnetic field of the stator, which isregulated by the frequency converter. AC motors are gradually replacing DC servomotors. The main reason isthat 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. 14. 14 AC Servo Motorc. Stepping MotorA stepping motor is a device that converts the electrical pulses into discrete mechanical rotationalmotions of the motor shaft. This is the simplest device that can be applied to CNC machines since it canconvert digital data into actual mechanical displacement. It is not necessary to have any analog-to-digital 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: slowspeed, low torque, low resolution and easy to slip in case of overload. Examples of stepping motor applicationare the magnetic head of floppy-disc drive and hard disc drive of computer, daisy-wheel type printer, X-Y tapecontrol, and CNC EDM Wire-cut machine.
  15. 15. 15 Stepping MotorFeedback DeviceIn order to have a CNC machine operating accurately, the positional values and speed of the axes need to beconstantly updated. Two types of feedback devices are normally used positional feedback device and velocityfeedback device.a. Positional Feed Back DevicesThere are two types of positional feedback devices: linear transducer for direct positional measurement androtary encoder for angular or indirect linear measurement.
  16. 16. 16Linear Transducers – A linear transducer is a device mounted on the machine table to measure the actual displacement of theslide in such a way that backlash of screws; motors, etc would not cause any error in the feedback data. Thisdevice is considered to be of the highest accuracy and also more expensive in comparison with other measuringdevices mounted on screws or motors. Linear TransducerRotary Encoders –A rotary encoder is a device mounted at the end of the motor shaft or screw to measure the angulardisplacement. This device cannot measure linear displacement directly so that error may occur due to thebacklash of screw and motor etc. Generally, this error can be compensated for by the machinebuilder in the machine calibration process.
  17. 17. 17 Incremental and Absolute Rotary Encoderb. Velocity Feedback Device
  18. 18. 18The actual speed of the motor can be measured in terms of voltage generated from a tachometer mounted at theend of the motor shaft.DC tachometer is essentially a small generator that produces an output voltageproportional to the speed. The voltage generated is compared with the command voltage corresponding to thedesired speed. The difference of the voltages can is then used to actuate the motor to eliminate the error. TachogeneratorDisplay Unit
  19. 19. 19The Display Unit serves as an interactive device between the machine and the operator. When the machine isrunning, the Display Unit displays the present status such as the position of the machine slide, the spindleRPM, the feed rate, the part programmes, etc. In an advanced CNC machine, the Display Unit can show thegraphics simulation of the tool path so that part programmes can be verified before the actuallymachining. Much other important information about the CNC system can also displayed for maintenance andinstallation work such as machine parameters, logic diagram of the programmer controller, error massages anddiagnostic data. Servo DriveA servo drive consists of a servo amplifier and a servo motor. The main task of a servo amplifier (also calledamplifier, servo controller, or just controller) is the control of the motor current. In addition, ESR servoamplifiers offer a broad spectrum of functionalityWhile most of the electrical drives are operated at constant speed, a servo drive has a rather "hectic" life. Oftenit has to accelerate to the rated speed within a few milliseconds only to decelerate a short time later just asquick. 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 stalltorque, and compact motors with high power density.Servo drives are used where high dynamics (i. e. fast acceleration and deceleration) and good accuracy atreaching target positions are important. The good control behaviour allows the optimal adaptation to theapplication (e. g. positioning without overshoot). But also the smooth run (due to sinusoidal commutation) andthe possibility of exact synchronisation of two or more drives open a wide field. Because of their wide speedrange servo drives can be used in a huge number of applications.Servo drives run in large, highly automated installations with several dozens of axes as well as in machines withonly a few axes which perhaps operate independently.
  20. 20. 20Servo motorServo motors are electric motors that are designed specially for high dynamics. Servo motors by ESRdistinguish themselves by a compact design with high power density and a high degree of protection (up to IP65). They come as AC servo motors (brush less) or DC servo motors (with brushes for the commutation). Thehigh power density is achieved by permanent magnets made of neodymium-iron-boron (NdFeB), samarium-cobalt (SmCo), or ferrite material. The servo motor is equipped with a position sensor which provides thecontroller with position and speed information.As a standard, the AC servo motors are equipped with resolvers. In combination with the digital servoamplifiers sincos encoders (absolute encoder, single-turn or multi-turn) and high-resolution incrementalencoders may be used as well, in case higher accuracy or dynamics is required. The DC servo motors can beequipped with tacho generators and/or incremental encoders. For dimensioning the motor the following dataare important: the mass of the parts to be moved, the cycle time of the application, and the friction torque. Withthese data the rated and peak torque (maximum acceleration or deceleration) and the rated speed can becalculated. If required, gears are used to match the moment of inertia of the motor to the moment of inertia ofthe application.Servo amplifierThe servo amplifier (also called amplifier, servo controller, or just controller) controls the current of the motorphases in order to supply the servo motor with exactly the current required for the desired torque and the desiredspeed. 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 individualmotor phases with current.The control loops (analogue or digital) drive the power circuit and by constantly comparing setpoint with actualvalues ensure that the motor keeps exactly to the desired motions even under varying load.
  21. 21. 21 SINUMERIK SIEMENS SYSTEM 3 LSM- Logic Sub module LSM2 LSM1 Emergency Stop X+ Z- Z+ Machine X- Control Panel POWER ON Cycle Machine Control Panel Expansion PLC 2, external Power Supply NC PLC1 Logic UnitTape Puncher Tape Reader Fig.2 Typical numerical control configuration of Hinumerik 3100 CNC system
  22. 22. 22 Operator Control PanelFig.4 shows a typical Hinumerik 3100 CNC systems operator control panel. The operator control panelprovides the user interface to facilitate a two-way communication between the user, CNC system and themachine tool. This consists of two parts: • Video Display Unit (VDU) • KeyboardVideo Display Unit (VDU)The VDU displays the status of the various parameters of the CNC system and the machine tool. It displays allcurrent 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 designationsIn 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:1. Monochrome or black and white displays
  23. 23. 232. Color displaysOperators and machine panel SINUMERIK SIEMENS SYSTEM 3 Emergency Stop X+ Z- Z+ X- POWER ON Cycle Address Keys/Numerical keyboardControl elements and indicators of the operators panel Reset changeover LED-indicator For assignment Assignment of keys Program in progress Of keys Cancel word Feed hold Position not yet reached Alter word (Machine in motion) Alarm Enter word Change to actual CRT Change over to value display customer display Basic display Change of display Tool compensation Operator guidance Zero offset Yes,No Leaf forwards Test Delete input Leaf backwards Part program Start Right-Left Cursor Fig.4 Operator control panel of Hinumerik 3100 system
  24. 24. 24KeyboardA 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 theCNC 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 machinetool, 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 canbe established.
  25. 25. 25 Control elements of the machine control panel Rapid traverse activate Spindle Mode selector Spindle speed Feedrate/rapid traverse Direction keys OFF ON Switch override override Emergency Stop X+ Z- Z+ Feed X- Hold/Start Cycle start POWER ON Cycle Single Block Dry RunNC ON Key operated block Delete switch for input inhibit Block search Rapid Traverse Manual encoder active Override 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 • Output mode, etc.
  26. 26. 26Manual 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 joggedat high feed rate also. The axis movement can also be achieved manually using a hand wheel interface insteadof jog buttons. In this mode slides can be moved in two ways: • Continuous • IncrementalContinuous 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, systemallows jogging of axes in 1, 10, 100, 1000, 10000, increments. Axis movement is at a prefixed feed rate. It isinitiated by pressing the proper jog+ or jog- key and will be limited to the no of increments selected even if thejog button is continuously pressed. For subsequent movement the jog button has to be released and once againpressed.Manual Data Input (MDI) ModeIn this mode the following operation can be performed: • Building a new part program • Editing or deleting of part program stored in the system memory • Entering or editing or deleting of:
  27. 27. 27 ------ Tool offsets (TO) ------ Zero offsets (ZO) ------ Test data, etc.Teach-inSome system allows direct manual input of a program block and execution of the same. The blocks thusexecuted can be checked for correctness of dimensions and consequently transferred into the program memoryas part program.PlaybackIn setting up modes like jog or incremental, the axis can be traversed either through the direction keys or via thehand wheel, and the end position can be transferred into the system memory as command values. But therequired feed rates, switching functions and other auxiliary functions have to be added to the part program inprogram editing mode.Thus, teach-in and playback operating method allows a program to created during the first component proveout.Automatic Mode (Auto and Single Block)In this mode the system allows the execution of a part program continuously. The part program is executedblock by block. While one block is being executed, the next block is read by the system, analyzed and keptready for execution. Execution of the program can be one block after another automatically or the system willexecute a block, stop the execution of the next block till it is initiated to do so (by pressing the start button).Selection of part program execution continuously (Auto) or one block at a time (Single Block) is done throughthe machine control panel.Many systems allow blocks (single or multiple) to be retraced in the opposite direction. Block retrace is allowedonly when a cycle stop state is established. Part program execution can resume and its execution begins with the
  28. 28. 28retraced block. This is useful for tool inspection or in case of tool breakage. Program start can be effected at anyblock in the program, through the BLOCK SEARCH facility.Reference ModeUnder this mode the machine can be referenced to its home position so that all the compensations (e.g., pitcherror compensation) can be properly applied. Part programs are generally prepared in absolute mode withrespect to machine zero. Many CNC systems make it compulsory to reference the slides of the machine to theirhome 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 thememory 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, unknowncharacters, program already present in the memory, etc.). Transfer of data is done through a RS232C orRS422C port. Other PeripheralsThese include sensor interface, provision for communication equipment, programming units, printer, tapereader/puncher interface, etc.
  29. 29. 29INTERFACINGInterconnecting the individual elements of both the machine and the CNC system using cables and connectors iscalled 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 toproperly protect the electronic equipment.Cable wires of sufficiently large cross-sectional area must be used. Even though proper grounding reduces theeffect of electrical interference, signal cable requires additional protection. This is generally achieved by usingshielded cables. All the cable shields must be grounded at control only, leaving other end free. Other noisereduction 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.MONITORINGIn addition to the care taken by the machine tool builder during design and interfacing, basic control alsoincludes constantly active monitoring functions. This is in order to identify faults in the NC, the interfacecontrol and the machine at an large stage to prevent damages occurring to the work piece, tool or machine. If afault occurs, first the machining sequence is interrupted, the drives are stopped, the cause of the fault is storedand then displayed as an alarm. At the same time, the PLC is informed that an NC alarm exits. In HinumerikCNC system, for example, the following can be monitored: • Read-in • Format • Measuring circuit cables
  30. 30. 30 • 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 interfacesDIAGNOSTICSThe control will generally be provided with test assistance for service purposes in order to display some statuson the CRT such as: • 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
  31. 31. 31For the output signals, it is also possible to set and generate signal combinations for test purposes in order toobserve how the machine react to a changed signal. This simplifies trouble shooting considerably.MACHINE DATAGenerally, a CNC system is designed as a general-purpose control unit, which has to be matched with theparticular 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 externalequipment or manually by the keyboard. These data are fixed and entered during commissioning of the machineand generally left unaltered during machine operations. Machine data entered is usually relevant to the axis travel limits, feed rates, rapid traverse speeds and spindlespeeds, position control multiplication factor, Kv factor, acceleration, drift compensation, adjustment ofreference point, backlash compensation, pitch error compensation, etc. Also the optional features of the controlsystem are made available to the machine tool builder by enabling some of the bits of machine data. Applications of CNC MachinesCNC machines are widely used in the metal cutting industry and are best used to producethe 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 conventionalmachines
  32. 32. 32• Parts that may have several engineering changes, such as duringthe 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 runsSome common types of CNC machines and instruments used in industry are asfollowing:• 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• Electro Discharge Machine• Coordinate Measuring Machine• Industrial Robot
  33. 33. 33 PLC PROGRAMMINGProgrammable Logic Controller (PLC)A PLC matches the NC to the machine. PLCs were basically introduced as replacement for hard wired relaycontrol panels. They were developed to be reprogrammed without hardware changes when requirements werealtered and thus are reusable. PLCs are now available with increased functions, more memory and largeinput/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 inputdata, performs logical decisions based upon stored programs and drives the outputs. Connections to a computerfor hierarchical control are done via the CPU.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 bemotor 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. Thevoltage level of the field devices thus normally determines the type of I/O. So, power to actuate these devicesmust also be supplied external to the PLC. The PLC power supply is designated and rated only to operate theinternal portions of the I/O structures, and not the field devices. A wide variety of voltages, current capacitiesand types of I/O modules are available.
  34. 34. 34The principle of operation of a PLC is determined essentially by the PLC program memory, processor, inputsand outputs. The program that determines PLC operation is stored in the internal PLC program memory. The PLC operatescyclically, i.e. when a complete program has been scanned, it starts again at the beginning of the program. Atthe beginning of each cycle, the processor examines the signal status at all inputs as well as the external timersand counters and are stored in a process image input (PII). During subsequent program scanning, the processorthe accesses this process image. To execute the program, the processor fetches one statement after another from the programming memory andexecutes it. The results are constantly stored in the process image output (PIO) during the cycle. At the end of ascanning cycle, i.e. program completion, the processor transfers the contents of the process image output to theoutput modules and to the external timers and counters. The processor then begins a new program scan. Programming Tape Tape Printers Units Reader Puncher
  35. 35. 35 Fig.6 System with peripheral devices Inputs Processor Logic Storage Programmer memory memory Outputs Field Devices Power Power Supply Supply Fig.7 Generalized PLC block diagramWhat does ‘PLC’ mean?A PLC (Programmable Logic Controllers) is an industrial computer used to monitor inputs, and dependingupon their state make decisions based on its program or logic, to control (turn on/off) its outputs to automate amachine 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,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.
  36. 36. 36- 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 SystemsIndustrial control system or ICS comprise of different types of control systems that are currently in operation invarious industries. These control systems include PLC, SCADA and DCS and various others:PLCThey are based on the Boolean logic operations whereas some models use timers and some have continuouscontrol. These devices are computer based and are used to control various process and equipments within afacility. PLCs control the components in the DCS and SCADA systems but they are primary components insmaller control configurations.DCSDistributed Control Systems consists of decentralized elements and all the processes are controlled by theseelements. Human interaction is minimized so the labor costs and injuries can be reduced.Embedded ControlIn this control system, small components are attached to the industrial computer system with the help of anetwork and control is exercised.SCADASupervisory Control And Data Acquisition refers to a centralized system and this system is composed of various
  37. 37. 37subsystems like Remote Telemetry Units, Human Machine Interface, Programmable Logic Controller or PLCand Communications.Hardware Components of a PLC SystemProcessor unit (CPU), Memory, Input/Output, Power supply unit, Programming device, and other devices.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 discoveredearly.System BussesThe internal paths along which the digital signals flow within the PLC are calledbusses.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,
  38. 38. 38- 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.MemorySystem (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 oftimers and counters and other internal devices. EPROM for ROM’s that can be programmed and then theprogram made permanent.I/O SectionsInputs monitor field devices, such as switches and sensors.Outputs control other devices, such as motors, pumps, solenoid valves, and lights.Power SupplyMost PLC controllers work either at 24 VDC or 220 VAC. Some PLC controllers have electrical supply as aseparate module, while small and medium series already contain the supply module.Programming DeviceThe 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 RelaysThese 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 RelaysThese do not receive signals from the outside world nor do they physically exist. They are simulated relays andare what enables a PLC to eliminate external relays.
  39. 39. 39There are also some special relays that are dedicated to performing onlyone task.CountersThese 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 intheir counting speed.Some manufacturers also include highspeed counters that are hardware based.TimersThese 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.Output RelaysThese 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 StorageTypically there are registers assigned to simply store data. Usually used as temporary storage for math or datamanipulation.They can also typically be used to store data when power is removed from thePLC.The Simatic S5 PLC is an automation system based on PLC. It was manufactured and sold by Siemens. Suchautomation 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:
  40. 40. 40  Statement list (STL), Fig.12 (a)  Control system flowchart (CSF), Fig.12 (b)  Ladder diagram (LAD), Fig.12 (c) (b) Control system flow I 2.3 A chart CSF N Statement list D STL (a) I 4.1 A I 2.3 O A I 4.1 R O I 3.2 I 3.2 Q 1.6 = Q 1.6 (c) Ladder diagram LAD A I 2.3 Statement I 2.3 I 4.1 Operation A I 2.3 Operand I 2.3 Parameter I 3.2 Operand identifier Fig.12 Programmable controllerThe 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)
  41. 41. 41Operand, i.e. what is to be done with?E.g. I 4.5, i.e. with the signal of input 4.5The 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.The statement may include absolute operands, e.g. I 5.1, or symbolic operand, e.g. I LS1. Programming isconsiderably simplified in the later case as the actual plant designation is directly used to describe the deviceconnected to the input or output.Typically, a statement takes up one word (two bytes) in the program memory.STRUCTURED PROGRAMMINGThe 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 relatedsections (e.g. program block for transportation, monitoring, etc.). Further blocks, such as program blocks orfunction blocks can be called from a PB.Organization blocks (OB) contain block calls determining the sequence in which the PBs are to be processed. Itis 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 programmingprocessing. Such an interrupt can be triggered by a monitoring function if one or several monitored eventsoccur.Function block (FB) is block with programs for recurrent and usually complex function. In addition to the basicoperations, the user has a extended operation at his disposal for developing function blocks. The program in a
  42. 42. 42function block is usually not written with absolute operands (e.g. I 1.5) but with symbolic operands. Thisenables 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 areavailable, e.g. for individual controls, sequence controls, messages, arithmetic operations, two step controlloops, operator communications, listing, etc. These standard FBs for complex functions can be linked it the userprogram just like user written FBs simply by means of a call along with the relevant parameters.The Sequence block (SB) contain the step enabling conditions, monitoring times and conditions for the currentstep in sequence cascade. Sequence blocks are employed, for example, to organise the sequence cascade incommunication with a standard FB.The data blocks (DB) contain all fixed or variable data of the user program.CYCLIC PROGRAM PROCESSINGThe blocks of the user program are executed in the sequence in which they specified in the organisation block.INTERRUPT DRIVEN PROGRAM PROCESSINGWhen certain input signal changes occur, cyclic processing is interrupted at the next block boundary and an OBassigned to this event is started. The user can formulate his response program to this interrupt in the OB. Thecyclic program execution is the resumed from the point at which it was interrupted.TIME CONTROLLED PROGRAM EXECUTIONCertain 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 userprogram.
  43. 43. 43 Structured programming PB1 FB2 OB1 PB2 FB3 Program block (PB) Function block (PB)Organisation block (OB) Cycle execution PB FB OB PB FB Interrupt-driven execution PB FB OB Points at which interrupt-driven program can be inserted Start and finish of interrupt-driven program execution
  44. 44. 44 Fig.13 Organisation and execution of a structured user programEXAMPLES OF PLC PROGRAMBefore attempting to write a PLC program, first go through the instruction set of the particular language usedfor the equipment, and understand the meaning of each instruction. Then study how to use these instructions inthe program (through illustration examples given in the manual). Once the familiarization task is over, then startwriting 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.
  45. 45. 45 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.Example 1: Spindle ONPreconditions Feedback elements Address Fault indication Address RemarkTool clamp Pressure switch I 2.4 Lamp Q 2.1Job clamp Proximity switch I 3.2 Lamp Q 1.7Door close Limit switch I 5.7 Lamp Q 4.0Lubrication ON PLC output bit Q 1.0 Lamp Q 7.7Drive ready Input signal from I 4.6 Lamp Q 0.4 Drive unitPB 12 written is the individual function module for spindle ON for all the preconditions checked and foundsatisfactory. This function is required to be executed only when the spindle rotation is requested by the NC inthe 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 thatspindle rotation is requested. Say Flag bit F 100.0 is identified for this information communication. With thisdata, spindle ON function module can be recalled in the organisation block OB1 as follows.OB 1……A F 100.0JC PB12……
  46. 46. 46BENow, spindle ON function module PB12 will be executed only when F 100.0 is set. Otherwise the functionexecution will be bypassed. FLOW CHART PB12 START Comments NO INDICATE AN I 2.4 Tool not clamped TOOL CLAMP = Q 2.1 Display fault lamp FAULT YES NO AN I 3.2 Job not clamped INDICATE = Q 1.7 Display fault lamp JOB CLAMP FAULT YES NO AN I 5.7 Door not closed INDICATE = Q 4.0 Display fault lamp DOOR CLOSED FAULT YES NO AN Q 1.0 Lubrication not on INDICATE = Q 7.7 Display fault lamp LUBRICATION FAULT ON YES NO INDICATE DRIVE READY AN I 4.6 Drive not ready FAULT = Q 0.4 Display fault lamp YES
  47. 47. 47 YESExit STOP ANY FAULT ON I 2.4 Tool not clamped SPINDLE ON I 3.2 Job not clamped ON I 5.7 Door not closed NO ON Q 1.0 Lubrication not on ON I 4.6 Drive not ready R Q 67.3 Reset spindle enable bit BEC Block end conditionally A I 2.4 Tool clamped DO SPINDLE A I 3.2 Job clamped ON A I 5.7 Door closed A Q 1.0 Lubrication ON A I 4.6 Drive ready S Q 67.3 Set spindle enable bit BE Block end END
  48. 48. 47 YESExit STOP ANY FAULT ON I 2.4 Tool not clamped SPINDLE ON I 3.2 Job not clamped ON I 5.7 Door not closed NO ON Q 1.0 Lubrication not on ON I 4.6 Drive not ready R Q 67.3 Reset spindle enable bit BEC Block end conditionally A I 2.4 Tool clamped DO SPINDLE A I 3.2 Job clamped ON A I 5.7 Door closed A Q 1.0 Lubrication ON A I 4.6 Drive ready S Q 67.3 Set spindle enable bit BE Block end END
  49. 49. 47 YESExit STOP ANY FAULT ON I 2.4 Tool not clamped SPINDLE ON I 3.2 Job not clamped ON I 5.7 Door not closed NO ON Q 1.0 Lubrication not on ON I 4.6 Drive not ready R Q 67.3 Reset spindle enable bit BEC Block end conditionally A I 2.4 Tool clamped DO SPINDLE A I 3.2 Job clamped ON A I 5.7 Door closed A Q 1.0 Lubrication ON A I 4.6 Drive ready S Q 67.3 Set spindle enable bit BE Block end END
  50. 50. 47 YESExit STOP ANY FAULT ON I 2.4 Tool not clamped SPINDLE ON I 3.2 Job not clamped ON I 5.7 Door not closed NO ON Q 1.0 Lubrication not on ON I 4.6 Drive not ready R Q 67.3 Reset spindle enable bit BEC Block end conditionally A I 2.4 Tool clamped DO SPINDLE A I 3.2 Job clamped ON A I 5.7 Door closed A Q 1.0 Lubrication ON A I 4.6 Drive ready S Q 67.3 Set spindle enable bit BE Block end END