Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: corydoras on July 04, 2007, 06:57:21 PM

Title: Simple toolchange position
Post by: corydoras on July 04, 2007, 06:57:21 PM
Hi

I am looking for an easy way to get my machine to move to a toolchange position, without getting in to VB

Is this possible?

I am not gonna have an auto toolchange just for the machine to go to a set of coordinates to get easy access to the spindle, because I have my home position in the upper left corner if you know what I mean.

By the way, is there aneasy way to change the start position from bottom left corner to upper left corner?

Love Mach3, thanks Art & Co

Greetings from wet Norway

Cory
Title: Re: Simple toolchange position
Post by: Azrael on July 04, 2007, 07:25:18 PM
If I understood you, you want to get the spindle to the proper position for the tool change and then continue the program? There is option at the settings screen where you have to enter tool change position. Then you have to enable tool change in the config menu. When g-code find T*, program stop and you have to press 'go to tool change location" button, then your spindle shall take desired position. After you change tool, pres cycle start and that's it.
Hope this help
Cheers
Title: Re: Simple toolchange position
Post by: Chaoticone on July 04, 2007, 07:45:16 PM
Hey Cory,
    On your home position, go to config, homeing and limits and reverse the axis you want to change. It will then home in the opposite direction. Also, make sure it will see your home switch when it travels to that position.

Brett
Title: Re: Simple toolchange position
Post by: corydoras on July 05, 2007, 07:53:03 AM
Thanx for the reply guys.

Azrael:
I activated the toolchange in the config menu, and entered toolchange position, put M& in g-code file, and the ,machine stops and wait for tool change, but I cant fint the "go to toolchange location" button.

I run Mach3 v 2.0.065, I also have Quantum istalled, but cant find it there either.

By the way Is Quantum fully functional?, I like the big tool screen, so I would preffere to use Quantum, but I cant get LazyCam to work under it, Do I need LacyCam 2.0 Pro?

 Chaoticone :

I may have desribed the problem poorly, but here is an atatched screenshot explaining what I want.......I thnk:):)

Best Reg
Cory
Title: Re: Simple toolchange position
Post by: Chaoticone on July 05, 2007, 08:22:53 AM
Hey Cory,
   If you want to tell it that part Zero is in the upper left corner of the part, that will be done in your CAM package. What I suggested earlier will change your machines home position and, you don't reverse the axis, check home neg. (Sorry) Also, the tool change position is on the settings page. I have attached a screen shot to help.

Quantum is working but it is still Beta. Feel free to try it, but understand, it is beta.

Brett
Title: Re: Simple toolchange position
Post by: vmax549 on July 05, 2007, 10:37:59 AM
What I believe he is trying to say is,"There is " NO " go to tool change button in the current MACH screensets". Yes the postion dros are there but not the goto tool positon button. I think it used to be there in past versions. (;-) TP
Title: Re: Simple toolchange position
Post by: corydoras on July 05, 2007, 11:55:40 AM
Correct Vmax. I already put in the position, but as mentioned, cant find anything that activates this position (button)

Best reg
Cory
Title: Re: Simple toolchange position
Post by: vmax549 on July 05, 2007, 01:57:55 PM
Hi Cory, If you can put the button on the screen , we can help you with the VB coding. It is not that hard to do.
It is a handy function. We do it with a button and also from a macro inside the Gcode programs.

Hum just thought of something, If you are not comfortable with adding a button you can always use the TOOL Zero button on the main screen. It is inside the tool info block, you will just have to edit the button script. Easy to do if you need help just let us know.

(;-) TP
Title: Re: Simple toolchange position
Post by: Chaoticone on July 05, 2007, 02:14:26 PM
Thanks Vmax,
    I have been looking today and that is the only solution I have come with as well. I'm trying to learn a little about VB, but no good for that right now. If you could write the code, that would be great.

Brett
Title: Re: Simple toolchange position
Post by: vmax549 on July 05, 2007, 02:24:32 PM
OK but let's cover a few things first. For this to work correctly you need to be able to reference you machine to home. That way Mach is working from the same base coordinate each time and the machine will return to the same tool change position each time.

