PDA

View Full Version : Need Help! Postform.m in Surfcam Vel 4.0



Jerseycnc
01-26-2011, 02:49 PM
Just recently I got involved with Surfcam Velocity 4 (coming from Powermill ) and I have a few questions about adding a custom post. Got part time work from a company who has Leadwell Fanuc OM-A (older model). Would like to edit an existing post in Surfcam. I was told Postform.m is where the change needs to be.

The reason being-On rigid tap none of the generic post Haas or Fanuc etc. comes up with a M29 Sxxx
and two theres a "Q" or a "P" in the line of code-need changes in both places.
Would like to stay from manual editing.
Ex:
T5 M6
M3 S500 (Add M29 before S)
G00 G54 X0.5 Y0.688
G43 Z1. H5
M8
G93
G84 G98 X0.5 Y0.688 Z-0.3539 R0.1 P0 F27.778 (No Q or P after G84)

Thanks
JC

Excelmachine
01-26-2011, 03:53 PM
This is how I have my Surfcam set up with a Fanuc 21M:

Tap # Tapping canned/manual cycle
if [Rigid] > 0
M29 S[SPEED]
G84 G[RetPlane] X[H] Y[V] Z[D] R[VClear] F[FRate]
else
G84 G[RetPlane] X[H] Y[V] Z[D] R[Vclear] F[FRate]
Endif
end cancel

and when it posts, the ouptut looks like this:

T1
M6
S1000
G0 G90 G54 X-4.0784 Y2.4499
G43 Z1.1 H1 M8
M29 S1000
G84 G98 X-4.0784 Y2.4499 Z-0.375 R0.1 F27.6
G80
M9
M5
G0 G90 G49 G28 Z0
M19
M30

Just make sure when you choose your drill cycle, to use rigid tap, then it will post with the M29. I like to have it post with the spindle speed right after the tool change in case it needs to do a gear change, ie low range.

Jerseycnc
01-26-2011, 08:04 PM
Thanks for the help. Do you have any thoughts on that second issue where the Q & P is coming up in that line of code with the G84.

Thanks
JC

Excelmachine
01-26-2011, 08:29 PM
Open up your postform.m file with editNC or notepad and copy and paste the section where it talks about tapping and post it here. That way we can suggest how to change your particular post to make it work for you. You don't need to show us the whole post, just the relevant section.

Excelmachine
01-26-2011, 08:33 PM
Another reason for the P to show up would be if you put a dwell amount in the hole processing box. It's the box right under "cycle type" .

Jerseycnc
01-26-2011, 09:37 PM
Here is that section we are dicussing:
as far as the Dwell I understand that Thanks for letting me know where it is..- wasnt sure if that Fanuc OM will accept it- I wasnt sure about "Q"

Tap # Tapping canned/manual cycle
if [Rigid] > 0
G93 G93 to lock Z to spindle rotation.
G84 G[RetPlane] X[H] Y[V] Z[D] P[Dwell] R[VClear] F[FRate]
else
G84 G[RetPlane] X[H] Y[V] Z[D] R[Vclear] F[FRate]
Endif
end cancel

JC

Jerseycnc
01-26-2011, 09:43 PM
Tap
if [Rigid] > 0
G93 G93 to lock Z to spindle rotation.
G84 G[RetPlane] X[H] Y[V] Z[D] P[Dwell] R[VClear] F[FRate]
else
G84 G[RetPlane] X[H] Y[V] Z[D] R[Vclear] F[FRate]
Endif
end cancel

Excelmachine
01-27-2011, 02:10 PM
The easiest thing to do to get rid of posting the dwell if you never plan on using it is to modify your post. Before you do that, make a copy of it and put it somewhere safe so that you always have a "virgin" copy somwhere.

In this section:
Tap
if [Rigid] > 0
G93 G93 to lock Z to spindle rotation.
G84 G[RetPlane] X[H] Y[V] Z[D] P[Dwell] R[VClear] F[FRate]
else
G84 G[RetPlane] X[H] Y[V] Z[D] R[Vclear] F[FRate]
Endif
end cancel

just delete the P[Dwell] and save your post and then it won't post with that piece of code in it. Although if you ever want to have a dwell for whatever reason in the future, you will have to go back and add that section back in. Personally, I don't use a dwell for tapping. I think it might be useful if you were using a Tapmatic head in the CNC, but I'm not absolutely sure. On the Fanuc 21M I run, we just use the taps mounted directly into collets when tapping, we do the same on our Haas also.

Jerseycnc
01-27-2011, 04:04 PM
(TOOL_3 5/16-18 TAP PLUG)
(OPERATION_3 TAP THRU)
M9
G49 Z0 M5
T3 M6
M3 S297 --------move next line down--
G00 G54 X1.125 Y-0.5
G43 Z1.1 H3
M8
M29 S297
G84 G98 X1.125 Y-0.5 Z-0.3439 R0.1 P0 F16.5
X11.25
G80
G94
(TOOL_4 .125DIA EM 2FL)
(OPERATION_4 POCKET THRU)
M9
G49 Z0 M5


