PDA

View Full Version : Problem Can't remove post line #'s using postform.m



MrBoss8
09-18-2009, 08:05 PM
Does anyone know how to remove line numbers from the Surfcam 2002 post output? I tried playing with the "Sequence#s N 5 5 5" line in the postform.m file with no luck. Can anyone please help?

PS Even though "First#?" and "Last#?" lines are both set to "N" they are still outputted?

(I would also like to place a G99 after all G1, G2, and G3 commands without manually editing every line)

Thank for any and all help.

Jason S
09-19-2009, 08:15 AM
Does anyone know how to remove line numbers from the Surfcam 2002 post output? I tried playing with the "Sequence#s N 5 5 5" line in the postform.m file with no luck. Can anyone please help?

PS Even though "First#?" and "Last#?" lines are both set to "N" they are still outputted?

(I would also like to place a G99 after all G1, G2, and G3 commands without manually editing every line)

Thank for any and all help.

Try "Sequence#s N 0 5 5".

You can try this:

# Output a safe startup of CDC :
Infeed
G<Side> D<DComp> X<H> Y<V> F<FRate>
G99
end

ArcCode
G[ArcDir] x[h] y[v] Z[D] I[ival] J[jval] F[frate]
G99
End

I havent posted this code out, just throwing ideas out for you.

MrBoss8
09-22-2009, 02:37 AM
Jason, thanks for the reply. I tried the "Sequence#s N 0 5 5" (and "Sequence#s N 0 0 0") and the result is "N0" at the beginning of every line. I will be trying your G99 implementation in the next day or 2 and will let you know if it worked.

Jason S
09-22-2009, 07:38 AM
Jason, thanks for the reply. I tried the "Sequence#s N 0 5 5" (and "Sequence#s N 0 0 0") and the result is "N0" at the beginning of every line. I will be trying your G99 implementation in the next day or 2 and will let you know if it worked.

Can you show the post you are trying to edit? Sounds like you have something else going on. Might be able to help you fix the other stuff you want alot easier.

Do you have any N[Block] commands in your post?

If you need something to look at, go under your Help files and in Contents look in MPost Post Processor this will give you some good information.

NICK REESE
09-22-2009, 08:01 AM
Hi,

You're right Jason, either take out the N[Block] code or indent them a couple of spaces to make them inactive.

nick.

MrBoss8
09-22-2009, 03:05 PM
Jason, here is a copy of the post I'm trying to edit:

name Bridgeport BOSS 8

% 00
: 5
N >4
V 0
G >2
g >2 G
X ->3.>4
x ->3.>4 X
Y ->3.>4
y ->3.>4 Y
Z ->3.>4
z >3.>4 Z IncFrom V
w >3.>4 Z
I ->3.>4
i ->3.>4 I
J ->3.>4
j ->3.>4 J
R ->3.>4
K ->3.>4
P >40
F >3.1 Limit 0.1 100.0
H >2
T >2
M >2
$ 00
@ >3.>5
^ >3.>5
S >4 Limit 60 4200
' 00
. 00
ModalLetters X Y Z R F # List of letters that are modal

ModalGs 0 1 2 3 73 74 76 80 81 82 83 84 85 # List of g codes that are modal

Sequence#s N 5 5 5 # Char, freq, incr & start
First#? N # Y or N 'Output 1st sequence no.
Last#? N # Y or N 'Output last sequence no.

HCode X # X or X U 'Horizontal char.
VCode Y # Y or Y V 'Vertical char.
Dcode Z # Depth char.
FeedCode F # Feed rate char.

Comment ' ' # Begin End comment char.

Spindle 3 4 5 # Cw, ccw & stop m codes
Coolant 8 9 7 # On, Off & Mist m codes
DComp 41 42 40 # Left, Right & Cancel m codes
LComp 43 49 # On & Off codes

Feed G1 # Linear move
Rapid G0 # Rapid positioning word
Cw G2 # Circular move clockwise
Ccw G3 # Circular move counter clockwise
Inc/Abs G 91 90 # Inc & Abs char. & values
CtrCode I J # I J or R or I J K L
Helical? N

Spaces? N # Y or N 'Spaces between words
Incremental? N # Y or N 'Inc or abs output
CtrIncremental? N # Y or N 'Inc or abs I & J
ByQuadrants? N # Y or N 'Break arcs at quadrants

