Hello Guest it is March 29, 2024, 04:14:58 AM

Author Topic: Simple toolchange position  (Read 32047 times)

0 Members and 1 Guest are viewing this topic.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Simple toolchange position
« Reply #70 on: February 08, 2008, 02:28:54 PM »
can you copy and paste the script from your button, might find the problem :)
Hood
Re: Simple toolchange position
« Reply #71 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

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Simple toolchange position
« Reply #72 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
Re: Simple toolchange position
« Reply #73 on: February 08, 2008, 04:42:09 PM »
What is the xml file, profile or som kinda config file?

Here it is

Cory

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Simple toolchange position
« Reply #74 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)
Re: Simple toolchange position
« Reply #75 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

Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: Simple toolchange position
« Reply #76 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.


 








Not me driving the engine - I'm better looking.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Simple toolchange position
« Reply #77 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