Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Post help for prototrak


Recommended Posts

Hi all,

 

I am hoping someone here can help with a problem with code for a Prototrak. I am not sure if it is something I am doing inside Mastercam or a post problem. The code is posted like this:

PN8512 G20;

G130 X+0.0000 Y+0.0000;

G131 XM0.0000 XN0.0000 YM0.0000 YN0.0000 ST=00000;

N50;

N60 ( SET NEW Z! );

;

N70 ( SET NEW Z! );

;

N80 ( SET NEW Z! );

;

N90 G101 XB-1.2500A YB+0.4871A XE-0.7500A YE+0.4871A TC0 F10. D0.5000 CR0.0 T1;

N100 G103 XB-0.7500A YB+0.4871A XE-0.2500A YE+0.9871A XC-0.7500A YC+0.9871A F10. TC0 D0.5000 CR0.0 T1;

N110 G101 XB-0.2500A YB+0.9871A XE-0.2500A YE+1.9741A TC0 F10. D0.5000 CR0.0 T1;

N120 G102 XB-0.2500A YB+1.9741A XE+0.0000A YE+2.2241A XC+0.0000A YC+1.9741A F10. TC0 D0.5000 CR0.0 T1;

N130 G101 XB+0.0000A YB+2.2241A XE+3.0615A YE+2.2241A TC0 F10. D0.5000 CR0.0 T1;

N140 G102 XB+3.0615A YB+2.2241A XE+3.3115A YE+1.9741A XC+3.0615A YC+1.9741A F10. TC0 D0.5000 CR0.0 T1;

N150 G101 XB+3.3115A YB+1.9741A XE+3.3115A YE+0.0000A TC0 F10. D0.5000 CR0.0 T1;

N160 G102 XB+3.3115A YB+0.0000A XE+3.0615A YE-0.2500A XC+3.0615A YC+0.0000A F10. TC0 D0.5000 CR0.0 T1;

N170 G101 XB+3.0615A YB-0.2500A XE+0.0000A YE-0.2500A TC0 F10. D0.5000 CR0.0 T1;

N180 G102 XB+0.0000A YB-0.2500A XE-0.2500A YE+0.0000A XC+0.0000A YC+0.0000A F10. TC0 D0.5000 CR0.0 T1;

N190 G101 XB-0.2500A YB+0.0000A XE-0.2500A YE+0.9871A TC0 F10. D0.5000 CR0.0 T1;

N200 G103 XB-0.2500A YB+0.9871A XE-0.7500A YE+1.4871A XC-0.7500A YC+0.9871A F10. TC0 D0.5000 CR0.0 T1;

N210 G101 XB-0.7500A YB+1.4871A XE-1.2500A YE+1.4871A TC0 F10. D0.5000 CR0.0 T1;

N220 ( SET NEW Z! );

;

N230 ( SET NEW Z! );

;

%

 

It will not load with the ( SET NEW Z! ) lines. If I take them out in the editor to look like this it loads great

 

PN8512 G20;

G130 X+0.0000 Y+0.0000;

G131 XM0.0000 XN0.0000 YM0.0000 YN0.0000 ST=00000;

N90 G101 XB-1.2500A YB+0.4871A XE-0.7500A YE+0.4871A TC0 F10. D0.5000 CR0.0 T1;

N100 G103 XB-0.7500A YB+0.4871A XE-0.2500A YE+0.9871A XC-0.7500A YC+0.9871A F10. TC0 D0.5000 CR0.0 T1;

N110 G101 XB-0.2500A YB+0.9871A XE-0.2500A YE+1.9741A TC0 F10. D0.5000 CR0.0 T1;

N120 G102 XB-0.2500A YB+1.9741A XE+0.0000A YE+2.2241A XC+0.0000A YC+1.9741A F10. TC0 D0.5000 CR0.0 T1;

N130 G101 XB+0.0000A YB+2.2241A XE+3.0615A YE+2.2241A TC0 F10. D0.5000 CR0.0 T1;

N140 G102 XB+3.0615A YB+2.2241A XE+3.3115A YE+1.9741A XC+3.0615A YC+1.9741A F10. TC0 D0.5000 CR0.0 T1;

N150 G101 XB+3.3115A YB+1.9741A XE+3.3115A YE+0.0000A TC0 F10. D0.5000 CR0.0 T1;

