# EMC controller parameters for a simulated machine.
# General note: Comments can either be preceded with a # or ; - either is
# acceptable, although # is in keeping with most linux config files.

# General section -------------------------------------------------------------
[EMC]
VERSION = 1.1
MACHINE =               gmoccapy_development
DEBUG = 0


# Sections for display options ------------------------------------------------
[DISPLAY]
DISPLAY = gmoccapy

# Cycle time, in milliseconds, that display will sleep between polls
CYCLE_TIME =            100

# Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE =     1.5
MAX_SPINDLE_OVERRIDE =  1.2
MIN_SPINDLE_OVERRIDE = .5

# Max and default jog speeds in units per second
MAX_LINEAR_VELOCITY =   166
DEFAULT_LINEAR_VELOCITY = 5
MAX_ANGULAR_VELOCITY = 234

# Prefix to be used
PROGRAM_PREFIX = ../../nc_files/

# Introductory graphic
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5

# list of selectable jog increments
INCREMENTS = 1.000 mm, 0.100 mm, 0.010 mm, 0.001 mm ,1.2345 in

# set up 3 user popup message dialogs
# the messages support pango markup language
# detailed information about the markup language can be found at 
# https://developer.gnome.org/pango/stable/PangoMarkupFormat.html

# MESSAGE_TEXT = The text to be displayed, may be pango markup formatted
# MESSAGE_TYPE = one of "status" , "okdialog" , "yesnodialog"
#       status : Will just display a message as popup window, using the messsaging system of gmoccapy
#       okdialog : Will hold focus on the message dialog and will activate a "-waiting" Hal_Pin OUT.
#                  Closing the message will reset the waiting pin
#       yesnodialog : Will hold focus on the message dialog and will activate a "-waiting" Hal_Pin bit OUT
#                     it will also give access to an "-response" Hal_Pin Bit Out, this pin will hold 1 if the
#                     user clicks OK, and in all other states it will be 0
#                     Closing the message will reset the waiting pin
#                     The response Hal Pin will remain 1 until the dialog is called again
# MESSAGE_PINNAME = is the name of the hal pin group to be created


MESSAGE_TEXT = This is a <span background="#ff0000" foreground="#ffffff">info message</span> test
MESSAGE_TYPE = status
MESSAGE_PINNAME = statustest

MESSAGE_TEXT = This is a yes no dialog test
MESSAGE_TYPE = yesnodialog
MESSAGE_PINNAME = yesnodialog

MESSAGE_TEXT = Text can be <small>small</small>, <big>big</big>, <b>bold</b>, <i>italic</i> and even be <span color="red">colored</span>.
MESSAGE_TYPE = okdialog
MESSAGE_PINNAME = okdialog

# for details see nc_files/subroutines/maco_instructions.txt
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python

# Task controller section -----------------------------------------------------
[RS274NGC]
RS274NGC_STARTUP_CODE = G17 G21 G40 G43H0 G54 G64P0.005 G80 G90 G94 G97 M5 M9
PARAMETER_FILE = sim.var
SUBROUTINE_PATH = macros

# Motion control section ------------------------------------------------------
[EMCMOT]
EMCMOT =              motmod
COMM_TIMEOUT =          1.0
BASE_PERIOD  =          100000
SERVO_PERIOD =          1000000

# Hardware Abstraction Layer section --------------------------------------------------
[TASK]
TASK =                  milltask
CYCLE_TIME =            0.001

# Part program interpreter section --------------------------------------------
[HAL]
HALFILE = core_sim.hal
HALFILE = spindle_sim.hal
HALFILE = simulated_home.hal

# Single file that is executed after the GUI has started.
POSTGUI_HALFILE = gmoccapy_postgui.hal

HALUI = halui

# Trajectory planner section --------------------------------------------------
[HALUI]
#No Content

[TRAJ]
COORDINATES =      X Y Z 
LINEAR_UNITS =     mm
ANGULAR_UNITS =    degree
DEFAULT_LINEAR_VELOCITY = 9.0
MAX_LINEAR_VELOCITY = 234
POSITION_FILE =    position.txt
#NO_FORCE_HOMING = 1

# First axis
[EMCIO]
EMCIO = 		io
CYCLE_TIME =    0.100

# tool table file
TOOL_TABLE = tool.tbl
TOOL_CHANGE_POSITION = 100 100 -10
TOOL_CHANGE_QUILL_UP = 1

[KINS]
KINEMATICS = trivkins coordinates=xyz
JOINTS = 3

[AXIS_X]
MIN_LIMIT = -400.0
MAX_LIMIT = 400.0
MAX_VELOCITY = 166
MAX_ACCELERATION = 1500.0

[JOINT_0]
TYPE =                          LINEAR
HOME =                          0.000
MAX_VELOCITY =                  166
MAX_ACCELERATION =              1500.0
BACKLASH = 0.000
INPUT_SCALE =                   4000
OUTPUT_SCALE = 1.000
MIN_LIMIT =                     -400.0
MAX_LIMIT =                     400.0
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET =                    0.0
HOME =                           10
HOME_SEARCH_VEL =                200.0
HOME_LATCH_VEL =                 20.0
HOME_USE_INDEX =                 NO
HOME_IGNORE_LIMITS =             NO
HOME_SEQUENCE = 1
HOME_IS_SHARED = 1

# Second axis
[AXIS_Y]
MIN_LIMIT = -400.0
MAX_LIMIT = 400.0
MAX_VELOCITY = 166
MAX_ACCELERATION = 1500.0

[JOINT_1]
TYPE =                          LINEAR
HOME =                          0.000
MAX_VELOCITY =                  166
MAX_ACCELERATION =              1500.0
BACKLASH = 0.000
INPUT_SCALE =                   4000
OUTPUT_SCALE = 1.000
MIN_LIMIT =                     -400.0
MAX_LIMIT =                     400.0
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET =                    0.0
HOME =                           10
HOME_SEARCH_VEL =                200.0
HOME_LATCH_VEL =                 20.0
HOME_USE_INDEX =                 NO
HOME_IGNORE_LIMITS =             NO
HOME_SEQUENCE = 1

# Third axis
[AXIS_Z]
MIN_LIMIT = -400.0
MAX_LIMIT = 0.001
MAX_VELOCITY = 166
MAX_ACCELERATION = 1500.0

[JOINT_2]
TYPE =                          LINEAR
HOME =                          0.0
MAX_VELOCITY =                  166
MAX_ACCELERATION =              1500.0
BACKLASH = 0.000
INPUT_SCALE =                   4000
OUTPUT_SCALE = 1.000
MIN_LIMIT =                     -400.0
MAX_LIMIT =                     0.001
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET =                    1.0
HOME =                           -10
HOME_SEARCH_VEL =                200.0
HOME_LATCH_VEL =                 20.0
HOME_USE_INDEX =                 NO
HOME_IGNORE_LIMITS =             NO
HOME_SEQUENCE = 0
HOME_IS_SHARED = 1

# section for main IO controller parameters -----------------------------------
[MACROS]
MACRO = i_am_lost
MACRO = halo_world
MACRO = jog_around
MACRO = increment xinc yinc
MACRO = go_to_position X-pos Y-pos Z-pos
