Cnc machining nm09/2


Writing a program for a machining centre



Download 0.53 Mb.
Page19/27
Date28.01.2017
Size0.53 Mb.
#9464
1   ...   15   16   17   18   19   20   21   22   ...   27

4.19 Writing a program for a machining centre


This instruction introduces a standard format for the writing of a program for the ZenJord Ziegler Machining Centre using the ‘word address’ system. Although there are other program formats which will work on this machine, students are advised that the standard format introduced in this instruction is the only format which will be accepted in this course of instruction.

4.19.1 The job


The example to be used is the ‘slotted base’ shown below. The job is to be clamped as shown with the program ‘zero’ being placed in the bottom left hand comer and identified using the standard symbol.



Figure 4.38 Slotted base


4.19.2 The tool path


The program is a point programme in which the centre of a 10 mm end mill will follow the path shown below.

Remember: Milling program paths are based on the path the centre of the cutting tool would take.





Figure 4.39 Slotted base showing the path of the tool

4.19.3 Operator set up sheets


One of the first tasks in writing a part for any machine is to complete the ‘Operator's Set Up Sheet. See the following example:

Operators setting up sheet - example

The main functions of such a sheet is that it becomes a written copy of what tools offsets are to be used during the machining process. In addition the set up sheets show all of the physical clamping or work holding arrangements showing not only the program zero but just as importantly the position of any clamps or obstructions the programmer will have to consider when plotting the tool path.


4.19.4 Programming format


Although we accept that there are a number of formats or approaches which can be used in writing part programs for a CNC Machining Centre, the format introduced in this guide is designed to provide a logical, simple and safe approach to programming.

4.20 CNC Machining centre program format


You will note that the programming format it is divided into four basic groups, each group represents a particular phase or stage in the programming process.

Machine set up

%MPFI

(Program I. D.)

G71 G90 G94 Gl7 G40

G00 Z0 D0

G54 X0 Y0

G55 X0 Y0





Tool set up

Ml9

M00


T01 D01

(Tool I. D.)

F320 S2000 M03




Machining cycle

G00 Z10

X 10 Y45

Z-2 M08

G01 X130

………….

.................



…………..

G00 Z40 M09





End of cycle

G00 Z0 D0

Ml9


M00

(Remove last tool)

G53 G00 X0 Y0

M02


For the purpose of standardisation and ease of assessment, this programming format is to be strictly adhered to by students.


4.20.1 Group 1 — Machine set up


% MPFI: This is a program identification code which the Siemens 820M MCU requires to accept a part program. The number which follows % MPF identifies the program number.

Program ID: This is a man data which gives the operator prompts. Anything in brackets ( ) will be ignored by the MCU.

G90 G94 G71 G40 G17

Regardless of whether or note the machine is preset, it is good practice to confirm the modes in which you want the control to respond. The order in which you write these commands does not matter.

G90 : This command instructs the control that all tool movement will be ‘absolute ‘, that is to say that all dimensions will be taken from the one datum point. Should ‘incremental’ dimensions be required then the command 091 is used.

G94: The commands 094 and 095 are codes which relate to feed units, G94 will set the control in feed units of mm/min units while G95 sets the control in mm/rev.

G71: If a G71 command is specified all movements will be in mm. Should the inch mode be required then the command used will be G70.

G40: The subject of tool radius compensation will be covered at a later stage of this course however, at this point it is important that prior to any machining, all compensation from any previous programme be cancelled. This is done by including the command G40.

G17: This command sets any contour machining in the X and Y axis only.



G900 Z0 D0

G00: This is a rapid traverse command.

Z0: This directs the Z axis to return to its ‘home’ position.

D0: This cancels any tool offsets which may still be set as modal command.

G54 X0 Y0

G54: The G54 is one of four available positions preset commands which, when executed, will drive the table to what ever the X and Y values specify. These values are preset as ‘zero offsets’ on the MCU.

In this example no matter where the tool may be, the G54 X0 Y0 command will drive the table back to the machine home starting point is rapid traverse.





Figure 4.40

G55 X0 Y0

This command is the second of the four available position preset commands available and is used to drive to the point the programmer has used as the ‘program zero ‘.

Prior to entering a program into the MCU the machine setter must establish the exact distance from the ‘machine home’ to the ‘programme zero’, this is known as setting the zero offsets. The actual distance between the machine home and the programme zero is referred to the ‘zero offset’ and is expressed as an X and Y axis distance.


Setting zero offsets


The methods used to establish these X and Y coordinates can vary from machine to machine. In the case of the Zenfold Machining Centre the zero offset is found by manually driving an edge finding device from the machine home to the selected program zero.



Figure 4.41

The X and Y coordinates, (in this example X-350 and Y-250), are registered in the MCV memory as a zero offset under G55. This remains in memory until deleted by the setter/programmer.

The G55 position preset has an additional function which is executed by the X and Y coordinates which complete the action statement.

In this example shown above:

G55: When this is read, the MCV searches its buffer storage and finds the coordinates registered as G55 -in this case X-350 Y-250. Once found the table is rapid traverse to these coordinates.

X0 Y0: Once the table has reached the target point which in this case is the program zero, the programmer has the option of giving this point any value he/she wants. Because we want this point to be recognised X0 Y0 we specified G55 X0 Y0. (If for some reason a programmer wanted the target point to be recognised by the MCV as X-25 Y-25 then the appropriate command would be G55 X-25 Y-25).