N160 G102 XB+3.3115A YB+0.0000A XE+3.0615A YE-0.2500A XC+3.0615A YC+0.0000A F10. TC0 D0.5000 CR0.0 T1;

N170 G101 XB+3.0615A YB-0.2500A XE+0.0000A YE-0.2500A TC0 F10. D0.5000 CR0.0 T1;

N180 G102 XB+0.0000A YB-0.2500A XE-0.2500A YE+0.0000A XC+0.0000A YC+0.0000A F10. TC0 D0.5000 CR0.0 T1;

N190 G101 XB-0.2500A YB+0.0000A XE-0.2500A YE+0.9871A TC0 F10. D0.5000 CR0.0 T1;

N200 G103 XB-0.2500A YB+0.9871A XE-0.7500A YE+1.4871A XC-0.7500A YC+0.9871A F10. TC0 D0.5000 CR0.0 T1;

N210 G101 XB-0.7500A YB+1.4871A XE-1.2500A YE+1.4871A TC0 F10. D0.5000 CR0.0 T1;

%

I have edited the post to include the G130 and G131 lines as that was a problem at first as well. I know it is not that big of a deal taking those lines out but when you are working with high school students it presents a small problem trying to explain why they have to take the extra steps. We are not to the point yet of working with posts so for the younger kids it would be a mess. The post is below. I see where it is getting the SET NEW Z! but I have no idea why it is doing it.

Thanks,

Tom

 

| FEATURES: |

# ------------------------------------------------------------------------

#

#Canned text:

# Entering cantext on a contour point from within Mastercam allows the

# following functions to enable/disable.

# Cantext value:

# 1 = Stop = output the "M00" stop code

# 2 = Ostop = output the "M01" optional stop code

#

#

# NOTE:

#

# Even though this is a 2 axis post enter a depth and rapid height when

# programming pockets and 2D contours.

#

# At the beginning of the program it needs a program number. The name

# of the program (use a number) will be the program number at the start

# of file. This will allow for a progno up to 8 char. long.

#

# Example:

#

# Name of program 12345678.MX2

#

# PN 12345678 G20;

#

# Program must have a MX2 extension for machine to accept it. (12345678.MX2)

#

sextnc$ : "MX2" # NC gocde output file will have this file extension

#

# END_HEADER$

#

# --------------------------------------------------------------------------

# DEBUG - Switches for debugging purposes

# --------------------------------------------------------------------------

fastmode$ : yes$ # Enable Quick Post Processing, set to no for debug

bug1$ : 1 # 0=No display, 1=Generic list box, 2=Editor

bug2$ : 0 # Add postline label to each line at column 'bug2'

bug3$ : 0 # Add whatline to each line? yes/no

bug4$ : 0 # Add -.nci line number to each line? yes/no

whatno$ : yes$ # Ignore whatline branches to plin1 etc.? (leave as yes)

linktolvar$ : 1 #Associate X tolerance variables to V9- variable?

linkplnvar$ : 1 #Associate X plane specific variables to V9- variable?

cant_tlchng$ : 1 #Ignore cantext entry on move with tlchng_aft?

newglobal$ : 0 #Enable error checking for global variables?

 

 

# --------------------------------------------------------------------------

# Format Statements - i=incr, n=nonmodal, l=leave ldg, t=leave trlg, d=delta

# --------------------------------------------------------------------------

fs 1 +1.4ltn

fs 2 1.4ltn

fs 3 0 4

fs 4 1 0ltn

fs 5 1.1ltn

fs 6 2 0ltn

fs 7 4 0n

fs 8 1.4ltni

fs 9 1.4lt

fs 10 1 0n

fs 11 4.1n

 

# --------------------------------------------------------------------------

# Format Assignments

# fmt X 1 x - x, y, z, i, j, k, xh, yh, zh, xr, yr, zr

# are init. fs 1, with 'normal' prefix letter

# --------------------------------------------------------------------------

# --------------------------------------------------------------------------

# Axis output formats - Linear

# --------------------------------------------------------------------------

fmt "XE" 1 x$ # X Axis Pos

fmt "YE" 1 y$ # Y Axis Pos

fmt "X" 1 xd # X Axis Drill Pos

fmt "Y" 1 yd # Y Axis Drill Pos

fmt "XB" 1 xb # X Rapid Pos

