Hello Guest it is May 23, 2024, 04:35:10 PM

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 - Ironwright

Pages: 1 2 »
1
Mach4 General Discussion / Re: touchscreen shut down button
« on: December 14, 2022, 03:21:17 PM »
Works like a charm. Thanks!

I move the machine just off the home position, then  call the screen exit and a call to os.execute a shutdown.bat file after that.  I put a 6 second delay in the shutdown to give Mach4 plenty of time to shutter.

2
Mach4 General Discussion / touchscreen shut down button
« on: December 13, 2022, 03:14:49 PM »
I have a touchscreen on my machine and would like to create a shutdown button.  Any ideas what lua code I would need to shutdown the program safely?  I wrote a batch file to shutdown the computer, but mach needs to be closed properly before that to avoid corrupting's the INI file.

3
Mach4 General Discussion / Re: force screen label to refresh
« on: December 06, 2022, 11:13:10 AM »
Doesn't work.  Every command I'm using in between the Screen changes are gcodeexecutewait.  I've even tried adding additional gcodeexecutewait(g04 p1.0) commands to force a machine pause condition.  If I do those it will sometimes skip the command where I actually want it to move. I even tried setting the look ahead in the control to 1.  It freaks out if you set it to zero.

4
Mach4 General Discussion / Re: force screen label to refresh
« on: December 06, 2022, 12:01:15 AM »
Is there a way to limit look ahead to prevent new code from running till the task is completed?

5
Mach4 General Discussion / force screen label to refresh
« on: December 05, 2022, 08:40:14 PM »
I'm using an on screen label for operator information,  But it does not always refresh.  Is there a way to force the individual object to refresh?  I've tried the scr screen refresh command and that does not seem to help.  the maddening thing is it's erratic.  Sometimes when I call a function it will behave fine and sometimes it doesn't. 

6
Mach4 General Discussion / Re: PLC Inputs
« on: December 04, 2022, 01:05:07 PM »
it doesn't matter.  It does the same thing with a keyboard input or a push button contact hooked up to an input on the motion controller. MACH4 handles both the same way.  The condition seems to only effect inputs that call functions that use the motion handler.  if you use a button press to change something on screen it does that just fine.  Anything involving the motion handler like mdiexicute, gcodeexicute, or gcodeexicutewait it will not activate till the button is released.

The button I am using in particular is a BACO contact block momentary push button.  https://www.mcmaster.com/7403K19/ hardwired directly to an input on the motion controller.  It behaves the same way when i  hook up a keyboard and swap the input to a keyboard  input.


7
Mach4 General Discussion / PLC Inputs
« on: December 03, 2022, 11:30:52 PM »
Anyone else have issue with the plc inputs not working on activation of an input and only firing after release of the input?  It doesn't seem to make a difference either whether it is from the keyboard input add on, or if I use an input directly from the motion controller?
 
Like the code below.  The CycleStart function should launch when the button is pressed triggering input 1.  You can see the input is on in the diagnostics, and in the log.  It doesn't though it triggers when the button is released.  I've tried changing the low/high setting on the input page.  Then it just fires off as soon as you enable the machine.

[mc.ISIG_INPUT1] = function (on_off)
   if (on_off == 1) then   
      CycleStart()
   else
      
   end

end, -- end isig input 1

8
Mach4 General Discussion / G53 will only go one direction
« on: December 03, 2022, 07:03:42 PM »
g53 will only allow one direction of motion.  I can go from Z0.0 to Z5.0 just fine, but I can't go back again.

G53 G00 Z5.0 (WORKS)

G53 G00 Z0.0 (DOES NOT)

9
Mach4 General Discussion / Re: Doing math to DRO values
« on: December 02, 2022, 11:28:54 AM »
THANK YOU THAT WAS VERY HELPFUL!

10
Mach4 General Discussion / Re: Doing math to DRO values
« on: December 01, 2022, 10:07:57 AM »
A custom DRO on screen for user input.  How do you assign a pound variable to a DRO?

Pages: 1 2 »