# File Name:    user defined name (ARM machine config. file).
# File Purpose: This file is a configuration file which holds all the parameters required by the A.R.M. process
#               to set-up the routing machine and to create the rout output file.
# Written by:   Ian Ticehurst (Autom8 Ltd.)
# Version 1A.:  Date: 27.10.00 - Initial design and development.
# Version 1B.:  Date: 24.11.00 - This file renamed lenz_35 and modified to meet machine parameters supplied by a user.
############################# Start of notes ###############################
# There can be many of these files located within the sys/hooks/ncr/config/machines directory. Each file is designed
# to hold information relevant to a specific routing machine. Thus the rout output that is generated by the A.R.M.
# process will be customised to match that machine. This file sets up the panel location on the machine, the file format,
# how to deal with short lines, and pressure foot commands etc. The name of the file will typically reflect the name of
# the machine being used. Thus, if a factory has different machine types it can be quite easy to create different files
# specific to different machines.
# (Note that the comments are outside of the parameter sections as some problems were found with inclusion of comment
# lines within the "{}" sections).
############################# End of notes ###############################

# Settings section.
# This section sets some general parameters used in Auto Rout Manager functions.
#
# Parameters are:-
#  drill_layer         - the name of the drill layer to be created if any hole / slot requires moving to a drill layer.
#  sr_zero_drill_layer - this should be set to the name of a drill layer where the step and repeat co-ordinates will be
#                        set relative to a specified datum (uses the attribute .drill_sr_zero). If the layer does not exist
#                        in the job, the step and repeat datum is taken from the step datum. If no layer name is set, this
#                        function is ignored (sr_zero_set (see below) uses this parameter).
#  hook_units          - the units for the hooks to operate in.
#  break_sr            - if set to yes, force step and repeats to be broken (i.e. no step and repeats in output file).
#  ccw                 - default is no. If set to yes this indicates that machine is in couter-clockwise mode (typically used
#                        when working in an axis version that inverts the arc direction).
#  short_lines         - defines the method to use when lines smaller than the cutter radius are encountered. The setting can
#                        be either "none" (no special action) or "angle" where a small angle will be added into the router path.
#                        (for more information see on-line manual 0704 chapter 2).
#  press_down          - default is no. If set to yes a pressure foot down command will be added whenever the tool is lifted up.
#  last_z_up           - defines the M code number to be used at the final tool lift command (typically 16 or 17).
#  max_arc_ang         - this value defines the maximum arc radius that is supported by the rout machine (90,180,360).
#  sep_lyrs            - default is no. If set to yes then the system will take account of the angle of rotation of each step and
#                        use a seperate rout layer in order to create the correct rout path for that particular rotation.
#                        In order to do this the system must have extra rout layers where the layer name must be the same, but
#                        must also carry the angle of rotation. Thus if the main layer is called "rout", the layer to use for a
#                        step at 90 degree rotation must be called rout90, for 180 degree rotation rout180 etc. Typically this is
#                        used to define different plunge points when the step is placed at different rotations.
#  allow_no_chain_f    - if set to no then the system will not output a rout layer which contains unchained features. If set to
#                        yes, then unchained features are ignored.

drill_layer         = rt2drl
sr_zero_drill_layer = drill
hook_units          = inch
break_sr            = no
ccw                 = no
short_lines         = none
press_down          = no
last_z_up           = 16
max_arc_ang         = 90
sep_lyrs            = no
allow_no_chain_f    = no

# Registration section.
# This section describes the rout machine table geometry and the panel position on the rout machine table. 
#
# Parameters are:-
#  xsize    - the size of the X axis routing area of the machine.
#  ysize    - the size of the Y axis routing area of the machine.
#  angle    - the default angle to place the panel on the machine table (0,90,180,270).
#  mirror   - if set to yes the panel will be mirrored (i.e. routed from reverse side).
#  xoff     - the offset distance from the rout table zero (the bottom left) to the panel datum (in X).
#             (Moves the panel on the machine table).
#  yoff     - the offset distance from the rout table zero (the bottom left) to the panel datum (in Y).
#             (Moves the panel on the machine table).
#  version  - the default routing version to be used (1-8). (See on-line manual 0704 chapter 5 for details).
#  xorigin  - the offset of the rout file X0 position from the rout table zero (the bottom left).
#             (Does not move the panel, but moves the effective X/Y zero point).
#  yorigin  - the offset of the rout file Y0 position from the rout table zero (the bottom left).
#             (Does not move the panel, but moves the effective X/Y zero point).
#  xscale   - the scaling to apply to the X co-ordinates at output.
#  yscale   - the scaling to apply to the Y co-ordinates at output.
#  xscale_o - the origin for the scaling of the X co-ordinates (distance from machine table bottom left)
#  yscale_o - the origin for the scaling of the Y co-ordinates (distance from machine table bottom left)

