(SOLVED - maybe) How to get an underscore in a pin/parameter name?
14 Jun 2018 16:10 #112360
by andypugh
Replied by andypugh on topic How to get an underscore in a pin/parameter name?
Create your component and then pre-process
Then edit the generated C file to have your pin names.
Then compile and install
halcompile --preprocess hm2_7i76e.comp
Then edit the generated C file to have your pin names.
Then compile and install
sudo halcompile --install hm2_7i76e.c
Please Log in or Create an account to join the conversation.
14 Jun 2018 16:11 #112361
by andypugh
Replied by andypugh on topic How to get an underscore in a pin/parameter name?
But, on a typical LinuxCNC intallation you can simply change the [HOSTMOT2[BOARD string to be your hm2-7i76 module and edit the loadrt lines.
Please Log in or Create an account to join the conversation.
14 Jun 2018 16:13 #112362
by andypugh
Replied by andypugh on topic How to get an underscore in a pin/parameter name?
I don't suppose hm2_test is any help?
github.com/LinuxCNC/linuxcnc/blob/master...-hostmot2/hm2_test.c
github.com/LinuxCNC/linuxcnc/blob/master...-hostmot2/hm2_test.c
Please Log in or Create an account to join the conversation.
14 Jun 2018 17:24 #112363
by Sparky961
Not at all helpful.
Replied by Sparky961 on topic How to get an underscore in a pin/parameter name?
I'd be putting my wager on the coder doing something wrong rather than the compiler doing something wrong
...
Just cos a underscore can be used does not necessarily mean it should.
Not at all helpful.
Please Log in or Create an account to join the conversation.
14 Jun 2018 17:26 #112364
by Sparky961
Perhaps you missed where I showed doing exactly the same...
forum.linuxcnc.org/24-hal-components/347...?limitstart=0#112340
Replied by Sparky961 on topic How to get an underscore in a pin/parameter name?
Create your component and then pre-process
halcompile --preprocess hm2_7i76e.comp
Then edit the generated C file to have your pin names.
Then compile and install
sudo halcompile --install hm2_7i76e.c
Perhaps you missed where I showed doing exactly the same...
forum.linuxcnc.org/24-hal-components/347...?limitstart=0#112340
Please Log in or Create an account to join the conversation.
14 Jun 2018 17:30 #112365
by andypugh
That doesn't seem to be exactly the same thing at all. Perhaps you failed to read my recipe?
(And you will find that you get the problem you describe any time that the component name and the file name do not match, so if you didn't change the component name in supply.c then it simply won't work.)
Replied by andypugh on topic How to get an underscore in a pin/parameter name?
Perhaps you missed where I showed doing exactly the same...
forum.linuxcnc.org/24-hal-components/347...?limitstart=0#112340
That doesn't seem to be exactly the same thing at all. Perhaps you failed to read my recipe?
(And you will find that you get the problem you describe any time that the component name and the file name do not match, so if you didn't change the component name in supply.c then it simply won't work.)
The following user(s) said Thank You: InMyDarkestHour
Please Log in or Create an account to join the conversation.
14 Jun 2018 17:36 #112366
by Sparky961
It looks promising. If it allows me to run a config offline it is a viable solution.
Replied by Sparky961 on topic How to get an underscore in a pin/parameter name?
I don't suppose hm2_test is any help?
github.com/LinuxCNC/linuxcnc/blob/master...-hostmot2/hm2_test.c
It looks promising. If it allows me to run a config offline it is a viable solution.
Please Log in or Create an account to join the conversation.
- InMyDarkestHour
- Offline
- User is blocked
Less
More
- Posts: 701
- Thank you received: 111
14 Jun 2018 17:38 #112367
by InMyDarkestHour
Replied by InMyDarkestHour on topic How to get an underscore in a pin/parameter name?
That's what I was trying to say, the file name and component name have to match, hence the coding error.
What is the thing with the dash replacing underscore if you know ?
What is the thing with the dash replacing underscore if you know ?
Please Log in or Create an account to join the conversation.
14 Jun 2018 17:45 #112368
by andypugh
Part of the (widely ignored) canonical interface specification.
It is documented somewhere that all HAL pins should use hyphens.
Replied by andypugh on topic How to get an underscore in a pin/parameter name?
What is the thing with the dash replacing underscore if you know ?
Part of the (widely ignored) canonical interface specification.
It is documented somewhere that all HAL pins should use hyphens.
The following user(s) said Thank You: InMyDarkestHour
Please Log in or Create an account to join the conversation.
14 Jun 2018 17:46 #112369
by andypugh
It looks promising. If it allows me to run a config offline it is a viable solution.[/quote]
Having tried it, I am not sure if any of the test_patterns actually load.
For example.
Replied by andypugh on topic How to get an underscore in a pin/parameter name?
github.com/LinuxCNC/linuxcnc/blob/master...-hostmot2/hm2_test.c
It looks promising. If it allows me to run a config offline it is a viable solution.[/quote]
Having tried it, I am not sure if any of the test_patterns actually load.
halrun
loadrt hostmot2
loadrt hm2_test test_pattern=6
For example.
Please Log in or Create an account to join the conversation.
Time to create page: 0.088 seconds