Upload
yohannes-gebre
View
217
Download
0
Embed Size (px)
Citation preview
7/30/2019 201003231433[30653] (1)
1/66
Unit 4: Computer Numerical Control Systemthe basics of the core of CNC machine tool-CNC unit:
functionsworking principleshardware configuration and
software structure
to view the main features of CNC unit in more general terms:
stressing why things are handled the way they are even more than the
specific techniques used with any one particular CNC machine toolbe able to easily zero in on any kind of CNC machine tool
two typesnumerical control (NC)
(have to read the program each time a part is runthey have no means of
editing existing programs)
computer numerical control (CNC)
(can store and allow editing of loaded programs)
7/30/2019 201003231433[30653] (1)
2/66
4.1.1 NC systemThe NC machine can be divided into three basic areas:
control unit + drive mechanisms + the machine
The most basic function of any NC machine is automaticprecise
and consistent motion control
All forms of NC equipment have two or more directions ofmotion--called axes
These axes can be precisely and automatically positioned along their
lengths of travel.
The two most common axis types are linear(driven along a straight path)
and rotary (driven along a circular path)
7/30/2019 201003231433[30653] (1)
3/66
conventional machine tools: motions are by manually turning
cranks and hand-wheels
NC machines: motions are actuated by servomotors under
control of the NCand guided by the part program
themotion type (rapid, linearand circular)
the axes to movetheamount of motion
and themotion rate (feed rate) are programmable
7/30/2019 201003231433[30653] (1)
4/66
An NC command tells the drive motor to rotate a precise amount of angle
The rotation of the drive motorin turn rotates the ball-screw
The ball-screw drives the linear axis
A feedback device at the opposite end of the ball-screw allows the control
to confirm that the commanded number of rotations has taken place
7/30/2019 201003231433[30653] (1)
5/66
numerical data :for controlling the relative motion between cutting tool and piece part
the component dimensions
( from engineering drawings--the geometric data),
to define feed rates,
spindle speedstool identification numbersand miscellaneous functions
(to perform such operations as tool or
work changingor coolant control--the technological data).
The combination ofall this numerical information
in a sequence is a part program
the process ofcreating the data in a correctly structuredformat is programming
Numerical controls use standard microelectronic modules that havebeendeveloped forcomputer hardware (special modules needed in servo-
control circuits )
7/30/2019 201003231433[30653] (1)
6/66
4.1.2 CNC system and functions of CNC unitControls today are soft-wiredwhich allows greater
flexibility in changing and upgrading the computer control
The modern CNC machine tool issoftware drivencomputercontrols are programmed instead of hard-wired
CNC system: is a special computer system that is equipped
with certain interface circuits and servo driversand can dopart or all the works an NC system do by running the software
stored in its memories
CNCs have expandable memories that can store
large numbers of programsplus subroutines
and correction dataextensive memory capacity : sophisticated graphic displays
and dynamic simulation
7/30/2019 201003231433[30653] (1)
7/66
CNCs comprises: CNC unit
feed motion servo subsystem
spindle servo subsystem
and some auxiliary control cells.
Operation panel
I/O DevicesCNC
Control Unit
PLC
Keyboard
Spindle servo cell
Machine tool I/O circuits and devices
Spindle driver
Feed motion
servo cells
Detect device
Feed drivers
Machine
tool
7/30/2019 201003231433[30653] (1)
8/66
CNCs comprises: CNC unitfeed motion servo subsystem
spindle servo subsystem
and some auxiliary control cells.
7/30/2019 201003231433[30653] (1)
9/66
CNC unit is the core of the whole CNC system
It is composed ofhardware and software
Hardware: is made up of microprocessors
electronic memory modules
I/O interfaces,
and position control modulesetc
software controls all functions of the machine,
manages all local programming,
and graphic simulation of the cutting
7/30/2019 201003231433[30653] (1)
10/66
7/30/2019 201003231433[30653] (1)
11/66
hardware and the software work together to doall functions:
graphic display, HMI (Human-Machine Interface)
system diagnosis
implementing of various complex tool-path controlling,
compensation algorithms
intelligent controlling
online programming
and Web communicationsetc)
7/30/2019 201003231433[30653] (1)
12/66
main functions and features of CNC unitControlling function
the number of control axes and synchronously control axes:linear axes and rotate axes, basic axes and auxiliary axes
(The more the number of controlled axesespecially the number of axes
being controlled synchronouslythe more powerful functions of the CNC
unit, and the more complex structure of the CNC unitthe more difficulty
of programming.)
Preparatory functionG function, describes the motion modes of CNC machine
The motion modes comprise instructions of basic motions
dwellplane selections,coordinate system settings
tool compensations
reference point return
fixed operation circles
and metric/inch unit transferetc
7/30/2019 201003231433[30653] (1)
13/66
Interpolation functioninterpolation by using software real-time calculations
Linear interpolationcircular interpolationhelical interpolation
and polar coordinate interpolation
Feed functionFeedrate designation
(machining centers only allow the feed rate to be specific in per-minute
format: inches or millimeters per minute;
Turning centerswhich have position encoders in their spindlesalso
allow feed rate to be specified in per-revolution format: inches ormillimeters per revolution)
Feed Rate Override:multiple position switchon control panel
allows the operator to change the programmed feed rate during cutting
(The switch is usually segmented in 10 percent increments
that range from 0 percent through 200 percent )
7/30/2019 201003231433[30653] (1)
14/66
7/30/2019 201003231433[30653] (1)
15/66
Rapid motion
to minimize non-productive time during the machining cycle
to command motion at the machines fastest possible rate
Common uses for rapid motion: non-cutting motion
| include :
positioning the tool to and from cutting positions
moving to clear clamps and other obstructions
7/30/2019 201003231433[30653] (1)
16/66
Spindle function
specify the spindle speedOn operation panelthere is a button to turn the spindle on andoffas well as a rheostat to control spindle speed
Miscellaneous functionallow a variety of special functions
Miscellaneous functions aretypically used asprogrammable switches
(spindle on/offcoolant on/offand so on)
C f
7/30/2019 201003231433[30653] (1)
17/66
Compensation function
allow the CNC user to
allow for unpredictable conditions related to tooling
Tool length compensationcutter radius compensation
and tool nose radius compensationenable the CNC machine to adjust cutting tool to zero in the right
position
when wear occurs on cutter tool or changing of cutting tool
Technical parameters compensation,( fixture offset
NRZ(Non-return-to-Zero) of axis while counter-movingdistortion of machine tool
any unpredictable situations during programming
a form of compensation to deal with the problem
7/30/2019 201003231433[30653] (1)
18/66
Enhanced functiongraphic display function
CRT or LCD displayer: show programsparametersvarious
compensation datacoordinatesfault information
part graphs;
monitor dynamiccutter tool paths while machining
Self-diagnosis functionvarious diagnosis programs : prevent faults occurring
or going worse
to sho rten the t ime of brok en-down
Communication function
RS-232-C communications (serial) port personal computers
Some form of communications software allow transmissions
7/30/2019 201003231433[30653] (1)
19/66
communications networks------usually referred to asDNC systems
Some CNC units support for MAP(Manufacturing Automation Protocol)
connect with industry communication nets to
fulfill the needs of FMS and CIMS
P i f ti
7/30/2019 201003231433[30653] (1)
20/66
Programming function
Manual programmingall CNC programmers should have a good understanding ofmanual programming techniques regardless of whether or notthey are used
conversational (shop-floor) programming
created using graphic and menu-driven functionsvisual check
and CAM system programminghelps the programmer in three major areas
keeps the programmer from having to do math calculations
makes easy to prog ram di f ferent k inds o f machineswith thesame basic language
helps with certain basic machining pract ice func t ions
4 2 Functional interface
7/30/2019 201003231433[30653] (1)
21/66
4.2 Functional interface
between hardware and software in CNC unitCNC unit : hardware + software
work together to perform all functions of CNC unit
different characters:
Hardware higher speedmore expensive
software flexibleslow on processingproportionbetween hardware and software is determined
by cost-performance of the CNC unit
(In the earlier NC equipmentsall functions were implemented by hardware;computer was introduced into CNC system)
participations of computerdifferent in different CNC units
in different time
7/30/2019 201003231433[30653] (1)
22/66
four different functional interfaces between hardware and software:
Program
Input
Interpola
tion
Positio
n
Pretreatm
ent
Speedcon
trol
Servom
otor
DetectorHard
ware
Software Hardware
Hardware
Hardware
Software
Software
1
2
3
4 Software Hardware
7/30/2019 201003231433[30653] (1)
23/66
4.3HARDWARE ARCHITECTURE OF CNC UNITMicro-processors + electronic memory modules
+ I/O interfaces + position control modules
7/30/2019 201003231433[30653] (1)
24/66
Types of CNC Unitdetermined by the architecture of printed circuit
boards:
All-in-one board architecture and multi-functionalmodules architecture
determined by the number of microprocessors:single microprocessor and multi-microprocessors
determined by the manufacturing fashions:ordinary personal computer architectureand special purpose architecture
determined by the opening degree :close architecturePC-plug-in-NC architectureNC-plug-in-PC architecturesoftware based open architecture
7/30/2019 201003231433[30653] (1)
25/66
All-in-one board architectureComprises:
main boardposition control cardPLC carddisplayer card
and power supply
Main board is a big printed circuit board
other functional cards are small size
each is installed in a card rack on the main board
M lti f ti l d l hit t
7/30/2019 201003231433[30653] (1)
26/66
Multi-functional modules architecture
CNC unit is divided into several function modules:
CNC control moduleposition control card
PLC cardgraph display card
and communication card, etc
Hardware and software are designed withmodularization method each function module is made
of printed circuit of same size
customers can establish their own CNC units by
combining theirselected function modules into the
card racks of a motherboardconnected by industry
standard busIPC bus or STD bus
e g : a holonomic CNC lath system of this architecture
7/30/2019 201003231433[30653] (1)
27/66
e.g.: a holonomic CNC lath system of this architecture
modules can be connected together by industry standard bus: IPC (Industry PC) bus or STD bus
Si l i hit t
7/30/2019 201003231433[30653] (1)
28/66
Single microprocessor architecture
only one microprocessor (on duty of controlling and
occupying the system bus )which processes various
NC tasks by time-sharing in a centralized controlway
simple and can be implemented easily
centralized controllingits performances and abilities
are limited by the byte lengthdata widthaddress
abilityand calculating speed of microprocessor.
M lti i hit t
7/30/2019 201003231433[30653] (1)
29/66
Multi-microprocessors architecture
three kinds of multi-microprocessor architectures:
distributed systemmaster-and-servant systembus based multi CPU system
distributed system
7/30/2019 201003231433[30653] (1)
30/66
distributed system
a communication network route between microprocessors
Interactions within microprocessors and shared resourcesvia network communication technology
7/30/2019 201003231433[30653] (1)
31/66
Master-and-servant systema master microprocessor: control the bus;
access the resources attached with the bus;
control and monitor servant microprocessors;
coordinate the operations of servant microprocessors;
(others) servant microprocessors:do what the master microprocessor command;
cannot do decision-making and scheduling;
all independent systemsThe communication:
by interactive responses through I/O interface
or by duplex RAM
7/30/2019 201003231433[30653] (1)
32/66
Bus based multi CPU system
7/30/2019 201003231433[30653] (1)
33/66
Bus based multi CPU system
each CPU can directly access all the system resources,
can use all of theirown resources freely and independently
CUPs compete to occupy the parallel bus ??
bus-intermediatoris used
to assign and manage priority of each CPU
a parallel main bus links several microprocessor systems
Microprocessors cannot be divided into master and servant:
at one timeonly one CPU with higher prioritycan use the parallel bus
7/30/2019 201003231433[30653] (1)
34/66
IPC based CNC system
7/30/2019 201003231433[30653] (1)
35/66
IPC based CNC system
CNC unit : base on industry computer (IPC) platform
built by plugging in certain control cards and NC software
IPC platform has made CNC unit cheaper and cheaper
and easily be substituted when fault occurs
7/30/2019 201003231433[30653] (1)
36/66
NC plug in PC
7/30/2019 201003231433[30653] (1)
37/66
NC-plug-in-PC
IPC+ PMAC (Programmable Multi-Axis Control Card )
|
plugged in the card rack of IPC
( On PMAC cardhigh speed DSP is used as CPU
high performances on motion control and PLC control )
PMAC card(itself is a NC system)can be used independently:
Its opened prog rams l ibrary package
can be used on Windows p lat form
to establish con trol systemas users purpo se.
open architecture motion control
4 4 CNC SYSTEM SOFTWARE
7/30/2019 201003231433[30653] (1)
38/66
4.4 CNC SYSTEM SOFTWAREIn CNC system: software codes fall into two groups
user software and system software
User software: part program
7/30/2019 201003231433[30653] (1)
39/66
User software: part program
It is compiled into a program with various G-codes and
M-codes
according to the process sequence
System software: an operating system
It is specifically designed for the type of machine that itis destined to control.
be sorted into two packages
managing sof twareand con tro l sof tw are
To execute the part program:
7/30/2019 201003231433[30653] (1)
40/66
To execute the part program:
CNC unit compiles the codes into the format
does preparatory and interpolation functions
(control software)
all functions of control software are implemented
under the supervision and coordination of
(managing software)
system software
previously written in Assemble Language
achieve higher executing speed
take more time in the course of development;
now written in advanced languagessuch as C orC++etc
4.4.2 Control Software
7/30/2019 201003231433[30653] (1)
41/66
4.4.2 Control Software(main functions of a CNC system)
does the following work by correspondingsubroutines
(1) Compiling the part codes inputted by userspart codes: in ISO orEIA formatCompiler: translatetrim and store
decode and do decimal-binary transitions
calculate tools center path considering tool radius offset
pre-calculate some constants used in interpolation andspeed control process
Objective of pre-process:save time for real-time interpolation calculations
( can be done before machining
or in the idle intervals while machining)
(2) Interpolation calculations
7/30/2019 201003231433[30653] (1)
42/66
(2) Interpolation calculations
to assign electrical pulses for axes
a strict real time program:
demands as less as possible number of instruction codes
to shorten the time for performing interpolation calculations
time is determinative
combine rough interpolation and fine interpolation:
software : rough interpolation
that interpolates a tiny line each time
Hardware: fine interpolation
by turning the tiny line into a series of
single pulses
and outputting the pulses
(3) Speed control
7/30/2019 201003231433[30653] (1)
43/66
(3) Speed control
aims at controlling the speed of pulses assigning(controlling the frequency of interpolation calculation)
to guarantee the preset feed velocity
speed control subroutine: automatically speed up or slowdown the velocity to avoid pace-loss
implemented by:software method (software t imermethod)
hardware means (velocity code controlling an osci l latorthen by in terrupts or quer iesto guarantee the feed velocity)
Further more:
7/30/2019 201003231433[30653] (1)
44/66
Further more:
software combining with speed integrator hardware
Software: processing the speed control data
+ Speed Integrator Hardware
constant compound velocity controllingcan be realized
the feed velocitycan be improved greatly
(4) Position control
7/30/2019 201003231433[30653] (1)
45/66
(4) Position control
position loop of servo system
done by either software or hardware
Position control software:
7/30/2019 201003231433[30653] (1)
46/66
Position control software:
comparesinterpolation-calculated position
with real measured position
in each sampling cycle
control the motor using the difference
adjustthe magnification of the position loop circuit
compensatethe error of screw pitch
the non-return-to-zero when reverse the motion
location precision be improved
Position control implements functions on calculations:
7/30/2019 201003231433[30653] (1)
47/66
p
4.4.3 Managing Software
7/30/2019 201003231433[30653] (1)
48/66
Managing software is composed of :
part program I/O,
display (part programtool position
system parametersrunning status,
alarm informationstatic and dynamic tool path)
diagnosis codes (by which CNC unit can carry out
self- diagnosis and spot the faults)
two groupsdepends on hardware: manages and drives peripheral equipment
performs real time processes
independent of hardware: manages timetasksmemory,synchronizes various procedures
the capability of parallel processing:
7/30/2019 201003231433[30653] (1)
49/66
p y p p g
many function procedures (e.g.: preparatory functions
and interpolation process)
need to be implemented in parallel
Input
Display Control
Diagnosis I/O
Encoding
Compensation
Speed process
Interpolation
Position
processing
Preparatory functions
the capability of real time processing:
7/30/2019 201003231433[30653] (1)
50/66
p y p g
tasks ofhigher priority will be implemented in time
tasks with lower priority will wait in queue
(For examplefrom the point of view ofurgency
collision detecting procedure should havehigher priority
than information display procedure)
CNC system can react to the event (s) in time
system will keep in a safe status
Parallel process means:
7/30/2019 201003231433[30653] (1)
51/66
p
computer implements two or more tasks at the same time
or within the same time interval
improve the processing speed greatly
methods to realize parallel process:time overlap: based on flow line techniquestaggers the processing time of
procedures
makes many procedures at the same
time.
7/30/2019 201003231433[30653] (1)
52/66
resource-sharing: based on time-sharing principle
7/30/2019 201003231433[30653] (1)
53/66
g g p p
many procedures occupy CPU processing time in turn
Real time processmeans:
7/30/2019 201003231433[30653] (1)
54/66
p
CNC system react in time to
the requests and events of system
methods to realize real time process:
Interruption technologymany types of interruption
external interruption: external monitor interruption,
input interruption of keyboard / operation panel;
internal timer Interruption: interpolation loop interruption,
position sampling interruption;
7/30/2019 201003231433[30653] (1)
55/66
hardware fault interruption:memory errortimer error
timeout during interpolation calculation
hardware fauIt (sent out by hardware fauItdetectors when fault occurs)
software interruption:the alarm interruption when there is exception
during software execution
e.g. : various overflow error and reset
4.4.4 Architecture of CNC System Software
7/30/2019 201003231433[30653] (1)
56/66
y
organizing and managing modeof CNC system software
two different architectures
tandem architecture
interruption architecture
tandem architecture
7/30/2019 201003231433[30653] (1)
57/66
CNC system software is divided into two groups
foreground application:a real time interruption service program
Realize: the real time functions(interpolation calculationposition controllogical control of machine tool, etc.)
background application: a loop running program
Realize: the input of part program
some preparatory processes
(encodingtool compensation calculationspeed calculation)
manages tasks of procedures
work cooperatively
The system program carried out in the courses
7/30/2019 201003231433[30653] (1)
58/66
firstsystem startup
secondinitializing process
then entering the loop executing of background application
During executing of background application
real time interruption procedures intervene every now and then
to implement real time controls
7/30/2019 201003231433[30653] (1)
59/66
Executed by
interrupting
Foregroundapplication
Fault process
Position control
Interpolation
calculation
...
Executed in
loop
Backgroundapplication
Encoding
Display
Tool compensation
Speed calculation
Input/Output
Interruption architecture
7/30/2019 201003231433[30653] (1)
60/66
no distinction of background and foreground applications
initializing procedure+ interruption service procedures
with different priorities
a large multilevel interruption system
I i i li i
7/30/2019 201003231433[30653] (1)
61/66
Initialization
Interruption manage system (hardware+software)
0leve
linterruptserv
ice
1leve
linterruptserv
ice
2leve
linterruptserv
ice
Nl
evelinterruptservice
7/30/2019 201003231433[30653] (1)
62/66
e.g. Tasks div is ion and their pr ior i t ies
7/30/2019 201003231433[30653] (1)
63/66
in HuaZhong I system softw are
eight types of tasks with different priorities (from high down to low): Position control (4 ms)
Interpolation calculation (8 ms)
Data collection (12 ms)
PLC task (16 ms)
Tool compensation task (condition (buffer) drivable)
Program codes interpreting (condition (buffer) drivable)
Dynamic display (96 ms)
HMI: Human-Machine-Interface (menu managedloop continuously);
Position control task has the highest priority:hence has the shortest invoking time interval 4 ms
HMI task has the lowest priority:
is an infinite loop procedure that starts only one time
7/30/2019 201003231433[30653] (1)
64/66
Real Time Operating System -----RTOS
CNC
7/30/2019 201003231433[30653] (1)
65/66
,
7/30/2019 201003231433[30653] (1)
66/66
,
TCB
CNC
CNCCNCPCDOS
WINDOWSCNC
DOS WINDOWS