Page 2 of 2

Re: Script/GCode interface

Posted: Fri Mar 30, 2018 1:36 pm
by Vangoth
Good night, a question my auggie does not activate the spindle with the M3 code. Should I add it?

Re: Script/GCode interface

Posted: Fri Mar 30, 2018 3:49 pm
by ArtF
Hi:

  Have you turned on the spindle libraries? The default one turns on a laser, so you may want to change that so it only turns on a relay. The GCode library calls
the SetSpindleState macro, you will find the laser example of that macro that may be modified.

Art

Re: Script/GCode interface

Posted: Sat Mar 31, 2018 7:33 am
by Vangoth
yes sir, I have it activated but when I load the code g and start doing the movement, it locks up when it finds the M3 code. and create a new script only with the option to turn on and off plasma with relay # 3 and it does not work either. Here I leave you the scrip that you wrote and the error that appears when the machine finds the M3

global SpindleOn = function ()
{
Pokeys1.SetRelay (3,1);
print ("Plasma Spindle RT Engaged");
 
};
 
global SpindleOff = function ()
{
Pokeys1.SetRelay (3,0);
print ("Plasma Spindle RT dis-engaged");
 
};



Re: Script/GCode interface

Posted: Sat Mar 31, 2018 10:51 am
by ArtF
Hi:

  The messages seem to show the script being called, can you press the log button at that point and send me a copy of the log? Does an ESTOP happen when you do this or does the spindle just not come on?

Art

Re: Script/GCode interface

Posted: Sat Mar 31, 2018 1:31 pm
by ArtF
Hi:

One other test to make, in your SCRIPT tab, enter the following..

Pokeys1.SetRelay(3,1);

and press RUN on thge screen. Does the relay turn on? You should hear it
click on the board. Try

Pokeys1.SetRelay (3,0);

and again press RUN, doe the relay turn off?

Art

Re: Script/GCode interface

Posted: Sun Apr 01, 2018 12:57 pm
by Vangoth
yes sir I did the test and the relay is turned on with: Pokeys1.SetRelay (3,1); and it shuts down with Pokeys1.SetRelay (3,0); .

When I run the G code when I reach the M3, the program turns on the N (3) relay and the system locks and the error LED on the screen turns on. Annex image of the error.

I appreciate your help.

Re: Script/GCode interface

Posted: Sun Apr 01, 2018 2:07 pm
by ArtF
Hi:

It sounds like maybe an error or typo is in the script.
Can you use the LocalEdit button in the lib to load the
Laser-Spindle Script into the script editor and show me
what the SetSpindleState macro looks like now?

  There may be soem error in there.

Thx
Art

Re: Script/GCode interface

Posted: Sun Apr 01, 2018 2:12 pm
by Ya-Nvr-No
it looks like the G4 X command is the error
G4 is a pause/dwell command followed by a P time value there are some controllers that use an X just not sure Auggie does

Side Note:
it is a standard practice to have the spindle M call on and S speed on the same line
most industrial controllers will also fault on if a G1 feed move is called before the feed rate is set.

Re: Script/GCode interface

Posted: Sun Apr 01, 2018 2:14 pm
by ArtF
Hi:

As YaNvrNo pointed out  the G04X line is an error.

G04 is a dwell but doesnt use X, remove that line and see if the error goes away..
Thx to "YaNvrNo" for pointing this out.

Thx
Art

Re: Script/GCode interface

Posted: Sun Apr 01, 2018 2:51 pm
by Vangoth
yes sir thank you very much, indeed the error was the code G4. edit it and it works

Does that mean that I must change the postprocessor for one that does not generate a g4?

Re: Script/GCode interface

Posted: Sun Apr 01, 2018 3:08 pm
by ArtF
Hi:

yes, or edit the files afterwards. The G04 is allowed, but it has to be in the form of G04P.5 for example as a .5 second dwell.
Plasma usually uses this to wait for fire..

Art

Re: Script/GCode interface

Posted: Sun Apr 01, 2018 3:20 pm
by Vangoth
yes sir, I am in the task of looking for and testing a postprocessor that will probe in the Z axis before turning on the torch and then turn on the torch with M3 and pause for 1 second depending on the thickness of the metal so that the Fire penetrate the material and start the cut.

MUCHAS GRACIAS POR SU AYUDA

Re: Script/GCode interface

Posted: Sun Apr 01, 2018 3:36 pm
by ArtF
You should probably just hook up a home switch on the Z that homes downwards till the switch hits the material and sets it as home.
You just tell Auggie to home the Z then. That can probably be done with a macro call or a simple macro script. Ill check into the GCode
command for telling an axis to home to switch.. I think I added it but Im not sure..

Art