Hello Guest it is March 29, 2024, 08:18:09 AM

Author Topic: Locating question  (Read 7792 times)

0 Members and 1 Guest are viewing this topic.

Offline rdean

*
  •  94 94
    • View Profile
Re: Locating question
« Reply #10 on: January 18, 2011, 10:07:18 AM »
 :o
I am working on the Demo version if I purchase Mach3 will the screen work then?

How do you know if your code is correct if you can not trust what is displayed?

I do want everyone to know that I do appreciate the help given to me on this subject.

Thank you
Ray

Offline Dan13

*
  •  1,208 1,208
    • View Profile
    • DY Engineering
Re: Locating question
« Reply #11 on: January 18, 2011, 12:25:45 PM »
Ray,

The display error is not specific to the demo version.

You can use the Z Inhibit option on the Program Run screen and specify a value below which the Z will not go. Use a value just above the material and you can visualize your tool moves. Also when I am running a program the first time and not sure about it I usually decrease the FRO to a very low value so I have enough time to hit FeedHold if things go wrong.

Dan

Offline rdean

*
  •  94 94
    • View Profile
Re: Locating question
« Reply #12 on: January 21, 2011, 02:05:35 PM »
I have continued to work on this and found that I had some offsets programed into the fixture and a couple of other problems.  I still am not real happy with the display but now I can see what is happening and it makes sense.

I do still have a problem that maybe you or someone can help me with. 

This is the code for making two rectangles  along the X axis with radius at the corners.
f100
G0 Y1
G52 Y1
G1 X1.5
G3 X2 Y.5 I1.5 J.5
G1 Y1.5
G3 X1.5 Y2 I1.5 J1.5
G1 X-1.5
G3 X-2 Y1.5 I-1.5 J1.5
G1 Y.5
G3 X-1.5 Y0 I-1.5 J.5
G1 X0
G52 X0 Y0
G0 Y0
G0  X4.5
G0 Y1
G52 X4.5 Y1
G1 X1.5
G3 X2 Y.5 I1.5 J.5
G1 Y1.5
G3 X1.5 Y2 I1.5 J1.5
G1 X-1.5
G3 X-2 Y1.5 I-1.5 J1.5
G1 Y.5
G3 X-1.5 Y0 I-1.5 J.5
G1 X0
G52 X0 Y0
G0 Y0
G0 X0

This works fine with no problems but if I try to make the same rectangles only along the Y axis it won't work.  I get an error message says the end of the arc doesn't match.

Please look at this and see where I went wrong.

f100
G0 Y1
G52 Y1
G1 X1.5
G3 X2 Y.5 I1.5 J.5
G1 Y1.5
G3 X1.5 Y2 I1.5 J1.5
G1 X-1.5
G3 X-2 Y1.5 I-1.5 J1.5
G1 Y.5
G3 X-1.5 Y0 I-1.5 J.5
G1 X0
G52 X0 Y0
G0 Y5
G52 Y5
G1 X1.5
G3 X2 Y.5 I1.5 J.5
G1 Y1.5
G3 X1.5 Y2 I1.5 J1.5
G1 X-1.5
G3 X-2 Y1.5 I-1.5 J1.5
G1 Y.5
G3 X-1.5 Y0 I-1.5 J.5
G1 X0
G52 X0 Y0
G0 Y0


Thank you to all

Ray

Offline Dan13

*
  •  1,208 1,208
    • View Profile
    • DY Engineering
Re: Locating question
« Reply #13 on: January 21, 2011, 03:06:13 PM »
Are you using absolute I, J? Why do you use the first G52 Y1?

Try using this code for your rectangle:

(Assuming Incremental I J)
G00 X0 Y0
G01 X1.50 Y0
G03 X2.0 Y.5 I0 J.5
G01 X2.0 Y1.5
G03 X1.5 Y2.0 I-.5 J0
G01 X-1.5 Y2.0
G03 X-2.0 Y1.5 I0 J-.5
G01 X-2.0 Y.5
G03 X-1.5 Y0 I.5 J0
G01 X0 Y0


Dan

Offline rdean

*
  •  94 94
    • View Profile
Re: Locating question
« Reply #14 on: January 21, 2011, 05:11:46 PM »
Yes I am using absolute I,J
Does it have be in incremental?

I wanted to move off the starting point for the first offset and then run the rectangle code.  When I get this figured out the rectangle code will be one of many in the subroutine file. I will only have to write the code for the rectangle once and then be able to use it anywhere I want.

I will try using incremental and see how it works.

Ray

Offline rdean

*
  •  94 94
    • View Profile
Re: Locating question
« Reply #15 on: January 21, 2011, 05:38:09 PM »
It works!!  After 5 days and countless hours trying different codes it finally works.

Should I be doing all my programing in incremental?

Got to go back and read some more.

Ray

Offline Sage

*
  •  365 365
    • View Profile
Re: Locating question
« Reply #16 on: January 21, 2011, 06:50:32 PM »
Not to state the obvious, but, since you appear to be a newbe to G-code I will point out that you have no Z-axis commands in your program. Therefore, what you have programmed (so far) will do no actual cutting or, it will drag the cutter all over the place possibly breaking it.
You'll probably be adding an equivalent amount of code to manage the Z-axs.

Sage

Offline rdean

*
  •  94 94
    • View Profile
Re: Locating question
« Reply #17 on: January 21, 2011, 08:23:19 PM »
You are right.

I am very new to G code and the mill I was using did not have an automated Z axis.  You would move to where you you wanted to be and manually lowered the cutter and ran the program.  It did not use any G Code but I wrote a program to access the serial port directly. It worked fine and I have made many replacement dash panels and radio surrounds on it.  You could not run the program unattended and the table was limited.
I am refitting a used larger mill to automate the whole process so I thought I should automate the programming also by learning G Code.  Sending pulses to each motor makes for a lot of lines of code.  I am not a machinist  and even after reading through the documentation several times I am still learning how to setup the configuration and settings.

I now have my start up set for Absolute Distance and Incremental I,J. 

Thanks for the reply

Ray   

Offline Sage

*
  •  365 365
    • View Profile
Re: Locating question
« Reply #18 on: January 21, 2011, 09:54:18 PM »
Ok.
Manual Z is fine but then you're going to need something like an M1 (optional stop) to stop the code while you adjust the Z axis manually before and after each rectangle.
 As it is the code is going to move around a particular rectangle and then immediately go to the next one without giving you a chance to get the tool out of the work. And then it will start the next one without giving you a chance to put it back down.
You have a bit more thinking to do.
Sage