Part 2

HAL Connections

HAL Connections

  1. Open up the postgui.hal file from our linuxcnc/configs/gladevcp1 directory with Gedit and add the following lines. The first line connects the motion.spindle-on pin to our LED widget and the second line connects motion.spindle-speed-out to our meter. After Axis and the GladeVCP panel load then the postgui.hal file is processed and our connections are made.

    net spindle-state gladevcp.hal_led1 <= motion.spindle-on
    net spindle-speed gladevcp.hal_meter1 <= motion.spindle-speed-out
  2. Now run the configuration and home the simulated machine. Next issue a MDI command S1500 M3 and noticed the LED changes to green and the meter needle moves to 1500. We have just created a spindle RPM meter and a spindle ON LED.

    Your configuration should look like this now.

    images/gladevcp-03-01.png