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:

Haas post manual entry op


MrFish
 Share

Recommended Posts

Can someone tell me what i need to change in my Haas post to get the manual op to output correctly as either code - no brackets, or comment - with brackets depending on the radio button I have selected. Currently with the following post code i just get everything in brackets as a comment.

 

--------------------------------------------------------------------------

# Tool Comment / Manual Entry Section

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

ptoolcomment #Comment for tool

tnote = t$

toffnote = tloffno$

tlngnote = tlngno$

"(", pstrtool, ")", e$

"(", *tnote, *toffnote, *tlngnote, *tldia$, ")", e$

 

pstrtool #Comment for tool

if strtool$ <> sblank,

[

strtool$ = ucase(strtool$)

*strtool$, " "

]

 

pcomment$ #Comment from manual entry (must call pcomment2 if booleans)

pcomment2

 

pcomment2 #Comment from manual entry

scomm$ = ucase (scomm$)

if gcode$ = 1007, "(", scomm$, ")"

else, "(", scomm$, ")", e$

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

# Start of File and Toolchange Setup

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

psof0$ #Start of file for tool zero

psof$

 

 

 

 

output looks like this

 

 

N2410 G1 G40 Y28.069

N2420 Z-7. F2000.

N2430 G0 Z26.

( M01 (MEASURE TO SET CUTTER OFFSET) )

( M03 )

( FINISH BACK ANGLED FACE )

N2440 A350.

N2450 X7. Y26.52

N2460 Z13.

 

was set to code in operation, so should not have the brackets at start and end of the M01 and M03 lines. Next line is the following operation comment, so should be there.

Link to comment
Share on other sites

Not sure if this will help, but here is the comment section of my post that works properly.

 

At a previous shop, I remember having to change the 1007 to one of the other options (or vice versa) to get it to work. It would output code as comments or comments as code. Changing that number fixed it, but I don't remember where I did it. That was also back in V9.

 

 

 

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

# Tool Comment / Manual Entry Section

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

ptoolcomment #Comment for tool

tnote = t$

toffnote = tloffno$

tlngnote = tlngno$

" (", *tnote, ")", e$

!spaces$

spaces$ = 0

spaces$ = prv_spaces$

 

pstrtool #Comment for tool

if strtool$ <> sblank,

[

strtool$ = ucase(strtool$)

*strtool$, " "

]

 

ptime #Turn 24-hour time format into AM/PM format added by tws

!spaces$

spaces$ = zero

if time$ >= 13, time2 = (time$ - 12)

else, time2 = time$

hour = int(time2)

min = frac(time2)

*hour, ":", *min,

if time$ > 12, " PM"

else, " AM"

spaces$ = prv_spaces$

 

 

pcomment$ #Comment from manual entry (must call pcomment2)

pcomment2 #Required if doing boolean 'if' logic testing!

 

pcomment2 #Output Comment from manual entry

scomm$ = ucase (scomm$)

if gcode$ = 1005, sopen_prn, scomm$, sclose_prn, e$ #Manual entry - as comment

if gcode$ = 1006, scomm$, e$ #Manual entry - as code

if gcode$ = 1007, sopen_prn, scomm$, sclose_prn #Manual entry - as comment with move NO e$

if gcode$ = 1026, scomm$ #Manual entry - as code with move NO e$

if gcode$ = 1008, sopen_prn, scomm$, sclose_prn, e$ #Operation comment

if gcode$ = 1051, sopen_prn, scomm$, sclose_prn, e$ #Machine name

if gcode$ = 1052, sopen_prn, scomm$, sclose_prn, e$ #Group comment

if gcode$ = 1053, sopen_prn, scomm$, sclose_prn, e$ #Group name

if gcode$ = 1054, sopen_prn, scomm$, sclose_prn, e$ #File Descriptor

Link to comment
Share on other sites

Not sure if this will help, but here is the comment section of my post that works properly.

 

At a previous shop, I remember having to change the 1007 to one of the other options (or vice versa) to get it to work. It would output code as comments or comments as code. Changing that number fixed it, but I don't remember where I did it. That was also back in V9.

 

 

 

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

# Tool Comment / Manual Entry Section

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

ptoolcomment #Comment for tool

tnote = t$

toffnote = tloffno$

tlngnote = tlngno$

" (", *tnote, ")", e$

!spaces$

spaces$ = 0

spaces$ = prv_spaces$

 

pstrtool #Comment for tool

if strtool$ <> sblank,

[

strtool$ = ucase(strtool$)

*strtool$, " "

]

 

ptime #Turn 24-hour time format into AM/PM format added by tws

!spaces$

spaces$ = zero

if time$ >= 13, time2 = (time$ - 12)

else, time2 = time$

hour = int(time2)

min = frac(time2)

*hour, ":", *min,

if time$ > 12, " PM"

else, " AM"

spaces$ = prv_spaces$

 

 

pcomment$ #Comment from manual entry (must call pcomment2)

pcomment2 #Required if doing boolean 'if' logic testing!

 

pcomment2 #Output Comment from manual entry

scomm$ = ucase (scomm$)

if gcode$ = 1005, sopen_prn, scomm$, sclose_prn, e$ #Manual entry - as comment

if gcode$ = 1006, scomm$, e$ #Manual entry - as code

if gcode$ = 1007, sopen_prn, scomm$, sclose_prn #Manual entry - as comment with move NO e$

if gcode$ = 1026, scomm$ #Manual entry - as code with move NO e$

if gcode$ = 1008, sopen_prn, scomm$, sclose_prn, e$ #Operation comment

if gcode$ = 1051, sopen_prn, scomm$, sclose_prn, e$ #Machine name

if gcode$ = 1052, sopen_prn, scomm$, sclose_prn, e$ #Group comment

if gcode$ = 1053, sopen_prn, scomm$, sclose_prn, e$ #Group name

if gcode$ = 1054, sopen_prn, scomm$, sclose_prn, e$ #File Descriptor

 

 

Cheers Thad, once I set the strings for sopen_prn & sclose_prn it worked a treat.

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