Hello Guest it is March 28, 2024, 04:16:41 AM

Author Topic: Add or edit Mach4 Lathe screen  (Read 5078 times)

0 Members and 1 Guest are viewing this topic.

Re: Add or edit Mach4 Lathe screen
« Reply #20 on: November 19, 2018, 12:17:11 PM »
OK done.
now? what's next step?
I do not have to enter in the dedicated screen input?
Re: Add or edit Mach4 Lathe screen
« Reply #21 on: November 19, 2018, 12:45:42 PM »
If all you want is for the reset button to shut the coolant off, then you're finished.  Just save that and test it. 
Turn your coolant on and press the reset button; it will turn the coolant off.
Chad Byrd
Re: Add or edit Mach4 Lathe screen
« Reply #22 on: November 19, 2018, 01:04:41 PM »
tried on the computer at home and it works!
I try it on the lathe as soon as possible.

Is it possible to switch on or off with an external button?

Thank you for your great patience!
Re: Add or edit Mach4 Lathe screen
« Reply #23 on: November 19, 2018, 03:16:59 PM »
Yes.   There is a thread on this forum with that information already.   But the searching isn't working right now.   I'll see if I can get some script I have on a machine on the is thread.
Chad Byrd
Re: Add or edit Mach4 Lathe screen
« Reply #24 on: December 04, 2018, 02:55:11 AM »
Hi,
Can you give me a clue where to look for this thread?
why does the "search" function no longer work?
Re: Add or edit Mach4 Lathe screen
« Reply #25 on: January 02, 2019, 02:41:42 AM »
Hi,
I had to suspend the tests due to work commitments.
Today I managed to turn on the lathe.
I entered the codes to disable M8 as described above.
I noticed that it goes off if I press STOP or RESET only with the muose on the screen of Mach4.
It has no effect if I press its external button on the panel.
How can I combine this function with external keys?
Re: Add or edit Mach4 Lathe screen
« Reply #26 on: January 02, 2019, 08:07:07 AM »
You have to add that functionality in the signal library for the your external reset button.  
Chad Byrd
Re: Add or edit Mach4 Lathe screen
« Reply #27 on: January 02, 2019, 08:18:10 AM »
Hi,
could you give me an example, please?
P.S I found a connection discussion.
now I can turn on / off the refrigerant from the external button.
I insert links, as help for other people.


http://forum.machsupport.com/forum/index.php/topic,38386.0.html
Re: Add or edit Mach4 Lathe screen
« Reply #28 on: January 02, 2019, 08:28:00 AM »
That right there is your example.  
You've figured it out with this example, however, instead of having it toggle coolant on and off, just keep it off.
So in your Reset Button Input, just add this part of code:

         local OSigCool = mc.mcSignalGetHandle (inst,mc.OSIG_COOLANTON)
         mc.mcSignalSetState(OSigCool,0)
         --mc.mcCntlSetLastError(inst, "Coolant Off")  --(this is just a message keep this if you like.)

This will turn it off and not toggle it on and off.
« Last Edit: January 02, 2019, 08:30:57 AM by Cbyrdtopper »
Chad Byrd

Offline smurph

*
  • *
  •  1,544 1,544
  • "That there... that's an RV."
    • View Profile
Re: Add or edit Mach4 Lathe screen
« Reply #29 on: January 09, 2019, 11:19:30 PM »
If just the reset button is all you want to use to turn the coolant off, then just add M9 to the Initialization codes in the configuration dialog.  These two strings of G codes will be sent to the control every time the reset button is pressed.  Or the mcCntlReset() API function is called. 

Steve