× Forum Header

Forward Step / Backward Step - Vexta Question

More
13 Mar 2018 13:33 #107274 by BrendaEM
I am I correct in assuming that StepConf cannot set up driver for a forwardstep and backwardstep pins such as the older Vexta drivers for parallel port use?

I have found very little info, but this:
forum.linuxcnc.org/38-general-linuxcnc-q...s-with-cw-ccw-signal

I've written a 3,000+ line serial-port command-line Arduino Stepper test program, and yet I am not confident that I can set up a motor with Linux CNC.
forum.arduino.cc/index.php?topic=469343.msg3213804#msg3213804

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

More
13 Mar 2018 13:58 #107276 by PCW
I dont think stepconf can set the step type but its easy to do in the hal file section that loads the stepgen component

The stepgen manual page explains how to do this:

man stepgen

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

More
13 Mar 2018 16:32 - 13 Mar 2018 16:36 #107281 by BrendaEM
Thank you PCW...

...but I looked over some of the documentation for HAL and Stepconf; it looks like a real complicated, sparely documented, nightmare : (

That's why I posted the original post.
Last edit: 13 Mar 2018 16:36 by BrendaEM.

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

More
13 Mar 2018 17:22 - 13 Mar 2018 17:30 #107284 by PCW
I think HAL is quite well documented as is the stepgen component. in addition,
there are HAL tutorials to get you started, for example:

linuxcnc.org/docs/html/hal/tutorial.html

l also think that as a simple setup tool stepconf does OK for most people but for more unusual LinuxCNC
configurations or customization you need some understanding of hal and components

DId you read the stepgen manual page and look at the (stepconf created) hal file?
Last edit: 13 Mar 2018 17:30 by PCW.

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

More
13 Mar 2018 22:14 #107307 by andypugh
Also look here for more elaborate stepgen docs.

linuxcnc.org/docs/2.7/html/hal/rtcomps.html#_stepgen

(precis: You need step_type 1)

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

More
14 Mar 2018 00:42 - 14 Mar 2018 00:46 #107324 by BrendaEM
I am looking at the HAL tutorials. It's difficult for me to get a lay of the land. Yikes, there's tread management on the first page of the tutorial. Do certain things have to be loaded? Are there kernal-module depends?

Looking at a StepConf's GUI, those are the only settings I am interested in, well that and the ability to set for stepforward/stepbackward.

AFAIK, I am not going to be able to use stepconf to created/modify the HAL configuration for my set up. If there were a forward-step / backward step option, I wouldn't have to mess with HAL in the first place.

It's regrettable that what I have seen appears a very flat non-tree way of doing things. In other words, why should a user see low-level motor winding waves--and higher level motor-driver settings at the same time?

Andypugh, thanks I have seen that about stepgen.
Last edit: 14 Mar 2018 00:46 by BrendaEM.

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

More
14 Mar 2018 10:27 #107338 by andypugh
Originally the HAL file was the only way to configure LinuxCNC[1]. However a Netlist like HAL will always be able to encompass more complexity than the author of a config tool like Stepconf can even envisage.

I think the way to look at this is that Stepconf creates an INI and HAL file for you, and you should feel "ownership" of those files. They are deliberately human-readable and human-editable.

Stepconf is a write-only utility. If you change an option all it knows how to do is re-create the files from scratch.
Once you are happy that you got all the options in Stepconf correct (or, even, most of them) then it is time to stop using it and change settings in the INI and logic in the HAL.

In your case you only need to save one line
loadrt stepgen step_type=0,0,0
needs to become
loadrt stepgen step_type=1,1,1

[1] Not entirely true, before the HAL layer was introduced the only way to configure LinuxCNC was to recompile.

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

More
17 Mar 2018 10:04 #107462 by BrendaEM
Thank you Andypugh.

I did understand that Stepconf was a utility that likely just sets settings.

But....

It's still not at all clear how the HAL in large is supposed to be human interfaced with. In other words, it appears that, the incantation: loadrt stepgen step_type=1,1,1 will cause a temporary change in the system, which will also be wrote to a file, but if the system is saving out the state settings, more akin to an old Quake (game) config.cfg than a fstab or a sources.list, then we aren't going to be able to put organized notes in it, are we?

And yet, we are not loading with loadrt, the thing (stepgen) the modifies the system?

LinuxCNC is quite a novel system. Though, the settings are so utterly granular that even as someone who wrote a command-line stepper interpreter myself, who has some Linux experience, I don't know if I am going to be able to set up my system.

LinuxCNC's complexity and perhaps it's power are unprecedented. As someone who wrote technical documentation professionally, I should think that most users would need clearer documentation.

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

More
17 Mar 2018 11:30 #107463 by andypugh

It's still not at all clear how the HAL in large is supposed to be human interfaced with. In other words, it appears that, the incantation: loadrt stepgen step_type=1,1,1 will cause a temporary change in the system,


I don't understand what you don't understand...

Would it help to think of the HAL file as like an old DOS batch file?

Your config currently has a HAL file that Stepconf created. That file is almost certainly setting the step type to 0.
Edit that file, and make the step type 1.
Job done.

As someone who wrote technical documentation professionally, I should think that most users would need clearer documentation.


The basics of how the HAL file works are here:
linuxcnc.org/docs/2.7/html/hal/basic-hal.html

And then every HAL component has its pins, functions and command line options documented here:
(Expand "realtime components and HAL modules"). There are a lot of them. "motion" is probably the most important.

But, to address your current problem, you just need to edit the HAL file in your config folder.

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

More
18 Mar 2018 01:35 #107478 by tommylight
If i remember correctly, there are 2 more things to edit in the hal file, namely the pin and stepgen pin names, besides what Andy already mentioned, so to recap:
loadrt stepgen step_type=0,0,0
should be changed to
loadrt stepgen step_type=1,1,1

net xstep => parport.0.pin-02-out
net xdir => parport.0.pin-03-out
should be changed to
net xup => parport.0.pin-02-out
net xdown => parport.0.pin-03-out

and
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
should be changed to
net xup <= stepgen.0.up
net xdown <= stepgen.0.down

Basically that is all that is needed to make your drives work with Linuxcnc and parallel port.
Please do double check that as it has been quite some time since i used type 1 stepgen, but i do use type 2 up to 9 very often, and they use XPA, XPB, for type 2 and XPA,XPB,XPC,XPD for types 4 to 9 (type 3 is 3phase i think ).

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

Time to create page: 0.177 seconds
Powered by Kunena Forum