Hi Jon and All;
My configuration is:
-D510MO computer
-Ubuntu 10.04 Live Disk
-EMC2 2.4.5
-USC with univstep reconfigured for mill.
The USC works fine in non servo mode, (Switches down).
When I switch to servo (switches up) none of the three servo axis
will move.
I have tracked (WATCH) the PID output into ppmc.0.stepgen.00.velocity (1.2
Volts)
as set by the .ini file. The ppmc.0.stepgen.00.enable is also good (yellow).
I'm out of things to try. The .ini and .hal file follow.
Any HELP will really be a big help.
Thanks
Don
.INI
# EMC controller parameters for generic controller.
# Modified univstep 11/08/2010
# General section
-------------------------------------------------------------
[EMC]
# Version of this INI file
VERSION = $Revision: 2010/11/08 $
# Name of machine, for use with display, etc.
MACHINE = EMC-JETMILL1
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
DEBUG = 0
# DEBUG = 0x00000007
# DEBUG = 0x7FFFFFFF
# Sections for display options
------------------------------------------------
[DISPLAY]
# Name of display program, e.g., xemc
DISPLAY = axis
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.100
# Path to help file
HELP_FILE = tkemc.txt
# Initial display setting for position, RELATIVE or MACHINE
POSITION_OFFSET = RELATIVE
# Initial display setting for position, COMMANDED or ACTUAL
POSITION_FEEDBACK = ACTUAL
# Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE = 1.2
# Prefix to be used
PROGRAM_PREFIX = /home/jetmill1/emc2/nc_files
# Introductory graphic
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 2
# Enable popup balloon help
BALLOON_HELP = 1
# 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.010
# Part program interpreter section
--------------------------------------------
[RS274NGC]
# File containing interpreter variables
PARAMETER_FILE = jetmill1.var
# Motion control section
------------------------------------------------------
[EMCMOT]
EMCMOT = motmod
# Key for real OS shared memory, e.g., for simulated motion
SHMEM_KEY = 111
# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
# Interval between tries to emcmot, in seconds
COMM_WAIT = 0.010
# Base task period, in nanoseconds - this is the fastest thread in the
machine
BASE_PERIOD = 50000
# Servo task period, in nanoseconds - will be rounded to an integer multiple
# of BASE_PERIOD
SERVO_PERIOD = 1000000
# Trajectory Planner task period, in nanoseconds - will be rounded to an
# integer multiple of SERVO_PERIOD
TRAJ_PERIOD = 10000000
# Hardware Abstraction Layer section
--------------------------------------------------
[HAL]
# The run script first uses halcmd to execute any HALFILE
# files, and then to execute any individual HALCMD commands.
#
# list of hal config files to run through halcmd
HALFILE = jetmill1.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
# Spindle Controller Section Volts/3072 RPM
-------------------------------------------
[SPINDLE]
LOW_GEAR_V_RPM = 26.589
HIGH_GEAR_V_RPM = 3.177
# Trajectory planner section
--------------------------------------------------
[TRAJ]
AXES = 4
COORDINATES = X Y Z A
HOME = 0 0 0 0
#NO_FORCE_HOMING = 1
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 5.
#MAX_VELOCITY = 10.8333333
MAX_VELOCITY = 1.2
DEFAULT_ACCELERATION = 100.0
MAX_ACCELERATION = 20.0
POSITION_FILE = position.txt
PROBE_INDEX = 0
PROBE_POLARITY = 1
# Axes sections
---------------------------------------------------------------
# First axis ---- X
[AXIS_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 20.0
PID_MAX_VEL = 1.25
BACKLASH = 0.0006
INPUT_SCALE = 5085
#INPUT_SCALE = 125000
#OUTPUT_SCALE = 125000.0
OUTPUT_SCALE = 1.0
MIN_LIMIT = 0.0
MAX_LIMIT = 23.65
#FERROR = 0.0100
#MIN_FERROR = 0.001
FERROR = 0.5100
MIN_FERROR = 0.501
#HOME_SEARCH_VEL = -1.0
#HOME_LATCH_VEL = -0.1
#HOME_FINAL_VEL = 1.0
HOME_SEARCH_VEL = -0.05
HOME_LATCH_VEL = -0.005
HOME_FINAL_VEL = 0.1
HOME_IGNORE_LIMITS = YES
#HOME_USE_INDEX = YES
HOME_USE_INDEX = NO
#HOME_OFFSET = -0.1
HOME_OFFSET = 10.7
HOME = 0.0
#HOME_SEQUENCE = 0
DEADBAND = 0.000011
P = 150
I = 100
D = 0.1
BIAS = 0.0
FF0 = 0
FF1 = 1
FF2 = 0.0
# Second axis ---- Y
#Y and Z removed for space, same symptom.
# Third axis ---- Z
# Fourth axis ---- A
[AXIS_3]
TYPE = ANGULAR
HOME = 0.0
MAX_VELOCITY = 10.8333333
MAX_ACCELERATION = 100.0
PID_MAX_VEL = 66
BACKLASH = 0.000
INPUT_SCALE = 10000.0
OUTPUT_SCALE = 10000.0
MIN_LIMIT = -3600.0
MAX_LIMIT = 3600.0
FERROR = 0.010
MIN_FERROR = 0.1
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
DEADBAND = 0.00001
P = 150
I = 100
D = 0.1
BIAS = 0.0
FF0 = 0
FF1 = 1
FF2 = 0.0
# 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 = jetmill1.tbl
.HAL
# For X, Y and Z servo steppers plus A stepper on JETMill1
# HAL config file for Pico Systems USC board with spindle DAC
# load realtime modules
loadrt trivkins
#loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD
num_joints=[TRAJ]AXES
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD
servo_period_nsec=[EMCMOT]SERVO_PERIOD traj_period_nsec=[EMCMOT]TRAJ_PERIOD
key=[EMCMOT]SHMEM_KEY
loadrt pid num_chan=4
loadrt hal_ppmc extradac=0x00
loadrt estop_latch count=1
loadrt and2 count=5
loadrt or2 count=3
loadrt mux2 count=1
loadrt scale count=1
# Add functions to be evaluated every servo period.
# inputs get read at the beginning of the thread
addf ppmc.0.read servo-thread
addf motion-command-handler servo-thread
addf and2.0 servo-thread
addf and2.1 servo-thread
addf and2.2 servo-thread
addf and2.3 servo-thread
addf and2.4 servo-thread
addf or2.0 servo-thread
addf or2.1 servo-thread
addf or2.2 servo-thread
addf mux2.0 servo-thread
addf scale.0 servo-thread
addf estop-latch.0 servo-thread
addf motion-controller servo-thread
addf pid.0.do-pid-calcs servo-thread
addf pid.1.do-pid-calcs servo-thread
addf pid.2.do-pid-calcs servo-thread
addf pid.3.do-pid-calcs servo-thread
# outputs get updated at the end of the thread
addf ppmc.0.write servo-thread
# set PID loop output limits to +/-1.00
setp pid.0.maxoutput [AXIS_0]PID_MAX_VEL
setp pid.1.maxoutput [AXIS_1]PID_MAX_VEL
setp pid.2.maxoutput [AXIS_2]PID_MAX_VEL
setp pid.3.maxoutput [AXIS_3]PID_MAX_VEL
# set PID loop gains
setp pid.0.Pgain [AXIS_0]P
setp pid.0.Igain [AXIS_0]I
setp pid.0.Dgain [AXIS_0]D
setp pid.0.bias [AXIS_0]BIAS
setp pid.0.FF0 [AXIS_0]FF0
setp pid.0.FF1 [AXIS_0]FF1
setp pid.0.FF2 [AXIS_0]FF2
setp pid.0.deadband [AXIS_0]DEADBAND
setp pid.1.Pgain [AXIS_1]P
setp pid.1.Igain [AXIS_1]I
setp pid.1.Dgain [AXIS_1]D
setp pid.1.bias [AXIS_1]BIAS
setp pid.1.FF0 [AXIS_1]FF0
setp pid.1.FF1 [AXIS_1]FF1
setp pid.1.FF2 [AXIS_1]FF2
setp pid.1.deadband [AXIS_1]DEADBAND
setp pid.2.Pgain [AXIS_2]P
setp pid.2.Igain [AXIS_2]I
setp pid.2.Dgain [AXIS_2]D
setp pid.2.bias [AXIS_2]BIAS
setp pid.2.FF0 [AXIS_2]FF0
setp pid.2.FF1 [AXIS_2]FF1
setp pid.2.FF2 [AXIS_2]FF2
setp pid.2.deadband [AXIS_2]DEADBAND
setp pid.3.Pgain [AXIS_3]P
setp pid.3.Igain [AXIS_3]I
setp pid.3.Dgain [AXIS_3]D
setp pid.3.bias [AXIS_3]BIAS
setp pid.3.FF0 [AXIS_3]FF0
setp pid.3.FF1 [AXIS_3]FF1
setp pid.3.FF2 [AXIS_3]FF2
setp pid.3.deadband [AXIS_3]DEADBAND
# get feedback scaling from ini file
setp ppmc.0.encoder.00.scale [AXIS_0]INPUT_SCALE
setp ppmc.0.encoder.01.scale [AXIS_1]INPUT_SCALE
setp ppmc.0.encoder.02.scale [AXIS_2]INPUT_SCALE
setp ppmc.0.encoder.03.scale [AXIS_3]INPUT_SCALE
# set output scaling from ini file
# input and output scales should (normally) be the same for a USC
setp ppmc.0.stepgen.00.scale [AXIS_0]OUTPUT_SCALE
setp ppmc.0.stepgen.01.scale [AXIS_1]OUTPUT_SCALE
setp ppmc.0.stepgen.02.scale [AXIS_2]OUTPUT_SCALE
setp ppmc.0.stepgen.03.scale [AXIS_3]OUTPUT_SCALE
# set pulse timing
setp ppmc.0.stepgen.00-03.pulse-width-ns 3000
setp ppmc.0.stepgen.00-03.pulse-space-min-ns 3000
setp ppmc.0.stepgen.00-03.setup-time-ns 2000
# connect axis enables to step generators
net Xenable axis.0.amp-enable-out => ppmc.0.stepgen.00.enable =>
pid.0.enable
net Yenable axis.1.amp-enable-out => ppmc.0.stepgen.01.enable =>
pid.1.enable
net Zenable axis.2.amp-enable-out => ppmc.0.stepgen.02.enable =>
pid.2.enable
net Aenable axis.3.amp-enable-out => ppmc.0.stepgen.03.enable =>
pid.3.enable
# connect position commands to motion controller
net Xpos-cmd axis.0.motor-pos-cmd => pid.0.command
net Ypos-cmd axis.1.motor-pos-cmd => pid.1.command
net Zpos-cmd axis.2.motor-pos-cmd => pid.2.command
net Apos-cmd axis.3.motor-pos-cmd => pid.3.command
# connect PID feedback to motion module
net Xpos-fb ppmc.0.encoder.00.position => axis.0.motor-pos-fb =>
pid.0.feedback
net Ypos-fb ppmc.0.encoder.01.position => axis.1.motor-pos-fb =>
pid.1.feedback
net Zpos-fb ppmc.0.encoder.02.position => axis.2.motor-pos-fb =>
pid.2.feedback
net Apos-fb ppmc.0.encoder.03.position => axis.3.motor-pos-fb =>
pid.3.feedback
# connect PID output signals to step generators
net Xoutput pid.0.output => ppmc.0.stepgen.00.velocity
net Youtput pid.1.output => ppmc.0.stepgen.01.velocity
net Zoutput pid.2.output => ppmc.0.stepgen.02.velocity
net Aoutput pid.3.output => ppmc.0.stepgen.03.velocity
# connect limit/home switch outputs to motion controller
net Xminlim ppmc.0.din.00.in-not => axis.0.neg-lim-sw-in =>
axis.0.home-sw-in
net Xmaxlim ppmc.0.din.01.in-not => axis.0.pos-lim-sw-in
net Yminlim ppmc.0.din.02.in-not => axis.1.neg-lim-sw-in =>
axis.1.home-sw-in
net Ymaxlim ppmc.0.din.03.in-not => axis.1.pos-lim-sw-in
net Zminlim ppmc.0.din.04.in-not => axis.2.neg-lim-sw-in
net Zmaxlim ppmc.0.din.05.in-not => axis.2.pos-lim-sw-in =>
axis.2.home-sw-in
# connect probe touch switch
#net ProbeTch ppmc.0.din.07.in =>
# connect index pulses to motion controller
net Xindex <= ppmc.0.encoder.00.index-enable => axis.0.index-enable
net Yindex <= ppmc.0.encoder.01.index-enable => axis.1.index-enable
net Zindex <= ppmc.0.encoder.02.index-enable => axis.2.index-enable
# connect e-stop write/sense to I/O controller
# Additional logic to prevent univstep's constant estop out from holding
FF clear.
# Add Probe-Estop OR Univstep Estop.
net ppmcEstop ppmc.0.din.15.in-not => and2.4.in0
net EstopOkOut estop-latch.0.ok-out => and2.4.in1 ppmc.0.dout.07.out
iocontrol.0.emc-enable-in
net EstopOkIn and2.4.out => or2.2.in0
net ProbEstopIn ppmc.0.din.08.in => or2.2.in1
net EstopOkInOr or2.2.out => estop-latch.0.fault-in
net emcEstopOut iocontrol.0.user-enable-out => estop-latch.0.ok-in
net emcEstopReset iocontrol.0.user-request-enable => estop-latch.0.reset
# Spindle Speed, Direction and Gears
#The following corrects direction and speed for Bridgeport 2 speed gear head
# DAC jumpers = JP1 removed JP2 horizontal right
# 1000 * ppmc.0.DAC8.00.value in to force a whole number
setp mux2.0.in0 [SPINDLE]LOW_GEAR_V_RPM # 10 volts/358 RPM * 1000 = 27.933
- 4.811% = 26.589
setp mux2.0.in1 [SPINDLE]HIGH_GEAR_V_RPM # 10 volts/3072 RPM * 1000 =
3.2552 - 2.40% = 3.177
#setp scale.0.offset 0.0
setp ppmc.0.DAC8.00.scale 1000.
net spindle-rpm-cmd motion.spindle-speed-out => scale.0.in
net spindle-higear ppmc.0.din.06.in => mux2.0.sel and2.0.in1 and2.3.in1
net spindle-logear ppmc.0.din.06.in-not => and2.1.in1 and2.2.in1
net spindle-fwd motion.spindle-forward => and2.0.in0 and2.2.in0
net spindle-rev motion.spindle-reverse => and2.1.in0 and2.3.in0
net or-0-in0 and2.0.out => or2.0.in0
net or-0-in1 and2.1.out => or2.0.in1
net or-0-out or2.0.out => ppmc.0.dout.00.out
net or-1-in0 and2.2.out => or2.1.in0
net or-1-in1 and2.3.out => or2.1.in1
net or-1-out or2.1.out => ppmc.0.dout.01.out
net spindle-gain mux2.0.out => scale.0.gain
net spindle-volts scale.0.out => ppmc.0.DAC8.00.value
# connect mist-utility/flood coolant to I/O controller
net Mist-utilOn iocontrol.0.coolant-mist => ppmc.0.dout.03.out
net FloodOn iocontrol.0.coolant-flood => ppmc.0.dout.02.out
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users