fmt "YB" 1 yb # Y Rapid Pos

fmt "XE" 1 xe # X Axis end position

fmt "YE" 1 ye # Y Axis end position

fmt "X" 1 xr$ # X Rapid Pos

fmt "Y" 1 yr$ # Y Rapid Pos

 

# -------------------------------------------------------------------------

# Axis output formats - Circular

# --------------------------------------------------------------------------

 

fmt "I" 1 i$ # Arc center description in X

fmt "J" 1 j$ # Arc center description in Y

fmt "K" 1 k$ # Arc center description in Z

fmt "XC" 1 xc$ # Arc Center X

fmt "YC" 1 yc$ # Arc Center Y

fmt "R" 9 arcrad$ # Arc Radius

fmt "D" 9 arcdia # Arc Diameter

fmt 1 sweep$ # Angle between start and end of arc

# --------------------------------------------------------------------------

# Program & Sequence number format

# --------------------------------------------------------------------------

fmt "PN" 10 progno$ # Program number

fmt "N" 7 seqno$ # Starting Sequence Number

fmt "N" 7 seqinc$ # Sequence Number Increment

fmt "N" 7 n$ # Main Program Sequence Number

# --------------------------------------------------------------------------

# Tool format

# --------------------------------------------------------------------------

fmt "T" 4 t$ # Tool Number

fmt "T" 4 first_tool$ # First Tool Used (bldnxtool: yes)

fmt "T" 4 next_tool$ # Next Tool Used (bldnxtool: yes)

fmt "D" 9 tldia$ # Tool Diameter

fmt 9 tlrad$ # Tool Radius

fmt 9 trflat$ # Tool Flat Radius

fmt 9 tcr$ # Tool Corner Radius

fmt "H" 4 tlngno$ # Length Offset Number

fmt 1 tlplnno$ # Tool Plane Number

# --------------------------------------------------------------------------

# Spindle Speeds & Feedrate output formats

# --------------------------------------------------------------------------

fmt "S" 3 ss$ # Spindle Speed

fmt "F" 11 fr$ # Feedrate

fmt "F" 11 hfr # hold actual feed rate until change occurs

# --------------------------------------------------------------------------

# Cutter Comp formats

# --------------------------------------------------------------------------

fmt "G" 3 ccomp$ # Modal format for ccomp

fmt "M" 3 cc$ # Cutter Comp.

# --------------------------------------------------------------------------

# Miscellaneous output formats

# --------------------------------------------------------------------------

fmt 5 plane$ # Modal plane code selector

fmt "M" 4 sscode # Spindle Speed Code (M59 - M77 from tbl 1)

fmt 10 gcode$ # Format linear G-code selector for modality only

fmt 3 coolant$ # Format coolant M-code selector for modality only

fmt "M" 10 cantext$ # Canned text

 

# --------------------------------------------------------------------------

# Drill variable formats

# --------------------------------------------------------------------------

fmt 1 drillcyc$ # drillcyc = 0..7

fmt 1 drillcur$ # Drill with current cycle flag (=1 if true)

fmt 4 drillref # Initial / Reference Toggle (G98/G99)

fmt "P" 2 dwell$ # Dwell

fmt 10 crtest # working modifiable variable

 

# --------------------------------------------------------------------------

# Formulas - Use ':' instead of '=' to initialize variables

# --------------------------------------------------------------------------

scalex$ : 1. # Scaling of .NCI at input - x,y,z,i,j,k

scaley$ : 1. # Scaling of .NCI at input - x,y,z,i,j,k

scalez$ : 1. # Scaling of .NCI at input - x,y,z,i,j,k

rotary : no$ # Use rotary axis

subprg$ : no$ # Open Sub Program File

auxprg$ : no$ # Open Aux Program File

bldnxtool$ : yes$ # Build next tool table

skipmotest$ : no$ # Skip motion test in linear

tooltable$ : 0 # Output tool table 0=no, 1=before header, 2=after header

plane$ : 0 # Initialize plane code to suppress first G17

getnextop$ : yes$ # nextop will hold the next op-code (gcode)

spaces$ : 0 # Number of spaces to add between fields

nobrk$ : 2 # omit breakup of x/y & z rapid moves

omitcrlf$ : no$ # Omit CR/LF- Used for floppy output of - .NC files

