In the [TASK] section, you need to specify
TASK = milltask
this task controller sends auxilliary I/O (spindle, coolant, etc.) to routines that process it for controlling external hardware.
In the [EMCMOT] section, you need to specify
EMCMOT = motmod
this is the real-time kernel module that handles all motion control.
# Base task period, in nanoseconds - this is the fastest thread in the machineBASE_PERIOD = 1000000 Unless you have need for a faster running thread for other purposes, running the base period the same as the servo period reduces CPU overhead.
# Servo task period, in nanoseconds - will be rounded to an integer multiple # of BASE_PERIODSERVO_PERIOD = 1000000 The above is in ns units, and is equivalent to 1000 servo updates a second.
In the [HAL] section, you need to specify
The standard hal files for PWM are :
HALFILE = univpwm_load.hal
HALFILE = univpwm_servo.hal
HALFILE = univpwm_motion.hal
HALFILE = univpwm_io.hal
The traj section sets parameters for all axes and the trajectory planner.
AXES = 4
# COORDINATES = X Y Z R P WCOORDINATES = X Y Z A
In each [AXIS_n] section, (where n ranges from 0 to number of axes - 1) you should
have the following settings:
TYPE = either LINEAR or ANGULAR
MAX_VELOCITY = user_units per SECOND (not minute)
MAX_ACCELERATION = user_units per SECOND squared (not minute)
P = 100 to start with, this is the main servo gain
I = 1.0 an integral term to improve accuracy over a period of time
D = 1.0 a differential term that damps the system response
FF0 = 0.0 a positioning offset, left for pedantic reasons
FF1 = 2.000 a velocity feedforward, helps reduce following error proportional to velocity
FF2 = 0.025 an acceleration feedforward, helps reduce foll. error when accelerating
BACKLASH = 0.0 compensates for machine backlash
BIAS = 0.0 torque offset, might be useful with holding the knee up
INPUT_SCALE = the number of encoder counts per user_unit. If the position display moves the wrong way when you manually move the motor, make the sign negative.
OUTPUT_SCALE = 1.0 This is an output gain setting, the sign reverses the motor direction. Leave the parameter at either +1.0 or -1.0, otherwise it divides the possible output range by the value you enter!
MAX_LIMIT = distance from home to the + travel limit, expressed in user_units.
MIN_LIMIT = distance from home to the - travel limit, expressed in user_units.
FERROR = 0.001 this sets the permitted following error (in user_units) proportional to velocity in user_units/second.
MIN_FERROR = 0.005 this sets the minimum permitted following error when velocity is zero.
It is simply added to the FERROR * velocity to get the acceptable error at each servo cycle.
HOMING_VEL = 0.25 sets the velocity (in user_units/sec) that homing is performed at.
HOME_OFFSET =0.0 the location of the system's home position from where the home switch actually clicked.
In the [EMCIO] section, you need to specify :
EMCIO = io