M47

Post anything you want to discuss with others about the software.

M47

Postby Alberto FUL » Wed Feb 07, 2018 3:52 pm

I'm trying to use M47 inside a macro
exec.Code("M47");
but I get message : M47 could not read !

in G-code there's no problem.

Any suggestion ?
Alberto FUL
 
Posts: 39
Joined: Thu Jan 12, 2017 1:48 pm
Location: Italy

Re: M47

Postby Alberto FUL » Wed Feb 07, 2018 4:00 pm

this is not working too:

exec.Callbutton(130); // stop
exec.Callbutton(127); // rewind
exec.Callbutton(128); // cycle start
Alberto FUL
 
Posts: 39
Joined: Thu Jan 12, 2017 1:48 pm
Location: Italy

Re: M47

Postby Alberto FUL » Wed Feb 07, 2018 5:14 pm

Macro
Alberto FUL
 
Posts: 39
Joined: Thu Jan 12, 2017 1:48 pm
Location: Italy

Re: M47

Postby Alberto FUL » Wed Feb 07, 2018 5:17 pm

Yes, G-code is running.
My will is to have G-code loop (with conditional jump).
Alberto FUL
 
Posts: 39
Joined: Thu Jan 12, 2017 1:48 pm
Location: Italy

Re: M47

Postby cncdrive » Wed Feb 07, 2018 9:57 pm

M47 does not work in macros.
Calling the cycle stop button code 130. stops your cycle and so your currently running macro too, so your macro can no more rewind and cycle start again.
Maybe Dezsoe can give you an idea about what else way to resolve what you want to achive.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: M47

Postby dezsoe » Thu Feb 08, 2018 3:25 pm

Alberto,
Could you explain the whole task you want to do? If it's not public, send in PM. If I know what you want to do, then maybe I can help you.
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: M47

Postby Alberto FUL » Fri Feb 09, 2018 5:28 pm

I'd like to have the possibility to loop the G-code if a check-box is on.
Thanks
Alberto FUL
 
Posts: 39
Joined: Thu Jan 12, 2017 1:48 pm
Location: Italy

Re: M47

Postby dezsoe » Fri Feb 09, 2018 6:28 pm

That's easy. Make a call to a macro before the M47. The macro checks for the checkbox and stops if not checked.

G-code:
Code: Select all
G0 X10
G0 X0
M1001
M47

Macro (M1001.txt)
Code: Select all
if (!AS3.Getcheckboxstate(19000))
{
  exec.Callbutton(130); // Stop button
  exec.Callbutton(127); // Rewind button
}
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: M47

Postby Alberto FUL » Fri Feb 09, 2018 7:40 pm

Thanks
Alberto FUL
 
Posts: 39
Joined: Thu Jan 12, 2017 1:48 pm
Location: Italy


Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: No registered users and 33 guests