With out that mach could be at any location position base  it booted up with and the TCP would be wrong.

Follow me so far?
Title: Re: Simple toolchange position
Post by: Chaoticone on July 05, 2007, 02:29:22 PM
Yup, I understand. Could you not read the Machine pos. DROs and work in that in the macro? Let me see what the tool change position dros are. brb

Brett
Title: Re: Simple toolchange position
Post by: Chaoticone on July 05, 2007, 02:47:26 PM
The OEM codes for the Machine coord. DROs are X 83 Y 84 Z 85.

Brett
Title: Re: Simple toolchange position
Post by: Chaoticone on July 05, 2007, 03:12:57 PM
The tool cahnge position dros are OEM codes, X 1200, Y 1201, Z 1202.

Brett
Title: Re: Simple toolchange position
Post by: vmax549 on July 05, 2007, 05:30:45 PM
Correct in both instances, NOW do you want to run it from a button or run it AUTO matically from the tool change M6 macro or both?  Do you want it to return to the position you were at before you went to the TCP? Do you want it to follow a certain path to get to the TCP?  Remember if it follows the same general direction to and from the TCP you can plan where you want to place clamps ,etc.. What you sacrifice sometimes is time to get to TCP and return not following the most direct path. ??

(;-) TP
Title: Re: Simple toolchange position
Post by: corydoras on July 05, 2007, 05:49:32 PM
Just a simple way to get it to a comfort position in manual mode without having to jog it

By a press of a button

Best reg
Cory
Title: Re: Simple toolchange position
Post by: Chaoticone on July 05, 2007, 06:02:39 PM
I would like to see it work in both, button and auto via M6. I think  it should follow a certain path, return to the position before the tool change, and cycle start would put it back to proper position and start the program from where it left off.

Brett
Title: Re: Simple toolchange position
Post by: vmax549 on July 05, 2007, 09:34:10 PM
Ok lets start with a button. Cory are you able to place a button on the screen you want it it be on?  Or do we need to use the main screen and use the auto tool zero button?

Also you do realise you have to reference your machine to home when you first start Mach. This will not work correctly if you do not.

(;-) TP
Title: Re: Simple toolchange position
Post by: corydoras on July 06, 2007, 06:15:23 AM
Sorry Vmax, I have no knowledge of screen designing, or any VB script writing.

I would be nice to have this option, but by all means dont put to much work into it unless u want to

I am in the process of building a new machine, and have just started the build on the electrical cabinet.
Still having some problems with uneven movements on the X axis that I need to sort out

Thanx for your help so far guys

Best reg
Cory
Title: Re: Simple toolchange position
Post by: vmax549 on July 06, 2007, 11:09:28 AM
Hi Cory , it is not a problem. I take it that you use the standad screen set that came with mach? If so I can just modify the screen set and send it to you by email. Where would you like the button located, on what page/pages.What would you like it called?    Give it some thought. It is only a ten minute process to do. Maybe post a picture of the new machine? We like pictures of new MACHINES. (;-)

(;-) TP
Title: Re: Simple toolchange position
Post by: vmax549 on July 06, 2007, 11:39:44 AM
OK Brett, you are up. You want a button script and a M6 version.


Button version, Edit this into a button of your choice. It will use the positions you entered into the Tool Change Position DROs (note they need to be in Machine Coord Positions). It also takes the current feed rate and saves it. Z will retract up to the set position then y then Z. THis will give you a general path direction that it will always follow. The feedrate is set to 100 you can edit that to your choice. When it gets to the TCP it resets the feedrate to the previous setting and returns to the current Coordinate system.

Note: You use this code at your own risk, Always pretest any code before using it in normal use. There can be errors. Machine damage can occur with bad code. Death or injury of the operator can occur with bad code.
 (;-) TP

Note: To stop a button operation normally  the " ESC" key stops a macro, BUT there can be a delay to stopping due to Buffering of the code.