reg {
  xsize    = 12
  ysize    = 26
  angle    = 0
  mirror   = no
  xoff     = 0.5
  yoff     = 0.5
  version  = 1
  xorigin  = 0.5
  yorigin  = 0.5
  xscale   = 1
  yscale   = 1
  xscale_o = 0
  yscale_o = 0
}

# Format section.
# This section describes how the output rout file should be formatted, including language, units, zeroes etc.
# (Note that further modifications to the output rout file can be made using the out_file hook).
#
# Parameters are:-
#  format         - the output file format (for example: Excellon1, Excellon2, Siebmeyer etc.) 
#  zeroes         - how to include non-functional zeroes in the output file (trailing/leading/none).
#  units          - the output file units (inch/mm). 
#  tool_units     - the output file tool units (inch/mm).
#  nf1            - the number of numbers to use before the decimal point (i.e. 2 in 2.4 format).  
#  nf2            - the number of numbers to use after the decimal point (i.e. 4 in 2.4 format).
#  decimal        - if set to yes, a decimal point will be added in the output co-ordinates.
#  sr_start_code  - defines the correct step and repeat start code for excellon format (set to 25 or 31).
#  modal_coords   - if set to yes will not re-state duplicated co-ordinates in the output file.
#  single_sr      - if set to yes, even patterns without any repeat will be included within step and repeat codes.
#  sr_zero_set    - default is no, if set to yes the step and repeat co-ordinates will be set relative to a specified datum. 
#                   This datum is on a drill layer, where the drill layer name is defined in the parameter sr_zero_drill_layer
#                   (see above). The datum is defined using the attribute .drill_sr_zero.
#  foot_down_cmd  - any rout features that carry the attribute ".foot_down" will have the code defined by this parameter added
#                   in the file prior to these features being routed. (Obviously this can only be used when the output format
#                   supports a foot down command).

format {
  format        = SM3000
  zeroes        = none
  units         = mm
  tool_units    = mm
  nf1           = 3
  nf2           = 3
  decimal       = yes
  sr_start_code = 25
  modal_coords  = yes
  single_sr     = no
  sr_zero_set   = no
  foot_down_cmd = G99
}

# Output hook section.
# This section determines if the out_file hook exists and should be used, and if so which sections should be used in order to
# modify the final output file.
#
# Parameters are:-
#  exists      - if yes, the out_file is to be used for any sections selected "yes" below.
#  header      - if yes, use the header blocks as defined by the out_file hook.
#  eof         - if yes, use the end of file blocks as defined by the out_file hook.
#  tool_change - if yes, use the tool change blocks as defined by the out_file hook.
#  start_step  - if yes, use the step and repeat start blocks as defined by the out_file hook (only active if full S&R is chosen).
#  end_step    - if yes, use the step and repeat end blocks as defined by the out_file hook (only active if full S&R is chosen).

out_hook {
   exists        = yes
   header        = yes
   eof           = no
   tool_change   = yes
   start_step    = no
   end_step      = no
}

# Panel section.
# The panel section can be used to modify and (or all) of the parameters given above when a particular panel size is loaded.
# Typically this is used to modify the placement of the panel on the machine dependant on the panel size. However, it should
# be noted that any of the sections used above can appear within the panel section. Thus the only parameters of note in this
# section are the xsize and ysize which are checked against the step (panel) size being used. If it matches then any parameters
# defined in the panel section are used. Any parameters not defined in the panel section are taken from those above.
# In the examples below all lines are commented out (example only).

#panel {
#   xsize = 20
#   ysize = 16
#   reg {
#     angle = 90
#     mirror = no
#     xoff = 3
#     yoff = 4
#     xscale = 1
#     yscale = 1
#     xscale_o = 0
#     yscale_o = 0
#  }
#}