From here on, the MCU only recognises the program zero as X0 Y0 until such time as the G55 X0 Y0 command is cancelled with the modal command G53.

4.20.2 Group 2 —Tool set up


M19: As part of the tool change routine M19 will both stop the spindle revs and jog the spindle into a tool change position.

M00: In most CNC controls M00 is positive stop only. On the Siemens 820M MCU, M00 is a program stop and tool load command. Once the tool has been loaded the MCU ‘cycle start’ must be pressed to resume the program.



T01 D01

T01: Each tool used is given an identification number prefixed by the letter T. T04 is tool 4 which for example may be and 80 mm four tooth carbide face cutter. Check with your class teacher for the correct tool identification codes.

D01: Because of the varying length of tools used on a machining centre, the Z axis distance from the point of the tool (in the home position) to the workpiece surface will vary for each tool. If the programmer had to compensate for the different length of tools when programming the job, it would become very complicated and the possibility of error more likely. To overcome this problem the programmer treats all tools as being the same length in his program. To compensate for the variations in tool length, tool offset codes are used to pre-set the MCU independent of the actual part program.


Setting tool offsets


To set tool offset the setter loads the tool, say T01, into the machine and ensures the spindle is ‘home’ in the ‘z’ axis. The spindle is then manually driven down until the tool touches the top surface’ of the workpiece or a appropriated setting gauge. The distance the tool travelled from the home position to the top face of the work is the tool offset and, is a minus Z value, this distance is entered into the Tool Offset Register as TOOL 1 (T01) OFFSET 1 (D01). The same procedure is repeated for all other tools.

Once the offsets for each tool have been established and registered in the MCU, the programmer can assume that the top face of the workpiece will always have a Z value of Z=Zero. In addition, any Z value above the top face of the workpiece will always be a +Z value while any Z value below the top face reference plane will always be a -Z value.





Figure 4.42 Tool positions after the tool offsets have been established and registered

F 320 S2000 M03

F320: F codes always refer to feed rates, in this example, because the feed has been specified as G94 (mm/min) the 320 refers to 320 mm of feed per mm.

S2000: On the machining centre S values are always statements of R. P. M. In the example the spindle speed would be 2000 rpm.

M03: This command will cause the spindle to start revolving in a clockwise direction. M04 will cause anti-clockwise, MOS will stop all spindle revs until an M03 or M04 command is given.

4.10.3 Group 3 -The machining cycle


G00Z10: This is often referred to as the Initial Level and is a rapid traverse to a safe distance above the Top Face of the workpiece in this case 10 mm above.

X-10 Y45: This position is to set the tool away from the workpiece ready to accept the first full depth cut. Note: This will be in rapid traverse because the previous G00 command remains modal.

Z-2 M08: Rapid traverse to Z-2 (a 2 mm depth of cut). M08 will tum the coolant ON.

G00Z40 M09: At the end of each cutting cycle the tool be raised to a safe stand off position ego Z40. With tool still below the splash guard tum to coolant OFF with the M09 command.


Group 4 -The end of the cycle


G00Z0 D0: With the job completed drive the tool home in the Z axis first with a G00 Z0 D0 command. Note: The D0 is read first, cancelling the tool offset and so making Z0 again the machine home position.

Ml9: Stop spindle and orient for Tool Change.

M00: Stop program and tool change.

G53 G00 X0Y0

G53: This cancels the G54 and G55 position preset and action allows the MCU to once again recognise X0 and Y0 as the ‘Machine Home’.

G00 X0Y0: Rapid traverse back to the Machine Home position.

M02: End of program and reset to start o program.

4.20.4 Sample program

Task

Using the co-ordinates previously calculated in exercise six and the standard program format from page 143, mill a groove 2 mm deep using a 4 mm HSS slot drill (tool number 3).
Result

The following manuscript would represent the complete program ready for production.

%MPFI


(SAMPLE PROGRAM)

N05 G7l G90 G94 G17 G40

Nl0 G00 Z0 D0

N15 G54 X0 Y0

N20 G55 X0 Y0

(************)

N25 M19

N30 M00


(L0AD 4 mm SL0T DRILL)

N35 T03 D03

N40 F300. S3000 M03

(************)

N45 G00 Zl0.0

N50 X195.0 Y62.32 M08

N55 G0I Z-2.0

N60 G02 X120.0 Y19.02 I-50.0

N65 G0I X55.98 Y55.98

N75 G0I X35.0

N80 G03 X15.0 Y80.0 I-20.0

N85 G0I X0 Yl05.98

N90 G00 Z40.0 M09

(**************)

N95 G00 Z0 D0

Nl00 M19

Nl05 M00

(REM0TE LAST T00L)

N110 G53 X0 Y0

N115 M02


Exercise 8 — section 4 — programming practice


Student instructions

  • Referring to NM09 -Exercise 8, and using coordinate geometry calculate the program points for the finishing operation. Remember that the accuracy of calculations is to be to two decimal places.

  • Prepare a hand written manuscript of your program on the work sheet provided and include all appropriate commands written in the standard format introduced in these instructions.

  • Check your program against the example format provided.


Worksheet

Exercise 8 -Hand written program

NC program Programmer's notes (as requested)




Download 0.53 Mb.

Share with your friends:
1   ...   15   16   17   18   19   20   21   22   ...   27




The database is protected by copyright ©ininet.org 2024
send message

    Main page