View Full Version : Problem with power managment in EMC2
ad_Wolf 06-13-2008, 01:55 PM Hi! I think that I have a problem: when I run EMC2, power of my step-motors is turning off. After this Z-axis is going down and tool regards to the table =(
P.S. Sorry for my bad english!
acondit 06-13-2008, 02:14 PM Hi! I think that I have a problem: when I run EMC2, power of my step-motors is turning off. After this Z-axis is going down and tool regards to the table =(
P.S. Sorry for my bad english!
What kind of computer are you using?
What drives are you using?
Alan
ad_Wolf 06-13-2008, 02:27 PM What kind of computer are you using?
What drives are you using?
Alan
I use step-motor drives. After EMC2 is loaded, I must turn power on. There is a problem: power already turned on in my drives, they are working, and Z-drive retain a spindle. After EMC2 loaded, he off the power in the drives, and Z-drive turn down the spindle.
acondit 06-13-2008, 02:33 PM I use step-motor drives. After EMC2 is loaded, I must turn power on. There is a problem: power already turned on in my drives, they are working, and Z-drive retain a spindle. After EMC2 loaded, he off the power in the drives, and Z-drive turn down the spindle.
What brand of stepper motor drives are you using?
What kind of computer are you using?
What breakout board are you using?
Why do you have power turned on to your drives before powering up EMC2????
It sounds like you don't have the drive enable signal setup correctly in EMC2.
Alan
ad_Wolf 06-13-2008, 02:45 PM What brand of stepper motor drives are you using?
What kind of computer are you using?
What breakout board are you using?
Why do you have power turned on to your drives before powering up EMC2????
It sounds like you don't have the drive enable signal setup correctly in EMC2.
Alan
Ок, brand -- motionking.
Computer -- Amd celeron kakoj-to tam, motherboard-Via, 256 mb ram.
Signal setup working correctly. I can show you the standart_pinout.hal file.
This is especially the realization of drivers.
acondit 06-13-2008, 02:50 PM Ок, brand -- motionking.
Computer -- Amd celeron kakoj-to tam, motherboard-Via, 256 mb ram.
Signal setup working correctly. I can show you the standart_pinout.hal file.
This is especially the realization of drivers.
Obviously something is not correct or you would not have asked the question. I am just trying to get enough information to allow us to help diagnose the problem.
Alan
ad_Wolf 06-13-2008, 02:57 PM I understand. How can I turn off this option? I don't need this, but I don't know how turn off power managment im EMC2. Power of drivers turnings off or on manually.
acondit 06-13-2008, 03:06 PM I understand. How can I turn off this option? I don't need this, but I don't know how turn off power management in EMC2. Power of drivers turnings off or on manually.
I guess I am confused because there isn't any automatic power management in EMC2.
There are signals that can be implemented to enable drives. There are signals that can be implemented to tell that an estop switch has been activated. There are signals that can be implemented to turn a spindle on or off. There are signals that can be implemented to tell that an axis has reached end of travel (limit). These are all things that you would have to set up in your ".hal" file.
Maybe it would be helpful if you posted your ini file and your hal file.
Alan
ad_Wolf 06-13-2008, 04:06 PM ini file:
[EMC]
VERSION = $Revision: 1.16.2.1 $
MACHINE = EMC-HAL-STEP-XYZA-IN
NML_FILE = emc.nml
DEBUG = 0
[DISPLAY]
DISPLAY = axis
CYCLE_TIME = 0.200
HELP_FILE = tkemc.txt
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 9.0
PROGRAM_PREFIX = /
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 1
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[RS274NGC]
PARAMETER_FILE = stepper.var
[EMCMOT]
EMCMOT = motmod
SHMEM_KEY = 111
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
BASE_PERIOD = 50000
SERVO_PERIOD = 1000000
TRAJ_PERIOD = 10000000
[HAL]
HALFILE = stepper_xyza.hal
HALFILE = standard_pinout.hal
[TRAJ]
AXES = 4
COORDINATES = X Y Z A
HOME = 0 0 0
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 10
DEFAULT_ANGULAR_VELOCITY = 30
MAX_VELOCITY = 50
MAX_ANGULAR_VELOCITY = 90
DEFAULT_ACCELERATION = 80
MAX_ACCELERATION = 400.0
[AXIS_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 12
MAX_ACCELERATION = 20.0
STEPGEN_MAXACCEL = 200
BACKLASH = 0.000
SCALE = 4000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -10000.0
MAX_LIMIT = 10000.0
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
[AXIS_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 12
MAX_ACCELERATION = 20.0
STEPGEN_MAXACCEL = 200
BACKLASH = 0.000
SCALE = 4000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -10000.0
MAX_LIMIT = 10000.0
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
[AXIS_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 12
MAX_ACCELERATION = 20.0
STEPGEN_MAXACCEL = 200
BACKLASH = 0.000
SCALE = 4000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -2000.0
MAX_LIMIT = 4000.0
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
[AXIS_3]
TYPE = ANGULAR
HOME = 0.0
MAX_VELOCITY = 90.0
MAX_ACCELERATION = 360.0
STEPGEN_MAXACCEL = 396
BACKLASH = 0.000
SCALE = 40
OUTPUT_SCALE = 1.000
MIN_LIMIT = -36000.0
MAX_LIMIT = 36000.0
FERROR = 5.0
MIN_FERROR = 1.0
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = stepper.tbl
standart_pinout.hal:
loadrt hal_parport cfg="0x0378"
addf parport.0.read base-thread 1
addf parport.0.write base-thread -1
linksp Xstep parport.0.pin-08-out
linksp Xdir parport.0.pin-09-out
linksp Ystep parport.0.pin-06-out
linksp Ydir parport.0.pin-07-out
linksp Zstep parport.0.pin-04-out
linksp Zdir parport.0.pin-05-out
linksp Astep parport.0.pin-02-out
linksp Adir parport.0.pin-03-out
# create a signal for the estop loopback
net estop-loop iocontrol.0.user-enable-out iocontrol.0.emc-enable-in
# create signals for tool loading loopback
net tool-prep-loop iocontrol.0.tool-prepare iocontrol.0.tool-prepared
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed
# create a signal for "spindle on"
newsig spindle_on bit
# commented out till we resolve this issue
# connect it to the iocontroller
linksp spindle_on motion.spindle-on
# connect it to a physical pin
linksp spindle_on parport.0.pin-01-out
and stepper_xyza. hal file:
# core HAL config file for steppers
# first load the core RT modules that will be needed
# kinematics
loadrt trivkins
# motion controller, get name and thread periods from ini file
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 num_joints=[TRAJ]AXES
# stepper module
loadrt stepgen step_type=0,0,0,0
# hook its functions to realtime threads
addf stepgen.make-pulses base-thread
addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
# connect position commands from motion module to step generator
newsig Xpos-cmd float
linksp Xpos-cmd <= axis.0.motor-pos-cmd
linksp Xpos-cmd => stepgen.0.position-cmd
newsig Ypos-cmd float
linksp Ypos-cmd <= axis.1.motor-pos-cmd
linksp Ypos-cmd => stepgen.1.position-cmd
newsig Zpos-cmd float
linksp Zpos-cmd <= axis.2.motor-pos-cmd
linksp Zpos-cmd => stepgen.2.position-cmd
newsig Apos-cmd float
linksp Apos-cmd <= axis.3.motor-pos-cmd
linksp Apos-cmd => stepgen.3.position-cmd
# connect position feedback from step generators
# to motion module
newsig Xpos-fb float
linksp Xpos-fb <= stepgen.0.position-fb
linksp Xpos-fb => axis.0.motor-pos-fb
newsig Ypos-fb float
linksp Ypos-fb <= stepgen.1.position-fb
linksp Ypos-fb => axis.1.motor-pos-fb
newsig Zpos-fb float
linksp Zpos-fb <= stepgen.2.position-fb
linksp Zpos-fb => axis.2.motor-pos-fb
newsig Apos-fb float
linksp Apos-fb <= stepgen.3.position-fb
linksp Apos-fb => axis.3.motor-pos-fb
# send the position commands thru differentiators to
# generate velocity and accel signals
# first 8 differentiators
loadrt ddt count=8
# link the differentiator functions into the code
addf ddt.0 servo-thread
addf ddt.1 servo-thread
addf ddt.2 servo-thread
addf ddt.3 servo-thread
addf ddt.4 servo-thread
addf ddt.5 servo-thread
addf ddt.6 servo-thread
addf ddt.7 servo-thread
# define the signals, and hook them up
newsig Xvel float
newsig Xacc float
linksp Xpos-cmd => ddt.0.in
linkps ddt.0.out => Xvel
linksp Xvel => ddt.1.in
linkps ddt.1.out => Xacc
newsig Yvel float
newsig Yacc float
linksp Ypos-cmd => ddt.2.in
linkps ddt.2.out => Yvel
linksp Yvel => ddt.3.in
linkps ddt.3.out => Yacc
newsig Zvel float
newsig Zacc float
linksp Zpos-cmd => ddt.4.in
linkps ddt.4.out => Zvel
linksp Zvel => ddt.5.in
linkps ddt.5.out => Zacc
newsig Avel float
newsig Aacc float
linksp Apos-cmd => ddt.6.in
linkps ddt.6.out => Avel
linksp Avel => ddt.7.in
linkps ddt.7.out => Aacc
# connect enable signals for step generators
newsig Xen bit
linksp Xen <= axis.0.amp-enable-out
linksp Xen => stepgen.0.enable
newsig Yen bit
linksp Yen <= axis.1.amp-enable-out
linksp Yen => stepgen.1.enable
newsig Zen bit
linksp Zen <= axis.2.amp-enable-out
linksp Zen => stepgen.2.enable
newsig Aen bit
linksp Aen <= axis.3.amp-enable-out
linksp Aen => stepgen.3.enable
# connect signals to step pulse generator outputs
newsig Xstep bit
newsig Xdir bit
newsig Ystep bit
newsig Ydir bit
newsig Zstep bit
newsig Zdir bit
newsig Astep bit
newsig Adir bit
linkps stepgen.0.step Xstep
linkps stepgen.0.dir Xdir
linkps stepgen.1.step Ystep
linkps stepgen.1.dir Ydir
linkps stepgen.2.step Zstep
linkps stepgen.2.dir Zdir
linkps stepgen.3.step Astep
linkps stepgen.3.dir Adir
# set stepgen module scaling - get values from ini file
setp stepgen.0.position-scale [AXIS_0]SCALE
setp stepgen.1.position-scale [AXIS_1]SCALE
setp stepgen.2.position-scale [AXIS_2]SCALE
setp stepgen.3.position-scale [AXIS_3]SCALE
# set stepgen module accel limits - get values from ini file
setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL
setp stepgen.1.maxaccel [AXIS_1]STEPGEN_MAXACCEL
setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL
setp stepgen.3.maxaccel [AXIS_3]STEPGEN_MAXACCEL
acondit 06-13-2008, 04:59 PM Please try to answer all of my questions. It is hard enough to diagnose problems when you can see and check the wiring directly, it is even harder when you can't see and check the wiring directly.
Generally, I wouldn't want to have my drives powered up and hooked to my computer without having my control software running first. I don't want the computer sending any signals to the parallel port except when told to by my control software.
Ok, now back to my questions, why do you have power turned on to your drives before starting up EMC2?
If you start EMC2 first and then turn your drives on does it still not work?
Which model MotionKing driver are you using?
Are you using a breakout board? If yes, what brand and model? Does it have or require a separate power source for opto-isolation?
There is an enable/disable pin on at least some of the motionking drivers. Do you have anything connected to the enable pin?
It also looks like you have a whole bunch of signals in your hal file that have nothing to do with a standard stepper system. A bunch of stuff that appears more like having to do with servo systems.
Alan
|
|