[Home]Adding Custom MDI Buttons

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org

Showing revision 7
Difference (from revision 7 to revision 7) (minor diff, author diff)
(The revisions are identical or unavailable.)

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

 To load the panel within axis add the following lines under the [DISPLAY] section:
 PYVCP=panel.xml

 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 May 2, 2010 8:50 am by Rvtinec (diff)
Search:
Published under a Creative Commons License