omitrefht : no$ # Don't use reference height on first non-canned Z move

seqmax$ : 9999 # Max. sequence number

omitseq$ : no$ # Omit sequence numbers?

frrapid : 300 # Rapid feedrate? 300.0

frmax : 300 # Maximum feedrate? 300.0

ssmax : 3000 # Maximum spindle speed? 3000

breakarcs$ : 1 # Break arcs, 0 = no, 1 = quadrants, 2 = 180deg. max arcs

arctype$ : 1 # Arc center 1=abs, 2=St-Ctr, 3=Ctr-St, 4=unsigned inc.

do_full_arc$ : 0 # Allow full circle output? 0=no, 1=yes

helix_arc$ : 0 # Support helix arc output, 0=no, 1=all planes, 2=XY plane only

arccheck$ : 1 # Check for small arcs, convert to linear

ltol$ : 0.002 # Length tolerance for arccheck

ncldr$ : 20 # Number of leader characters

ldrcode$ : 65 # Leader character dec. equiv.

compsav : 0

progname$ : 1 #Use uppercase for program name (sprogname)

 

# Global formulas

arcdia = arcrad$ * 2

 

#Cantext string definitions (spaces must be padded here)

sm00 : "M00"

sm01 : "M01"

strm : "M"

strtextno : ""

strcantext : ""

sblank : ""

 

 

# --------------------------------------------------------------------------

# USE CANNED CYCLES?

# --------------------------------------------------------------------------

usecandrill$ : yes$ # Use canned cycle for Drill

usecanpeck$ : yes$ # Use canned cycle for Peck

usecanchip$ : yes$ # Use canned cycle for Chip Break

usecantap$ : yes$ # Use canned cycle for Tap

usecanbore1$ : yes$ # Use canned cycle for Bore1

usecanbore2$ : yes$ # Use canned cycle for Bore2

usecanmisc1$ : no$ # Use canned cycle for Misc1

usecanmisc2$ : no$ # Use canned cycle for Misc2

 

skp_lead_flgs$ : 1 # Do NOT use v9 style contour flags

get_1004$ : 1 # Find gcode 1004 with getnextop?

rpd_typ_v7$ : 1 # Use Version 7 style contour flags?

strtool_v7$ : 2 # Use Version 7 toolname?

 

# --------------------------------------------------------------------------

# Strings - String labels must start with 's' - they are not pre-assigned

# --------------------------------------------------------------------------

#Select operation note

sop00 : "NULL" # String definition

sop01 : "CONTOUR" # " "

sop02 : "CONTOUR" # " "

sop03 : "DRILL/MISC" # " "

sop04 : "POCKET...." # " "

sop05 : "RULED....." # " "

sop06 : "2D-SWEPT.." # " "

sop07 : "3D-SWEPT.." # " "

sop08 : "REVOLVED.." # " "

sop09 : "LOFT......" # " "

sop10 : "COONS....." # " "

sop11 : "FILLET...." # " "

sop12 : "FLOWLINE.." # " "

sop13 : "M.FINISH.." # " "

sop14 : "M.ROUGH..." # " "

sop15 : "POINT....." # " "

sop16 : "DRILL5AX.." # " "

sop17 : "CURVE5AX.." # " "

sop18 : "OP18......" # " "

sop19 : "OP19......" # " "

sop20 : "OP20......" # " "

 

sopnote : "" # Target string

 

fstrsel sop00 opcode$ sopnote 21 -1

 

# --------------------------------------------------------------------------

# Select motion G code string

sG0 : "G100" # Linear movement at rapid feedrate G code

sg01 : "G101" # Linear movement at feedrate G code

sg02 : "G102" # Circular interpolation CW G code

sg03 : "G103" # Circular interpolation CCW G code

sgcode : "" # Target string for linear/circular motion G code

fstrsel sG0 gcode$ sgcode 4 -1

 

# --------------------------------------------------------------------------

# Coolant code select string

sm09 : "M09" # Coolant off

sm08 : "M08" # Coolant on - Flood

sm07 : "M08" # Coolant on - Mist

sm06 : "M08" # Coolant on - Tool

 

smcool : "" # Coolant code target string

 

fstrsel sm09 coolant$ smcool 4 -1

 

 

# --------------------------------------------------------------------------

# Spindle code string select

