Scratch build 5 axis Router

More
7 years 7 months ago #127738 by cvp83
Replied by cvp83 on topic Scratch build 5 axis Router
Ok, tried an experiment to see if "extra_setup" from a .comp hardware driver has access to .ini file variables. To me it looks like extra_setup does not have the variables at it disposal. Below is the "paper trail" as simply put as I can. Hope you can follow it. Anyone else encounter this issue? Just a detail that will need to worked around - with something like the runonce strategy shown below?

[KINS]
KINEMATICS = trivkins
JOINTS = 5


via hal

setp cvlm629.numchan [KINS]JOINTS

excerpts from .comp file:
...
param rw u32 numchan;
...
rtapi_print("NumChan from ini(val: %u)\n",numchan); //this line in extra_setup
...
if(runonce == 0) {
rtapi_print("NumChan runonce(val: %u)\n",numchan); //this line in the servo update loop
runonce++;
}


then view with dmesg
...
[ 731.845975] NumChan from ini(val: 0)
...
[ 731.892304] NumChan runonce(val: 5)

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

More
7 years 7 months ago #127776 by andypugh
The problem there is that extra_setup runs at load-time, prior to the "setp" line in HAL being run.

If you want to pass parameters to a .comp at load time, then they should be command-line parameters.

carousel.comp uses several of them using RTAPI_MP_ARRAY in the C-code section.
There is an (undocumented) header-item "modparam" that can be used in a .comp file but it is rather more limited. (and might not work at all, which would explain the lack of mention in the docs)

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

More
7 years 7 months ago #127785 by pl7i92
Replied by pl7i92 on topic Scratch build 5 axis Router
woudent it be mutch easyer to with the Standard 5Axis kinetics
then interfear with the trivials
THIS is My 6Axis 5Joints+ATC router at 3000Euros limit by Education

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

More
7 years 7 months ago #127789 by cvp83
Replied by cvp83 on topic Scratch build 5 axis Router
Thank you for clearing this up. I will implement a command line parameter. NumcChan is the only item that extra_setup must have.

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

More
7 years 7 months ago #127791 by cvp83
Replied by cvp83 on topic Scratch build 5 axis Router
I am guessing you question was:
"Would it not be easier to buy a CNC than make your own?"
Yes! ..but if you like the challenge of building something useful, then the picture is quite different. Spent $1250CDN and an unknown number of hours - with no regrets so far.

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

More
7 years 7 months ago #127792 by cvp83
Replied by cvp83 on topic Scratch build 5 axis Router
I am guessing you question was:
"Would it not be easier to buy a CNC than make your own?"
Yes! ..but if you like the challenge of building something useful, then the picture is quite different. Spent $1250CDN and an unknown number of hours - with no regrets so far.

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

Time to create page: 0.130 seconds
Powered by Kunena Forum