Forum Header

Forward Step / Backward Step - Vexta Question

More
8 years 7 months ago #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
Code:
loadrt stepgen step_type=0,0,0
needs to become
Code:
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
8 years 7 months ago #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
8 years 7 months ago #107463 by andypugh

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 or Create an account to join the conversation.

More
8 years 7 months ago #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.

More
8 years 7 months ago - 8 years 7 months ago #108161 by BrendaEM
Thank you again @andypugh.

The documentation lacks situational awareness. It's detailed yet myopic. We get a close look at certain sections, but we, or at least, I don't get a good basic sense of the LinuxCNCs architecture works.

[Perhaps pretend that I am just a newbie who didn't contribute anything this project, so I don't know much about it : )
Or perhaps, imagine that we read about Sherlock, Watson, a butler, and a heavy candlestick, but from reading the documentation, it's hard to understand: what happened, and where, and when.
Or, what problem was StepConf Wizard created to solve?]

Yet it seems like I should use StepConf to create a basic yet HAL setup, and then edit it from there.

@tommylight, thank you.

I am sorry, I am just getting back to this thread. I wasn't feeling too good for a few days, and today I needed to solder a few wires on my machine to feel I am making progress.
Last edit: 8 years 7 months ago by BrendaEM.

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

More
8 years 7 months ago #108172 by andypugh

BrendaEM wrote: The documentation lacks situational awareness. It's detailed yet myopic. We get a close look at certain sections, but we, or at least, I don't get a good basic sense of the LinuxCNCs architecture works.


I think that you are probably correct there, but it is a hard puzzle to solve as different users will want different things from the docs, and every time someone writes a section to explain something from a different viewpoint we end up with even more documentation, and potentially more confusion.

As an example, there is an architecture overview here:
linuxcnc.org/docs/2.7/html/code/code-notes.html
But it might well not be the overview that you want. It is also somewhat out of date, as it was written when the HAL was a relatively new idea, and hadn't developed into the vital part of LinuxCNC that it has become since.

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

Time to create page: 0.242 seconds
Powered by Kunena Forum