sm04 : "M04" # Spindle reverse - no coolant

sm05 : "M05" # Spindle off - no coolant

sm03 : "M03" # Spindle forward - no coolant

sm04f : "M04" # Spindle reverse - with coolant - Flood

sm05f : "M05" # Spindle off - with coolant ""

sm03f : "M03" # Spindle forward - with coolant ""

sm04m : "M04" # Spindle reverse - with coolant - Mist

sm05m : "M05" # Spindle off - with coolant ""

sm03m : "M03" # Spindle forward - with coolant ""

sm04t : "M04" # Spindle reverse - with coolant - Tool

sm05t : "M05" # Spindle off - with coolant ""

sm03t : "M03" # Spindle forward - with coolant ""

 

spdlon : "" # Target Spindle-on M-string

spdlsel = coolant$ * 3 + fsg3(ss$) # Spindle on selector based on

# coolant - 0 = off, 1 = Flood, 2 = Mist, 3 = Tool

 

fstrsel sm04 spdlsel spdlon 12 -1

 

# --------------------------------------------------------------------------

# Cutter compensation string select

scc0 : "" # cutter compensation state not changed

sg40 : "G40" # cancel cutter compensation

sg41 : "G41" # cutter compensation left

sg42 : "G42" # cutter compensation right

sg140 : "G40" # last linear move --> cancel cutter comp

# Note: Reversal of sg40 = "" & sg140 = "G40" cancels comp

# with last linear move

sccomp : "" # Select cutter compensation

 

 

fstrsel scc0 ccomp$ sccomp 5 -1

 

# --------------------------------------------------------------------------

# Select work plane G code

sg16 : ""

sg17 : "G17" # XY plane code

sg19 : "G19" # XZ plane code

sg18 : "G18" # YZ plane code

sgplane : "" # Workplane G code

fstrsel sg16 plane$ sgplane 4 -1

 

# --------------------------------------------------------------------------

# Canned drill cycle G string select

 

sg81 : "G81" # drill - no dwell

sg82 : "G82" # drill - with dwell

sg83 : "G83" # peck drill - no dwell

sg83d : "G83" # peck drill - with dwell

sg73 : "G73" # chip break - no dwell

sg73d : "G73" # chip break - with dwell

sg84 : "G84" # tap

sg84d : "G84" # tap # must be here for selector to work

sg85 : "G85" # bore #1 - no dwell

sg89 : "G89" # bore #1 - with dwell

sg86 : "G86" # bore #2 - no dwell

sg86d : "G86" # bore #2 - with dwell

sgm1 : "G81" # misc #1 - no dwell

sgm1d : "G82" # misc #1 - with dwell

sgm2 : "G81" # misc #2 - no dwell

sgm2d : "G82" # misc #2 - with dwell

sgdrill : "" # Target drill cycle G code

 

drlgsel = (drillcyc$ * 2) + fsg2(dwell$) # 16 possible combinations:

# drillcyc = 0..7

# dwell = 0 or non-zero (2 states)

fstrsel sg81 drlgsel sgdrill 16 -1

 

# --------------------------------------------------------------------------

# User-defined Postline labels starting with 'p'

# End a line with ',' to continue on the next line

# --------------------------------------------------------------------------

pyequal # prv_x = x already tested

if yb = y$, ex$

 

pequal # test for equality of prev and curr x/y

if xb = x$, pyequal

 

pijk # Force Plane Change "I, J, K" Values

if plane$ = 0, *i$, *j$, k$

if plane$ = 1, i$, *j$, *k$

if plane$ = 2, *i$, j$, *k$

 

pinit # Initialize Vars

prv_fr$ = 999.999

prv_frplunge$ = 999.999

 

pcomment$ # Manual Entry - COMMENTS (on a block by itself) 1005,1006

# "comment string" is passed to .PST in 'scomm'

n$, " (", scomm$, ")", e$

 

pccomp # Cuter comp output

if ccomp$ = 4 , !ccomp$

if compsav = 0, "TC0"

if compsav = 3, "TC1"

if compsav = 2, "TC2"

 

pfr # Feedrate W/O Negative Feedrates

hfr = fr_pos$

*hfr

 

pcoolon # Coolant on

if coolant$ > 0, smcool, !coolant$

 

pcooloff # Coolant off

if prv_coolant$ > 0, sm09

