[Home]Adding Custom MDI Buttons

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org

Showing revision 5

Adding a custom button on your pendant to execute a MDI command

 In this example I've added a "Rapid to Home Position" button to my pyVCP panel.
 Make sure you understand what the G Codes will do before trying this!

 In your .ini file add the following lines:
 [HALUI]
 MDI_COMMAND = G0 X0 Y0 Z0

 Also, make sure you have the following line in the [HAL] section of your ini file:
 [HAL]
 HALUI=halui

 In your panel.xml file add the following lines:
 <button>
     <halpin>"rapid-to-home"</halpin>
     <text>"Rapid to Home"</text> 
     <font>('Fixed',16)</font>
 </button>  

 In your postgui.hal file add the following lines:
 # set up the rapid to home button
 net remote-rapid-to-home halui.mdi-command-00 <= pyvcp.rapid-to-home

 Once you test this and understand what it does you can change the input to your pendant by changing the pyvcp reference to your paraport pin.

Enjoy John

upload:remotegui.png


LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org
This page is read-only. Follow the BasicSteps to edit pages. | View other revisions | View current revision
Edited July 17, 2009 1:10 pm by SWPadnos (diff)
Search:
Published under a Creative Commons License