Xtcp= GetUserDro (1200)
Ytcp= GetUserDro (1201)
Ztcp= GetUserDro (1202)
Feed= GetDRO(18)

MSGBOX " You are moving to the TCP, make sure path is clear"     'Warning you it is about to move

Code"G1 F100"                  ' Feedrate You can change this to your choice just change the number after the F or just use a G0 instead of G1
Code"G53 Z"&Ztcp
While IsMoving
Wend
Code"G53 Y"&Ytcp
While IsMoving
Wend
Code"G53 x"&Xtcp
While IsMoving
Wend

Setdro(18,Feed)
Title: Re: Simple toolchange position
Post by: corydoras on July 06, 2007, 09:02:29 PM
Super Vmax

I would love to have it on screen 1 (Program run screen)
Preferrably in the Tool info box.

I see that page is already crowded with buttons , but if it is possible, you could change the jog on/off button with the TVP button, since I dont use this function of the jog button.

Maby a good name would be"Toolchange pos" or "Goto TCP`)?

I have som pictures from the start of my build, but Ill get some new ones tomorrow maby, since there has been some progress in the build since these where taken.

Got the nerve up to try and build a one armed bandit machine, but as expected ....rigity is an issue here......
Build thread on cnczone.com:
http://www.cnczone.com/forums/showthread.php?t=37703

Best reg
Cory
Title: Re: Simple toolchange position
Post by: Chaoticone on July 06, 2007, 09:32:24 PM
Thanks Vmax,
    The button version seems to work fine. I have only tried it on my office PC, but it seems good.

Cory, Post the screen set you use, and I'll modifiy it for you. Rename it something like "cory1024.set"

Brett
Title: Re: Simple toolchange position
Post by: corydoras on July 07, 2007, 06:13:53 AM
Ok here it is

Best reg
Cory
Title: Re: Simple toolchange position
Post by: Chaoticone on July 07, 2007, 06:24:30 AM
Here you go Corey. Test it with a program loaded, cutting air. I added a TCP button beside youl tool info on the program run page.

