Pentapod configuration

More
31 May 2021 05:51 #210772 by Tawhiri
I am working on a pentapod machine, and I'm looking for advice about connecting my hardware.

I understand that since 2.8 compiling the pentapod kinematics with comp or halcomp is no longer necessary. (I realized this after messing up the *.ko files and having to reinstall LCNC)

Now I have a fresh install of LCNC 2.8. I created a basic pentapod configuration with the configuration selector.
My parallel ports, drivers and motors are working ok with a trivial config. (though sometimes the program complains about a missing port - but actually both works fine)

The part where I am stuck is that in which files should I put my port addresses and the pin layout?
LinuxCNC seems to ignore what I write in 'pentapod_cmds.hal', and when closing the program it reverts the file to its initial state.
I looked at the HAL files in the folder 'hallib', but none of them appears to be the obvious choice, and they are read-only anyway, so I'm guessing that I should keep them as they are.

And the second part of the question: exactly what should I write in this file? Looking at the HAL I can't see much common with the trivial design's HAL. A working example would be hugely useful.

Many thanks in advance
AndrĂ¡s

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

More
31 May 2021 08:13 #210779 by andypugh
Replied by andypugh on topic Pentapod configuration

The part where I am stuck is that in which files should I put my port addresses and the pin layout?
LinuxCNC seems to ignore what I write in 'pentapod_cmds.hal', and when closing the program it reverts the file to its initial state.


It sounds like you might be re-opening the Sample Configs -> sim -> axis -> Pentapod configuration.
The first time you open a sample config it is copied into your home directory into ~/linuxcnc/configs.
You can access that from the config picker by expanding the "My configs" section:

Attachments:
The following user(s) said Thank You: Tawhiri

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

More
01 Jun 2021 08:00 #210862 by Tawhiri
Replied by Tawhiri on topic Pentapod configuration
Thank you for the quick reply.
I am using the config under "My Configurations".
And the issue remains when I make a new copy of the config: all I put into the HAL file is ignored and the file is overwritten.

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

More
01 Jun 2021 08:02 #210863 by andypugh
Replied by andypugh on topic Pentapod configuration
Why are you making a new copy of the config?

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

More
01 Jun 2021 08:11 #210864 by andypugh
Replied by andypugh on topic Pentapod configuration
Can you explain the sequence of events?

If you open a config from the "Sample Configs" then a copy is made in your home linuxcnc directory.

If you open the same sample config gain, it creates another copy of the sample config. You can see this in my screenshot as I have sim,axis, sim.axis-1, sim,axis-2 and so on.

Any changes you make in the files in your home directory should not be over-written unless you re-run one of the config wizards.

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

More
01 Jun 2021 08:38 #210868 by Tawhiri
Replied by Tawhiri on topic Pentapod configuration
I made the copy to see if creating something without the config selector helps.

Here is what I did:
1. open 'home/andras/configs/sim.axis.pentapod/'pentapod_cmds.hal'
2. add this line: 'loadrt hal_parport cfg="0x1100 0x2100" '
3. run linuxCNC using the '/home/andras/linuxcnc/configs/sim.axis.pentapod/pentapod.ini'
4. close linuxCNC
5 open '..home/andras/configs/sim.axis.pentapod/'pentapod_cmds.hal' again: the line about the ports is gone

The weird thing is that my trivial config, which I created without the config selector (copied and edited some files from github) is working fine.

Maybe there is a line somewhere in one of the files which launches a config tool in the background which overwrites the files?

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

More
01 Jun 2021 09:57 #210873 by andypugh
Replied by andypugh on topic Pentapod configuration

2. add this line: 'loadrt hal_parport cfg="0x1100 0x2100" '


Not the problem, but you might want to "in" or "out" after each address:
linuxcnc.org/docs/2.8/html/hal/parallel-port.html
(I thought that it was necessary, but the docs say that it is optional)

5 open '..home/andras/configs/sim.axis.pentapod/'pentapod_cmds.hal' again: the line about the ports is gone


This is extremely odd. I have never seen this.

Try making a complete copy of the config directory and working in that instead.

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

More
01 Jun 2021 12:35 #210883 by Tawhiri
Replied by Tawhiri on topic Pentapod configuration
Found the solution:
in the INI file this line
HALFILE = LIB:basic_sim.tcl
had to be replaced with this:
HALFILE = ./pentapod_cmds.hal

Actually the text in the HAL file explains this rather clearly:
# To use ./pentapod_cmds.hal in the original inifile (or a copy of it),
# edit to change:
#     [HAL]
#     HALFILE = LIB:basic_sim.tcl parameters
# to:
#     [HAL]
#     HALFILE = ./pentapod_cmds.hal
Moral of the story: reading helps :)

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

Time to create page: 0.099 seconds
Powered by Kunena Forum