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 07-23-2008, 08:47 AM
 
Join Date: Jul 2008
Location: USA
Posts: 7
htengrave is on a distinguished road
New...need help motor won't turn

I hate to put this post up, but I need help.
I am new to linux EMC, not new to linux. I have been unable to get linux emc to drive a stepper motor. My computer is an AMd dual core. I am using the parallel port to drive a microkinetics stepper motor drive(DM4050) which is connected to a Superior Electric Stepper motor. I have tested the drivers and motor w a galil motion controller and the motor turned fine. I have pin 2 of the par port configured as step and pin 3 configured as direction. Any debugging help would be greatly appreciated. The Par port is a pci par port.
Reply With Quote

  #2   Ban this user!
Old 07-23-2008, 08:55 AM
 
Join Date: Jul 2003
Location: Holmen, WI
Posts: 1,081
samco is on a distinguished road

did you find the address of the pci printer port in linux? You will then need to modify your hal file similar to this...

1. Figure out the address of your parallel port card
To find the address of your parallel port card in a terminal window

lspci -v

You will see something similar to this
0000:00:10.0 Communication controller: NetMos Technology PCI 1 port parallel adapter (rev 01)
Subsystem: LSI Logic / Symbios Logic: Unknown device 0010
Flags: medium devsel, IRQ 11
I/O ports at a800 [size=8]
I/O ports at ac00 [size=8]
I/O ports at b000 [size=8]
I/O ports at b400 [size=8]
I/O ports at b800 [size=8]
I/O ports at bc00 [size=16]

In my case the address was the first one so I changed my .hal file from


loadrt hal_parport cfg=0x378

to

loadrt hal_parport cfg=0xa800
Reply With Quote

  #3   Ban this user!
Old 07-23-2008, 08:58 AM
 
Join Date: Jul 2003
Location: Holmen, WI
Posts: 1,081
samco is on a distinguished road

