× Forum Header

stepper motors moving REALLY slowly, stepconf test

More
18 Nov 2013 03:46 #40907 by Glamplitude
Dear Forum

I've just registered and I apologise if this question has already been answered elsewhere. I've been hunting through the forum for about a fortnight now and haven't come up with anything. I've decided to post it as a query in case there is a systematic answer which may help others.

I have built a two-axis hotwire CNC machine principally for making model aeroplane parts. It has two identical halves; each of which is a 2-axis system. A pretty standard hotwire system. The wire itself can also be turned on and off via software if I manage to get that far.

The stepper motors are driven by this step driver: www.kitsrus.com/pdf/k158.pdf - reading through other forum entries it is probably worth saying that the digital inputs on this (very nice) board are opt-isolated via a 4N25 optocoupler. I can't think this is connected with my problem right now but I understand that it may cause problems at much higher frequencies.

The digital inputs to the drivers (via opto) are connected to a parallel port card, a NetMos PCI card. I tested all of the output pins with a simple piece of software and can report that they are working fine.

I connected up the motor drivers to the port and power supply and ran the following piece of test code at the prompt. This code was saved under the filename "strobe1", which is relevant because it calls itself. I also installed a package called parashell which provides the actual hardware write. My output wiring is as follows:

Pin 2: X step
Pin 3: X dir
Pin 4: Y step
Pin 5: Y dir
Pin 6: Z step
Pin 7: Z dir
Pin 8: A step
Pin 9: A dir

# code listing: strobe1
./parashell 0xa400 255
sleep 0.05
./parashell 0xa400 170
sleep 0.05
./strobe1
# end of code listing

I ran this with "sudo ./strobe1". This basically holds down the direction bit for all 4 motors and pulses the step bit. The code works beautifully and all 4 motors turn slowly. Slowly, as you would expect with the over-generous delay given by sleep 0.05. I also have another program which does the same without the direction bit so I can check the other direction of rotation. From this I surmise that (1) my port is fine (2) my driver boards are fine, and (3) everything is correctly connected.

However, when I try to set up stepconf, at the "test axis" window, the jog button only jogs one click at a time (I think that could be correct) but it only does so in the Right direction (i.e. not Left). When I press the "Run" button, the motor moves INCREDIBLY slowly - about 2 or 3 clicks per second. At that rate, I could build an aeroplane wing faster out of dried saliva and tears than my machine will produce the foam cuts.

There are other problems when I try to experiment with Axis, but I thought I'd first ask if the above is normal behaviour? If not, are there are clues anyone can give me to get the motors to grind along at an acceptable rate?

Thanking you all in advance for your kind assistance

Gareth

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

More
18 Nov 2013 15:40 #40924 by Rick G
What step and direction times are you using?
Perhaps a little more information on the settings you are using in Stepconf.

Rick G

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

More
18 Nov 2013 16:34 #40926 by cncbasher
easy answer post your hal and ini files as attachments ,
this will enable us to evaluate more than just a simple single question in one go ,

also what power supply v and amps are you using ? , as this will have an effect on the speed , although at this stage it's all about timing and settings
The following user(s) said Thank You: Glamplitude

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

More
18 Nov 2013 23:47 #40941 by andypugh

However, when I try to set up stepconf, at the "test axis" window, the jog button only jogs one click at a time (I think that could be correct) but it only does so in the Right direction (i.e. not Left).

This might be due to the step and direction signals being exchanged in stepconf.
The following user(s) said Thank You: Glamplitude

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

More
19 Nov 2013 05:05 #40951 by Glamplitude
Gentlemen, thank-you for your answers! (indeed, ladies too if I have left any out)

I have attached the files created by Stepconf during the process of my fiddling. I am not at all expert at LinuxCNC nor Stepconf, so it is entirely likely that there is an obvious error, confusing conflict or such in the file. As I said, this is my first attempt; or should I say my umpteenth attempt at my first configuration?

Is it worth pointing out at this stage that my machine is not an XYZA machine so much as a WXYZ or whatever the correct description would be for a 2x2axis machine? It's a bit maddening that I can't for the life of me make Stepconf treat all the motors equally: they all have gears and leadscrews, and there is no axis which is rotational only (what Stepconf calls the A axis).

Well, I'm very grateful if you can cast your eyes over these (no doubt atrocious) files and possibly give me an inkling as to what I might do to make the steppers drive better.

Yours optimistically and very gratefully,
Gareth

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

More
19 Nov 2013 05:20 - 19 Nov 2013 05:22 #40952 by andypugh

Is it worth pointing out at this stage that my machine is not an XYZA machine so much as a WXYZ or whatever the correct description would be for a 2x2axis machine?


It's an XYUV machine.

