# HAL config file for Pico Systems UPC board # # NOTE: this is a copy of the stepper board file, it will be edited soon for PWM - do not use yet # connect position feedback signals to encoders linksp Xpos-fb <= ppmc.0.encoder.00.position linksp Ypos-fb <= ppmc.0.encoder.01.position linksp Zpos-fb <= ppmc.0.encoder.02.position # steal encoder input for pendant #linksp Apos-fb <= ppmc.0.encoder.03.position # get feedback scaling from ini file setp ppmc.0.encoder.00.scale [AXIS_0]INPUT_SCALE setp ppmc.0.encoder.01.scale [AXIS_1]INPUT_SCALE setp ppmc.0.encoder.02.scale [AXIS_2]INPUT_SCALE setp ppmc.0.encoder.03.scale [AXIS_3]INPUT_SCALE setp ppmc.0.encoder.04.scale 324 # for spindle axis, 81 tooth gear sensor in quadrature # get DAC scaling from ini file setp ppmc.0.DAC.00.scale [AXIS_0]OUTPUT_SCALE setp ppmc.0.DAC.01.scale [AXIS_1]OUTPUT_SCALE setp ppmc.0.DAC.02.scale [AXIS_2]OUTPUT_SCALE #setp ppmc.0.DAC.03.scale [AXIS_3]OUTPUT_SCALE Spindle speed output # connect PID output signals to step generators linksp Xoutput => ppmc.0.DAC.00.value linksp Youtput => ppmc.0.DAC.01.value linksp Zoutput => ppmc.0.DAC.02.value # linksp Aoutput => ppmc.0.DAC.03.value # add a couple of tuning test links # if these are useful will want to add them to the other axes as well # or make these setup with the tuning script linkps ddt.0.in Xoutput linkps ddt.1.in Xpos-fb newsig spindle-sync bit newsig spindle-index-en bit linksp spindle-index-en => ppmc.0.encoder.04.index-enable # hook up motion controller's sync output linkps motion.spindle-index-enable => spindle-index-en # report rev count to motion controller newsig spindle-pos float linkps ppmc.0.encoder.04.position => spindle-pos linksp spindle-pos => motion.spindle-revs # set up 4th DAC generator as a spindle speed control newsig spindle-speed float newsig spindle-DAC-cmd float newsig spindle-DAC-filt float newsig spindle-DAC-abs float linkps motion.spindle-speed-out => spindle-speed linksp spindle-speed => mult2.1.in0 setp mult2.1.in1 0.002457 linkps mult2.1.out => spindle-DAC-cmd linksp spindle-DAC-cmd => lowpass.0.in linkps lowpass.0.out => spindle-DAC-filt setp lowpass.0.gain 0.005 linksp spindle-DAC-filt => abs.0.in linksp spindle-DAC-abs => abs.0.out linksp spindle-DAC-abs => ppmc.0.DAC.03.value # spindle speed display addf lowpass.1 servo-thread net spinraw ppmc.0.encoder.04.delta conv-s32-float.0.in net spinfloat conv-s32-float.0.out mult2.0.in0 setp mult2.0.in1 185.185185 # (60/encoder count/rev) net rawSpindleRPM mult2.0.out => lowpass.1.in setp lowpass.1.gain 0.02 newsig SpindleRPM float linkps lowpass.1.out => SpindleRPM