Re: [Emc-users] G0 vs G1-specific functions?
> On the MPG on my machines I use ilowpass to smooth the output of the jog > wheel before sending it to LinuxCNC. In addition to the userspace module for the xhc-hb04 pendant, LinuxCNC provides helper scripts that provide two ways to smooth stepped motion requested by an xhc-hb04 pendant. Usage is demonstrated in simulation configs available as usual from the configuratoin selector at: Sample Configurations/sim/axis/xhc-hb04 The configuration directory includes a .txt file for the supplied configurations and a README to help in adapting a sim example to a hardware configuration. The first method provided uses a lowpass filter for each axis with its time constant set using the ini item: [XHC_HB04_CONFIG]coefs=. A coef value of 1 indicates no filtering, decreasing the value sets an increasing time constant value. The behavior is adapted from the lowpass component (ref: man lowpass) so for a typical servo period of 1mS, a 1Hz bandwidth is realized with coef=0.0063. The second method uses a multiplexer to alter the axis acceleration (hal pins like ini.N.max_acceleration) when not in manual mode. The acceleration values for manual mode are set using the ini item [XHC_HB04]mpg_accels= and enabled with a separate setting [APPLICATIONS]APP=xhc-hb04-accels. To illustrate the behavior, i've used the xhc-hb04-layout2.ini configuration with LinuxCNC 2.7.4 and halscope to capture a velocity profile. All tests were done on the X axis using the xhc-hb04-layout2.ini sim configuration, LinuxCNC 2.7.4, and settings: [AXIS_X]MAX_ACCELERATION=20, pendant set for: stepsize = 20 (0.020 inches per step) Photos are at: http://www.panix.com/~dgarrett/stuff/xhc-hb04/ 0.png Reference, shows a g0x1 mdi move (starting at x=0). The ini setting for acceleration (=20) is used. Note that pendant values for coefs and mpg_accels are not used during mdi or auto (gcode program) motions. The next two screengrabs were made using the xhc-hb04-layout2.ini configuration with the [XHC_HB04]mpg_accels line disabled (commented out with a leading #). Each shows the X axis speed over a single full rotation of the jog wheel (comparable to the mdi move above, about 1.0 inch travel) 1.png Jog wheel, no mpg_accels, coef=1 (for the X axis) 2.png jog wheel, no mpg_accels, coef=0.0063 (for the X axis) Note that when using this method, filtering the steps with a reduced coef value smooths the velocity profile but the acceleration is still stepped at its set (=20) value. On a large machine with high acceleration, reducing the coef enough to alleviate the jerkiness may result in wheel response that is considered too sluggish. (The jagged edges in the velocity trace are due to the human turning the wheel.) The final screengrab uses the xhc-hb04-layout2.ini configuration with no edits to illustrate the use of the [XHC_HB04]mpg_accels= feature. The coef value for the X axis is 1 (no filtering) but the mpg_accel value for the X axis is a small value (=1) compared to the normal acceleration (=20) 3.png jog wheel, using mpg_accels=1 (for the X axis) In the photo, the reduced acceleration allows a smooth response usin a an acceleration reduced by a factor of 20. For a real machine, some experimentation may be required to determine suitable values for the coef= and mpg_accels= settings for each axis. References: README for adapting sim configurations: http://git.linuxcnc.org/gitweb?p=linuxcnc.git;a=blob;f=configs/sim/axis/xhc-hb04/README;h=5565c26bb0863b31ba0ae37ef581ac13eef8a562;hb=refs/heads/2.7 txt file for xhc-hb04-layout2 configuration: http://git.linuxcnc.org/gitweb?p=linuxcnc.git;a=blob;f=configs/sim/axis/xhc-hb04/xhc-hb04-layout2.txt;h=645cd93dbc63045eded48e36ede85fc36fccbc72;hb=refs/heads/2.7 man page for lowpass component has equations for computing coef values http://linuxcnc.org/docs/master/html/man/man9/lowpass.9.html man page for the xhc-hb04 userspace module: http://linuxcnc.org/docs/2.7/html/man/man1/xhc-hb04.1.html -- Dewey Garrett -- Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] G0 vs G1-specific functions?
On 27 June 2016 at 17:00,wrote: > Can the acceleration be changed dynamically through HAL and still work > properly? I don't think that the system even looks at the acceleration pins when the machine is running G-code. -- atp "A motorcycle is a bicycle with a pandemonium attachment and is designed for the especial use of mechanical geniuses, daredevils and lunatics." — George Fitch, Atlanta Constitution Newspaper, 1916 -- Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] G0 vs G1-specific functions?
Can the acceleration be changed dynamically through HAL and still work properly? Because say the traj planner looks 10 moves ahead, and it's 2x G1 followed by 3x G0 moves then 5x G1. It forms a plan based on the acceleration rules. But when it hits the 3rd command, the HAL suddenly changes the acceleration rule, invalidating the existing plan. If the traj planner sticks with the preexisting traj plan and only uses the current HAL accel limits to replan the new moves after the current plan is executed, that won't work. There would be G0 moves which have excess accel that could stall the motors. Danny Sebastian Kuzminskywrote: > On 06/27/2016 09:09 AM, dan...@austin.rr.com wrote: > > Is there any HAL component that can tell if it's running as G0 or G1? > > The pin motion.motion-type, described here: > > http://linuxcnc.org/docs/html/man/man9/motion.9.html > > "traverse" (1) is a G0, "linear feed" (2) is a G1, and "arc feed" (3) is > G2/G3. > > > -- > Sebastian Kuzminsky > > -- > Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San > Francisco, CA to explore cutting-edge tech and listen to tech luminaries > present their vision of the future. This family event has something for > everyone, including kids. Get more information and register today. > http://sdm.link/attshape > ___ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users -- Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] G0 vs G1-specific functions?
On 06/27/2016 09:09 AM, dan...@austin.rr.com wrote: > Is there any HAL component that can tell if it's running as G0 or G1? The pin motion.motion-type, described here: http://linuxcnc.org/docs/html/man/man9/motion.9.html "traverse" (1) is a G0, "linear feed" (2) is a G1, and "arc feed" (3) is G2/G3. -- Sebastian Kuzminsky -- Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] G0 vs G1-specific functions?
On 06/27/2016 02:41 AM, Danny Miller wrote: > In a similar thread, I'm doing 3D carving with some aggressive > acceleration profiles. The XHC mpg is SUPER rough when stepping around, > it's supposed to allow you to use different accelerations for mpg > inputs, but none of that section has ever worked. The mpg works but the > section's options don't. If the behavior doesn't match the documentation, that's a bug, please log it on the github issue tracker: https://github.com/LinuxCNC/linuxcnc/issues On the MPG on my machines I use ilowpass to smooth the output of the jog wheel before sending it to LinuxCNC. One click from the MPG becomes a smoothly accelerating & decelerating curve of 1000 clicks (each 1/1000 the size) going out of ilowpass and into motion. This makes the MPG motion much smoother. Here's an example of using ilowpass with an MPG: https://github.com/LinuxCNC/linuxcnc/blob/master/configs/common/shuttle.hal#L215 -- Sebastian Kuzminsky -- Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] G0 vs G1-specific functions?
Hmm, interesting, but that's only to reduce accel in manual mode, right? It'd reduce shaking while using the mpg, but the G0 moves in the g-code would create motor stalls if used at full speed. I'm wondering if all G0 and manual input could be a mode of higher speed but more limited in acceleration. I know a lot of people have noted that the standard trapezoidal accel profile doesn't follow the physical properties of the motor (less torque at higher speed=more at lower), but nontrapezoidal profiles with variable acceleration are exceedingly complicated to build into motion control. But it seems that just separating out G0 and G1 with two separate trapezoidal modes gets you like 90% of the way there. Is there any HAL component that can tell if it's running as G0 or G1? Would it make sense for HAL to use the current velocity to reduce acceleration, thus creating a nontrapezoidal profile? I think I can see how the HAL could do that, but I think it would break the motion control & trajectory planner outright. Danny andy pughwrote: > On 27 June 2016 at 09:41, Danny Miller wrote: > > So, is there a way to have RAPID_ACCELERATION (for G0 alone) as a > separate thing from MAX_ACCELERATION for the axes, used for G1 motion? Possibly. There are HAL pins to control acceleration. However they are not read during program execution. I don't know whether this will work (and can't test it here) but maybe this is worth an experiment? loadrt mux2 ... addf mux2.0.servo-thread ... net accel-sel halui.mode.is-auto => mux2.0.sel setp mux2.0.in0 100 setp mux2.0.in1 1 net accel-selected mux2.0.out => ini.traj_default_acceleration -- atp "A motorcycle is a bicycle with a pandemonium attachment and is designed for the especial use of mechanical geniuses, daredevils and lunatics." — George Fitch, Atlanta Constitution Newspaper, 1916 -- Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] G0 vs G1-specific functions?
On 27 June 2016 at 09:41, Danny Millerwrote: > > So, is there a way to have RAPID_ACCELERATION (for G0 alone) as a > separate thing from MAX_ACCELERATION for the axes, used for G1 motion? Possibly. There are HAL pins to control acceleration. However they are not read during program execution. I don't know whether this will work (and can't test it here) but maybe this is worth an experiment? loadrt mux2 ... addf mux2.0.servo-thread ... net accel-sel halui.mode.is-auto => mux2.0.sel setp mux2.0.in0 100 setp mux2.0.in1 1 net accel-selected mux2.0.out => ini.traj_default_acceleration -- atp "A motorcycle is a bicycle with a pandemonium attachment and is designed for the especial use of mechanical geniuses, daredevils and lunatics." — George Fitch, Atlanta Constitution Newspaper, 1916 -- Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users