> 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&T Tech Expo July 15-16. Meet us at AT&T 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