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:

Peck rat = 0


Recommended Posts

In my other posts I have it set up with your help to show an error message if my peck depth = 0.

 

I found in formulas: testpeckrate : 0 #switch to turn on peckrate flag

 

in error message: speckrate_error : "ERROR -- PECKRATE = 0"

 

and in ppeck$ and pchpbrk$

 

if peck1$ <= 0,

[

testpeckrate = mprint(speckrate_error) #edited **TPJ 03-24-2008**

"ERROR -- PECKRATE = 0", e$

]

I put all these in my Kitamura post but it just doesn't do everything quite right.

 

It puts " ERROR -- PECKRATE = 0 " in the program but it does not throw up a box saying "ERROR -- PECKRATE = 0" like it does in my other posts. What did I leave out.

 

Does anyone know??

 

Thanks in advance for looking!!

 

I'm using X5 now need to change my profile.

Link to comment
Share on other sites

This is from one of my posts;

 

# Error messages
# --------------------------------------------------------------------------
saxiswarn   : "WARNING-POST ROTARY AXIS ASSIGNMENT ('rot_on_x') OVERWRITTEN BY OPERATION"
saxisoff	: "ERROR-POST ROTARY AXIS ASSIGNMENT ('rot_on_x') IS DISABLED"
saxiserror  : "ERROR-INVALID ROTARY AXIS ASSIGNMENT ('rot_on_x') FOR CURRENT OPERATION"
sindxerror  : "WARNING-INDEX ANGLE DOES NOT MATCH POST SETTING ('ctable')"
stlorgerr   : "ERROR-TOOL ORIGIN DOES NOT MATCH CENTER OF ROTATION IN POLAR MILLING"
shomeserror : "ERROR-G92 WORK OFFSET ('wcstype') DOES NOT SUPPORT TRANSFORM SUBPROGRAM"
sprgnerror  : "ERROR-SUBPROGRAM NUMBER MATCHES THE MAIN PROGRAM NUMBER"
scomperror  : "CUTTER COMP ERROR - CC STARTED ON AN ARC"
sfeedrate0  : "ERROR -- FEEDRATE = 0"   
speckrate0  : "ERROR -- PECKRATE = 0" #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
svari172error  : "ERROR -- variable 172 = 0"
svari199error  : "ERROR -- variable 199 = 0"
sgagelengtherror  : "ERROR -- gage length = 0"
stoollengthwarn	: "WARNING -- TOOL NUMBER & LENGTH OFFSET DOESN'T MATCH"
stooldiawarn	: "WARNING -- TOOL NUMBER & DIA OFFSET DOESN'T MATCH"

 

ppeck$   		#Canned Peck Drill Cycle
 	savdrl_gcode = gcode$
 	pdrlcommonb
 	if peck1$ = 0, result = mprint(speckrate0) #<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 	if drl_prm2$,
   	[
   	sav_refht = refht$
   	refht$ = drl_prm2$
   	n$, pdrlxy, e$
   	n$, sg01, *drl_prm2$, [if drl_prm3$, *drl_prm3$], e$
   	n$, *drl_prm1$, pspindle, e$
   	n$, *sgdrlref, *sgdrill, pfzout, pcout, prdrlout, *peck1$, feed,
		strcantext, e$
   	pcanceldc$,
   	n$, *speed, pspindle, e$
   	n$, sg00, *initht$, e$
   	refht$ = sav_refht
   	]
 	else, n$, *sgdrlref, *sgdrill, pdrlxy, pfzout, pcout,
   	prdrlout, *peck1$, *feed, strcantext, e$
 	pcom_movea

Link to comment
Share on other sites
in error message: speckrate_error : "ERROR -- PECKRATE = 0"

 

In the error message line make sure there are two spaces between the : and "ERROR -- PECKRATE = 0"

 

In in ppeck$ and pchpbrk$ change ;

 

if peck1$ <= 0,

[

testpeckrate = mprint(speckrate_error) #edited **TPJ 03-24-2008**

"ERROR -- PECKRATE = 0", e$

]

 

to;

 

if peck1$ <= 0, result = mprint(speckrate0)

 

I tried to find the post that I edited before but all I could find were Louis' posts. They were dated 2007 so I must have chucked yours.

Link to comment
Share on other sites

I was wondering about who helped me with that. I remember seeing somthing on the board about and asked questions and you helped me. Couldn't remember by the initials. thanks for the help again.

Will try it in the morning. I have everything just like you said except I need to check spacing.

 

Thanks again!!

Link to comment
Share on other sites

# --------------------------------------------------------------------------
# Error messages
# --------------------------------------------------------------------------
saxiserror       "WARNING - DEFINED AXIS OF ROTATION DOES NOT MATCH OPERATION'S AXIS OF ROTATION - OUTPUT MAY BE INVALID"
sindxerror       "WARNING - INDEX ANGLE DOES NOT MATCH POST SETTING ('ctable')"
stlorgerr        "ERROR - TOOL ORIGIN DOES NOT MATCH CENTER OF ROTATION IN POLAR MILLING"
shomeserror      "ERROR - WORK OFFSET USAGE DOES NOT SUPPORT TRANSFORM SUBPROGRAM"
sprgnerror       "ERROR - SUBPROGRAM NUMBER MATCHES THE MAIN PROGRAM NUMBER"
srotaxerror      "ERROR - MORE THAN 1 ROTARY AXIS DETECTED IN SELECTED AXIS COMBINATION - OUTPUT MAY BE INVALID" 
swriteopserror   "ERROR - WRITE NC OPERATION INFORMATION MUST BE ENABLED IN CONTROL DEFINITION - SET AND REPOST"
sworkoffseterror "ERROR - NO WORK CO-ORD SYSTEM APPLIED"
sspeederror      "ERROR - RPM NOT SET CORRECTLY ?"
speck1error      "ERROR - NO PECKS SET FOR DRILLING"     # <<<<<<<<<<<<<<<
scutcomperror    "ERROR - CUTTER COMP STARTS / FINISHES ON AN ARC"

 

ppeck$           #Canned Peck Drill Cycle
     pdrlcommonb
     if peck1$ = 0, result = mprint(speck1error), speck1error, e$ 

 

do the same for the pchpbrk$ cycle

 

The mprint puts the error on-screen, 2nd statement puts the error message into the NC file

nearly the same as the previous post ...you may have missed the e$

Link to comment
Share on other sites
if peck1$ <= 0,

[

testpeckrate = mprint(speckrate_error) #edited **TPJ 03-24-2008**

"ERROR -- PECKRATE = 0", e$

]

 

It's just clicked, you inserted a comment in the middle of the IF statement

 

Change it to

testpeckrate = mprint(speckrate_error) , "ERROR -- PECKRATE = 0", e$ #edited **TPJ 03-24-2008**

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...