Brett
Title: Re: Simple toolchange position
Post by: corydoras on July 07, 2007, 07:31:54 AM
You`r the Man, Chaoticone ...it worked great, but the feedrate was set to 100, is it possible to change this as it was rather slow?

I owe you man

Best reg
Cory
Title: Re: Simple toolchange position
Post by: vmax549 on July 07, 2007, 09:30:13 AM
Brett you can substitute a G0 for the G1f100 and it will move at high speed. The G1f100 was a hold over from the code it was running at one time. (;-) TP
Title: Re: Simple toolchange position
Post by: corydoras on July 07, 2007, 09:56:26 AM
Hi

i looked into the prograam code in wordpad, and i see that you wrote some text that I could change the feedrate or put in a G0 ibstead of a G1 Brett.

What kind of editor do i need to use to change this.

It did´nt work in wordpad

Bwest reg
Cory
Title: Re: Simple toolchange position
Post by: vmax549 on July 07, 2007, 10:52:55 AM
Cory from the screen the button is located. At the top of the screen select OPERATOR then Edit Button Script. The buttons that are editable will now flash. Click on the one to edit.  This will bring up the VB editor. Edit the Info inside of the " " on the line that has the feedrate set. You can edit the F100 to whatever or just delete the G1 F100 and subsitute G0.

Next Save, then go to the top of the screen and select VEIW and then Save Current Layout. Thats it

Test in the air before using on work. (;-) TP
Title: Re: Simple toolchange position
Post by: corydoras on July 07, 2007, 12:56:29 PM
Cool, woorks as a sweet mandarin.

Thanx guys, really cool with this forum that lets us edit the software the way we want it,(not that it is is not great already thou)

Best reg
Cory
Title: Re: Simple toolchange position
Post by: corydoras on July 07, 2007, 04:10:31 PM
Now If I could only het my NetMos  paralellport card to work I could start testing the machine, but what a troublesome card....
Have read all the threads here on adding another paralellport card but have not found any suggestion that works.

Need 2 ports since I run servos on x and y axis directli to my LPT! port and stepper and BOB on the 2nd.....well that was the intention at least.


But TCP works great

Best reg
Cory
Title: Re: Simple toolchange position
Post by: vmax549 on July 07, 2007, 04:59:46 PM
Ok lets take a shot at it explain what your problem is and what you have tried so far.

Best yet please start a new thread as to not dilute this thread on the TCP


 (;-) TP
Title: Re: Simple toolchange position
Post by: corydoras on July 07, 2007, 05:36:13 PM
New thread started

Best reg
Cory
Title: Re: Simple toolchange position
Post by: vmax549 on July 07, 2007, 08:59:04 PM
Brett are you ready to work on the M6 version?
Title: Re: Simple toolchange position
Post by: Chaoticone on July 07, 2007, 09:29:41 PM
Sorry for the late reply guys, just got in a couple of hours ago to find my shop had been hit by lightning. :( All problems that I know of are fixed now though. I'm ready Vmax.

Brett
Title: Re: Simple toolchange position
Post by: vmax549 on July 07, 2007, 10:37:35 PM
OK first you need to add a set of 3 dros to the setting screen just below the TOOL CHANGE POSITION DROs.

Label them Xpos, Ypos, Zpos top to bottom.  Set them to

Xpos = UserDro 2000
ypos = UserDro 2001
Zpos = UserDro 2002

Then add this to the M6start and M6end Macros

'M6Start macro

Tool= GetSelectedTool ()
SetCurentTool (Tool)

Xpos= Getoemdro (83)
ypos= GetOemDro (84)
Zpos= GetOemDro (85)

Xtcp= GetOemDro (1200)
Ytcp= GetOemDro (1201)
Ztcp= GetOemDro (1202)

SetOemDro (2000,Xpos)
SetOemDro (2001,Ypos)
SetOemDro (2002,Zpos)

Code "GO"

Code "G53 Z" &Ztcp
While Ismoving
Wend

Code "G53 Y" &Ytcp
While Ismoving
Wend

Code "G53 X" &Xtcp
WHile Ismoving
Wend

End

========================================

'M6end Macro

Yreturn= GetOEMDro (2000)
Xreturn= GetOEMDro (2001)
Zreturn= GetOEMDro (2002)

Code "GO"

Code "G53 x" &Xreturn
While Ismoving
Wend

Code "G53 y" &Yreturn
While Ismoving
Wend

Code "G53 z" &Zreturn
While Ismoving
Wend

END


Remember you must ref home when you start MACH.

(;-) TP




Title: Re: Simple toolchange position
Post by: vmax549 on July 07, 2007, 11:10:46 PM
I also have the m6 start tied to a tool change page that give me all the tool info so I use the correct tool. It also has a 1/2 page flashing LED to alert me to the tool change. I can post a picture if you want to see it. (;-) TP
Title: Re: Simple toolchange position
Post by: Chaoticone on July 07, 2007, 11:35:16 PM
I sure would like to see it.  :o  :) I'm working on the M6 bit now. The tool chang position button works great. Thanks Vmax.

Brett
Title: Re: Simple toolchange position
Post by: vmax549 on July 07, 2007, 11:45:05 PM
Just to let you know what it does(;-). At the tool change it records the current position to the userdros, then it movesto the tool change positon as defined in the tool position dros. After the tool change it then returns to the position it came from and prepares to restart with cycle start.
(;-) TP
Title: Re: Simple toolchange position
Post by: Chaoticone on July 07, 2007, 11:48:47 PM
Thanks Vmax, this is my first play with DROs. Do I set those as oem code, 2000 etc?

Brett
Title: Re: Simple toolchange position
Post by: vmax549 on July 08, 2007, 12:43:15 AM
Brett that is correct x=2000 y=2001 =2002.

Here is a picture of the tool change page.

Title: Re: Simple toolchange position
Post by: Chaoticone on July 08, 2007, 01:04:02 AM
I like that. I got the M6 version working. When it calls a M6, it goes to the tool change posotion. Hit Cycle start again, it then goes to machine 0s, then goes back to running the program.

Brett
Title: Re: Simple toolchange position
Post by: vmax549 on July 08, 2007, 11:18:14 AM
Brett be very very carefull, This is how SCRIPTers are born. It is extremely additive, worse than drugs. (;-) TP
Title: Re: Simple toolchange position
Post by: corydoras on December 03, 2007, 12:18:13 PM
Hey guys

Long time, no action:)

Finally got the time to finish my 2nd machine. and here are some pictures vmax and Brett.( BTW thanx again Brett for helping me set up my 2nd paralellport, works like a charm)

The problem I have now is that I upgraded Mach 3 from v 2.00.65 to tha lockdown version 2.60.

And then my TCP button that you guys created for me dissapeared.
Tried putting the modified 1024.set file in the mach forlder but no succsess.

Could one of you mabye take a look at the attached file and put the same function into my screenset for this new version sometime if you find the time.

I would greately appriciate it.

Thanx guys

Best reg
Cory
Title: Re: Simple toolchange position
Post by: corydoras on December 03, 2007, 12:24:11 PM
Here are the pix of the build
Title: Re: Simple toolchange position
Post by: olf20 on January 06, 2008, 07:15:48 PM
Hi all
I was in need of the same function. I did a search and found this wonderfully illustrated thread.
I followed each reply and downloaded the screen for cory and it worked just as ya'll had said.
Just wanted to let everyone know what a great forum this is!!!
I have been into computers since the TRS80, and I have learned a lot, but at the same time I have also
learned I don't know much (at times). Always seems to be a work on progress.
Thanks for the help and support all of you show on a daily basis!
olf20
Title: Re: Simple toolchange position
Post by: Hood on January 06, 2008, 07:53:13 PM
EDIT

OOOOPS, never noticed this subject continued onto another page, will teach me to read things fully before I post LOL.
Title: Re: Simple toolchange position
Post by: Chaoticone on January 06, 2008, 10:39:16 PM
Quote
.( BTW thanx again Brett for helping me set up my 2nd paralellport, works like a charm)

Your welcome Cory. Are you sorted now? I don't know how I missed the post, but I did. Just saw it today because the other replies bumped it.

Brett
Title: Re: Simple toolchange position
Post by: corydoras on January 07, 2008, 04:25:11 PM
Hi Brett

Long time no contact.

As you can se from post#42, I have lost the TCP on the screenset you made for me after upgrading mach 3.

If you find the time somwhere in the future I would greately appriciate if you could put it in the screenset i posted in this post.

And BTW Happy New Year guys

Best reg
Cory
Title: Re: Simple toolchange position
Post by: Hood on January 07, 2008, 05:25:49 PM
corydoras
 Is this just a button on the screen  that when you press it will move the tool to the position you have entered in the TCP  DROs on the settings page?
 You can do this easily yourself if you wish, just go to the Mach folder on your drive and you will see Screen4.exe, double click on it and once it opens go to file and Open. You then browse to the Mach3 folder and choose the screenset you want to modify. Choose the screensize you want then click OK.
At the top you will see IMG with a red line through it, click on it and you will notice the background image will go, next go to the left and choose the button Icon, you then click on the screen where you want this button. Next go to the None icon and click it, if you dont do that you may end up inadvertantly putting buttons all over the screen. Next double click on the button you just created, choose the "VB script function..." option  and also type in the name you want  for the button in the Button lable/text space then clcik OK. Next you want to "save as" from file menu (  if you rename it Mach will not overwrite the next time you upgrade)
 Now close Screen4 and open Mach then go to view and Load Screen and browse to the location of your new screen, once its opened use the Operator menu and choose Edit  Button Script you will see your new button flashing, clcik on it. In the editor box that pops up put the text I have below, then close and save, your button is now done.

x = GetUserDRO( 1200 )
y = GetUserDRO( 1201 )
z = GetUserDRO( 1202 )

code "G0"  ' to switch things to G0 mode if not there already
code "G53Z" & z
code "G53X" & x & "Y" & y   

 If you dont want to do this either me or Brett or others will do it for you but really its easy so give it a go :)

Hood
Title: Re: Simple toolchange position
Post by: Chaoticone on January 07, 2008, 07:07:55 PM
Is this what you want?

Brett
Title: Re: Simple toolchange position
Post by: Overloaded on January 07, 2008, 08:43:12 PM
Hey HOOD, Hey BRETT,
I thought I'd give this a go but seem to have hit a stump.
Can you see what I am doing wrong ?
Thanks,
RC



I think I got it.
Thanks,
RC
Title: Re: Simple toolchange position
Post by: Chaoticone on January 07, 2008, 08:59:41 PM
Hey RC, I think you need a space between the second x&  (space here) "Y" . I would also get rid of the None at the top.

Brett
Title: Re: Simple toolchange position
Post by: Overloaded on January 07, 2008, 09:13:02 PM
Thanks Brett,
I saw what Hood meant ....ie, do the same with Y & y.

I did have to loose the "None" too..like you said.

I learn something EVERY day around here.........IF I pay attention.

You guys are BRILLIANT,
RC
Title: Re: Simple toolchange position
Post by: Chaoticone on January 07, 2008, 09:18:44 PM
LOL,
Quote
You guys are BRILLIANT
Hood surley is, I just know copy and paste.  ;D  It is addictive isn't it?

Brett
Title: Re: Simple toolchange position
Post by: Overloaded on January 07, 2008, 09:36:48 PM
Brett,
Can you tell me WHY I get this when I try to oped any of these macro's ?
I next get a license to agree to, then Mach opens with no screen set.
I also get this when attempting to dwnld from forum topics....macro's...I think.

Thanks,
RC
Title: Re: Simple toolchange position
Post by: Overloaded on January 07, 2008, 09:48:02 PM
Brett, dang-it..I did it again.
Thought I had tried everything before posting. But....
I was trying to open them from the Mach3 folder.....wont work.
Go through the VB Script Editor...works every time.
Geeeesh,
RC
Title: Re: Simple toolchange position
Post by: Hood on January 08, 2008, 03:01:52 AM
RC
 I can take no credit for the code, I could probably do that now as I know the very basics of VB but at the time I put that button on my custom screen it was simply copied from the standard screen at the time.
 As Brett says you need the spacing correct, the way you have it now with the seperate G53Y on the next line will work but it will move X first then Y, if you do it like I posted the X and Y will move at the same time. I think if you wished you could have the G53 in with the Y but its just extra typing thats not needed ;)
Hood
Title: Re: Simple toolchange position
Post by: Overloaded on January 08, 2008, 05:18:43 AM
Hood,

So....."G53Z"&z& "X"&x& "Y"&y   would move all axis's simultaneously ? I realize that the Z should move clear first for obvious reasons.
Just trying to get a grip on scripting.
I'll try it.

I'll be danged....it works. The space goes.......see pic.

You guys are too modest,
Thanks,
RC
Title: Re: Simple toolchange position
Post by: Hood on January 08, 2008, 05:36:04 AM
code "G53Z" & z & "X" & x & "Y" & y would, you need to have the spaces. I am not the best with VB, in fact I am just slightly better than useless ;)
Hood
Title: Re: Simple toolchange position
Post by: Hood on January 08, 2008, 05:40:03 AM
Oh just a wee tip for you when editing code that is already there. What I do if I am messing around wanting to see what works is put a ' before a line of code that I want to ignore. That way if I want to go back to the original all I need to do is delete the mess of code I have just added and then remove the ' where I put them in. I think you can also put rem in front of a line for it to be ignored but to me ' is easier ;)

Hood
Title: Re: Simple toolchange position
Post by: Overloaded on January 08, 2008, 05:58:57 AM
Hood, I tinkered a little with a Picaxe micro controller some time back. Very little actually. It was a similar coding, some form of Basic I guess.
I used the ' to "comment"  lines very often as you do.  ( seems to do the same thing in G code.
Thanks,
RC
Title: Re: Simple toolchange position
Post by: Chaoticone on January 08, 2008, 08:33:19 AM
Another thing, step thru the program in editor and when yu get the syntax eror, it will highlite the trouble. Also, hoover over the lines with your cursor. THis doesn't work if it is a problem and Mach is trying to run it. Neither does editing the code from the error message pop up I dont think. You have to close the error and po up, then open the script in editor or button editor.

Brett
Title: Re: Simple toolchange position
Post by: Overloaded on January 08, 2008, 08:58:06 AM
I found out the hard way about trying to edit the error pop-up....bout wore my mouse out.
Thanks for the tips.

I'm starting a new thread in LCam forum, from .dwg file to LazyCam to M3Turn.
Check it out, I'm certain you and Chip can get me "sorted".

Thanks Brett,
RC
Title: Re: Simple toolchange position
Post by: corydoras on January 08, 2008, 10:14:22 AM
Thanx Brett, just what I was hoping for.

Mabye Ill try to make this happen on Q by myself....any chance of sucseeding you think?

Best reg
Cory
Title: Re: Simple toolchange position
Post by: Chaoticone on January 08, 2008, 10:52:17 AM
Sure Cory, nothing to it but to do it.

Brett
Title: Re: Simple toolchange position
Post by: olf20 on January 11, 2008, 07:15:40 AM
Brett, Great thread!
I got my game pad and setup keygrabber using the guidelines in the thread. I got most everything working that I need / want.
One question I have is I don't fully understand the difference between the joystick and the buttons on the game pad.
In order to get my jogging rate to change I had to put my X & Y on the buttons. Then I could program another button to increase / decrease the jogging rate. However I'm out of buttons and have the joystick setup for my Z axis. The Z axis works fine, but I can not control my Z jogging speed.
Any thoughts?
Thanks olf20
Title: Re: Simple toolchange position
Post by: Chaoticone on January 11, 2008, 08:23:54 PM
olf20, Are your joysticks analog?

Brett
Title: Re: Simple toolchange position
Post by: olf20 on January 12, 2008, 07:25:11 AM
Thanks for the reply!
How do I know if its analog? Is there some way of
determining using keygrabber??
Thanks olf20
Title: Re: Simple toolchange position
Post by: Chaoticone on January 12, 2008, 10:19:41 PM
I don't think you can tell in Keygrabber, should say on the game pad somewhere and may have a button to choose analog.

Brett
Title: Re: Simple toolchange position
Post by: corydoras on February 08, 2008, 01:30:12 PM
Hi guys.

I put a button on my screenset using Screen4, as you brilliantly described Hood, thanx, but when i paste the vb script I found in an earlier post of this thread, and try to run the script I get the error msg: "Cannot use g53 Incremental"


Am I missing som settings in config here?

And while we are at it, just for fun I tried to load the screenset for Q (as it has the Big tool button on in,that i like) could this actually work?

Cory
Title: Re: Simple toolchange position
Post by: Hood on February 08, 2008, 02:28:54 PM
can you copy and paste the script from your button, might find the problem :)
Hood
Title: Re: Simple toolchange position
Post by: corydoras on February 08, 2008, 04:00:19 PM
Yupp, here it is

Xtcp= GetUserDro (1200)
Ytcp= GetUserDro (1201)
Ztcp= GetUserDro (1202)
Feed= GetDRO(18)

MsgBox " You are moving to the TCP, make sure path is clear"     'Warning you it is about to move

Code"G0"                  ' Feedrate You can change this to your choice just change the number after the F or just use a G0 instead of G1
Code"G53 Z"&Ztcp
While IsMoving
Wend
Code"G53 Y"&Ytcp
While IsMoving
Wend
Code"G53 x"&Xtcp
While IsMoving
Wend

Setdro(18,Feed)
 
Cory
Title: Re: Simple toolchange position
Post by: Hood on February 08, 2008, 04:08:32 PM
OK, it works fine here, can you attach your xml to see if I can replicate with your xml and the button.
Hood
Title: Re: Simple toolchange position
Post by: corydoras on February 08, 2008, 04:42:09 PM
What is the xml file, profile or som kinda config file?

Here it is

Cory
Title: Re: Simple toolchange position
Post by: Hood on February 08, 2008, 05:28:34 PM
Cory
 Problem is your distance mode is Incremental,  I have modified the VB to change to Absolute, do the toolchange and then go back to incremental. I am not the best at such things so be ready with the E-Stop as you press the button and then also after you have done the toolchange just in case I have not done things 100% correctly, it does seem to work OK here but.........
Hood

Xtcp= GetUserDro (1200)
Ytcp= GetUserDro (1201)
Ztcp= GetUserDro (1202)
Feed= GetDRO(18)

MsgBox " You are moving to the TCP, make sure path is clear"     'Warning you it is about to move

Code "G90"
Code"G0"                  ' Feedrate You can change this to your choice just change the number after the F or just use a G0 instead of G1
Code"G53 Z"&Ztcp
While IsMoving
Wend
Code"G53 Y"&Ytcp
While IsMoving
Wend
Code"G53 x"&Xtcp
While IsMoving
Wend
Code "G91"

Setdro(18,Feed)
Title: Re: Simple toolchange position
Post by: corydoras on February 08, 2008, 06:40:42 PM
Thanx Hood, that worked great.

BTW, could you explain to me the difference of Incremental an absolut postioning, advantages vs disatvantage?, or are there any links to a thread on the forum or videos explaining this?

Cory
Title: Re: Simple toolchange position
Post by: jimpinder on February 09, 2008, 06:04:27 AM
The machine needs to know where it is, and keeps track of itself in memory. When you "set all home" the machine goes back to a fixed position, and sets all DRO's to zero. If you jog too and fro, or up and dpwn, the DRO's will track where you are. This is absolute positioning - and is the MACHINES particular position. If you tell it to go to e.g. X1,Y1,Z0 it will always go to the same position.

That position is not always the best position for machining, or writing code from. For example, my lathe home is tight under the chuck, with the cross-slide as far towards me as possible. This position is no good for starting to write code from, the best place to write code for a lathe is X0 on the centre line of the lathe, and Z0 at the end of the work piece.

To get to that position from "ref all home" you select an increment e.g. g54 to g59. say G56. This adds the requisite amounts to the DRO's from the "ref all home" position, so that the DRO's show X0 Y0 Z0 in relation to your offset position, ready for work. This also applies to offsets it adds for tool length and diameter. This is the incremental position, or offset position and is the one most used in programs.

IF HOWEVER you want to make a move that really has nothing to do with the program, but you need to go to a specific position for the MACHINE e,g, for a tool change, you must revert to absolute co-ordinates to tell the machine (G53) - make the move - then change back to your offset position before resuming.

There are tutorial videos in the collection.


 








Title: Re: Simple toolchange position
Post by: Hood on February 09, 2008, 09:18:35 AM
Cory
 I am fairly new to CNC so maybe my explanation of Abs and Inc is not the best but this is the way I understand it.
 In Absolute (G90) the position is always from the X, Y, Z zero position, whether you are meaning the G53 (Machine Zero) or for example a G54 offset zero.
 In absolute all dimesnions are from this zero position.
 With Incremental distance the move is relative to the position you are at that point in time. I will try to give an example of both.
 If you have four holes in a row, the first one is 1 inch positive on the X axis then the next 1 inch along from that, next 1 inch from that.
 With Abs (G90) your code to go to each hole would be
G0 X1
G0 X2
G0 X3 etc etc

However if you were in Incremental distance (G91)  it would be as follows
G0 X1
G0 X1
G0 X1

What the advantages and disadvantes are I am not sure, obviously from an operators point of view I would say the Abs position is easier to grasp and edit but maybe thats just my thinking.
 Actually I may just have written a load of crap, as I said I am no expert on this so if I have made a balls of it please jump in and correct me. In fact maybe Graham would jump in as I know he is more fluent in G-Code than I will ever be ;)

Hood