My laser engraver from 0 knowledge to 32.461% .... probably

Discussions and file drops for Auggie
Post Reply
BobbyW
Site Admin
Posts: 117
Joined: Sun Sep 08, 2019 11:27 pm

Re: My laser engraver from 0 knowledge to 32.461% .... probably

Post by BobbyW »

ArtF wrote: You may want to try it without all the M5 and M3's.

Art
Thank you Art , you are the boss  :)
Well soon i wake up i saw you answer and i start to modify .
I let M3 only an beginning and M5 at the end of code .
Surprised , the laser cut all lines , dont miss any line and everything is fine.
Second good thing , now the extension generate the GCODE way more faster ,
i mean if before for 20000 GCODE lines need 20 sec , now in 6-10sec is done.
Still i'm not sure if is necesary the line "G00 (LASER OFF) "
because if i pass that on next will be the " power" and " feed " set and
start again in "G0" >
I mean the laser will never " accidentaly " burn without that line , right ?
For me was a little difficult , without any knowledge about GCODE ,
my start was from "0". All good now , still learning.
Thanks Art
Bobby

You do not have the required permissions to view the files attached to this post.
ArtF
Global Moderator
Global Moderator
Posts: 4557
Joined: Sun Sep 05, 2010 5:14 pm
Contact:

Re: My laser engraver from 0 knowledge to 32.461% .... probably

Post by ArtF »

Hi Bobby:

  The G0 line is not required for laser control. It is a given that any G0 move will
not turn on the laser. SO really, only an M3 at start is necessary, and the M3 is really only a
safety.

Art
BobbyW
Site Admin
Posts: 117
Joined: Sun Sep 08, 2019 11:27 pm

Re: My laser engraver from 0 knowledge to 32.461% .... probably

Post by BobbyW »

Ok . Understood .
I remove all unnecesary comands and now work ok.
So at the end wasn't the extension issue , M3 M5 G0
repeately on each path just saturate the script .
And also the code is generated way more fast of course.
Thanks Art
Bobby
ArtF
Global Moderator
Global Moderator
Posts: 4557
Joined: Sun Sep 05, 2010 5:14 pm
Contact:

Re: My laser engraver from 0 knowledge to 32.461% .... probably

Post by ArtF »

Bobby:

  Those scripts, M3 etc.. were written to be executed as laser on and probably dont contain a
syncing variable to wait for completion of the command. In that case the m3 may not actually turn on till
a few ms after the next command causes motion.  Ill have to check that as it could cause a loss of burn
in such a case as yours.
  Recently one user made cnc scripts for spindles and I think he had to add a sync to make sure
the spindle was up to speed before continuing.

Art
BobbyW
Site Admin
Posts: 117
Joined: Sun Sep 08, 2019 11:27 pm

Re: My laser engraver from 0 knowledge to 32.461% .... probably

Post by BobbyW »

ArtF wrote: Bobby:

  Recently one user made cnc scripts for spindles and I think he had to add a sync to make sure
the spindle was up to speed before continuing.

Art
Yea , on laser a burn miss is not big deal but on CNC it is .
I got the point about that .
And now with all pieces together , i remember , when i write first time the extension
to fit with Auggie was ok , but in that time my motors wasn't realy "good " tuned.
in time , getting experience , i figure out my laser can go to 12000 without any problem
the motors are with encoders and never miss one step , many time i engrave a photo 6 or 7 times
just to test and never miss the 0 point . But... after G00 go from 4000 to 12000 "max 4000 was my old config"
the laser start to miss some very small points .
And now working normaly.
When i start to build i was with '0" experience in CNC and GCODE and of course
i made many mistakes when i design the laser .
the very big one , the X ax are so heavy + big motor , totaly pointless to move 200g
laser head , the ax itself is at least 20 times more heavy than the laser head,
but if we dont mistake we can not learn , so ... we go on. :D
thanks Art
Bobby
You do not have the required permissions to view the files attached to this post.
BobbyW
Site Admin
Posts: 117
Joined: Sun Sep 08, 2019 11:27 pm