actually - after you know the port address using lspci -v.... If you are using the stepconf - you can enter the port address. (if you don't want to edit the hal file)

sam
Reply With Quote

  #4   Ban this user!
Old 07-23-2008, 09:07 AM
 
Join Date: Jul 2008
Location: USA
Posts: 7
htengrave is on a distinguished road

I am away from the machine, I will try it tonight.
I will put a post as soon as I try it. Many Thanks for the info and the quick response!!!
Reply With Quote

  #5   Ban this user!
Old 07-23-2008, 08:25 PM
 
Join Date: Jul 2008
Location: USA
Posts: 7
htengrave is on a distinguished road

Still nothing. The Parallel card is a Siig serial/parallel.
it showed up as irq 10, 9800[size 8]
i/o ports ar 9800[size =8]
i/o ports ar 9400[size =8]
i/o ports ar 9000[size =4]

I tried all addresses and nothing.
...I am wondering if linux doesn't like this card?
Reply With Quote

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

Originally Posted by htengrave View Post
Still nothing. The Parallel card is a Siig serial/parallel.
it showed up as irq 10, 9800[size 8]
i/o ports ar 9800[size =8]
i/o ports ar 9400[size =8]
i/o ports ar 9000[size =4]

I tried all addresses and nothing.
...I am wondering if linux doesn't like this card?
Try posting your ini file and your hal file. It is possible something is wrong in them that could be causing your problem.

Alan
__________________
http://www.alansmachineworks.com
Reply With Quote

  #7   Ban this user!
Old 07-24-2008, 07:21 AM
 
Join Date: Jul 2008
Location: USA
Posts: 7
htengrave is on a distinguished road

Hal file
# Generated by stepconf at Thu Jul 24 08:17:55 2008
# If you make changes to this file, they will be
# overwritten when you run stepconf again
loadrt trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD traj_period_nsec=[EMCMOT]SERVO_PERIOD key=[EMCMOT]SHMEM_KEY num_joints=[TRAJ]AXES
loadrt probe_parport
loadrt hal_parport cfg=0x9800
setp parport.0.reset-time 10000
loadrt stepgen step_type=0,0,0
loadrt pwmgen output_type=0

addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf pwmgen.make-pulses base-thread
addf parport.0.write base-thread
addf parport.0.reset 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
addf pwmgen.update servo-thread

net spindle-cmd <= motion.spindle-speed-out => pwmgen.0.value
net spindle-enable <= motion.spindle-on => pwmgen.0.enable
net spindle-pwm <= pwmgen.0.pwm
setp pwmgen.0.pwm-freq 100.0
setp pwmgen.0.scale 1166.66666667
setp pwmgen.0.offset 0.114285714286
setp pwmgen.0.dither-pwm true
net spindle-cw <= motion.spindle-forward

net estop-out => parport.0.pin-01-out
net xstep => parport.0.pin-02-out
setp parport.0.pin-02-out-reset 1
net xdir => parport.0.pin-03-out
net ystep => parport.0.pin-04-out
setp parport.0.pin-04-out-reset 1
net ydir => parport.0.pin-05-out
net zstep => parport.0.pin-06-out
setp parport.0.pin-06-out-reset 1
net zdir => parport.0.pin-07-out
net astep => parport.0.pin-08-out
setp parport.0.pin-08-out-reset 1
net adir => parport.0.pin-09-out
net spindle-cw => parport.0.pin-14-out
net spindle-pwm => parport.0.pin-16-out


setp stepgen.0.position-scale [AXIS_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 60000
setp stepgen.0.dirsetup 60000
setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL
net xpos-cmd axis.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => axis.0.motor-pos-fb
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xenable axis.0.amp-enable-out => stepgen.0.enable

setp stepgen.1.position-scale [AXIS_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 60000
setp stepgen.1.dirsetup 60000
setp stepgen.1.maxaccel [AXIS_1]STEPGEN_MAXACCEL
net ypos-cmd axis.1.motor-pos-cmd => stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb => axis.1.motor-pos-fb
net ystep <= stepgen.1.step
net ydir <= stepgen.1.dir
net yenable axis.1.amp-enable-out => stepgen.1.enable

setp stepgen.2.position-scale [AXIS_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 60000
setp stepgen.2.dirsetup 60000
setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL
net zpos-cmd axis.2.motor-pos-cmd => stepgen.2.position-cmd
net zpos-fb stepgen.2.position-fb => axis.2.motor-pos-fb
net zstep <= stepgen.2.step
net zdir <= stepgen.2.dir
net zenable axis.2.amp-enable-out => stepgen.2.enable

net estop-out <= iocontrol.0.user-enable-out
net estop-out => iocontrol.0.emc-enable-in

loadusr -W hal_manualtoolchange
net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared




ini file

# Generated by stepconf at Thu Jul 24 08:17:55 2008
# If you make changes to this file, they will be
# overwritten when you run stepconf again

[EMC]
MACHINE = jimtest1
NML_FILE = emc.nml
DEBUG = 0

[DISPLAY]
DISPLAY = axis
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.2
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/jim/emc2/nc_files
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in

[TASK]
TASK = milltask
CYCLE_TIME = 0.010

[RS274NGC]
PARAMETER_FILE = emc.var

[EMCMOT]
EMCMOT = motmod
SHMEM_KEY = 111
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
BASE_PERIOD = 100000
SERVO_PERIOD = 1000000

[HAL]
HALFILE = jimtest1.hal
HALFILE = custom.hal
POSTGUI_HALFILE = custom_postgui.hal

[TRAJ]
AXES = 3
COORDINATES = X Y Z
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 0.10
MAX_LINEAR_VELOCITY = 1.00

[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl

[AXIS_0]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 30.0
STEPGEN_MAXACCEL = 31.5
SCALE = 4000.0
FERROR = 0.05
MIN_FERROR = 0.01
MIN_LIMIT = -0.01
MAX_LIMIT = 40.0
HOME_OFFSET = 0.0

[AXIS_1]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 30.0
STEPGEN_MAXACCEL = 31.5
SCALE = 8000.0
FERROR = 0.05
MIN_FERROR = 0.01
MIN_LIMIT = -0.01
MAX_LIMIT = 40.0
HOME_OFFSET = 0.0

[AXIS_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 30.0
STEPGEN_MAXACCEL = 31.5
SCALE = 8000.0
FERROR = 0.05
MIN_FERROR = 0.01
MIN_LIMIT = -10.0
MAX_LIMIT = 10.0
HOME_OFFSET = 0.0
Reply With Quote

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

HTEngrave,

I would think that the 9800 is the right port. The only thing that looked really suspicious to me was the 60000 for dirhold and dirsetup. I am running an old Superior Electric drive and it requires 25000 dirhold and dirsetup (and I thought it was bad).

So let me ask you a series of questions to see if we can figure this out.

First, does it even spin the motors in stepconf?
Do you have an actual estop switch? If so, when you push the switch do you see a change in the axis gui?
What are you using for a BOB?
Do you have anything wired to /HOME and /FAULT on the drives?
Have you measured the +5v to the drive?
Is the power LED on the drive coming on?

Alan
__________________
http://www.alansmachineworks.com
Reply With Quote

  #9   Ban this user!
Old 07-24-2008, 07:53 PM
 
Join Date: Jul 2008
Location: USA
Posts: 7
htengrave is on a distinguished road

...here are my answers

First, does it even spin the motors in stepconf?
...Just working w one motor now, it does not spin when I am in stepconf

Do you have an actual estop switch? If so, when you push the switch do you see a change in the axis gui? I do not have an estop switch. I have not playd much w the graphics, but yes it does change when I press the estop button. I am able to "jog" the x axis, the pointer on the screen moves, but no motor activity.

What are you using for a BOB?
...sorry I don't know what a BOB is


Do you have anything wired to /HOME and /FAULT on the drives?
...nothing wired to home or fault
Have you measured the +5v to the drive?
...if you mean to the dm4050 yes, 5.06 to the logic side, 33.6V to the Vmm on the motor side. the motor is a 3.36V , 2.9amp motor. I have driven the motors w these drivers using a galil controler
Is the power LED on the drive coming on?
yes

I am going to have a basic 3 axis machine, wanted to get one motor working before moving on. One thing I find a bit odd is that the Driver(Microkinetics DM4050) says it has a Min pulse width is 50us. If my math is right, I think that should be 50000ns. I tried that, but it made no difference.
Reply With Quote

  #10   Ban this user!
Old 07-25-2008, 08:55 AM
 
Join Date: Feb 2007
Location: USA
Posts: 514
Big John T is on a distinguished road

Originally Posted by htengrave View Post
...here are my answers

First, does it even spin the motors in stepconf?
...Just working w one motor now, it does not spin when I am in stepconf
If it won't spin in stepconf you either have the wrong port address or timing set wrong or something wired wrong or your driver card is not enabled... If you have step and direction leds on your BOB (Break Out Board) do you see them change states as you try and jog in stepconf? Parallel port cards are $10 did you try another one?

http://wiki.linuxcnc.org/cgi-bin/emc...l_Port_Outputs

John
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 07-25-2008, 08:59 AM
 
Join Date: Feb 2007
Location: USA
Posts: 514
Big John T is on a distinguished road

Originally Posted by htengrave View Post
I am going to have a basic 3 axis machine, wanted to get one motor working before moving on. One thing I find a bit odd is that the Driver(Microkinetics DM4050) says it has a Min pulse width is 50us. If my math is right, I think that should be 50000ns. I tried that, but it made no difference.
Your math is correct. If you have the rest of the timing specs I'll add them to this page ...

http://wiki.linuxcnc.org/cgi-bin/emc...r_Drive_Timing

John
Reply With Quote

  #12   Ban this user!
Old 07-25-2008, 09:23 AM
 
Join Date: Jul 2008
Location: USA
Posts: 7
htengrave is on a distinguished road

ok...I just learned something about breakout boards and Parallel ports.
my BOB is just a db25 connector soldered to a pcb w some terminal screws.
After doing some reading, I learned that the output of todays parallel ports is 3.3V, not 5V ttl. This very well could be my problem because my drivers want 5V ttl. Going to get a opt isolate breakout board that has output levels to drivers at 5V ttl.

I think that's a good place to start. I think the question was asked earlier, but I didn't quite understand. Will get back when I get a BOB.

many thanks for eveyone's input.
Reply With Quote

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
Problem- SX3 Spindle Motor Wont Turn ON ddexd Benchtop Machines 5 02-07-2008 06:30 AM
PICstep, motor won't turn Mister H PicStep Controllers 35 01-07-2008 12:25 AM
mill/turn on a cin turn Robert Timby General Metal Working Machines 4 01-31-2007 10:33 PM
Cin Turn turn/mill Robert Timby General CNC (Mill and Lathe) Control Software (NC) 0 01-24-2007 07:12 PM
motor won't turn anthony Gecko Drives 2 05-14-2005 12:55 AM




All times are GMT -5. The time now is 05:24 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