Navigation

  • Page 1

    Program constructionProgram:The most controller are using as a job controllanguage the symbols from the DIN66025.After this the partprogram are contains asequence of lines.A line contains several words.A word contains a letter and a number.Part program:24N10 G50 S2500N20 G0 X500 Z500N30 G0 X50 Z2...

  • Page 2

    Line:N20 G0 X500 Z500Word:Address NumberThe separate line contains:• Program technical information.• Geometrical information.• Technical information.24X 500OKUMA

  • Page 3

    Program technical information:For the execution of the program are necessary.For example : + Plus— Minus. decimal point Geometrical information.Means motion of some axis in the machine, theword for the motion is from that address G( Engl. Word for Go ) and some numbers behind.The most imp...

  • Page 4

    Technical information.F = FeedrateT = ToolS = SpindlespeedM = additional functionFor example:F – command = F0.25 ( mm/rpm )T – command = T0101 ( Tool no. 1 )S – command = S1000 ( 1000 rpm )M – command = M03 ( spindle direction CW )25OKUMA

  • Page 5

    Main Address CharactersMain Address Characters•N Block Number• G Preparatory Function (See List)• XDiameter Value• ZLength Value• FFeedrate (mm/min or mm/rev)•(or Dwell time in seconds)• SSpindle Speed (m/min or rev/min)• TTurret Station/Offset Number• M Miscellaneous Function (...

  • Page 6

    Lesson with G01Lesson with G01G50 S4500G00 X500 Z500G00 X0 Z2 T0101 G96 S250 M03 M08G01 Z0 F0.15G01 X40G01 Z-20G01 X60G01 Z-50G01 X100 Z-80G01 X140G01 Z-110G01 X160G01 Z-130G00 X500 Z500 M09M02NoteThe G00 command means that the machine will move with rapid feedrate , the rapid feedr...

  • Page 7

    Lesson with G85 Lap cycleLesson with G85 Lap cycleProgram construction for G85 Lap cycleG50 S4500G00 X500 Z500G00 X160 Z2 T0101 G96 S250 M03 M08G85 NAP1 D5 U0.5 W0.1 F0.35F = FeedrateW = Stock removal in ZU = Stock removal in XD = Cuttingdepth in diameterNAP1 G81G81 = Cutting direction...

  • Page 8

    Exercise G85 /G81Exercise G85 /G81OKUMA28 ( 29 )

  • Page 9

    Lesson G85 Lap Cycle in X Lesson G85 Lap Cycle in X -- DirectionDirectionBlank material D= 162Program construction for G85 Lap cycle in X -DirectionG50 S4500G00 X500 Z500G00 X162 Z2 T0101 G96 S250 M03 M08G85 NAP1 D4 U0.5 W0.1 F0.35NAP1 G82G0 Z-110G1 X140G1 Z-80G1 X100G1 X60 Z-50G1 Z-20G1 X40 ...

  • Page 10

    Exercise G85 / G82Exercise G85 / G82OKUMA31 ( 32 )

  • Page 11

    Lesson G85 Lap Cycle in Z Lesson G85 Lap Cycle in Z –– direction with blank direction with blank contour definitioncontour definitionG50 S4500G00 X500 Z500G00 X165 Z2 T0101 G96 S250 M03 M08G85 NAP1 D4 U0.5 W0.1 F0.35NAP1 G83G – Code for blank materialG0 X0 Z5G1 X45G1 Z-15G1 X65 Z-45G1 X...

  • Page 12

    Exercise G85 / G83Exercise G85 / G83OKUMA34 ( 35 )

  • Page 13

    Lesson G85 Lap Cycle with G84 changing cutting Lesson G85 Lap Cycle with G84 changing cutting conditionconditionBlank material D= 162Program construction for G85 Lap cycle with changing cutting conditionG50 S4500G00 X500 Z500G00 X165 Z2 T0101 G96 S250 M03 M08G85 NAP1 D4 U0.5 W0.1 F0.35 $ G84...

  • Page 14

    Lesson G87 Lap Cycle finish cutting cycleLesson G87 Lap Cycle finish cutting cycleProgram construction for G87 finish cutting cycleProgram construction for G87 finish cutting cycleG50 S4500G00 X500 Z500( OD Rough )G00 X162 Z2 T0101 G96 S250 M03 M08G85 NAP1 D4 U0.5 W0.1 F0.35 G84 XA=100 ZA=2 ...

  • Page 15

    Lesson G76 automatic roundingLesson G76 automatic roundingProgram construction for G76 automatic roundingG50 S4500G00 X500 Z500G00 X165 Z2 T0101 G96 S250 M03 M08G00 X0G01 Z0 F0.1G01 G76 X40 L2G01 G76 Z-20 L3G01 G76 X60 L4G01 G76 Z-40 L5G01 X85G00 X500 Z500 M09M0238OKUMA

  • Page 16

    Lesson G75 automatic chamferingLesson G75 automatic chamferingProgram construction for G75 automatic chamferingG50 S4500G00 X500 Z500G00 X165 Z2 T0101 G96 S250 M03 M08G00 X0G01 Z0 F0.1G01 G75 X40 L2G01 G75 Z-20 L3G01 G75 X60 L4G01 G75 Z-40 L5G01 X85G00 X500 Z500 M09M0239OKUMA

  • Page 17

    Lesson Taper cutting by angle designation and G76 Lesson Taper cutting by angle designation and G76 functionfunctionProgram construction for Taper cutting by angle designation and G76 functionG50 S4500G00 X500 Z500G00 X165 Z2 T0101 G96 S250 M03 M08G00 X0G01 Z0 F0.1G01 X40G01 G76 Z-17.5 A170 L...

  • Page 18

    START POINTOF ANGLE0°90°180°270°-180°-270°-90°A VALUEDIRECT ANGLE COMMAND135°-225°OKUMA41

  • Page 19

    Lesson Taper cutting Lesson Taper cutting byby angle designation and G76 angle designation and G76 functionfunctionProgram construction for Taper cutting by angle designation and G76 functionG50 S4500G00 X500 Z500 G00 X165 Z2 T0101 G96 S250 M03 M08G00 X0G01 Z0 F0.1G01 X40G01 G76 Z-17.5 A170 L...

  • Page 20

    OKUMA43 ( 44 )

  • Page 21

    Lesson G71 thread cuttingLesson G71 thread cuttingG71 X 47.4 Z-40 H2.6 D0.25 U0.04 B60 F2 M73 M33Thread cutting modeInfeed patternPitchInfeed angleStock removal First cutting depth Thread heightZ - coordinate for end pointFinal diameter of thread G50 S2500G00 X500 Z500G0 X54 Z4 T0101 G97 S510 M...

  • Page 22

    Lesson G71 thread cutting cycleLesson G71 thread cutting cycleB60 M34Straight Infeed along thread Face ( right Face)B60 M33Zig zag InfeedB60 M32Straight Infeed along threadFace ( left Face )Cuttingdepth calculation:M73 Infeed is made by D ( in diameter ) in each thread cutting cy...

  • Page 23

    Lesson G73 Grooving cycleLesson G73 Grooving cycleProgram construction for G73 grooving cycleG73 X20 Z-70 K4 D2 L10 E0.2 Dwell timeTotal Infeed amount to the cutting start pointDepth of cut per peck feedShift amount to the startpoint Endpoint in ZFinal diameter in XG50 S2500G00 X500 Z500G...

  • Page 24

    Lesson G74 Drill cycleLesson G74 Drill cycleProgram construction for G74 drill cycleG74 X0 Z-70 D20 L40 E0.2 Dwell timeTotal Infeed amount to the cutting start pointDepth of cut per peck feedFinal point in ZEnd point in XG50 S2500G00 X500 Z500G00 X0 Z4 T0404 G97 S1500 M3 M42 M08G74 X0 ...

  • Page 25

    LessonLesson CutterradiusCutterradius compensationcompensationRecognition aid for different cutting direction during works with automatic cutting radius compensation.One sees in the direction of feedrate (arrows) and the tool is to the right of the outline, than it is necessary to program G42.If ...

  • Page 26

    LessonLesson CutterradiusCutterradius compensationcompensationZ OFFSETX OFFSETRADIUS CENTREOKUMA50

  • Page 27

    Lesson G41/G42 Cutter radius compensationLesson G41/G42 Cutter radius compensationProgram construction for cutter radius compensationG50 S4500G00 X500 Z500G00 X165 Z2 T010101 G96 S250 M03 M08G00 X0G01 G42 Z0 F0.1G01 G76 X40 L2G01 G76 Z-20 L3G01 G76 X60 L4G01 G76 Z-40 L5G01 X85G40G00 X500 ...

  • Page 28

    Lesson Sub program callingLesson Sub program callingProgram constructionG50 S4500G00 X500 Z500G00 X165 Z2 T010101 G96 S250 M03 M08CALL OSUBG00 X500 Z500 M09M02OSUBG00 X0G01 G42 Z0 F0.1G01 G76 X40 L2G01 G76 Z-20 L3G01 G76 X60 L4G01 G76 Z-40 L5G01 X85G40RTSNote:To call an Subprogram in a main p...

  • Page 29

    Macro’sMacro’sWhat is a Macro?A group of instructions, which arepossible to store and called as anunit, this make it possible the reducethe time of programming forrepeatable jobs or family parts.53OKUMA

  • Page 30

    Variables Function:In OSP controller it is possible to use 5 kind of Variable.1.)Common variables2.)Local variablesCommon VariablesThe term ”common” in ”common variables” can be literally understood as common; they can be used incommon for main and subprograms. When the same variable is u...

  • Page 31

    [Details]A local variable cannot be assigned the same name as already used for afunction name, comparison operator, Boolean operator, or extended addresscharacter.Extended address characters are provided to realise LAP, pattern processing,and user-specific fixed cycles. They are necessary because...

  • Page 32

    Lesson with common variableLesson with common variableV1=40V2=20V3=60V4=50V5=100V6=80V7=140V8=110V9=160G50 S4500G00 X500 Z500G00 X=V9 Z2 T0101 G96 S250 M03 M08G01 X0 Z0X=V1Z=-V2X=V3Z=-V4X=V5 Z=-V6X=V7Z=-V8X=V9G00 X500 Z500 M09M0256Program construction with common variableOKUMA

  • Page 33

    Lesson with local variableLesson with local variableDIA1=40LEN2=20DIA3=60LEN4=50DIA5=100LEN6=80DIA7=140LEN8=110DIA9=160G50 S4500G00 X500 Z500G00 X=DIA9 Z2 T0101 G96 S250 M03 M08G01 X0 Z0X=DIA1Z=-LEN2X=DIA3Z=-LEN4X=DIA5 Z=-LEN6X=DIA7Z=-LEN8X=DIA9G00 X500 Z500 M09M0267Program construction with loca...

  • Page 34

    Arithmetic Operation Function This function allows arithmetic operation using variables. The programming can be done in the same way as for general arithmetic expressions.Address character, Extended address character, Variable = ExpressionThe expression on the right-hand side, requesting an arith...

  • Page 35

    3. ) Function59V1 = ATAN [V2]V1 = ATAN2 [2]V1 = SQRT [V2]V1 = ABS [V2]V1 = BIN [V2]V1 = BCD [V2]V1 = ROUND [V2]V1 = FIX [V2]V1 = FUP [V2]V1 = DROUND [V2]V1 = DFIX [V2]V1 = DFUP [V2]V1 = MOD [V2/V3]V1= V1 * SIN [V3]V1= V1 * COS [V3]V1= V1 * TAN [V3]OKUMA

  • Page 36

    Lesson for triangle calculationLesson for triangle calculationFormula for calculate the sides of a triangle: A² + B²=C² ( Pythagorean )A = 25B = 55C = ?One possibility for calculation.V1=25V2=55V10=V1*V1 (625)V11=V2*V2 (3025)V12=V10+V11 (3650)V13=SQRT[V12] (60.415)M2Another possibility for ...

  • Page 37

    Lesson for triangle calculationLesson for triangle calculationFormula for angle calculation:AABTan= -----Sin= -----Cos= -----BCCA = 25B = 55C = 60.415= ?V1=25V2=55V3=60.415V10=V1/V2 ( 0.454545)V11=ATAN[V10] (24.444°)M261OKUMA

  • Page 38

    Exercise for triangle calculationExercise for triangle calculationExercise:Please calculate Side A and B and angleWe have:C = 75.716= 32.335Solution:62OKUMA

  • Page 39

    Practical ExercisePractical ExercisePlease make a macro for the workpiece shape above.63OKUMA

  • Page 40

    Example for make an counter program with alarm Example for make an counter program with alarm messagemessageV1=0V2=20N10N20......N90N100V1=V1+1IF[V1 GE V2] NALMGOTO N10NALM VUACM[1]='COUNTER OVER'VDOUT[992]=4711M2Alarm message programmingVUACM[1] = 'COUNTER OVER'System Variable Alarm messag...

  • Page 41

  • Page 42

    TestTestPlease make a macro for the deep hole drilling, after every step, drill should retractat the Z - position where the macro starts.V1=50( Z – endpoint of hole ) V2=5( Depth of cut per peck feed )V3=0.5( Approaching distance )OKUMA

x