Just got in thanks for new reply-you"ve helped alot !!!
This is what I got right now as shown above. I will move the speed on next line of code. Didnt want to do too much @ one time. I keep reposting to see different changes and yes took a shot at taking out P[Dwell] but decided leave it in and dont but in a Dwell. Im agreeing in that a tapmatic. If you notice it has a G94 which Unlock Z if w/ rigid tap as stated in postform.m - I dont think its needed for this control. will look further unless you have insite............

Thanks again
JC

Excelmachine
01-27-2011, 04:45 PM
It looks like with that posted code, you shouldn't have any problems. One thing I did change on my post was to eliminate the m3 right after the tool change. If you look at yours, the tool changes, the spindle turns on, aproaches the position, goes to Z height, turns on coolant, then signals the controller the M29 code with the spindle speed. I changed mine to just set the speed after the tool change so it actually doesn't turn on until the M29 code. So with my post, it would look like this:

(TOOL_3 5/16-18 TAP PLUG)
(OPERATION_3 TAP THRU)
M9
G49 Z0 M5
T3 M6
S297
G00 G54 X1.125 Y-0.5
G43 Z1.1 H3
M8
M29 S297
G84 G98 X1.125 Y-0.5 Z-0.3439 R0.1 P0 F16.5
X11.25
G80
G94
(TOOL_4 .125DIA EM 2FL)
(OPERATION_4 POCKET THRU)
M9
G49 Z0 M5

This does present a "pucker" factor as the tool approaches the hole location with the spindle stationary. If you ever ran a Fadal, that was the same way they ran with rigid tapping.

If you are interested in setting it that way, you can modify your post after it says StartCode with this:


1stToolChange # First tool change
G0 G30 Z0
M1
T[Tool]
M6
if [Rigid] > 0
S[Speed]
G00 G90 G[WORK] X[H] Y[V] T[NextTool]
G43 Z[D] H[Lcomp] M[Cool]
else
S[Speed] M[Direct]
G00 G90 G[Work] X[H] Y[V] T[NEXTTOOL]
G43 Z[D] H[Lcomp] M[Cool]
Endif
End


BUT, use at your own risk of course.

Jerseycnc
01-27-2011, 06:34 PM
I will experiment at this point I appreciate the direction , I try not to manually edit G-code which can cause error in the long run. The other choice would be to use a text editor ( I use Ultra-Edit ) and can write a macro to edit G-Code. I wanted to try this first ,
and I feel you got me to that point.


Thanks
JC

Toolmamon
09-26-2012, 02:44 PM
Im running a Leadwell and I'm also having trouble with my tapping cycle. Any clues?

Here is the code:

( 1/4-20 TAPRH TOOL - 3 DIA. OFF. - 3 LEN. - 3 DIA. - .25 )
( 1/4-20 TAPRH )
N27 T3 M6
N28 G0 G90 G54 X0. Y0. S240 M3
N29 G43 H3 Z.5 (This is where the machine stops and doesn't do anything anymore.)
N30 M8
N31 G99 G84 Z-.4 R.5 F12.
N32 G80
N33 G40
N34 M5
N35 M9
N37 G91 G0 G28 Z0.
N38 M01

machinster
09-27-2012, 02:39 PM
The only thing that I can see from your code is that your initial plane G43 H3 Z.5 and your retract plane ..R.5.. are the same.
Try making your initial plane like this G43 H3 Z1.0...

Let me know if that makes a difference...

Excelmachine
09-27-2012, 02:50 PM
Im running a Leadwell and I'm also having trouble with my tapping cycle. Any clues?

Here is the code:

( 1/4-20 TAPRH TOOL - 3 DIA. OFF. - 3 LEN. - 3 DIA. - .25 )
( 1/4-20 TAPRH )
N27 T3 M6
N28 G0 G90 G54 X0. Y0. S240 M3
N29 G43 H3 Z.5 (This is where the machine stops and doesn't do anything anymore.)
N30 M8
N31 G99 G84 Z-.4 R.5 F12.
N32 G80
N33 G40
N34 M5
N35 M9
N37 G91 G0 G28 Z0.
N38 M01

I'm not familiar with Leadwell machines but perhaps your machine needs to see a M29 for tapping? Try rewriting your code manually so it looks like this:
T3 M6
S240
G0 G90 G54 X0. Y0.
G43 H3 Z.5
M29 S240
G84 then the rest.
Remove the part from the vise or try somewhere safe on the table and run it and see if that works. If it does, then we can just change your post to do that code automatically.