machine siem850
#2
#  Option for Delcam Taiwan
#  am 14/06/2001 Ref.No. 0581 Issue 1.1
#
#
#
#8
   define word TN
    address letter = ";( T - "
    address width  = 6
    field width    = 2
   end define

   define word TL
    address letter = "   L - "
    address width  = 7
    field width    = 2
   end define

   define word TD
    address letter = ";( DIA. = "
    address width  = 9
    field width    = 6
    scale factor   = 2
   end define
   
    define word TM
     address letter = ";( Time = "
    address width  = 9
    scale divisor   = 60
    end define
    
   define format ( TM )
       not modal
       field width    = 10
       metric formats
       decimal point  = true
       decimal places = 2
       trailing zeros = false
       sign = if negative
   end define
    
   define word TH
        address letter  = ";( Offset = "
        address width   = 11
   end define 
   
   define word TZ
        address letter  = ";( Z = "
        address width   = 6
   end define   
   
       define format ( TH )
       not modal
       field width    = 12
      metric formats
       decimal point  = true
       decimal places = 2
       trailing zeros = false
       sign = if negative
   end define 
   
      define format (TZ)
    address width              =   6
    field width                =   8
    exponent width             =   0
    scale factor               =   1
    scale divisor              =   1
    tape position              =   1
    print position             =   1
    sign                       = if negative
    not permanent
    modal
   metric formats
    leading zeros              = false
    trailing zeros             = false
    decimal point              = true
    decimal places             =   3
   end define

   define format (TD)
    metric formats
    decimal point = true
    decimal places = 2
    leading zeros  = false
    trailing zeros = true
    imperial formats = metric formats
   end define

   define word TD2
    address letter = ( DIA. = "
    address width  = 8
    field width    = 6
    scale factor   = 2
   end define
   
   define format (TD2)
    metric formats
    decimal point = true
    decimal places = 2
    leading zeros  = false
    trailing zeros = true
    imperial formats = metric formats
   end define

   define word TipR
    address letter = "   R = "
    address width  = 7
    field width    = 6
    scale factor   = 1
   end define

   define format (TipR)
    metric formats
    decimal point = true
    decimal places = 2
    leading zeros  = false
    trailing zeros = true
    imperial formats = metric formats
   end define


define word %D 
    address letter  = " / " 
    address width  = 3 
    field width        = 2 
end define

define word %M 
   address letter   = ";(Date:-MM-DD-YY -" 
    address width  = 17 
    field width        = 2 
end define

define word %Y 
    address letter  = " / " 
    address width  = 3 
    field width        = 2 
end define

define word %H
   address letter = ";(Time: _"
   address width  = 7
   field width    = 3
end define

define word TN 
 address letter = ";(ToolPathName="
 address width = 15
end define

define word %N
   address letter = " : "
   address width  = 3
   field   width  = 2
end define

word order = ( + TN %D %M %Y %H %N )

define word TW 
  address letter = ";(Toolnum="
  address width = 9
end define

define word TL
  address letter = ";(Toollength="
  address width = 12
end define

define word TD 
  address letter = ";(Dia="
  address width  = 5
  scale factor   = 2
end define

define word TR
  address letter = ";(Tip rad="
  address width  = 9
end define

define format ( TW TL TD TR )
  modal
  field width    = 4
  metric format
  decimal point  = true 
  decimal places = 1
  trailing zeros = true
end define

define format (F)
     decimal point = true
 end define

  define word TN
    address letter = ";( T-NAME- "
    address width  = 10
    field width    = 2
   end define

   define word TL
    address letter = "   L - "
    address width  = 7
    field width    = 2
   end define

   define word TD
    address letter = "   DIA. = "
    address width  = 10
    field width    = 6
    scale factor   = 2
   end define

   define format (TD)
    metric formats
    decimal point = true
    decimal places = 2
    leading zeros  = false
    trailing zeros = true
    imperial formats = metric formats
   end define

   define word TD2
    address letter = ";( DIA. = "
    address width  = 9
    field width    = 6
    scale factor   = 2
   end define

   define format (TD2)
    metric formats
    decimal point = true
    decimal places = 2
    leading zeros  = false
    trailing zeros = true
    imperial formats = metric formats
   end define

   define word TipR
    address letter = "   R = "
    address width  = 7
    field width    = 6
    scale factor   = 1
   end define

   define format (TipR)
    metric formats
    decimal point = true
    decimal places = 2
    leading zeros  = false
    trailing zeros = true
    imperial formats = metric formats
   end define

   define word TPN
    address letter = ";(PROGRAM NAME-"
    address width  = 16
    field width    = 13
   end define
  define word RFP
    address letter = ", "
    address width  = 2
    field width    = 8
    sign           = if negative
    metric formats
    decimal point  = true
    decimal places = 3
    leading zeros  = false
    trailing zeros = false
  end define
#20
  define word DP
    address letter = ", "
    address width  = 2
    sign           = if negative
  end define
#26
  define word Q1
    address letter = ", "
    address width  = 2
  end define
#31
  define word PT
    address letter = " , "
    address width  = 3
    field width    = 5
    sign           = none
    metric formats
    decimal point  = true
    decimal places = 3
    leading zeros  = false
    trailing zeros = false
  end define
#43
  define word ST
    address letter = ", "
    address width  = 2
    field width    = 5
    sign           = none
    metric formats
    decimal point  = false
    decimal places = 0
    leading zeros  = false
    trailing zeros = true
  end define
#55
  define word ST1
    address letter = ", "
    address width  = 2
    scale factor   = 3
    scale divisor  = 2
    sign           = none
  end define
#63
  define format ( N )
    not permanent
  end define
#67
  define format ( MS EM )
    field width  = 1
  end define
#71
  define format ( G4 )
    address letter  = "MCALL CYCLE"
    address width   = 11
  end define
#76
  define format ( DP ST1 )
    field width    = 5
    metric formats
    decimal point  = false
    decimal places = 0
    leading zeros  = false
    trailing zeros = true
  end define
#85
  define format ( R11 )
    address letter = "("
    address width  = 1
    sign           = if negative
  end define
#91
  define format ( Z2 R2 Q P )
    address letter = ", "
    address width  = 2
  end define
#96
  define format ( R11 P Q Q1 )
    field width  = 5
    metric formats
    decimal point  = true
    decimal places = 3
    trailing zeros = false
    imperial formats = metric formats
  end define
#105
  word order = ( + RFP DP Q1 PT ST ST1 )
#107
 define keys
   cycle dwell    = P
 end define
#111
 define codes
   imperial data  = G6 20
   metric data    = G6 21
 end define
#116
   message output         = false
   block order            = true
   use hole top in cycles = true
   integer 12             = 0
   integer 51             = 4
   integer 69             = 2
#123
 define block tape start
   "%"
   "O0000"
end define
#128
 define block tool change first
        
        TPN ToolPathName ; " )"
        TD2 ToolRadius[ToolNum] ; TipR         TipRadius[ToolNum] ; " )"
        %M Month ; %D Day ; %Y Year ; ")" 
        %H Hour ; %N Minute ; ")"
        TM ToolPathTime ; " Min )"
        TH Thickness ; " )"
        TZ ToolpathMinZ ; " )"
   N ; "G21"
   N ; "G00G17G40G49G80G90"
   N ;  OP ; change tool ; T ToolNum 
   N ; "G54"
   N ; spindle ToolSpeed ; spindle on cw
#  N ; "G0" ;   x coord =C   ; y coord =C 
   N ; G1 0 ; xy plane ;  X FromX ; Y FromY ; X =C ; Y =C 
# N ; "G5.1Q1"
   N ; "G43"; tool length offset ; z coord FromZ ; tool length ToolNum 
   end define
#135
 define block tool change
#
    TN ToolNumber ;  TD ToolRadius[ToolNum] ;   TPN ToolPathName ; " )"
    TD2 ToolRadius[ToolNum] ; TipR     TipRadius[ToolNum] ; " )"
    TM ToolPathTime ; " Min )"
    TH Thickness ; " )"
    TZ ToolpathMinZ ; " )"
    N ; spindle ToolSpeed ; spindle on cw
 #  N ; "G0" ;   x coord =C  ; y coord =C 
 end define
#142
 define block move rapid
   N ; rapid ; G6 ; x coord ; y coord ; z coord ; M1 ; M2
          
 end define
#146
 define block move linear
   N ; linear ; G2 ; x coord ; y coord ; z coord ; tool radius ; feedrate ; M1 ; M2

 end define
#150
 define block cycle start
   N ; G3 ; feedrate Cycfed
   if ( cycle = 1 )
#             ( RTP ,         RFP ,        SDIS ,         DP                 DPR )
     N ; G4 ; R11 SafeZ ; RFP HoleTop ; clearplane ; DP HoleDepth ; ")"
   end if
   if ( cycle = 2 )
     N ; G4 83 ; R11 SafeZ ; RFP HoleTop ; clearplane ; DP HoleDepth ; ",0" ; 
         Q ( HoleTop - PeckDepth ) ; ",0" ; Q1 PeckDepth ;  cycle dwell ; ",0 , 0.8, 0)"
#             FDEP,                    FDPR,           DAM,  DTB,          DTS, FRF, VAR )   
   end if
   if ( cycle = 3 )
     N ; G4 ; R11 SafeZ ; RFP HoleTop ; clearplane ; DP HoleDepth ; ",0" ; 
         Q ( HoleTop - PeckDepth ) ; ",0" ; Q1 PeckDepth ;  cycle dwell ; ",0 , 0.8, 1)"

   end if
   if ( cycle = 4 )
     N ; G4 ; R11 SafeZ ; RFP HoleTop ; clearplane ; DP HoleDepth ; drill hole depth ; cycle dwell ; 
         ", ," ; PT ( Cycfed / ToolSpeed ) ; ST ToolSpeed[ToolNum] ; ST1 ToolSpeed[ToolNum] ; " )"
   end if
 end define
#171
 define block move cycle
 #  N ; x coord =C ; y coord =C 
 end define
#175
 define block move tap
 #  N ; x coord =C ; y coord =C
 end define
#179
 define block cycle end
   N ; "MCALL"
 end define
#183
 define block tape end

   N ; "M5"
   N ; "G00Z100."
   N ; "G91 G28 Z0"
   N ; "G91 G28 Y0"
   N ; ";(organizer :Lo Zheng Ji )"
   N ; ";(telephone :13528730260 )"
   N ; end of prog
   
 end define
#191
end
