CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Machine Controllers Software and Solutions > LinuxCNC (formerly EMC2)


LinuxCNC (formerly EMC2) Discuss LinuxCNC (formerly EMC2) Controlers here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 06-13-2008, 01:55 PM
 
Join Date: Jun 2008
Location: Ukraine
Posts: 7
ad_Wolf is on a distinguished road
Problem with power managment in EMC2

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!
Reply With Quote

  #2   Ban this user!
Old 06-13-2008, 02:14 PM
acondit's Avatar  
Join Date: Apr 2005
Location: USA
Posts: 1,774
acondit is on a distinguished road

Originally Posted by ad_Wolf View Post
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
__________________
http://www.alansmachineworks.com
Reply With Quote

  #3   Ban this user!
Old 06-13-2008, 02:27 PM
 
Join Date: Jun 2008
Location: Ukraine
Posts: 7
ad_Wolf is on a distinguished road

Originally Posted by acondit View Post
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.
Reply With Quote

  #4   Ban this user!
Old 06-13-2008, 02:33 PM
acondit's Avatar  
Join Date: Apr 2005
Location: USA
Posts: 1,774
acondit is on a distinguished road

Originally Posted by ad_Wolf View Post
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
__________________
http://www.alansmachineworks.com
Reply With Quote

  #5   Ban this user!
Old 06-13-2008, 02:45 PM
 
Join Date: Jun 2008
Location: Ukraine
Posts: 7
ad_Wolf is on a distinguished road

Originally Posted by acondit View Post
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.
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 06-13-2008, 02:50 PM
acondit's Avatar  
Join Date: Apr 2005
Location: USA
Posts: 1,774
acondit is on a distinguished road

Originally Posted by ad_Wolf View Post
Ок, 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
__________________
http://www.alansmachineworks.com
Reply With Quote

  #7   Ban this user!
Old 06-13-2008, 02:57 PM
 
Join Date: Jun 2008
Location: Ukraine
Posts: 7
ad_Wolf is on a distinguished road

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.
Reply With Quote

  #8   Ban this user!
Old 06-13-2008, 03:06 PM
acondit's Avatar  
Join Date: Apr 2005
Location: USA
Posts: 1,774
acondit is on a distinguished road

Originally Posted by ad_Wolf View Post
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
__________________
http://www.alansmachineworks.com
Reply With Quote

  #9   Ban this user!
Old 06-13-2008, 04:06 PM
 
Join Date: Jun 2008
Location: Ukraine
Posts: 7
ad_Wolf is on a distinguished road

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
Reply With Quote

  #10   Ban this user!
Old 06-13-2008, 04:59 PM
acondit's Avatar  
Join Date: Apr 2005
Location: USA
Posts: 1,774
acondit is on a distinguished road

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
__________________
http://www.alansmachineworks.com

Last edited by acondit; 06-14-2008 at 04:28 PM.
Reply With Quote

Sponsored Links
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fanuc 21-MB Tool Life Managment pmit Fanuc 12 11-12-2007 09:03 AM
Weird Problem Possibly Due To EMC2 juzwuz LinuxCNC (formerly EMC2) 5 12-20-2006 01:53 AM
power managment IC NCN PIC Programing / Design 3 02-22-2006 09:47 PM
Tool Managment/Dispensing Vendors - Help!!! Canon General Metalwork Discussion 0 09-19-2005 09:14 AM
Cable Managment SPEEDRE DIY-CNC Router Table Machines 3 08-16-2005 11:30 PM




All times are GMT -5. The time now is 05:22 PM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361