Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: tecalote on August 04, 2015, 01:17:40 PM

Title: External controls
Post by: tecalote on August 04, 2015, 01:17:40 PM
Good morning,

I'm trying to figure out how to set up a few physical switches to control Mach4. I already have an estop switch connected and working but I'd like to add some switches for START, PAUSE and STOP. I just can't figure out how to map inputs to the functions I want. Any help would be greatly appreciated.

Thanks
Title: Re: External controls
Post by: tecalote on August 12, 2015, 02:14:48 PM
I've been reading through the Mach4 LUA manual and I don't really undertand any of it but I think I found the code I want to use?

Code: [Select]
if (sig == mc.ISIG_INPUT1) and (state == 1) then
 local inst = mc.mcGetInstance()
 mc.mcCntlCycleStart(inst)
end

Now how do I make that work? Any help would be really appreciated.
Title: Re: External controls
Post by: dude1 on August 12, 2015, 07:44:51 PM
if you have a look through the forum that has been covered
Title: Re: External controls
Post by: CCWood on August 13, 2015, 11:49:28 AM
See if this helps...

http://www.machsupport.com/forum/index.php/topic,30464.0.html
Title: Re: External controls
Post by: tecalote on August 13, 2015, 01:15:17 PM
See if this helps...

http://www.machsupport.com/forum/index.php/topic,30464.0.html

Thank You! That did the trick. It's working now.