prv_coolant$ = 0

 

psg00 # Output "G0" via String Select Function to maintain modality

*sgcode

 

# --------------------------------------------------------------------------

# Postline - Names are pre-assigned except for partial lines which are

# called from pre-assigned lines (Ex. pt)

# --------------------------------------------------------------------------

 

pheader$ # File header

# "%"

eob$ = 59

"PN", sprogname$, " G20", e$

"G130 X+0.0000 Y+0.0000" , e$

"G131 XM0.0000 XN0.0000 YM0.0000 YN0.0000 ST=00000" , e$

 

psof0$ # Start of file for tool zero

 

psof$ # Start of file for non-zero tool number

pinit

pcan

pcan1, n$, strcantext, e$

pcan2

compsav = ccomp$

 

ptlchg0$ # Null tool change

compsav = ccomp$

pcan

 

ptlchg$ # Tool change

compsav = ccomp$

pcan

pcan1, n$, strcantext, e$

pcan2

 

peof0$ # End of file for tool zero

peof$

 

peof$ # End of file for non-zero tool

eob$ = 0

"%", e$

 

# --------------------------------------------------------------------------

# Axis Motion Definition Section

# --------------------------------------------------------------------------

prapid$ # Rest xb - yb

!x$, !y$

xb = xr$

yb = yr$

 

 

pendcomm # End of pass comment

n$, " ( SET NEW Z! )", e$

 

 

plincrop0 # Output last move if next nextop = 0

pcan1, n$, " ", *sgcode, " ", xb, "A ", yb, "A ", x$, "A ", y$,

"A ", pccomp, " ", pfr, " ", *tldia$, " CR-0.0 ", strcantext,

t$, e$

pendcomm

!ccomp$

 

plincrop # Output cr and cr- depending on start of toolpath

pequal

if nextop$ > 999, pcan1,

n$, " ", *sgcode, " ", xb, "A ", yb, "A ", x$, "A ", y$, "A ",

pccomp, " ", pfr, " ", *tldia$, " CR-0.0 ", strcantext, t$, e$

if nextop$ > 999, pendcomm

if nextop$ < 1000,

pcan1, n$, " ", *sgcode, " ", xb, "A ", yb, "A ", x$, "A ", y$,

"A ", pccomp, " ", pfr, " ", *tldia$, " CR0.0 ", strcantext, t$, e$

xb = prv_x$

yb = prv_y$

 

plinout # Output proper code for conditions

if nextop$ = 0, plincrop0

if nextop$ <> 0, plincrop

 

plinm # Linear line movement - at feedrate

pcan

xb = prv_x$

yb = prv_y$

if opcode$ = 4, tldia$ = 0

if crtest = 0, plinout

crtest = 0

pcan2

 

plin$ # Linear line movement - at feedrate

plinm

 

pz$ # Linear movement in Z axis only - at feedrate

if motst$ = 4, pendcomm,e$

!z$

 

pzrapid$ # Linear movement in Z axis only - at rapid

if motst$ = 4, pendcomm,e$

!z$

 

pcircrop0 # Output last move if nextop = 0

pcan1, n$, " ", *sgcode, " ", xb, "A ", yb, "A ", x$, "A ", y$,

"A ", xc$, "A ", yc$, "A ", pfr, " ", pccomp, " ", *tldia$,

" CR-0.0 ", strcantext, t$,e$

pendcomm

!ccomp$

 

pcircrop # Output normal arc or cr- depending on opcode > 999

if nextop$ > 999,

pcan1, n$, " ", sgcode, " ", xb, "A ", yb, "A ", x$, "A ", y$,

"A ", xc$, "A ", yc$, "A ", pfr, " ", pccomp, " ", *tldia$,

" CR-0.0 ", strcantext, t$, e$

if nextop$ > 999, pendcomm

if nextop$ < 1000,

pcan1, n$, " ", sgcode, " ", xb, "A ", yb, "A ", x$, "A ", y$,

"A ", xc$, "A ", yc$, "A ", pfr, " ", pccomp, " ", *tldia$,

" CR0.0 ", strcantext, t$, e$

 

pcirout # Output proper code for conditions

if nextop$ = 0, pcircrop0

if nextop$ <> 0, pcircrop

 

pcirm # Circular interpolation

pcan

xb = prv_x$

