Hello Guest it is March 28, 2024, 05:02:47 AM

Author Topic: Mach4 Button OFFLINE  (Read 26834 times)

0 Members and 1 Guest are viewing this topic.

Re: Mach4 Button OFFLINE
« Reply #40 on: January 24, 2018, 04:05:41 PM »
Hi,
thats correct, enabling Mach should cause Enable#0 to go high ie cause the relay to operate.

Try opening the macros and single stepping through them with the debugger. Note m211 should turn Enable#0 off
and m210 should turn it on.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mach4 Button OFFLINE
« Reply #41 on: January 24, 2018, 05:20:59 PM »
what is the debugger??
Re: Mach4 Button OFFLINE
« Reply #42 on: January 24, 2018, 06:37:38 PM »
Hi,
it is a program that runs Lua code, part of the script editor, chapter 2:

http://www.machsupport.com/wp-content/uploads/2014/05/Mach4%20Scripting%20Manual.pdf

Download it and read it, then read it again, and the read it again for good measure.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mach4 Button OFFLINE
« Reply #43 on: January 24, 2018, 09:02:07 PM »
Hi,
just realised its also in the Mach4 Docs folder, you already have it!

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mach4 Button OFFLINE
« Reply #44 on: January 25, 2018, 04:03:39 AM »
let's try to reason. suppose that macros work. a macro disables Mach4.

when Mach4 is in the DISABLE state, it no longer executes any commands

how can an ENABLE macro run when Mach4 is off ???

Mach4 must always remain active, I just have to disable axes.
is my thought right or wrong?
« Last Edit: January 25, 2018, 04:10:48 AM by daniba73 »
Re: Mach4 Button OFFLINE
« Reply #45 on: January 25, 2018, 12:31:25 PM »
Hi,
the macros DO NOT disable Mach, they are meant to turn on and off a signal (OSIG_ENABLE0) which is connected to a pin. These macros are just for experimentation
anyway.  If you can't get them to turn a pin on your controller on and off then you'll have no chance to program Mach.

Have you read the chapter about the script editor? Have you opened the scripts and run them? Are the macros in your current profile?

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mach4 Button OFFLINE
« Reply #46 on: January 26, 2018, 12:54:40 PM »
Hi,
I tried, and tried again, but it does not work, the macros have no effect.
I put the M210 and M211 macros here:
C: \ Mach4Hobby \ Profiles \ Mach4Lathe \ Macros
question:
which PIN are the macros for?
do you work?
what controller do you use?
Re: Mach4 Button OFFLINE
« Reply #47 on: January 26, 2018, 01:03:01 PM »
Hi,
yes they work, I'm using my mill profile. Is use an ESS controller but the controller has no bearing on whether the macro runs or not.

The pin is depends on what you assign to Machs output.

Have you run through the macro single step with the debugger?

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mach4 Button OFFLINE
« Reply #48 on: January 26, 2018, 01:08:05 PM »
Hi,
open the script editor and select m210. Press F5. Now press F11 until the little green arrow is one step past the last statment.
With the cursor hover over hsig. Does the number look reasonable?

Rather than carry on single stepping until you run out of code and crash the debugger at the last 'end' press <shift>F5.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mach4 Button OFFLINE
« Reply #49 on: January 26, 2018, 01:17:52 PM »
Hi,
have just run the macros successfully in Mach4Lathe. I have an LED which indicates ENABLE0 and I can turn it on and off using the macros.

Do you know how to use the screen editor to make an LED? Would be a good idea to make an LED and attach it to ENABLE0.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'