# HAL config file for Pico Systems USC board # set sane pulse timing - these are basically Gecko numbers # both pulse width and space are set to 3.5 uS, to prevent # problems if the outputs are inverted externally setp ppmc.0.stepgen.00-03.pulse-width-ns 3500 setp ppmc.0.stepgen.00-03.pulse-space-min-ns 3500 setp ppmc.0.stepgen.00-03.setup-time-ns 1000 # 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 # 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 6912 # connect PID output signals to step generators linksp Xoutput => ppmc.0.stepgen.00.velocity linksp Youtput => ppmc.0.stepgen.01.velocity linksp Zoutput => ppmc.0.stepgen.02.velocity # connect axis enables to step generators linksp Xenable => ppmc.0.stepgen.00.enable linksp Yenable => ppmc.0.stepgen.01.enable linksp Zenable => ppmc.0.stepgen.02.enable # set output scaling from ini file # note that these are using INPUT_SCALE - this is because the # input and output scales should (normally) be the same for a USC # and emc2 always rewrites OUTPUT_SCALE to 1 setp ppmc.0.stepgen.00.scale [AXIS_0]INPUT_SCALE setp ppmc.0.stepgen.01.scale [AXIS_1]INPUT_SCALE setp ppmc.0.stepgen.02.scale [AXIS_2]INPUT_SCALE # 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-index-en bit linkps motion.spindle-index-enable => spindle-index-en linksp spindle-index-en => ppmc.0.encoder.03.index-enable # hook up motion controller's sync output #linkps motion.spindle-sync => spindle-sync # report rev count to motion controller newsig spindle-pos float linkps ppmc.0.encoder.03.position => spindle-pos linksp spindle-pos => motion.spindle-revs