Design of Interface Hardware and Software for DNC System

Design of Interface Hardware and Software for DNC System


Distributed numerical control (DNC) can be defined as a manufacturing system in which a number of machines are connected by a computer through direct connection. The tape reader is eliminated in DNC, thus relieving the system of its least reliable component. Instead of using the tape reader, the part program is transmitted to the machine tool directly from the computer memory .One of the most important demands of our time is making correct information available at the right time and right place. This demand is satisfied by use of a DNC system.

Installation of a DNC system is the first step towards computer integrated manufacture. A DNC system receives CL data from a CAD/CAM workstation and transfers it to individual machines after post-processing, thus, saving precious workstation time and carrying out error-free data transmission.

One of the main tasks to be carried out by DNC is the provision of unequivocal information paths ensuring efficient supply of information to machines and retrieval of such information as and when required. A condition for moving over from NC technology towards integrated manufacturing is the manner in which information is linked. The current situation characterised by increasing investments in complex manufacturing cells, the linking of machining processes, the reduction in batch sizes and need for shorter deliveries, demands an information supply and retrieval system in which the machines and men are fully integrated.

1.1 Components of a DNC System

The term distributed numerical control is evolved from the direct numerical control. A direct numerical control system consists of four basic components : (i) central computer, (ii) bulk memory , which stores the NC part programmes, (iii) communication lines, and (iv) machine tool.

The computer calls the part program instructions from bulk storage and sendsit to the individual machines as and when required. It also receives data back from the machines. This two-way information flow occurs in real-time. This means that each machine requests for instructions which must be satisfied almost instantaneously.

Similarly, the computer must always be ready to receive information from the machines and to respond accordingly. The remarkable feature of the DNC system is that the computer is servicing a large number of separate machine tools, all in real-til..e.

Depending upon the number of machines and the computational requirements imposed on the computer , it is sometimes necessary to make use of satellite computers. These satellites are minicomputers, and they serve to take some burden off the central computer . Each satellite controls several machines. Groups of part program instructions are received from the central computer and stored in buffers. They are then dispensed to the individual machines as required. Feedback data from the machines are also stored in the satellite'sbuffer before it is collected by the central computer .


There are several functions which a DNC system is designed to perform. These functions are unique to DNC and cannot be accomplished with either conventional NC or CNC system. The functions and advantages of DNC are explained in the following sections.

2.1 NC without Punched Tape

The major objectives of DNC system is to eliminate the use of punched tape. The problems of tape reader are: (i) unreliability of the tape reader, (ii) fragile nature of paper tape, and (iii) difficulties in making corrections and changes in the program contained on the punched tape.

In addition, certain expenses are associatedwith the equipment that produces the punched tape. AU of these costs anc! inconveniences can be eliminated with the DNC approach. The other advantages are data transfer at high baud rate and data redundancy.

2.2 NC Part Program Storage

An important function of the DNC system is storing the part programs. The program storage subsystemmust be structured to satisfy several purposes :

(a) The progIams should be made available for down loading to the NC machine tools, 

(b) The subsystem should allow for editing of programs, 

(c) I  The DNC  soItware should accomplish the post- 

processing function,

