# Include your customized HAL commands here # The commands in this file are run after the AXIS GUI (including PyVCP panel) starts # **** Setup of spindle speed display using pyvcp -START **** # **** Use COMMANDED spindle velocity from LinuxCNC because no spindle encoder was specified # **** COMANDED velocity is signed so we use absolute component (abs.0) to remove sign net pid_command => abs.0.in net absolute-spindle-vel <= abs.0.out => pyvcp.spindle-speed # **** force spindle at speed indicator true because we have no feedback **** net spindle-at-speed => pyvcp.spindle-at-speed-led sets spindle-at-speed false net pid_feedback => pyvcp.current-spindle-speed => near.0.in2 => abs.1.in net spindle_speed_abs <= abs.1.out => pyvcp.current-spindle-speed-bar # connect one input to the commanded spindle speed net absolute-spindle-vel => near.0.in1 # connect the output to the spindle-at-speed input net spindle-at-speed motion.spindle-at-speed <= near.0.out # set the spindle speed inputs to agree if within 1% setp near.0.scale 1.05