Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 07:46:00 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  General Mach Discussion
| | |-+  Plasma , new macro code
Pages: 1 2 3 4 5 6 »   Go Down
Print
Author Topic: Plasma , new macro code  (Read 2124 times)
0 Members and 1 Guest are viewing this topic.
BR549
Active Member

Offline Offline

Posts: 2,551


View Profile
« on: June 19, 2010, 11:53:23 PM »

I loaded up a new macro program in the MACH TOOL BOX that allows the machine to travel the PART extents to see if the part can be cut from your material on the table.

Load you program, then move to a position that you think will do for the X0Y0 (origin). Then run the code. The macro will ASK you if your Z position is safe for travel. If yes then it will reset the XY axis to zero, retreive the xy minmax extents and then travel the far corners of those values.

IF not then it ends and asks you to correct the problem then restart.

If the part BOX will fit on your material then you are good to go.

Good for routers GREAT for plasma.
Logged
Tweakie.CNC
Active Member

Offline Offline

Posts: 3,258


Super Kitty.


View Profile WWW
« Reply #1 on: June 20, 2010, 05:48:02 AM »

Absolutely brilliant - great addition for any machine.

Tweakie.


For those who follow -  the Macro is in this thread http://www.machsupport.com/forum/index.php/topic,15154.0.html
Logged

Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.
budman68
Master of the Custodial Arts, or better known as:
Global Moderator
*
Offline Offline

Posts: 1,994



View Profile
« Reply #2 on: June 20, 2010, 07:19:36 AM »

Agreed, this will be great as I like to utilize all my "scrap" pieces, so this will be a nice way to see if the profile will "fit" the material.

Thanks for this-

Dave
Logged

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

Dave->    Wink
budman68
Master of the Custodial Arts, or better known as:
Global Moderator
*
Offline Offline

Posts: 1,994



View Profile
« Reply #3 on: June 20, 2010, 07:29:22 AM »

Already having a problem and I asked a question in the actual Macro post, maaybe someone can help?

Thanks,
Dave
Logged

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

Dave->    Wink
BR549
Active Member

Offline Offline

Posts: 2,551


View Profile
« Reply #4 on: June 20, 2010, 10:32:02 AM »

Hi Dave, I just ran it here about a dozen times with different files and NO problems. What version of Mach are you running?

Out of curiousity press the regen button before you try it again. Later vers of mach are not as reliable with VB as the earlier versions. There are as many wait states in that program as I can stuff in there and still have it do anything.

But that is just my opinion
Logged
BR549
Active Member

Offline Offline

Posts: 2,551


View Profile
« Reply #5 on: June 20, 2010, 11:03:59 AM »

Dave I just loaded up the stable ver of mach V.040 and I can say that there is something bad wrong in there with VB/Gcode.

SO I will pull the macro code to keep from causeing issues.
Logged
budman68
Master of the Custodial Arts, or better known as:
Global Moderator
*
Offline Offline

Posts: 1,994



View Profile
« Reply #6 on: June 20, 2010, 11:32:27 AM »

Thanks for looking into this, I'm running R3.041 so I guess there's the reason why.

EDIT: Tried the regen and the same exact thing.

Thank you sir-
Dave
« Last Edit: June 20, 2010, 11:34:18 AM by budman68 » Logged

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

Dave->    Wink
BR549
Active Member

Offline Offline

Posts: 2,551


View Profile
« Reply #7 on: June 20, 2010, 11:47:07 AM »

one last thing, Load up a program and then use the VB editor and single step down through the code to see if it still works. IF it works ok then save and try it again from the button.

I can make it work here by first single stepping down through the code. after that it works every time with the V.040.

Don't ask me why you need to single step it first to make it work HuhHuh

YOU COULD delete out the AUTO section and do that part manually then run the motion code as a button.

It is a darn handy function as we have used it here with plasma for about a year now without problems.
« Last Edit: June 20, 2010, 11:48:47 AM by BR549 » Logged
budman68
Master of the Custodial Arts, or better known as:
Global Moderator
*
Offline Offline

Posts: 1,994



View Profile
« Reply #8 on: June 20, 2010, 11:54:10 AM »

Yep, it works correctly as long as the editor is open! What's up with that?  Cheesy


Dave
Logged

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

Dave->    Wink
BR549
Active Member

Offline Offline

Posts: 2,551


View Profile
« Reply #9 on: June 20, 2010, 02:27:42 PM »

Dave could you try this version, I have it working reliably here on the V.040 version

'Macro To AUTOEXTENTS
Sub main()
 FR = 30      'Sets FeedRate
 DT = 3         'Sets Dwell Time
 Msg="Is Your Z HEIGHT Safe To Travel?"
SetVar(120,FR)
SetVar(121,DT)
Response = MsgBox(Msg, 4 )
If Response = 7 Then
GoTo N3:
Else
GoTo N2:
End If
N2:
DoButton(8)      'ZeroX
Sleep(1000)      
DoButton(9)      'ZeroY
Sleep(1000)
DoButton(10)
Sleep(1000)
DoOemButton(160)   'Regen ToolPath
Sleep(1000)
Sleep(1000)
SetVar(100,Getoemdro(4))
Sleep(100)
SetVar(101,Getoemdro(10))
Sleep(100)
Setvar(110,Getoemdro(5))
Sleep(100)
Setvar(111,Getoemdro(11))
Sleep(1000)
DoOemButton(169)
Sleep(1000)
Code"G1 X#100 Y#110 F#120"
While Ismoving()
Sleep(100)
Wend
Code"G4 P#121"
Code"G1 X#100 Y#111 F#120"
While Ismoving()
Sleep(100)
Wend
Code"G4 P#121"
Code"G1 X#101 Y#111 F#120"
While Ismoving()
Sleep(100)
Wend
Code"G4 P#121"
Code"G1 X#101 Y#110 F#120"
While Ismoving()
Sleep(100)
Wend
Code"G4 P#121"
Code"G1 X#100 Y#110 F#120"
While Ismoving()
Sleep(100)
Wend
Code"G4 P#121"
Code"G1 X0.000 Y0.000 F#120"
While Ismoving()
Sleep(100)
Wend
DoOemButton(170)
Sleep(1000)
GoTo N4:
N3:
MsgBox("Move Z To A Safe Position And Restart")
GoTo N4:
N4:
End Sub
End

Logged
Pages: 1 2 3 4 5 6 »   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!