> On Feb 6, 2018, at 10:28 AM, andy pugh <bodge...@gmail.com> wrote: > > On 6 February 2018 at 15:20, <tom-...@bgp.nu> wrote: >> >> As I replied to Andy, spindle-at-speed is just coming from vfd-at-speed in >> custom.hal. >> net gs2-at-speed motion.spindle-at-speed <= spindle-vfd.at-speed > > That should work, as long as the spindle-vfd component at-speed output > works correctly (perhaps it doesn't) > > One thing that might cause the problem you are seeing is if there is a > lowpass between the motion.spindle-xx-out and the spindle-vfd.speed-in
Andy, We don’t have a lowpass filter on the spindle-xx-out but we do have one between the encoder velocity and motion.spindle-speed.in… -Tom #******************************* # SPINDLE SECTION #******************************* # ---Encoder feedback signals/setup--- setp hm2_5i25.0.encoder.00.counter-mode 0 setp hm2_5i25.0.encoder.00.filter 1 setp hm2_5i25.0.encoder.00.index-invert 0 setp hm2_5i25.0.encoder.00.index-mask 0 setp hm2_5i25.0.encoder.00.index-mask-invert 0 setp hm2_5i25.0.encoder.00.scale [SPINDLE_9]ENCODER_SCALE net spindle-revs hm2_5i25.0.encoder.00.position motion.spindle-revs setp lowpass.1.gain 1 net spindle-vel-fb-rps hm2_5i25.0.encoder.00.velocity lowpass.1.in net spindle-vel-fb-rps-lp lowpass.1.out motion.spindle-speed-in net spindle-index-enable hm2_5i25.0.encoder.00.index-enable motion.spindle-index-enable net spindle-revs ddt.0.in setp scale.0.gain 60 setp lowpass.0.gain 0.01 net spindle-vel-fb-rps => scale.0.in net spindle-fb-rpm scale.0.out => abs.0.in net spindle-fb-rpm-abs abs.0.out => lowpass.0.in net spindle-fb-rpm-abs-filtered lowpass.0.out #******************************* # END SPINDLE SECTION #******************************* Custom.hal: # Include your custom HAL commands here # This file will not be overwritten when you run PNCconf again loadusr -Wn active-gcodes python activegcodes.py # Classic Ladder loadrt classicladder_rt addf classicladder.0.refresh servo-thread loadusr classicladder --nogui emcolathe.clp # load the user space component for the Automation Direct GS2 VFD's loadusr -Wn spindle-vfd gs2_vfd -r 9600 -p none -s 2 -n spindle-vfd -A 1 -D 2.0 -X # connect the spindle direction pin to the GS2 net gs2-fwd spindle-vfd.spindle-fwd <= motion.spindle-forward # connect the spindle on pin to the GS2 net gs2-run spindle-vfd.spindle-on <= motion.spindle-on # connect the GS2 at speed to the motion at speed net gs2-at-speed motion.spindle-at-speed <= spindle-vfd.at-speed # connect the spindle RPM to the GS2 # scale pulley ratio on spindle (1/0.833133) setp scale.1.gain 1.154 net commanded-speed scale.1.in motion.spindle-speed-out net gs2-RPM spindle-vfd.speed-command scale.1.out ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users