Hello Guest it is May 20, 2019, 05:07:32 PM

Author Topic: Plasma , new macro code  (Read 16389 times)

0 Members and 1 Guest are viewing this topic.

Offline budman68

*
  • *
  •  2,360 2,360
    • View Profile
Re: Plasma , new macro code
« Reply #40 on: June 25, 2010, 09:40:00 PM »
I'm not sure I know how to make an MCode, lol!

I set up a button in a screen designer as a VB "Run Script" button and then open Mach 3 and use the "Edit button Script" command to insert the script.

Dave
----------------------------------------------------------------------
Just because I'm a Global Moderator, don't assume that I know anything !

Dave->    ;)

Offline BR549

*
  •  6,865 6,865
    • View Profile
Re: Plasma , new macro code
« Reply #41 on: June 25, 2010, 10:04:12 PM »
I have a different version if you are game to try it(;-) It keeps the toolpath display working so you can see it draw a pretty line around the part.

Offline budman68

*
  • *
  •  2,360 2,360
    • View Profile
Re: Plasma , new macro code
« Reply #42 on: June 25, 2010, 10:11:11 PM »
Sure, absolutely! I'm actually learning a bit more as I go-

Dave
----------------------------------------------------------------------
Just because I'm a Global Moderator, don't assume that I know anything !

Dave->    ;)

Offline BR549

*
  •  6,865 6,865
    • View Profile
Re: Plasma , new macro code
« Reply #43 on: June 25, 2010, 10:14:02 PM »
Dave does the test Gcode file you load have an "M30" in the last line? Just curious(;-)



 'Macro To AUTOEXTENTS
Sub main()
Msg="Is Your Z HEIGHT Safe To Travel?"
Response = MsgBox(Msg, 4 )
If Response = 7 Then
GoTo N3:
Else
GoTo N2:
End If
N2:
DoButton(8)      'ZeroXyZ
DoButton(9)
DoOemButton(160)   'Regen ToolPath
While Isloading()
Wend
DoButton(2)
SetVar(100,Getoemdro(4))
SetVar(101,Getoemdro(10))
Setvar(110,Getoemdro(5))
Setvar(111,Getoemdro(11))
While Ismoving()
Wend
'DoOemButton(169)
While Ismoving()
Wend
Code"G1 X#100 Y#110 F30"
While Ismoving()
Wend
Code"G4 P3"
Code"G1 X#100 Y#111 F30"
While Ismoving()
Wend
Code"G4 P3"
Code"G1 X#101 Y#111 F30"
While Ismoving()
Wend
Code"G4 P3"
Code"G1 X#101 Y#110 F30"
While Ismoving()
Wend
Code"G4 P3"
Code"G1 X#100 Y#110 F30"
While Ismoving()
Wend
Code"G4 P3"
Code"G1 X0.000 Y0.000 F30"
While Ismoving()
Wend
DoButton(2)
GoTo N4:
N3:
MsgBox("Move Z To A Safe Position And Restart")
GoTo N4:
N4:
End Sub
End

Offline budman68

*
  • *
  •  2,360 2,360
    • View Profile
Re: Plasma , new macro code
« Reply #44 on: June 26, 2010, 07:10:41 AM »
Hi Terry,

Yes, I use an M30 in my GCode, don't most users?

The new script did not run either  :D

Thanks,
Dave
----------------------------------------------------------------------
Just because I'm a Global Moderator, don't assume that I know anything !

Dave->    ;)

Offline BR549

*
  •  6,865 6,865
    • View Profile
Re: Plasma , new macro code
« Reply #45 on: June 26, 2010, 08:51:49 AM »
Interesting (;-)   Can you describe what it actually does step by step?

Yes Most do use the M30 but not all do.

Offline budman68

*
  • *
  •  2,360 2,360
    • View Profile
Re: Plasma , new macro code
« Reply #46 on: June 26, 2010, 06:30:58 PM »
Yes, of course but I'll do one better. I'll show you  ;)

Take note how after the GCode window cycles, the run time counter continues counting and does not stop.

Oh, and pay no attention to how the fonts and characters are clipped. I have my fonts set larger than normal on my widescreen so that's why it looks that way on my test machine.

http://www.youtube.com/watch?v=Z2fYFqvH84k

Dave
----------------------------------------------------------------------
Just because I'm a Global Moderator, don't assume that I know anything !

Dave->    ;)

Offline BR549

*
  •  6,865 6,865
    • View Profile
Re: Plasma , new macro code
« Reply #47 on: June 26, 2010, 07:16:20 PM »
OK what happens IF you let it run for a while. Does it return to a rewound screen or never finishes??

Here it runs the code does the Regen then rewinds back to the top and runs the perimeter moves, showing the moves on the toolpath screen then ends and the gcode is ready to run

If you get a chance could you run the enclosed Test Gcode file to see IF it could be file dependant
« Last Edit: June 26, 2010, 07:26:54 PM by BR549 »

Offline budman68

*
  • *
  •  2,360 2,360
    • View Profile
Re: Plasma , new macro code
« Reply #48 on: June 26, 2010, 07:45:12 PM »
Yep, it's file dependant as your file indeed works correctly, my friend-

Also, yes, the run time counter doesn't stop, the longest I let it run was 15 minutes.

So I'm guessing it's the M30 at the end of my file? What exactly is that affecting?

Dave
----------------------------------------------------------------------
Just because I'm a Global Moderator, don't assume that I know anything !

Dave->    ;)

Offline BR549

*
  •  6,865 6,865
    • View Profile
Re: Plasma , new macro code
« Reply #49 on: June 26, 2010, 07:52:32 PM »
Could you post the file you were using to test?

The M30 does not have anything to do with it(;-) I had removed the M30 to test and never put it back.