TASK = bridgeporttask |
TASK = milltask |
EMCMOT = univpwmmod this is the real-time kernel module that handles all motion control and digital I/O between EMC and the UPC board. Unless you are using a PCI plug-in parallel port card, you should probably have this : IO_BASE_ADDRESS = 0x378 Which specifies the standard parallel port address for communication with the UPC board. Period should be commented out like this : ; PERIOD = 0.000016 The ";" prevents this setting from taking effect. The PERIOD interrupt is used for some software step generation programs, but has no use here. |
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 machine BASE_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_PERIOD SERVO_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. [TRAJ] AXES = 4 # COORDINATES = X Y Z R P W COORDINATES = X Y Z A HOME = 0 0 0 0 LINEAR_UNITS = mm ANGULAR_UNITS = degree CYCLE_TIME = 0.010 DEFAULT_VELOCITY = 5.0 MAX_VELOCITY = 28.0 DEFAULT_ACCELERATION = 40.0 MAX_ACCELERATION = 60.0 The velocity units are in user units/second, so the above MAX_VELOCITY is 28 mm/second, the DEFAULT_ACCELERATION is in user units/second -squared, or 40 mm/sec/sec. |
UNITS = the size of a "user unit". If you want user units to be inches, make this 0.0393700787 (one mm expressed in inches); for mm use 1.0 |
P = 1000 to start with, this is the main servo gain |
MAX_ACCELERATION = user_units per SECOND squared (not minute) P = 100 to start with, this is the main servo gain |
I = 5.0 an integral term to improve accuracy over a period of time |
I = 1.0 an integral term to improve accuracy over a period of time |
D = 50.0 a differential term that damps the system response |
D = 1.0 a differential term that damps the system response |
FF2 = 0.25 an acceleration feedforward, helps reduce foll. error when accelerating |
FF2 = 0.025 an acceleration feedforward, helps reduce foll. error when accelerating |
BACKLASH = 0.0 you really don't want to use this, anyway |
BACKLASH = 0.0 compensates for machine backlash |
CYCLE_TIME = 0.001 this is the servo update cycle, in seconds, set to 1 KHz here 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. (Follow with a 0) |
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 0.0 This is an output gain setting, the sign reverses the motor direction. Leave the first parameter at either +1.0 or -1.0, otherwise it divides the possible output range by the value you enter! |
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! |
MIN_OUTPUT = -100.0 Needed to get full range on the PWM duty cycle. MAX_OUTPUT = 100.0 Needed to get full range on the PWM duty cycle. |
HOME_OFFSET =0.0 the location of the system's home position from where the homne switch actually clicked. SETUP_TIME = 50000 this parameter on the first axis [AXIS_0] sets the PWM frequency in Hz. So, 50000 is 50 KHz, the correct frequency for the Pico System PWM servo amplifier. If using other PWM servo drives, get the correct PWM frequency from the manufacturer. |
HOME_OFFSET =0.0 the location of the system's home position from where the home switch actually clicked. |
EMCIO = ppmcbridgeportio ESTOP_SENSE_INDEX = 14 ESTOP_SENSE_POLARITY = 0 ESTOP_WRITE_INDEX = 7 ESTOP_WRITE_POLARITY = 0 You need to make sure none of the other xxx_WRITE_INDEX values are set to 7, as they must not interfere with the ESTOP function. |
EMCIO = io |