Part 6b Creating the HAL and INI files
Minimum INI file
To run LinuxCNC there are some core things that must be in the INI file. In the linuxcnc/configs/gui6 directory create the gui6.ini file.
gui6.ini
# display options [DISPLAY] # Name of display program to execute DISPLAY = gui6 # Cycle time, in seconds, that display will sleep between polls CYCLE_TIME = 0.100 # section for main IO controller parameters [EMCIO] # Name of IO controller program, e.g., io EMCIO = io # cycle time, in seconds CYCLE_TIME = 0.100 # tool table file TOOL_TABLE = tool.tbl # Motion control section [EMCMOT] EMCMOT = motmod # Timeout for comm to emcmot, in seconds COMM_TIMEOUT = 1.0 # Interval between tries to emcmot, in seconds COMM_WAIT = 0.010 # Hardware Abstraction Layer section [HAL] HALFILE = gui6.hal # Trajectory planner section [TRAJ] AXES = 3 COORDINATES = X Y Z HOME = 0 0 0 LINEAR_UNITS = inch ANGULAR_UNITS = degree CYCLE_TIME = 0.010 DEFAULT_VELOCITY = 1.2 POSITION_FILE = position.txt MAX_LINEAR_VELOCITY = 1.2 # Part program interpreter section [RS274NGC] # File containing interpreter variables PARAMETER_FILE = gui6.var # Task controller section [TASK] # Name of task controller program, e.g., milltask TASK = milltask # Cycle time, in seconds, that task controller will sleep between polls CYCLE_TIME = 0.001
Minimum HAL File
To run LinuxCNC there are some core things that must be in the HAL file. In the linuxcnc/configs/gui6 directory create the gui6.hal file.
gui6.hal
# kinematics loadrt trivkins # motion controller loadrt motmod base_period_nsec=100000 servo_period_nsec=1000000 num_joints=[TRAJ]AXES addf motion-command-handler servo-thread addf motion-controller servo-thread
Tool Table
The LinuxCNC software has to find a tool table so create a file named tool.tbl and save it with the rest of the files in our configuration directory.
tool.tbl
T1 P1 D0.125000 Z+0.462066 ;1/8 end mill