Re: My laser engraver from 0 knowledge to 32.461% .... probably

Post by BobbyW »

Hi everyone .
Just to say i want to cut a small shape , doesn't matter the complexity
and i dont want to travel all time to my PC to rewind the code and start my job.
So it is possible via script to program some push buttons connected to Pokeys IO ?
Like " Run " Stop " Rewind ' Cont.
That can be possible via script ?
Thanks
Bobby
ArtF
Global Moderator
Global Moderator
Posts: 4557
Joined: Sun Sep 05, 2010 5:14 pm
Contact:

Re: My laser engraver from 0 knowledge to 32.461% .... probably

Post by ArtF »


  Bobby:


  When a valid input pin toggles its value.. say Pin 6 on the Main Pokeys,
a signal is sent to the scripting facility of "MotionPin6". This means a script
waiting on such a signal will start running when it sees that toggle of value.

  You'd need to write a script that listens for that signal to do your operation.
You'd use the block command to pause a script, blocking  on that pin. Im forgetting
many of these operations as I rarely change scripts anymore.. but you need a
script similar to this and to call it in an mdi line or something to start the process.

ex script:

global MyRewindService = function()
{
  while(1)
    {
      print("Waiting for Pin6 to rewind");
      block("MotionPin6"); //this will wait for pin6 to toggle

      //do a Gcode call here to do a rewind.. I thinks like..
      print("Pin6 has been pressed");
      Engine.Gcode("M30");
     
    }
};
//and start the service
MyRewindService();
 

    The above script would be added to the end of your Gcode script in the
library, it will then start up as the system does and make pin6 a rewind button.
  Though you may want to test the pin6 value to see if its a 1 or zero.. I think
thats something like Motion.GetDigPin(6) .. you should see example of how
to use those calls in the various posts here or in the library in various scripts.

Art



BobbyW
Site Admin
Posts: 117
Joined: Sun Sep 08, 2019 11:27 pm

Re: My laser engraver from 0 knowledge to 32.461% .... probably

Post by BobbyW »

ArtF wrote:
  Bobby:

       Engine.Gcode("M30");

Art
Thanks Art
For rewind button , i found the other way
to automated rewind. Shame to me i didn't know
exist a " rewind " command in GCODE.
So i put it at the end on my extension footer , every time i generate GCODE
the code will rewind itself .

Code: Select all

'header': """%
M5 ( LOCK LASER)
(Header)
""",
'footer': """(Footer)
M5 (LOCK)
G00 X0 Y0 (Move head out of way)
M2 (END)
M30 (rewind)
%"""
}
And that solve the rewind.
For RUN , STOP i look in the panel and i saw
the variable used by that buttons .
I think need something like when pin_X is toggled.

Code: Select all

GlobalSet("Execute");
Thanks
Bobby
ArtF
Global Moderator
Global Moderator
Posts: 4557
Joined: Sun Sep 05, 2010 5:14 pm
Contact:

Re: My laser engraver from 0 knowledge to 32.461% .... probably

Post by ArtF »

probably more like GlobalSet("Execute",1);
BobbyW
Site Admin
Posts: 117
Joined: Sun Sep 08, 2019 11:27 pm

Re: My laser engraver from 0 knowledge to 32.461% .... probably

Post by BobbyW »

ArtF wrote: probably more like GlobalSet("Execute",1);
Hi Art
Yes , you right . I didn't know the function have a argument.
It works , but with two issues .
One " Engine.Gcode("M30"); " M30 is not recognized .
and second , Doesn't matter how fast i press the button
the comand will always double execute.
I assume "toggle" is not perfect solution ,
because i assume the service will detect my press 0 to 1 and after i release
the button the service detect 1 to 0 normaly .
Maybe if i wait only from 0 to 1 the pin change ?
Usualy when a pin_X can be in/out type is necesary
pull up/down with 1-10k .
Thanks
Bobby
Post Reply