Hello Guest it is April 19, 2024, 05:00:33 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - thosj

41
In the signal library section of the screen script, you can use an INPUT for the button, then have it trigger your output.

Here's an example of a button triggering the coolant pump relay. You'll just have to figure out how to trigger YOUR OUTPUT.

----------Mach4 Input 17 PoKeys Pin 17-----
----------Toggle Coolant M8----------------
[mc.ISIG_INPUT17] = function (state)
if (state == 1) then
     local inst = mc.mcGetInstance();
     local sigh = mc.mcSignalGetHandle(inst, mc.OSIG_COOLANTON);
     local sigState = mc.mcSignalGetState(sigh);
     if (sigState == 0) then
         local OSigCool = mc.mcSignalGetHandle (inst,mc.OSIG_COOLANTON)
         mc.mcSignalSetState(OSigCool,1)
         mc.mcCntlSetLastError(inst, "Coolant On")
     else
         local OSigCool = mc.mcSignalGetHandle (inst,mc.OSIG_COOLANTON)
         mc.mcSignalSetState(OSigCool,0)
         mc.mcCntlSetLastError(inst, "Coolant Off")
     end
end
   
end,

42
Mach4 General Discussion / Re: How does G30 work?
« on: January 19, 2023, 08:37:19 AM »
I've been using this for a while with the Fusion 360 post, wonder where I got the pound variables? My guess is Chad Bird!! Somehow he/we figured it out a few years ago when working on Fusion posts:)

43
Mach4 General Discussion / Re: Mach4 V5000 G91 causing problems
« on: January 17, 2023, 08:19:16 AM »
Over on the Warp9TD forum, Andy is suggesting there may be an issue with 5000 and is recommending 4809.

44
One thing I'll say is Mach4 runs your machine WAY better than Mach3. Perhaps you could try again, you can run Mach3 and Mach4 alternately, so you'd have a fallback position!! Then if you use my method upgrading Mach4, renaming folders, then you'd always be able to get back to the last working environment.

Might be worth a try!

45
Mach4 General Discussion / Re: How to trigger "action" with an input?
« on: January 09, 2023, 09:43:42 AM »
Here's some of mine. PoKeys, but yours could be whatever pin.

----------Mach4 Input 17 PoKeys Pin 17-----
----------Toggle Coolant M8----------------
[mc.ISIG_INPUT17] = function (state)
if (state == 1) then
     local inst = mc.mcGetInstance();
     local sigh = mc.mcSignalGetHandle(inst, mc.OSIG_COOLANTON);
     local sigState = mc.mcSignalGetState(sigh);
     if (sigState == 0) then
         local OSigCool = mc.mcSignalGetHandle (inst,mc.OSIG_COOLANTON)
         mc.mcSignalSetState(OSigCool,1)
         mc.mcCntlSetLastError(inst, "Coolant On")
     else
         local OSigCool = mc.mcSignalGetHandle (inst,mc.OSIG_COOLANTON)
         mc.mcSignalSetState(OSigCool,0)
         mc.mcCntlSetLastError(inst, "Coolant Off")
     end
end
   
end,

----------Mach4 Input 14 PoKeys Pin 14--
----------Toggle Mist M7----------------
[mc.ISIG_INPUT14] = function (state)
if (state == 1) then
     local inst = mc.mcGetInstance();
     local sigh = mc.mcSignalGetHandle(inst, mc.OSIG_MISTON);
     local sigState = mc.mcSignalGetState(sigh);
     if (sigState == 0) then
         local OSigMist = mc.mcSignalGetHandle (inst,mc.OSIG_MISTON)
         mc.mcSignalSetState(OSigMist,1)
         mc.mcCntlSetLastError(inst, "Mist On")
     else
         local OSigMist = mc.mcSignalGetHandle (inst,mc.OSIG_MISTON)
         mc.mcSignalSetState(OSigMist,0)
         mc.mcCntlSetLastError(inst, "Mist Off")
     end
end
   
end,

------------Mach4 Input 8 PoKeys Pin 8----------------
------------Toggle SpinCW-----------------------------
[mc.ISIG_INPUT8] = function (state)
if (state == 1) then
     local inst = mc.mcGetInstance();
     local sigh = mc.mcSignalGetHandle(inst, mc.OSIG_SPINDLEON);
     local sigState = mc.mcSignalGetState(sigh);
     if (sigState == 1) then
         mc.mcSpindleSetDirection(inst, 0);
     else
         SpinCW()
     end
end


Might help!

Tom

46
Might be too late, but when you upgrade Mach4, rename the Mach4Hobby folder to something like Mach4Hobby_4612, then install the new version. It'll make a new Mach4Hobby folder and install. Open both those folders in File Explorer and copy over your stuff, licenses, screens, profiles, macros, modules, and it should be good. AND......with a simple folder rename, you can go back to a running version if something like this happens!! Personally, I would never install Mach4 over a previous install, but, hey, that might just be me.

I believe there is also a way to load saved profiles that Mach4 makes, but don't recall offhand how to do that. Someone will chime in here, maybe.

47
Mach4 General Discussion / Re: Mach 4 Go To Work Zero button not working.
« on: January 07, 2023, 12:08:03 PM »
Try right clicking the icon you use to start Mach4 and choose Run as administrator, then try your edit to the screen.

48
Mach4 General Discussion / Re: Help mazh4 z-axis act-up
« on: August 21, 2022, 05:22:06 PM »
Then you got me. Is it a stepper losing steps with the rapid back and forth or something, eventually catching up with soft limits?

49
Mach4 General Discussion / Re: Help mazh4 z-axis act-up
« on: August 21, 2022, 06:33:07 AM »
Is the Z axis homed when you do this?

50
You've read thru this, right?

https://warp9td.com/index.php/gettingstarted/setting-up-the-smoothstepper-and-mach4

Some things to look for are go to the diagnostics page and see if your switches, limit and homing, show on there when you press/activate them by hand. Be sure your switches are assigned to axes and active and all.

I believe Andy at Warp9td has a default profile for a G540, you might just start with that.

Otherwise, if you still have questions, you might try the Warp9td forum, Andy provides the best support you could hope for.