ZRestart? Y # Y or N 'New cycle if diff. depths
Work G # Work offset register
UppercaseComments? Y # Y or N 'Require uppercase comments

Drill 1 # Drilling canned/manual cycle
N[Block] G81 V[Vclear] x[H] y[V] z[D] F[FRate]
N[Block] x[H] y[V]
end cancel

Peck 1 # Pecking canned/manual cycle
N[Block] G87 V[Vclear] x[H] y[V] z[D] w[Vbite] F[FRate]
end cancel

Tap 1 # Tapping canned/manual cycle
N[Block] G84 x[H] y[V] z[D] F[FRate]
N[Block] x[H] y[V]
end cancel

Ream 1 # Reaming canned/manual cycle
N[Block] G85 x[H] y[V] z[D] F[FRate]
N[Block] x[H] y[V]
end cancel

Bore 1 # Boring canned/manual cycle
N[Block] G86 x[H] y[V] z[D] F[FRate]
N[Block] x[H] y[V]
end cancel

Back 1 # Back boring canned/manual cycle
G87 x[H] y[V] z[D] F[FRate]
x[H] y[V]
end cancel

Cancel # Cancel a canned/manual cycle
N[Block] G80
end

StartCode # Start of the program
:[Program#]
N[Block] G90 G70 G75
End

1stToolChange # First tool change
N[Block] G0 X[WorkH] Y[WorkV] T[Tool] M6
N[Block] G0 X[H] Y[V]
N[Block] S[Speed]
N[Block] Z[Vclear] M[Cool]

End

Infeed # Enable cutter comp
N[Block] G1 G[Side] X[H] Y[V] F[FRate]
end

Outfeed # Disable cutter comp
N[Block] G1 G40 X[H] Y[V]
end

ToolChange # Secondary tool changes
N[Block] M[CoolantOff]
N[Block] G0 X[H] Y[V] T[Tool] M6
N[Block] Z[Vclear] M[Cool]
End

EndCode # End of the program
N[Block] M9
N[Block] G0 X[WorkH] Y[WorkV] M02
End

LineCode # Linear move
N[Block] G1 X[H] Y[V] Z[D] F[FRate]
End

RapidCode # Rapid move
N[Block] G0 X[H] Y[V] Z[D]
End

Cwcode Force? Y # CW circular move
N[Block] G2 x[H] y[V] i[IVal] j[JVal] F[FRate]
End

Ccwcode Force? Y # CCW circular move
N[Block] G3 x[H] y[V] i[IVal] j[JVal] F[FRate]
End
REPLACE "N5G90" WITH ".N5G90"
replace "x" with "X"
replace "y" with "Y"
Replace "@" with "Tool Diameter "
Replace "^" with " Corner Radius "
Replace "$" with " '""

Jason S
09-22-2009, 03:26 PM
Sequence#s N 0 5 5 # Char, freq, incr & start (CHANGE LINE TO THIS)

N[Block] (REMOVE ALL INSTANCES)

LineCode # Linear move
G1 X[H] Y[V] Z[D] F[FRate]
G99 (ADD)
End

Cwcode Force? Y # CW circular move
G2 x[H] y[V] i[IVal] j[JVal] F[FRate]
G99 (ADD)
End

Ccwcode Force? Y # CCW circular move
G3 x[H] y[V] i[IVal] j[JVal] F[FRate]
G99 (ADD)
End

These are the changes I made and it worked to your original request.:cheers:

If you PM your email address, I'll send you the postform.m file.

MrBoss8
09-24-2009, 08:13 PM
Hello Jason, The following files are the output produced and the post you sent me. Line #'s are gone but the G99 command appears on a separate line by itself, not after a G1, G2, or G3 as is needed. Can you see anything that may cause this?

Thanks again.


post output:

:00001
G90G70G75

ID DELETED

G0X0Y0T3M6
G0X-0.5183Y0.3281
S4000
Z0.5M8
G0Z0.25
G1Z-0.01F15.0
G99
G1X0.5183
G99
G2X0.5356Y0.308I0.5183J0.3106F15.0
G99
G2X0.4332Y0.124I0.2413J0.3513F15.0
G99
G3X0.3202Y-0.0237I0.6882J-0.1882F15.0
G99
G1X0.3633Y-0.0237
G99
G2X0.4178Y-0.0501I0.3636J-0.0924F15.0
G99
G2X0.4213Y-0.0633I0.404J-0.0609F15.0
G99
G1X0.6427Y-0.0633
G99
G2X0.6602Y-0.0808I0.6427J-0.0808F15.0
G99
G1X0.6602Y-0.1007
G99
G2X0.6421Y-0.1182I0.6427J-0.1007F15.0
G99
G3X0.1109Y-0.1945I0.5885J-1.6322F15.0
G99
G1X0.1109Y-0.2223
G99
G2X0.1448Y-0.3052I-0.4355J-0.4934F15.0
G99
G2X0.1281Y-0.3281I0.1281J-0.3106F15.0
G99
G1X-0.1281Y-0.3281
G99
G2X-0.1448Y-0.3052I-0.1281J-0.3106F15.0
G99
G2X-0.1109Y-0.2223I0.4355J-0.4934F15.0
G99
G1X-0.1109Y-0.1945
G99
G3X-0.6421Y-0.1182I-0.5885J-1.6322F15.0
G99
G2X-0.6602Y-0.1007I-0.6427J-0.1007F15.0
G99
G1X-0.6602Y-0.0808
G99
G2X-0.6427Y-0.0633I-0.6427J-0.0808F15.0
G99
G1X-0.4213Y-0.0633
G99
G2X-0.4178Y-0.0501I-0.404J-0.0609F15.0
G99
G2X-0.3633Y-0.0237I-0.3636J-0.0924F15.0
G99
G1X-0.3202Y-0.0237
G99
G3X-0.4332Y0.124I-0.6882J-0.1882F15.0
G99
G2X-0.5356Y0.308I-0.2413J0.3513F15.0
G99
G2X-0.5183Y0.3281I-0.5183J0.3106F15.0
G99
G1X-0.5183Y0.3261
G99
G1X0.5183
G99
G2X0.5336Y0.3083I0.5183J0.3106F15.0
G99
G2X0.4319Y0.1256I0.2413J0.3513F15.0
G99
G3X0.3171Y-0.0257I0.6882J-0.1882F15.0
G99
G1X0.3633Y-0.0257
G99
G2X0.4162Y-0.0513I0.3636J-0.0924F15.0
G99
G2X0.4188Y-0.0653I0.404J-0.0609F15.0
G99
G1X0.6427Y-0.0653
G99
G2X0.6582Y-0.0808I0.6427J-0.0808F15.0
G99
G1X0.6582Y-0.1007
G99
G2X0.6422Y-0.1162I0.6427J-0.1007F15.0
G99
G3X0.1089Y-0.1931I0.5885J-1.6322F15.0
G99
G1X0.1089Y-0.2227
G99
G2X0.1429Y-0.3058I-0.4355J-0.4934F15.0
G99
G2X0.1281Y-0.3261I0.1281J-0.3106F15.0
G99
G1X-0.1281Y-0.3261
G99
G2X-0.1429Y-0.3058I-0.1281J-0.3106F15.0
G99
G2X-0.1089Y-0.2227I0.4355J-0.4934F15.0
G99
G1X-0.1089Y-0.1931
G99
G3X-0.6422Y-0.1162I-0.5885J-1.6322F15.0
G99
G2X-0.6582Y-0.1007I-0.6427J-0.1007F15.0
G99
G1X-0.6582Y-0.0808
G99
G2X-0.6427Y-0.0653I-0.6427J-0.0808F15.0
G99
G1X-0.4188Y-0.0653
G99
G2X-0.4162Y-0.0513I-0.404J-0.0609F15.0
G99
G2X-0.3633Y-0.0257I-0.3636J-0.0924F15.0
G99
G1X-0.3171Y-0.0257
G99
G3X-0.4319Y0.1256I-0.6882J-0.1882F15.0
G99
G2X-0.5336Y0.3083I-0.2413J0.3513F15.0
G99
G2X-0.5183Y0.3261I-0.5183J0.3106F15.0
G99
G0X-0.5183Y0.3261Z0.5
X0.1159Y0.2264
Z0.25
G1Z-0.01
G99
G1Y-0.0281
G99
G1X0.1723
G99
G2X0.2295Y0.1397I0.7094J-0.1177F15.0
G99
G3X0.2618Y0.2323I-0.0179J0.2779F15.0
G99
G1X0.2393Y0.2264
G99
G1X0.1159
G99
G1X0.1139Y0.2284
G99
G1Y-0.0301
G99
G1X0.174
G99
G2X0.2313Y0.1387I0.7094J-0.1177F15.0
G99
G3X0.2643Y0.235I-0.0179J0.2779F15.0
G99
G1X0.239Y0.2284
G99
G1X0.1139
G99
G0Z0.5
X-0.1159Y-0.0281
Z0.25
G1Z-0.01
G99
G1Y0.2264
G99
G1X-0.2393
G99
G1X-0.2618Y0.2323
G99
G3X-0.2295Y0.1397I0.0179J0.2779F15.0
G99
G2X-0.1723Y-0.0281I-0.7094J-0.1177F15.0
G99
G1X-0.1159Y-0.0281
G99
G1X-0.1139Y-0.0301
G99
G1Y0.2284
G99
G1X-0.239
G99
G1X-0.2643Y0.235
G99
G3X-0.2313Y0.1387I0.0179J0.2779F15.0
G99
G2X-0.174Y-0.0301I-0.7094J-0.1177F15.0
G99
G1X-0.1139Y-0.0301
G99
G0Z0.5
M9
G0X0Y0M2


postform.m file:

name Bridgeport BOSS 8

% 00
: 5
N >4
V 0
G >2
g >2 G
X ->3.>4
x ->3.>4 X
Y ->3.>4
y ->3.>4 Y
Z ->3.>4
z >3.>4 Z IncFrom V
w >3.>4 Z
I ->3.>4
i ->3.>4 I
J ->3.>4
j ->3.>4 J
R ->3.>4
K ->3.>4
P >40
F >3.1 Limit 0.1 100.0
H >2
T >2
M >2
$ 00
@ >3.>5
^ >3.>5
S >4 Limit 60 4200
' 00
. 00
ModalLetters X Y Z R F # List of letters that are modal

ModalGs 0 1 2 3 73 74 76 80 81 82 83 84 85 # List of g codes that are modal

Sequence#s N 0 5 5 # Char, freq, incr & start
First#? N # Y or N Output 1st sequence no.
Last#? N # Y or N Output last sequence no.

HCode X # X or X U 'Horizontal char.
VCode Y # Y or Y V 'Vertical char.
Dcode Z # Depth char.
FeedCode F # Feed rate char.

Comment ' ' # Begin End comment char.

Spindle 3 4 5 # Cw, ccw & stop m codes
Coolant 8 9 7 # On, Off & Mist m codes
DComp 41 42 40 # Left, Right & Cancel m codes
LComp 43 49 # On & Off codes

Feed G1 # Linear move
Rapid G0 # Rapid positioning word
Cw G2 # Circular move clockwise
Ccw G3 # Circular move counter clockwise
Inc/Abs G 91 90 # Inc & Abs char. & values
CtrCode I J # I J or R or I J K L
Helical? N

Spaces? N # Y or N 'Spaces between words
Incremental? N # Y or N 'Inc or abs output
CtrIncremental? N # Y or N 'Inc or abs I & J
ByQuadrants? N # Y or N 'Break arcs at quadrants

ZRestart? Y # Y or N 'New cycle if diff. depths
Work G # Work offset register
UppercaseComments? Y # Y or N 'Require uppercase comments

Drill 1 # Drilling canned/manual cycle
G81 V[Vclear] x[H] y[V] z[D] F[FRate]
x[H] y[V]
end cancel

Peck 1 # Pecking canned/manual cycle
G87 V[Vclear] x[H] y[V] z[D] w[Vbite] F[FRate]
end cancel

Tap 1 # Tapping canned/manual cycle
G84 x[H] y[V] z[D] F[FRate]
x[H] y[V]
end cancel

Ream 1 # Reaming canned/manual cycle
G85 x[H] y[V] z[D] F[FRate]
x[H] y[V]
end cancel

Bore 1 # Boring canned/manual cycle
G86 x[H] y[V] z[D] F[FRate]
x[H] y[V]
end cancel

Back 1 # Back boring canned/manual cycle
G87 x[H] y[V] z[D] F[FRate]
x[H] y[V]
end cancel

Cancel # Cancel a canned/manual cycle
G80
end

StartCode # Start of the program
:[Program#]
G90 G70 G75
End

1stToolChange # First tool change
G0 X[WorkH] Y[WorkV] T[Tool] M6
G0 X[H] Y[V]
S[Speed]
Z[Vclear] M[Cool]

End

Infeed # Enable cutter comp
G1 G[Side] X[H] Y[V] F[FRate]
end

Outfeed # Disable cutter comp
G1 G40 X[H] Y[V]
end

ToolChange # Secondary tool changes
M[CoolantOff]
G0 X[H] Y[V] T[Tool] M6
Z[Vclear] M[Cool]
End

EndCode # End of the program
M9
G0 X[WorkH] Y[WorkV] M02
End

LineCode # Linear move
G1 X[H] Y[V] Z[D] F[FRate]
G99
End

RapidCode # Rapid move
G0 X[H] Y[V] Z[D]
End

Cwcode Force? Y # CW circular move
G2 x[H] y[V] i[IVal] j[JVal] F[FRate]
G99
End

Ccwcode Force? Y # CCW circular move
G3 x[H] y[V] i[IVal] j[JVal] F[FRate]
G99
End

REPLACE "N5G90" WITH ".N5G90"
replace "x" with "X"
replace "y" with "Y"
Replace "@" with "Tool Diameter "
Replace "^" with " Corner Radius "
Replace "$" with " '""

Jason S
09-25-2009, 08:40 AM
Easy fix, just move the G99 to where you need it. I assumed "after" was on another line and not directly after. I sent you an updated post.

MrBoss8
09-30-2009, 01:38 AM
Jason, its "SO CLOSE" to being perfect! The only problem is a G99 appearing on G1 Z moves. (For whatever reason this sends the spindle down to crash?)

How close would the following be to a fix:

LineCode # Linear move
G1 G99 X[H] Y[V] F[FRate] # removed " Z[D]"
End

LineCode # Linear move
G1 Z[D] F[FRate] # Z[D] by itself (no G99, or X, or Y)

(Can "LineCode" appear more than once?)

A sample of the output follows: (the lines in question are marked with **********)

:00001
G90G70G75
G0X0Y0T1M6
G0X-0.0257Y0.1046
S4000
Z0.25M8
G1G99Z-0.01F15.0 **********
G2G99X0.0068Y0.1255I-0.0009J0.1017F15.0
G2G99X0.0417Y0.0852I0.0048J0.0885F15.0
G2G99X0.0202Y0.05I-0.0028J0.0882F15.0
G2G99X-0.0061Y0.05I0.0071J0.0644F15.0
G2G99X-0.0179Y0.0675I0.0039J0.0694F15.0
G1G99X0.033Y0.065
G0Z0.25
X-0.0257Y0.1046
Z0.24
G1G99Z-0.02 ********** (? no feedrate after 1st occurrence?)
G2G99X0.0068Y0.1255I-0.0009J0.1017F15.0
G2G99X0.0417Y0.0852I0.0048J0.0885F15.0
G2G99X0.0202Y0.05I-0.0028J0.0882F15.0
G2G99X-0.0061Y0.05I0.0071J0.0644F15.0
G2G99X-0.0179Y0.0675I0.0039J0.0694F15.0
G1G99X0.033Y0.065
G0Z0.25
X-0.0257Y0.1046
Z0.23
G1G99Z-0.021 **********
G2G99X0.0068Y0.1255I-0.0009J0.1017F15.0
G2G99X0.0417Y0.0852I0.0048J0.0885F15.0
G2G99X0.0202Y0.05I-0.0028J0.0882F15.0
G2G99X-0.0061Y0.05I0.0071J0.0644F15.0
G2G99X-0.0179Y0.0675I0.0039J0.0694F15.0
G1G99X0.033Y0.065
G0Z0.25
X-0.0257Y0.1046
Z0.229
G1G99Z-0.023 **********


Thanks Again.

Jason S
09-30-2009, 07:47 AM
No problem to fix.

LineCode # Linear move
G1 Z[D] F[FRate] # Z[D] by itself (no G99, or X, or Y)

Sent updated postform.m.

MrBoss8
10-02-2009, 08:16 PM
After putting more spaces between LineCode and # Linear move, output seemed to be correct, but have not yet had time to test consistency but, things look good so far.

Jason, Thanks for the help

Jason S
10-03-2009, 08:36 AM
No problem, any other issues just let me know, you have my e-mail.

Good luck.:cheers: