NEWS
LinuxCNC 2.5.2 Release
There are no translations available.

LinuxCNC 2.5.2 Update Released (changelog).
 
LinuxCNC 2.5.1 Release
There are no translations available.

LinuxCNC 2.5.1 Update Released (changelog). If the Package Manager does not prompt you to upgrade see this page.

 
LinuxCNC 2.5.0 Release
There are no translations available.

New major release (changelog). See the instructions to update your system from EMC 2.4 to LinuxCNC 2.5.
 
Home Forum HAL HAL Examples Oxy/Acc Torch Delay

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Oxy/Acc Torch Delay

Oxy/Acc Torch Delay 24 Nov 2011 06:11 #15082

  • BigJohnT
  • BigJohnT's Avatar
  • OFFLINE
  • Administrator
  • Posts: 4955
  • Thank you received: 87
  • Karma: 134
One of the guys on the IRC was wondering how to do an adjustable on the fly pre-heat delay for his Oxy/Acc torch. After some discussion and suggestions I came up with this example using digital input, digital output, and oneshot.

.ini file additions
[DISPLAY]
...
PYVCP = panel.xml

[HAL]
...
POSTGUI_HALFILE = postgui.hal


panel.xml

<?xml version='1.0' encoding='UTF-8'?>
<pyvcp>
<!--
slider for torch delay
-->

<scale>
<font>("Helvetica",16)</font>
<width>"25"</width>
<halpin>"delay"</halpin>
<resolution>0.1</resolution>
<orient>HORIZONTAL</orient>
<initval>0.1</initval>
<min_>0.1</min_>
<max_>10</max_>
</scale>

</pyvcp>


postgui.hal

loadrt oneshot names=torch-delay
addf torch-delay servo-thread

net delay-time torch-delay.width <= pyvcp.delay-f
net delay-start torch-delay.in <= motion.digital-out-00
net go-torch motion.digital-in-00 <= torch-delay.out-not

anonimasu.ngc
G0 X2 Y2
Z-0.999
M62 P0 (turn on the delay)
Z-1 (gotta move after M62)
M66 P0 L1 Q25 (wait for delay to finish)
M63 P0
G1 X3 Y3 F10
M2


Enjoy
John
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 0.846 seconds
Powered by Kunena Forum
© 2013 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.