Found the missing line!

addf toggle.0 servo-thread

and also had to remove -not as I'm using NO button

Now ti works as expected!

________________________________
From: Jon Elson <el...@pico-systems.com>
Sent: Friday, November 25, 2016 6:11 PM
To: Enhanced Machine Controller (EMC)
Subject: Re: [Emc-users] adding hardware pouse/resume button

On 11/25/2016 10:31 AM, Tomaz T. wrote:
> I'm trying to implement hardware push button (NO) for pause/resume program, 
> but it has no effect and I'm not sure what is wrong or missing
>
>
>
I've done this, a toggle button that turns on feed hold.

Here's the HAL code (feedhold.hal) :
loadrt toggle

addf toggle.0 servo-thread

# following for feed-hold toggle button
net feedholdbtn ppmc.0.din.15.in-not => toggle.0.in
setp toggle.0.debounce 20
net feedhold toggle.0.out => motion.feed-hold
net feedhold pyvcp.FeedHold



And here's an xml file (feedhold.xml) that puts up an "LED"
for the feedhold condition on a pyvcp control panel.  You
need an indicator, otherwise you'll never know why the
machine refuses to move.

<pyvcp>
  <label>
   <text>"Feed Hold:"</text>
</label>
<led>
   <halpin>"FeedHold"</halpin>
<on_color>"red"</on_color>
<off_color>"green"</off_color>
</led>
</vbox>
</pyvcp>

In the [DISPLAY] section of your .ini file, add this line :
PYVCP = feedhold.xml

And in the [HAL] section, add this :
HALFILLE = feedhold.hal


Jon

------------------------------------------------------------------------------
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users
Emc-users Info Page - 
SourceForge<https://lists.sourceforge.net/lists/listinfo/emc-users>
lists.sourceforge.net
This list is for users of the Enhanced Machine Controller (EMC). Topics include 
how to obtain, install, configure, and use EMC, as well as other general EMC 
related ...



------------------------------------------------------------------------------
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to