× Forum Header

quadrature output in stepconf

More
23 Jun 2013 00:09 #35923 by Goosey
My stepper drivers accept a quadrature output from the parallel port but I can't find out where to change it from step/direction to quadrature. I'm getting the motors to step one step in each direction when I jog in the test window and I'm assuming that is simply the direction pin changing state. If I click run, I hear a frequency generated in the motor which I assume is the step pin pulsing.
Could someone point me in the right direction?

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

More
23 Jun 2013 00:34 #35924 by ArcEye
Hi

You have moved beyond what stepconf can do, it just outputs basic generalised configs.

Look at linuxcnc.org/docs/2.5/html/man/man9/stepgen.9.html

and edit the relevant section of the config that stepconf generated (.hal file)

eg
loadrt stepgen step_type=2,2,2 ctrl_type=p,p,p

would probably cover a 3 axis quadrature stepper setup

regards
The following user(s) said Thank You: Goosey

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

More
23 Jun 2013 10:32 #35937 by Goosey
I replaced the stepconf loadrt stepgen statement with the one above...it does seem to be the very settings I need.
However, after rebooting and trying LinuxCNC again, still get the errors. I do get the pick list for configs, including the one I made with stepconf but it fails to continue after.
I have only used stepconf and the change you offered. I even put "loadrt stepgen step_type=2,2,2 ctrl_type=p,p,p
" in the custom.hal file, thinking that might work but no luck Could I be missing some other pre-run config?

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

More
23 Jun 2013 13:29 #35938 by ArcEye

However, after rebooting and trying LinuxCNC again, still get the errors. I do get the pick list for configs, including the one I made with stepconf but it fails to continue after.


I am confused as to what error you are getting

Your previous problem was that the motors did not move.
Now you seem to be saying you have the same problem AND that you cannot start Axis

Run linuxcnc from a terminal and cut and paste the error messages

Also zip your whole config directory and attach that

Regards

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

More
24 Jun 2013 03:53 #35961 by Goosey
With the stepconf test window, when I try to jog left or right, it will take only one step but when I hit run, the motor emits a frequency at the step rate but doesn't move. I deduce this means it is getting step/dir commands instead of quadrature.
When I change the ini files by replacing step/dir with loadrt stepgen step_type=2,2,2 ctrl_type=p,p,p it breaks linuxcnc and it won't even load.
If I had a set of basic ini files for 3 stepper motors driven by quadrature sequence outputs (00 01 11 10) I believe I might be able to step by step learn whatever else I need to do.
I have no feedback, aka. stop switches, only the three h-bridge drivers. The signal to one side of the h-bridge has one pin inverted so I only need one wire per side for forward and reverse current, depending on that output being high or low.. That means 2 parport outputs per bridge.
I've tried editing several of the stepper configs offered when linuxcnc starts but it always breaks them to change them to loadrt stepgen step_type=2,2,2 ctrl_type=p,p,p and then linuxcnc just won't continue. And each time i edit, I reboot before I try to run the edited version, in case something is still loaded in mem.

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

More
24 Jun 2013 03:56 #35962 by Goosey
Since my machine is in the shop and not on the internet, I'll zip everything up when I'm there next and send it to you via sneaker net <G>

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

More
24 Jun 2013 17:24 - 24 Jun 2013 17:24 #35974 by ArcEye
OK, It is the terminal output which can be important, should say exactly what the error was or at least point that way.

I suspect I know what is happening when linuxcnc fails to start, but without the error message I cannot be sure.
I probably assumed too much knowledge and familiarity with my original advice

If you have changed the loadrt stepgen line in your .hal file, have you also changed the axis settings lines?

If you look at the man page for stepgen, you will see that stepspace, dirsetup and dirhold do not apply to a type 2 stepgen and those pins will not exist.
If you are editing a stepconf generated config they will be set for a type 0 stepgen and these pins will be initiated with several setp lines per axis
You need to comment them out

Also note that the dirdelay pin will exist for a type 2 stepgen and needs to be set with a sensible delay for direction changes in nano secs
I have no idea what that figure should be, I would probably start at the same value as the dirhold was set to and see what happened.

Have you seen this as a bit more detailed account of the stepgen outputs?
www.linuxcnc.org/docs/html/hal/rtcomps.html

regards
Last edit: 24 Jun 2013 17:24 by ArcEye.

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

More
24 Jun 2013 23:51 #36002 by Goosey
I had read www.linuxcnc.org/docs/html/hal/rtcomps.html but when it said simulation, i overlooked it in favor of an actual working example. Thanks for the reroute. I often have to re-read new tech (to me) several times to get it's totality embedded in my mind and I'm not there yet

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

More
25 Jun 2013 06:54 #36015 by Goosey
I made the changes you recommended and the program actually ran, but wouldn't talk to the motors. I read farther and I think the main thing I need to get a handle on is (setp stepgen.2.phase-A output). Complete info on it doesn't seem to reside in one place so I'm on a search now to find out more.
attached is both the error code and my hal file
Attachments:

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

More
25 Jun 2013 14:42 - 25 Jun 2013 15:16 #36025 by cncbasher
you don't have the phase's connected as you thought ...
take a look here
www.anderswallin.net/2011/11/ab-quadrature-from-emc2/

attached your hal file modified to suit , just check the parallel port pins of course
it's untested .
Attachments:
Last edit: 25 Jun 2013 15:16 by cncbasher.

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

Time to create page: 0.168 seconds
Powered by Kunena Forum