- Posts: 266
- Thank you received: 0
Forward Step / Backward Step - Vexta Question
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 to join the conversation.
The stepgen manual page explains how to do this:
man stepgen
Please Log in to join the conversation.
...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.
Please Log in to join the conversation.
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?
Please Log in to join the conversation.
linuxcnc.org/docs/2.7/html/hal/rtcomps.html#_stepgen
(precis: You need step_type 1)
Please Log in to join the conversation.
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.
Please Log in to join the conversation.
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
[1] Not entirely true, before the HAL layer was introduced the only way to configure LinuxCNC was to recompile.
Please Log in to join the conversation.
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 to join the conversation.
BrendaEM wrote: 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 to join the conversation.
- tommylight
-
- Offline
- Administrator
-
- Posts: 22010
- Thank you received: 3
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 to join the conversation.
