Home designed and built 5C CNC lathe with ATC and C_Axis

More
5 years 7 months ago #204084 by PCW
pncconf could probably have some more descriptive check box names
Though not sure what you would use rather than "Single Input Encoder"
maybe a selecting box with ABZ vs AZ but that is jargon also

HALs at its base is rather simple, most of it consists of statements that
simply connect a pin or multiple pins to a signal:

net some_signal some_pin0 some_pin1 some_pin_n

Where the signal name is arbitrary and the pin names come from LinuxCNC components

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

More
5 years 7 months ago #204455 by Becksvill
NOJO

first off don't want to step on any toes here. the guys replying to you are some of the main experts on linuxcnc. where as I am only 3 years old in linuxcnc

but I was just going to document my build thread a bit on another cnc mill I am retrofitting and say your questions so am taking time to help hopefully.

it sounds like you need some one on one help. and sit down with you

first off maybe best way is just to email me, you can find me at carbidecutters.co.nz

and then I can help you directly and add you to various groups that are great for sharing ideas.

there is a facebook group that is quite active and good for these first step things where people are just trying to get to grips with linuxcnc and getting stuck on simple stuff.

and also various chat groups that are great.

the forum is awesome for hard questions but a bit harder to do video calls on lol

anyway email me if you want a hand

regards

Andrew (new zealand)

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

More
5 years 6 months ago #204467 by NoJo
Andrew, you are very kind! Yes, I do need someone, a patient someone.., to help me over the barrier. I am not that dumb, have done some very smart stuff in my life and career, am an Electronics engineer and an Aeronautical Engineer, Designed aircraft and flight control systems, etc, etc - not to tout my own flag, but it is precisely that that frustrates me to madness! I am bright enough to easily be able to get my mind around this, and yet....
I know that this is simply an issue of not grasping the fundamentals, and therefore the rest is Greek...Sort of like, don't go do Physics if you don't grasp complex, or even basic, Math..
I will email you Andrew, thank you.

Regards
Joe

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

More
5 years 6 months ago #204477 by Becksvill
awesome

I have been in your shoes.

I am just a young guy that is completely self taught. 3 years ago I didn't know what a relay was. but its not too hard to get started once you grasp the concepts


just for anyone else following along this youtube channel is really good for learning linuxcnc. he teaches are a nice pace and its great.


and just for those that are interested I am trying to make a nice complete build thread here that people can learn from in the future
retrofitting a large 6ton high speed VMC

High speed VMC retrofit

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

More
5 years 6 months ago #204491 by andypugh

NoJo wrote: I cannot grasp how the signal, pins, etc integrate and till I manage that, there is no way I could read or change a HAL file without simply hacking.


Let me try a high-level overview.

To a large extent the HAL file is a way to map the values that come out of the motion module to physical pins on the interface and a way for physical pin values to be interpreted by the motion module. [1]

Consider the X axis on a stepper system.
First the HAL file will load the motion module. On being loaded the module sets up a lot of internal connections and configures itself by reading values from the INI file.
Code:
loadrt motmod ...{config options}...
The important pin here is (typically) joint.0.motor-pos-cmd. This is a double-precision floating point number.
The HAL file needs to create a signal to refer to this value by. We will choose to call it "this-is-my-X" to stress that the signal names can be anything.
Code:
net this-is-my-X joint.0.motor-pos-cmd
If we want, we can add an arrow for human readers. But LinuxCNC pays no attention to them.
Code:
net this-is-my-X <= joint.0.motor-pos-cmd
We need a pair of digital step/dir outputs rather than a floating point number. This is what the stepgen components do. I say "components" as there are a few of them. There is a software one for parallel ports, and integrated ones for Mesa, Pico, Pluto etc.
The Mesa / Pluto / Pico output the physical pulses on pins that are defined by their internal firmware. So here we will use the software stepgen as the example. Note that the output of the software stepgen does not _have_ to go to the parallel port. That is one of the strengths of HAL. You could set up a quadrature stepgen to drive an encoder counter. I don't know why you would want to, but you could.
So, we load a stepgen . Actually we will load 4, 3 in position mode and one in velocity mode.
Code:
loadrt stepgen ctrl_type=p,p,p,v
And connect the motor position command to the appropriate pin..
Code:
net this-is-my-X => stepgen.0.position-cmd

We would then use further "net" commands to wire the bit-type step/dir signals to appropriate IO
Code:
net this-is-my-X-step stepgen.0.step => parport.0.pin-00-out

And, that, is basically, all that HAL does. It takes numerical or logical values, optionally converts them to other types of values, and transfers them to other moduels, and eventually out into the real world.

I don't know if this was any help. I just took a guess at where the conceptual block might be.

I recommend skimming through all the HAL modules listed here:
linuxcnc.org/docs/2.8/html/
under the headings "Commands and userspace components" and "Realtime components and kernel modules". Just to get a feel for the sorts of signal manpulations that HAL can do.

[1]This is the typical situation. The motion module is not always loaded, and there is not always any physical interface, but those are special cases.
The following user(s) said Thank You: Clive S, besriworld, johnmc1, NoJo

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

More
5 years 6 months ago #204495 by Clive S
Extremely well put Andy. Thankyou

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

Time to create page: 0.222 seconds
Powered by Kunena Forum