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.
 

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

TOPIC: toggle2nist question

toggle2nist question 10 Lug 2012 08:18 #21745

  • clkeck1
  • clkeck1's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 91
  • Karma: 2
I'm trying to get the foot switch on the lathe programmed. I'm using a toggle2nist and a set of edge detectors to output a m100 or m101 code to clamp and unclamp the chuck. The problem is the foot switch momentarily hits the toggle2nist.0.in pin but the on and off pins do not change. Do i have something setup wrong?


#foot switch for clamp/unclamp
net foot-switch toggle2nist.0.in

net on-edge toggle2nist.0.on edge.1.in
net off-edge toggle2nist.0.off edge.2.in

#link from toggle2nist to 100 and 101 mcodes
net chuck-clamp-from-foot-switch halui.mdi-command-00 edge.1.out
net turret-unclamp-foot-switch halui.mdi-command-01 edge.2.out

Also how do i put a delay in a custom M code for speed changes i want to do something like listed below

#!/bin/bash
# file Low gear
halcmd sets high-gear false
"delay .5 sec"
halcmd sets low-gear true
"delay .5 sec"

exit 0


Thanks
Cory
The administrator has disabled public write access.

Re:toggle2nist question 10 Lug 2012 09:11 #21749

  • BigJohnT
  • BigJohnT's Avatar
  • OFFLINE
  • Administrator
  • Posts: 5080
  • Thank you received: 102
  • Karma: 136
This thread should explain how toggle2nist works. It even has a diagram...

John
The administrator has disabled public write access.

Re:toggle2nist question 10 Lug 2012 09:23 #21750

  • ArcEye
  • ArcEye's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 1418
  • Thank you received: 114
  • Karma: 130
Hi

Just realised JT has just answered whilst I was doing my Mavis Beacon bit!

Regards a pause, easiest way from a M Code file might be to set one of your halui.mdi-command-XX commands
to G4 P0.5 and call that.

regards
The administrator has disabled public write access.

Re:toggle2nist question 10 Lug 2012 09:27 #21751

  • clkeck1
  • clkeck1's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 91
  • Karma: 2
I would like to include the delay inside the Mcode file.

Thanks
Cory
The administrator has disabled public write access.

Re:toggle2nist question 10 Lug 2012 09:35 #21752

  • andypugh
  • andypugh's Avatar
  • OFFLINE
  • Moderator
  • Posts: 4244
  • Thank you received: 152
  • Karma: 130
clkeck1 wrote:
I'm trying to get the foot switch on the lathe programmed. I'm using a toggle2nist
I think the problem is that toggle2nist requires the is-on input to be wired, so it knows which state to toggle from.
In your case your M100 and M101 should contain:
halmd setp toggle2nist.0.is-on 1
(or 0 for the complimentary function)

Are you sure you need the M100 / M101? It seems like this is something which could be handled entirely within HAL, unless you want the G-code to also have the ability to open/close the collet.
The administrator has disabled public write access.

Re:toggle2nist question 10 Lug 2012 09:45 #21753

  • clkeck1
  • clkeck1's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 91
  • Karma: 2
I want the option for the gcode. should never need it but you never know.

Ill add the toggle2nist.0.is-on line to the files and see what happens.

Thanks

Cory
The administrator has disabled public write access.

Re:toggle2nist question 11 Lug 2012 01:15 #21781

  • ArcEye
  • ArcEye's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 1418
  • Thank you received: 114
  • Karma: 130
I would like to include the delay inside the Mcode file.
If your M Code file is a bash script just use sleep
See man sleep

regards
The administrator has disabled public write access.

Re:toggle2nist question 11 Lug 2012 06:30 #21784

  • clkeck1
  • clkeck1's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 91
  • Karma: 2
Thanks guys that fixed those 2 issues
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 0.855 seconds
Powered by Kunena Forum
© 2013 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.