Scratch build 5 axis Router
02 Mar 2019 04:24 #127476
by cvp83
Scratch build 5 axis Router was created by cvp83
The purpose of sharing the details of the project is to give back to the LinuxCNC community, as I feel indebted for using the software and configuration examples to get this machine up and running. No doubt questions will arise as to why things were done the way are regarding this project, I excuse myself by stating I have no formal training in mechanical engineering or electronic design beyond that of High School. It needs to be understood the challenge was to make this thing – like making a puzzle, the end goal not just creating a working CNC.
Some Files relating to this project can be found here:
drive.google.com/open?id=1wldi5eFHPor_aLBJJXT_E7E9axwzdUxr
This project was started in October of 2015. CadKey Win 7 (1994!) was used to design the mechanics. Tried to port the drawing to FreeCAD 0.16 but found it hard to work with the imported DXF geometry in a useful manner. PCB123 from Sunstone was used to generate the schematics and circuit board layouts. The CVLM629 board (named after me and my favorite chip LM629) was made by Sunstone, they did a real nice job but it was expensive to have the minimum quantity made.
One of the design objectives was that the machine should fit through a standard width doorway. The work envelope ended up being 740mm x 396mm x 280mm (29.1” x 15.6” x 11.0”). The A axis can rotate infinitely. The B axis can move 270 degrees. The spindle is a 1/2” Mastercraft router. Many of the components are from scraped things like photocopiers and automobiles. Four of the five servo motors are Chevy Cobalt power steering motors. The X axis has a used timing belt from a Toyota Sienna cut in half. The A axis has a pancake motor from a photocopier. Motors were modified to mount Broadcom AEDM-5810-Z06 encoders.
With only Quick Basic 4.5 and Macro Assembler 5.1 experience (yes I am getting old), understanding Linux and C programming was a daunting process. As of Feb. 2019 LinuxCNC 2.7.12 is being used. Tried 2.8.0pre with Gmoccapy 5 axis back in Sept. 2018 but could not get it running and no clues were reported in the error logs, so reverted back to the Axis GUI. Will wait for the full 2.8 release and try again.
Still have some ongoing problems:
The big one is that the extra_setup from the hardware driver .comp file cannot access any variables from the .ini file, no errors occur but all values are set at zero. Moving the [HAL] section to the end of the .ini did not change things. To overcome this the needed items were hard-coded into the .comp file.
Another problem is a large axis._.f-error at high servo speeds (13mm at 7500mm/min). It is a few hundredth of a mm at 200mm/min. Even with the servo loop running at 120/sec that’s 1mm per sample interval. Tried the servo loop at 240 but that made no difference. Might be the PID values written to the LM629 motion control chips, but since the first described problem exists it is cumbersome to change these. Besides this it seems the physical position is not in error near as much as is reported. A test was done where a 300mm dia. plate was attached to the vertical A axis (B axis at 90 deg.), a spot marked at 150mm radius, and full X-Y plane circle was plotted at 6300mm/min while also rotating the A axis 360 degrees. An estimated 2mm of error appeared to exist. A ridiculous value for FERROR in the .ini file needs to be there to keep it from E-Stopping on rapids.
Some Files relating to this project can be found here:
drive.google.com/open?id=1wldi5eFHPor_aLBJJXT_E7E9axwzdUxr
This project was started in October of 2015. CadKey Win 7 (1994!) was used to design the mechanics. Tried to port the drawing to FreeCAD 0.16 but found it hard to work with the imported DXF geometry in a useful manner. PCB123 from Sunstone was used to generate the schematics and circuit board layouts. The CVLM629 board (named after me and my favorite chip LM629) was made by Sunstone, they did a real nice job but it was expensive to have the minimum quantity made.
One of the design objectives was that the machine should fit through a standard width doorway. The work envelope ended up being 740mm x 396mm x 280mm (29.1” x 15.6” x 11.0”). The A axis can rotate infinitely. The B axis can move 270 degrees. The spindle is a 1/2” Mastercraft router. Many of the components are from scraped things like photocopiers and automobiles. Four of the five servo motors are Chevy Cobalt power steering motors. The X axis has a used timing belt from a Toyota Sienna cut in half. The A axis has a pancake motor from a photocopier. Motors were modified to mount Broadcom AEDM-5810-Z06 encoders.
With only Quick Basic 4.5 and Macro Assembler 5.1 experience (yes I am getting old), understanding Linux and C programming was a daunting process. As of Feb. 2019 LinuxCNC 2.7.12 is being used. Tried 2.8.0pre with Gmoccapy 5 axis back in Sept. 2018 but could not get it running and no clues were reported in the error logs, so reverted back to the Axis GUI. Will wait for the full 2.8 release and try again.
Still have some ongoing problems:
The big one is that the extra_setup from the hardware driver .comp file cannot access any variables from the .ini file, no errors occur but all values are set at zero. Moving the [HAL] section to the end of the .ini did not change things. To overcome this the needed items were hard-coded into the .comp file.
Another problem is a large axis._.f-error at high servo speeds (13mm at 7500mm/min). It is a few hundredth of a mm at 200mm/min. Even with the servo loop running at 120/sec that’s 1mm per sample interval. Tried the servo loop at 240 but that made no difference. Might be the PID values written to the LM629 motion control chips, but since the first described problem exists it is cumbersome to change these. Besides this it seems the physical position is not in error near as much as is reported. A test was done where a 300mm dia. plate was attached to the vertical A axis (B axis at 90 deg.), a spot marked at 150mm radius, and full X-Y plane circle was plotted at 6300mm/min while also rotating the A axis 360 degrees. An estimated 2mm of error appeared to exist. A ridiculous value for FERROR in the .ini file needs to be there to keep it from E-Stopping on rapids.
Please Log in or Create an account to join the conversation.
02 Mar 2019 10:44 #127489
by MaHa
Replied by MaHa on topic Scratch build 5 axis Router
Just in case if this entry in the .ini file is missing, to access ini file parameter.
[RS274NGC]
FEATURES = 4
[RS274NGC]
FEATURES = 4
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19197
- Thank you received: 6434
02 Mar 2019 13:35 #127492
by tommylight
Have a read through this, see if this helps:
forum.linuxcnc.org/10-advanced-configura...ning-detailed-how-to
Replied by tommylight on topic Scratch build 5 axis Router
That points to servo tuning. But since i you say you have PID on the LM629, might be something there also.Another problem is a large axis._.f-error at high servo speeds (13mm at 7500mm/min). It is a few hundredth of a mm at 200mm/min. Even with the servo loop running at 120/sec that’s 1mm per sample interval. Tried the servo loop at 240 but that made no difference. Might be the PID values written to the LM629 motion control chips, but since the first described problem exists it is cumbersome to change these. Besides this it seems the physical position is not in error near as much as is reported. A test was done where a 300mm dia. plate was attached to the vertical A axis (B axis at 90 deg.), a spot marked at 150mm radius, and full X-Y plane circle was plotted at 6300mm/min while also rotating the A axis 360 degrees. An estimated 2mm of error appeared to exist. A ridiculous value for FERROR in the .ini file needs to be there to keep it from E-Stopping on rapids.
Have a read through this, see if this helps:
forum.linuxcnc.org/10-advanced-configura...ning-detailed-how-to
The following user(s) said Thank You: cvp83
Please Log in or Create an account to join the conversation.
03 Mar 2019 02:37 #127562
by cvp83
Replied by cvp83 on topic Scratch build 5 axis Router
Thank you for taking the time to address my problem.
My understanding of "FEATURES=" is to enable one or more of 5 set-able options within the G-code interpreter. The above sighted problem has to do with initializing a hardware driver with parameters the are contained in the main .ini file.
My understanding of "FEATURES=" is to enable one or more of 5 set-able options within the G-code interpreter. The above sighted problem has to do with initializing a hardware driver with parameters the are contained in the main .ini file.
Please Log in or Create an account to join the conversation.
04 Mar 2019 00:07 #127641
by andypugh
It is part of the Linux design that kernel drivers (which includes LinuxCNC .comp file that run in realtime) do not have access to the file system.
I don't think that any of the realtime HAL components access an INI file, but someone might have found a way.
Things like the axis limits and home speeds are sent to realtime by dedicated NML messages. It really isn't worth trying that.
The way to get values to a component is via HAL. You create a pin or parameter in the componentThen setp that value in the HAL
Replied by andypugh on topic Scratch build 5 axis Router
The big one is that the extra_setup from the hardware driver .comp file cannot access any variables from the .ini file, no errors occur but all values are set at zero.
It is part of the Linux design that kernel drivers (which includes LinuxCNC .comp file that run in realtime) do not have access to the file system.
I don't think that any of the realtime HAL components access an INI file, but someone might have found a way.
Things like the axis limits and home speeds are sent to realtime by dedicated NML messages. It really isn't worth trying that.
The way to get values to a component is via HAL. You create a pin or parameter in the component
param rw float my_value "this is a value that is pulled from an INI";
setp my_component.0.my_value [INI_SECTION]INI_VALUE
Please Log in or Create an account to join the conversation.
04 Mar 2019 14:13 #127697
by cvp83
Replied by cvp83 on topic Scratch build 5 axis Router
Thank you!
I will work with your advise and post the results. This may take a bit of time.
I will work with your advise and post the results. This may take a bit of time.
Please Log in or Create an account to join the conversation.
05 Mar 2019 00:55 #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)
[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.
05 Mar 2019 10:48 #127776
by andypugh
Replied by andypugh on topic Scratch build 5 axis Router
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)
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.
05 Mar 2019 13:59 #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
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.
05 Mar 2019 14:15 #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.
Time to create page: 0.104 seconds