× Forum Header

SOLVED: one axis not working for newbie

More
16 Dec 2013 07:25 - 18 Dec 2013 05:06 #41636 by mtngun
I'm trying to convert a lathe from TurboCnc to LinuxCNC. I'm new to LinuxCNC.

I ran the stepconfig wizard and the X axis tested OK inside the wizard, but not the Z axis. Likewise, the X axis works inside LinuxCNC but not the Z axis.

The X axis is driven by a Gecko 203V, pins 2 & 3
The Z axis is driven by a Gecko 201, pins 14 & 16
The 203V runs on active hi, while the 201 runs on active lo.

Both axis work fine in TurboCNC, so I'm confident there is no hardware problem.

The X axis & 203V run no matter whether I configure the pins to "invert" or not. :woohoo:

The Z axis does not run whether I configure the pins to "invert or not. :angry:

I'm guessing there is something wrong with the HAL file?

My ini and hal files are attached.
Attachments:
Last edit: 18 Dec 2013 05:06 by mtngun. Reason: solved problem

Please Log in or Create an account to join the conversation.

More
16 Dec 2013 16:36 #41639 by cncbasher
you need to reconfigure the z to active hi ,
The following user(s) said Thank You: mtngun

Please Log in or Create an account to join the conversation.

More
17 Dec 2013 03:30 #41645 by mtngun
I don't understand why I should set the Z's 201 to run on active high since it runs active lo in TurboCNC?

Nonetheless I edited the hal file as follows to turn off "invert" for pins 14 & 16? I changed the "invert" command for 14 & 16 from "1" to "0." It didn't make any difference -- still no Z response.

net xstep => parport.0.pin-02-out
setp parport.0.pin-02-out-reset 1
net xdir => parport.0.pin-03-out
setp parport.0.pin-14-out-invert 0
net zstep => parport.0.pin-14-out
setp parport.0.pin-14-out-reset 1
setp parport.0.pin-16-out-invert 0
net zdir => parport.0.pin-16-out

Please Log in or Create an account to join the conversation.

More
17 Dec 2013 03:36 #41646 by mtngun
I have a newbie question about the HAL file that may or may not be related to my Z problem.

LinuxCNC refers to the lathe's X as axis "0" and the lathe's Z as axis "2." Yet some of the HAL commands generated by StepConfig refer to Z as a "1" not a "2" . Is it supposed to be that way, or is that a bug?

This is what I am referring to:

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

Why is it using "stepgen.1." instead of "stepgen.2" ?

Please Log in or Create an account to join the conversation.

More
17 Dec 2013 08:07 #41664 by BigJohnT
For a lathe that has no Y axis I assume the Stepconf Wizard skips the Y axis and assigns stepgen 1 to axis 2 (z).

Does Z hold firm when power is applied?

If you change directions does Z move one step?

Stepper diagnostics linuxcnc.org/docs/html/common/Stepper_Diagnostics.html

JT
The following user(s) said Thank You: mtngun

Please Log in or Create an account to join the conversation.

More
17 Dec 2013 08:17 #41667 by mtngun

Does Z hold firm when power is applied?

I'll try to check later this evening

If you change directions does Z move one step?

No. There is zero response from the Z axis.

Please Log in or Create an account to join the conversation.

More
17 Dec 2013 08:19 #41668 by BigJohnT
One step might be hard to see... if your step and direction pins are reversed you will get one step each time you change direction.

JT

Please Log in or Create an account to join the conversation.

More
17 Dec 2013 09:45 #41677 by mtngun

Does Z hold firm when power is applied?

Z holds firm as soon as power is applied to the drives.

If you change directions does Z move one step?

I put my hand on the motor while changing directions, couldn't feel anything or hear anything.

I re-verified that pin 14 goes to the 201's step terminal and that pin 16 goes to the 201's direction terminal.

Please Log in or Create an account to join the conversation.

More
17 Dec 2013 19:45 #41691 by BigJohnT
My next guess is that you picked 203 from the dropdown for timing and the 201 has much longer time requirements.

wiki.linuxcnc.org/cgi-bin/wiki.pl?Stepper_Drive_Timing

The 201 would not run on the 203's step and direction timing.

JT
The following user(s) said Thank You: mtngun

Please Log in or Create an account to join the conversation.

More
18 Dec 2013 04:55 #41711 by mtngun
Fixed it. Reconfigured the wiring to run Z on pins 6 & 7 instead of 14 & 16. Then reran StepConf, now Z works, though rough as a cob.

I vaguely remember reading somewhere that the high pins on some parallel ports do not work in LinuxCNC unless a certain switch is set? But for now I am content to use pins 6 & 7.

As BigJohnT suggested, the 201 and the 203 drivers require different timing, and StepConf does not give us the option of specifying two different timing settings, so the Z is probably running rough for that reason.

I presume I have to edit something or another to specify different timing for the 201, so exactly where and how do I do that?

Please Log in or Create an account to join the conversation.

Time to create page: 0.123 seconds
Powered by Kunena Forum