You probably want to look at www.buildbot.linuxcnc.org and get the 2.6/master debs installed. Then you can have a live-plot like this:

(This is a sample config, sim/axis/axis-foam Looking at that will be a huge help with your own config, which I am afraid you are going to have to at least partly hand-code)


Attachments:
Last edit: 19 Nov 2013 05:22 by andypugh.
The following user(s) said Thank You: Glamplitude

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

More
19 Nov 2013 15:20 - 19 Nov 2013 15:26 #40960 by Glamplitude
Dear Andy

Yes, indeed, that looks exactly right for me!



I think my system was already on version 2.6, according to the output from uname:

gareth@cnc-01:~$ uname -a
Linux cnc-01 2.6.32-122-rtai #rtai SMP Tue Jul 27 12:44:07 CDT 2010 i686 GNU/Linux

But I went through the instructions at buildbot (incidentally, it's buildbot.linuxcnc.org, no www). These gave some errors. Maybe I'm already at the right version, or maybe it's something else. Nonetheless, even before I run Axis, I'm keen to get the motors to step properly and speedily.

With thanks as always for your time

Gareth

The update went well:

Ign buildbot.linuxcnc.org hardy Release.gpg
Ign buildbot.linuxcnc.org/ hardy/master-rt Translation-en_ZA
Ign buildbot.linuxcnc.org hardy Release
Ign buildbot.linuxcnc.org hardy/master-rt Packages
Ign buildbot.linuxcnc.org hardy/master-rt Sources
Ign buildbot.linuxcnc.org hardy/master-rt Packages
Ign buildbot.linuxcnc.org hardy/master-rt Sources
Get:1 buildbot.linuxcnc.org hardy/master-rt Packages [5,745B]
Get:2 buildbot.linuxcnc.org hardy/master-rt Sources [1,556B]
Fetched 7,301B in 5s (1,423B/s)
Reading package lists... Done

But the install not so much:

root@cnc-01:/etc/apt/sources.list.d# apt-get install linuxcnc
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
linuxcnc: Depends: libboost-python1.34.1 (>= 1.34.1-2.1) but it is not installable
Depends: libmodbus5 but it is not installable
Depends: linux-image-2.6.24-16-rtai but it is not installable
Depends: python (< 2.6) but 2.6.5-0ubuntu1 is to be installed
Depends: python2.5 (>= 2.5) but it is not installable
Depends: python2.5-imaging but it is not installable
Depends: python2.5-tk but it is not installable
Depends: rtai-modules-2.6.24-16-rtai but it is not installable
Recommends: hostmot2-firmware but it is not installable
E: Broken packages

Nor this one:

root@cnc-01:/etc/apt/sources.list.d# apt-get install linuxcnc-sim
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package linuxcnc-sim is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package linuxcnc-sim has no installation candidate
Last edit: 19 Nov 2013 15:26 by Glamplitude. Reason: do_want image

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

More
19 Nov 2013 21:29 #40976 by andypugh

I think my system was already on version 2.6, according to the output from uname:


I that case, you should be able to run the sim/axis-foam demo config and get a feel for how it works out for you.

What I think will work for you is to create an XYZ configuration (not paying much attention to Z) then manually copy the X and Y configuration stuff in the INI and HAL to U and V (you can reference the sim/axis-foam config to see how it all needs to fit together)

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

More
24 Nov 2013 14:52 - 24 Nov 2013 14:54 #41142 by Glamplitude
Hello Andy

Thank-you very much. Sorry for the silence - my day job has been crazy in the last while. Well, this morning I decided to try switching the step and direction signals in Stepconf and WHAT A LOT OF NOISE AND MOVEMENT! I'm Mr. Popular now, for making a hell of a noise in the house first thing on a Sunday but I couldn't be happier. The movement was erratic and didn't sound smooth - indication that the numbers I have saved for accelleration, speed and so on are way out, but the whole gantry leapt into life!

Thanks for all the support and encouragement; I shall do exactly as you say, and find the bits which are now working from the one set of configs and merge them with another set designed for a hotwire machine. I'll come back to you when I've got something to report.

Cheers!

Gareth
Last edit: 24 Nov 2013 14:54 by Glamplitude. Reason: grammar

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

More
26 Nov 2013 16:52 #41175 by Glamplitude
Dear everyone who has been helping me

I am going to close this thread because under the title of steppers moving really slowly, the issue has been solved. There are new issues, with which I am currently fighting the good fight, but the motors are zooming about merrily.

The solution was: swap the step and direction signal around for each motor.

I don't really understand why, because now the step pin feeds into the DIR input on the driver board, but there you go.

Thanks to everyone who contributed!

Gareth

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

Time to create page: 0.116 seconds
Powered by Kunena Forum