yb = prv_y$

if opcode$ = 4, tldia$ = 0

if crtest = 0, pcirout

crtest = 0

pcan2

 

pcir$ # Circular interpolation

pcirm

Link to comment
Share on other sites
Guest MTB Technical Services

The problem you have is not really a post issue but you can correct it via a post edit.

You need to understand your ProtoTRAK control a little better.

 

You are trying to post out a program in the Event based format.

The Event based format doesn't support comments.

 

Specifically, what ProtoTRAK Machine and Control are you trying to post code for?

The newer models can actually take G-Code and translate between various control systems.

Link to comment
Share on other sites

Colin,

I tried that and the nothing at all was posted and I got a ton of errors.

 

Tim, It is a EMX control 2 axis fairly new as we received the machines just a couple of months ago. The post does not give you the .CAM code. It gives out .MX2 code. I downloaded files both CAM and MX2 from programs on the machine and the post we used gives us code very close to it except for the darn SET NEW Z lines. I was thinking it may be something with MISC values in Mastercam but I changed those and nothing happened.

 

Tom

Link to comment
Share on other sites

tom if you dont mind me asking, where did you get the post,ive been looking for that kind of post for my proto trak

 

Have you tried asking your reseller?

Link to comment
Share on other sites
Guest MTB Technical Services

Colin,

I tried that and the nothing at all was posted and I got a ton of errors.

 

Tim, It is a EMX control 2 axis fairly new as we received the machines just a couple of months ago. The post does not give you the .CAM code. It gives out .MX2 code. I downloaded files both CAM and MX2 from programs on the machine and the post we used gives us code very close to it except for the darn SET NEW Z lines. I was thinking it may be something with MISC values in Mastercam but I changed those and nothing happened.

 

Tom

 

Tom,

 

The MX2 format doesn't support Z positions at all.

It's strictly 2-axis so I am assuming this control is mounted on some kind of bridgeport type of knee mill.

 

Pay attention of the !z$ in both pz$ and pzrapid$ .

The ! suppresses the Z output.

Simply REM out the Z line like Colin said and you'll be OK.

 

#if motst$ = 4, pendcomm,e$

Link to comment
Share on other sites

Tom,

 

The MX2 format doesn't support Z positions at all.

It's strictly 2-axis so I am assuming this control is mounted on some kind of bridgeport type of knee mill.

 

Pay attention of the !z$ in both pz$ and pzrapid$ .

The ! suppresses the Z output.

Simply REM out the Z line like Colin said and you'll be OK.

 

#if motst$ = 4, pendcomm,e$

 

Tim,

You hit it on the head! Thanks! My mind will be clear for a long weekend up in Wells Beach ME (not that it is going to be beach weather around here!) I took all the Z values out in the Mastercam linking parameters and POOF. Got just what I was looking for. I only have one now at the very end that does not seem to matter. One little renegade N50; line number that I need to get out of there. That should be easy.

Tom

Link to comment
Share on other sites
Guest MTB Technical Services

Tom,

 

What you may want to do is modify the pz$ and pzrapid$ postblocks to output a program stop.

This will allow the operator to adjust the Z depth manually on the machine and simply press cycle start to continue.

Link to comment
Share on other sites

Different control but on our smx 2 axis, we worked with our reseller and have all Z moves output as 'Set Z#' where # is the program depth value.

So for example, we can do some involved parts programmed in mcam where the machine will rapid to the plunge position and stop saying 'SET Z-.50' so we plunge 0.5 and press go and the machine runs to the next Z move where it says 'CHECK Z' so we wind up the quill, press go and repeat etc.

So we can do work which would normally be done on a VMC (talking prototypes here).

By memory IJK's have to be output as the machine doesn't like R's, and also compensation was a bit of a nightmare because whatever happens, the machine also applies its own roll on/off. So we can prog in mcam and have a lead in of whatever, post it and NCPlot it and all looks good, run in machine and the machine rolls onto the programmed roll on (ie double roll). Caught me out in a tight space - gouge!!!

Link to comment
Share on other sites

my dealer doent offer post for prototrak mx2

my dealer doent offer post for prototrak mx2

 

Having previously worked for a reseller for over 5 years, I find this EXCEEDINGLY difficult to believe, I know first hand what they have access to so that they can provide posts. And a generic IS available

 

SO......

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...