(d1'" The part program in a DNC system is typically stored as the CLFILE (cutter location data files). The CLFILE is converted into instructions for a particular machine tool (i.e. post-processing),

(e) The storage system must be structured to perform 

certain data processing and management functions such as file security, display of programs, manipulation of data etc, and
(f) The  computational   flexibility   (edit  and graph). 

2.3  Data  Collection,   Processing  and Reporting

The data collection, processing and reporting functions of DNC concern the direct link from the I central computer to the machine tool in the factory. Another important function of DNC involves the opposite function of transferring data from the machine

tools back to the central computer. Thus the DNC involves a two-way data transfer .

The basic purpose behind the data collection, processing and reporting functions of DNC is to monitor online production in a factory .

2.4 Communications

A communication network is required to accomplish the above three functions of DNC. The essential communication links in a DNC system are between three components of the system: (i) central computer and machine tools, (ii) central computer and NC part programmer terminals, and (iii) central computer and peripherals like plotters, printers, paper tape reader/puncher, coordinate measuring machine and any other optional graphic station.

Five m.ore optional communication links can also be added to the DNC system: (i) computer aided-design (CAD) system, (ii) shop floor control system, (iii) corporate data processing computer, (iv) remote maintenance diagonistics system, and (v) other computer-automated systems in the plant.

These communications are becoming more common as the DNC technology moves towards the computer-integrated manufacturing (CIM) and factory of the future.


The tasks to be handled by DNC are subdivided into a number of working packages. The basic function of a DNC system lies in data management and distribution. The data contents are NC main programs, NC subroutines and NC tool data.

These data contents are managed and distributed by the DNC system. In this context, it primarily replaces what was hitherto practiced in the form of punched tape organisation. NC programs are stored on DNC host computer. The input and output results (NC data) can be affected on the user display screen or alternatively by a printer via an additional graphics package on a plotter or also graphically on screen.

General procedure for CAM operation

Figure 1   General procedure for CAM operation

Data distribution by DNC is quicker and more reliable in comparison with manual systems. The reason for this lies in the unequivocal information flow and secure method of transmission. The current performance level offered by DNC systems mav include the call-up of source programs, CAD clamping sketches and tool drawings on a DNC terminal. These facilities of graphic representation reduce the usage of paper in the workshop; editing functions, zoom functions and dialogue-guided facility interfaces lead to a situation where even relatively unskilled users can find their way very quickly. The simulated machining operations can be seen on the CAD/CAM screen. The output from the system is in the form of CLFILE. Procedure followed for CAM operations is given in Fig. 1. CLFILE is further post-processed to generate the NC tape for specific machine tools.

3.1 Future Projections

This system can be further developed to (i) monitor online status of CNC machines, (ii) report online
machine utilisation, (iii) graphical view of edited part program, (iv) extend memory of CNC machines using PC memory of DNC system, and (v) generate neutral data file for auto measure software thus linking CNC coordinate measuring machines to it.

The system can be integrated to a CIM environment as shown in Fig. 2.


The DNC systems offered in Indian market and their limitations are :

(a) HMT Limited: It supports only 4 CNC machines with RS232 interface. 

(b) Cadem System, Bangalore : Its hand-held portable terminal supports single RS232 port, whereas NC switch supports up to 14 CNC machines using serial RS232 port. 

(c) Comex Systems: It supports 8 CNC machines with RS232. 

(d) Godrej Limited: It supports up to 16 CNC machines with RS232 serial interface, however, it can work on only Godrej workstations. 

(e) Antech Services: It supports 16 CNC machines, however Unix Operting System and serial board are required . 

4.1 Components of a DNC System

CNC machines can be divided into two categories, viz. , machi.neshaving serial RS232 ports, and machines having parallel ports (used by paper tape reader and puncher).

None of the systems as mentioned in Sect.Qn4 above offer information flow to older version CNC machines having p~rallel ports. This necessitated development of a DNC ystem to meet our stringent requirement of information flow to machines having parallel as well serial ports.

Main modules of DNC link design are the workstation at CAD/CAM centre, a PC-A T as host computer, and an interface circuit board.

Here, PC-AT is working as a central (host) computer. It has two serial and two parallel ports. One serial port is used to connect workstation of CAD/CAM centre and the other serial and parallel adaptor ports are used for PC and interface board connection.

Infonnation    dIstrIbutIon   for  a typIcal  environment.

FIgure 2.  Infonnation    dIstrIbutIon   for  a typIcal  environment.

It was decided to go for a configuration of an interface board having 8 serial and 8 parallel ports to meet our immediate requirement of- data transfer to both old (parallel port) as well as new machines (serial port). The CNC machines and programming tenninals are connected through this board. Serial ports work in full duplex mode and the same port is used for data-in and data-out. Machines which do not have a serial port are connected by parallel ports. Each machine requires two parallel ports of interface board, one for reader emulation and the other for puncher emulation. Interface board, was designed for 16 machines, can be extended to support 64 seriaUparallel ports. The over all design is shown in Fig. 3.

The only limitation of the system is that the program can be transferred to one machine at a time. Selection of the connector of interface board was based upon signal requirement. Nonnally, 4 wires are required to establish RS232 protocol and 12 wires are required for emulation of reader and puncher. Thus, a 9-pin connector for serial and a 15-pin for parallel port were selected. A total of nine each of 9-pin and 15-pin connectors were used on interface board. One each of 9-pin and 15-pin connectors is used to connect the PC and rest are used to connect the machines.

Line' drivers were used to connect CAD/CAM system t<;>DNC comp~ter. It is working at 9600 baud rate, 8 data bits, Tlv parity and 2 stop bits. The CAD/CAM system was configured for connection with DNC system. Crosstalk software was used to establish the link -XTK data file was developed and tested for full compatibility. The manufacturing engineer can generate the CLFILE and it can be post-processed from shop-floor to convert CL data into NC data. in this way precious time can be saved for more powerful graphic workstation, and DNC PC can be used for post-processing and punching of the NC data.

4.2 DNC System at DROL

Most of the systems mentioned above can support only RS232 configuration. For the machines not having RS232 port, emulators have to be developed. Considering all the details it was decided to design and develop our own system

Infonnation    dIstrIbutIon   for  a typIcal  environment.

Figure 3. DNC   system   design.

. The basic aim was to send data to different machines with same single port, thus we had to build a prototype model for sending data from one port to two devices (printer and puncher) . For this, we used a scratch printed circuit board. The RS232 level signals were of the range of 9 to 12 and -9 to -12 V. ICs used for prototype model were 1488 (transmitters), 1489 (receiver) 74F244 (tristate buffer) and 74LS138 (decoder). IC 1488 was used to convert RS232 signal to TfL level and IC 1489 was used to convert TfL signal to RS232level. IC 74F244 was used because it can pass the signal only if it is enabled This was used basically for isolation from one machine to other. Decoder 74LS1::S8was used to make only one output as enable signal for buffer. Each buffer has 2 channels for transmission. Each channel has 4 lines, and each buffer is able to handle two machine lines, depending upon enabling. Data terminal ready (DTR) and request to send (RTS) were used as variables to decoder through Modem Control Register (Hex2FC). Power supply required for the above logic circuit was also designed. Requirement of the prototype model was +5.0, +9.0 and -9.0 V. For driver (ICl488) +9.0 and -9.0 V were used and +5.0 V was used for receiver, buffer and decoder. Prototype model was used to transmit data to two mdchines with single port. Once this protocol was established, it was decided to design and manufacture the DNC system to suit our requirements. This includes logic interface card and its power supply. This system was 8\! times faster as compared to puncher/reader option. 


The hardware interface circuit  design is shown in Fig.4.
Infonnation    dIstrIbutIon   for  a typIcal  environment.

Figure 4. Hardware Interface OOard

In this interface board, 4-line-to-16-decoders (multiplexer) are used for addressing a channel- The input lines (4 Nos) for the decoder are si~~ls from the seriaVparallel adapter board of the PC-AT- These signals are manipulated by the machine software device driver in such a way that output of decoder enables tristate buffer to connect a particular machine. When tristate buffer is in disabled state, it does not respond to an input signal. It works like an on-and-off activator , when enabled or disabled. The input signals to buffer are from PC-AT and machines. After activating the buffel-, direct link is between outgoing signal of the PC and incoming signal of CNC machines and vice-versa, while signals from other machines would be isolated from the PC signals. This is the principle for controlling many machines from one port of the PC- For serial communication, three or four wires are required from machine to interface circ:uit, while in parallel communication, 10 or 12 wires are required.

Four control signals used for decoder input are : DTR, RTS, out1 and SLCf IN. First three signals are from serial port and the fourth (SLCf IN) is from parallel port. DTR and RTS signals are of RS232 level and out1 and SLCf IN are of TI1.. level. Signal requirement of decoder input is of TI1..level. DTR and RTS signals are converted to TI1..level using receivers. Out1 signal is tapped directly from the pin No.34 of asynchronous communication chip. SLCf IN signal is taken from pin No.17 of centronics port. Both the signals are passed through driver and receiver before feeding to decoder. Each buffer has two enable signals. Four lines are connected with each enable signal. Four signals, viz. transmit, receive, ready and ground, are required for RS232 port. Thus the system was designed to have a single buffer for two channel communication depending upon enabling the channel. Decoder output at a particular pin will go down depending upon the input combination of control signal. Signal required to enable the tristate buffer is low. Output of decoder is controlled using device driver (software) to enable the known channel. Once a signal channel is open, connection is established between the PC and a single machine. At a time only one ouput of decoder will go low, thus, only one channel will be open. Again this buffer output is fed through driver to convert to RS232 level before sending to the machine. Similarly reverse process is followed to convert the machine'sRS232level signal to TI1.. level before sending to buffer. If XON-XOFF proto( .is selected only three wires are required.

PC signal requirements for parallel port are quite typical. Port requirements for sending the part program to machine and receiving back are different. Since they do not follow any interface protocol, their inflexibility should be taken into account for the inteliace. Signal requirement for sending data to machine is 8 data line and one control pulses. A total of 10 wires are required including ground. Pins 2 to 9 are used for data and pin 10 (ACK) is used to receive the pulse. Pin 25 is used as ground. Besides the above mentioned 10 wires, two more wires are requir'd for receiving the data. Other signal at pin 14 (AUTO FEED XT) is used to establish the emulator for puncher.

Taking consideration of all the above requirements, interface circuit board was designed and net list was prepared.  Net  list is the input  for  doing the printed  circuit board (PCB) design. It   gives pin-to-pin connection of the PCB which was designed on CAD/CAM sys.tem, plotted on photoplotter and was fabricated in DRDL.


Software modules have been divided into three parts: DNC main menu program, CNC machines selection menu program, and device drivers for individual machine.

Main menu selection calls the software programs, as CAD/CAM system linking is done by using the cross-talk software of Microsoft. In this case PC-A T works like vr 100 alphanumeric terminal for the work- station and part program can be transferred from CAD/CAM system to PC disk. It can further be transferred from PC to CNC machine memory after selecting a particular CNC machine. The file editing/viewing menu activates the Norton editor. This menu has been provided separately because file editing is often required, Editor can also be activated in DOS environment, users can use DOS commands like changing of directory , viewing of part program, listing and deleting of part program etc. The menu, PC to CNC machine or CNC machine to PC, calls the machine selection menu and choice of machine selects the particular device driver written for that machine thus, the part program transfer takes place. The complete structure of the software is shown in Fig. 5.'
 Software structure or DNC.

Figure 5.  Software structure or DNC.

DNC main menu program and CNC machines selection menu program are written in BASI C language . The device drivers for serial ports with XON-XOFF protocol and Handshake protocol are written in BASIC and ASSEMBL y languages. ASSEMBL y programs are required to develop the device driver for parallel ports to emulate the reader and puncher . Synchronisation of timings are very critical in both the cases. Interface timings for reader and puncher are given in Figs 6 and 7.

Design of Interface Hardware and Software for DNC System

If reader drive pulse is received from the CNC system, data is stored in the system by the leading edge of the drive pulse. The available read area following initiation of the drive pulse is 2.9 ms and the read area for the next character begins 6.1 ms after the drive pulse initiation regardless of the drive pulse frequency. This time difference is required for the outputs to stabilise. The output data must be gated into the CNC System during the code read area shown in the Fig. 6.

The puncher interface will accept data upto 1 after the leading edge of the PUNCH signal. The data

should be true for at least 200 Jls after the leading edge of the PUNCH signal or until READY goes to I; it can then be changed. to the next character at any choosen time prior to the next PUNCH signal. The PUNCH signal should have a minimum duration of 100 Jls or stay low until READY goes to I, and there must be a gap of at least 200 Jls between the trailing edge of a PUNCH pulse and the leading edge of the following PUNCH pulse. A PUNCH order should only be ,given when the interface is READY, otherwise the character will be ignored.

6.1 Constraints of Software

Reader and puncher ports are used for loading and unloading the part programs. The interface constraints and parity requirements were considered while developing the emulator for reader and puncher. Basic programs are not able to control the interface timings thus programs in ASSEMBL y language were developed to control interface timings.

Other problems faced during developing the device driver of parallel port was distance consideration. Initially the device driver was developed keeping the PC near the CNC machine. When distance between the PC and CNC system was increased, the same device driver was not working properly due to propagation delay. This delay was taken into consideration, while developing the device driver .


Initially NC uao.dgenetated from CAD/CAM was punched and then brought to the shop-floor for loading to CNC machines. Since most of the aerospace components are complex in shape and contour, the system generates lot of data for machining. Usually errors occur in tape punching and reading, thus requiring checking and editing the program after loading into CNC control. Sometime part program requires more memory than that available on the machine. It was observed in certain cases that loading the part program was taking more time compared to actual cutting time of the machine. It was decided to use the DNC system to cut dGNOunproductive time and transfer of error-free data to machine tool.


The DNC system is used to transfer part programs from CAD/CAM system to CNC machines and vice-versa. It can be used as a alphanumeric terminal to CAD/CAM system for developing post-processors, generating CL data off-line, post-processing, etc. This system at present supports up to 16 machines for part program transfer including 8 for serial ports and 8 for parallel ports. It can be extended to 64 CNC machines depending upon the requirements. The only limitation of this system is that it can transfer part program to single machine at a time. This limitation is insignificant considering the high speed (9600 baud rate) data transfer. Even part program transfer of 24 Kbytes takes, only 25 s at 9600 baud rate. The data transfer speed attainable with this system is 8 times over the existing puncher/reader .

DNC System software is menu-based and interactive. This system will cut down the unproductive time of CNC machines by fast and error-free data transfer. It facilitates the quick intra-transfer of jobs in the case of CNC machine breakdown. There is considerable saving in utilisation of CAD/CAM workstation "by doing most of the post-processing operation from. the shop-floor, thus, relieving the workstation to do the graphical operation. It is able to support old CNC machines which do not have standard interface port. This system gives a major advantages where part program storage is small. Large sizes of programs can be broken in smaller segments to facilitate its loading to memory .Once a segment of program is executed, it can be deleted from the memory and next segment of the program can be loaded. Taking cost factor into consideration, this is an ideal system to integrate the CNC machines for part program loading/unloading.