On Sat, 9 Mar 2019 08:29:10 -0800
"John Dammeyer" <[email protected]> wrote:

> I've been trying to decide the best forum to ask this question.  Given the 
> last few subjects on both STM32s and CANopen I'll start here and if not 
> perhaps someone can point me to a better place or we can take it off line.

STM32s and CANopen I am used to.

> I'm trying to learn a bit more about the Hardware Abstraction Layer (HAL) 
> used in LinuxCNC ...

I am trying the same right now.

> ...
> If I had a similar test on a LinuxCNC system and wanted to examine a switch 
> input what would the code look like and how would it break down into the 
> final machine instructions?

First you need to load driver CAN network driver in linuxcnc with "loadrt" 
command and add a thread to read/write periodically.

Then you map the net/signal in the *.hal file. or look at in the menu 
"Machine/Hal Meter" or the menu "Machine/Show Hal Configuration"

> ...
> Can someone knowledgeable with HAL and programming for LinuxCNC perhaps post 
> a similar example.  Say you have an I/O board plugged into the PC bus that 
> gives you 8 inputs and 8 outputs.  How does a simple test like:

I have to drivers in HAL I am working with, one for Ethernet and the other for 
Ethercat. They both use the Ethernet port.

> I've tried to look at the STMBL code which also uses a HAL approach. There a 
> Python program reads files and generates C code and include files.

There are *.comp files used for some components.

> But there's so much I'm really becoming quite confused on what may well be 
> really easy.  I lose track because the STMBL does so much,  So maybe a 
> "dummy's guide to HAL on LinuxCNC"?

There are documentation and I have read some of it.


Nicklas Karlsson


_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to