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:

RETRACT PROBLEMS IN POST


Greg_J
 Share

Recommended Posts

We just got a new HMC and the when programming moves in the B axis it gives errors with the value having a decimal. (B180. vs B180)

 

This is what I had before,

N100 G00 G17 G20 G40 G49 G80 G90 G55
N110 G00 G91 G28 Z0.
N120 T47
N130 M06 (PINZBORE BORING BAR)
N140 (MAX - Z2.)
N150 (MIN - Z-5.0625)
N160 G00 G90 G55 B0.
N170 G00 G90 X-15. Y0. S350 M03
N180 G43 H47 Z2. M50
N190 G98 G76 X-15. Y0. Z-5.0625 R.1 I-.03 F1.5
N200 X-5. Y0.
N210 X5. Y0.
N220 X15. Y0.
N230 G80
N240 G91 G28 Z0. M09
N250 M05
N260 G00 G90 G56 B180.
N270 G00 X15. Y0. S350 M03
N280 G43 H47 Z2. M50
N290 G98 G76 X15. Y0. Z-5.0625 R.1 I-.03 F1.5
N300 X5. Y0.
N310 X-5. Y0.
N320 X-15. Y0.
N330 G80 M09
N340 G91 G28 Z0.
N350 M05
N360 G90
N370 M30

 

and this after.

N100 G00 G17 G20 G40 G49 G80 G90 G55
N110 G00 G91 G28 Z0.
N120 T47
N130 M06 (PINZBORE BORING BAR)
N140 (MAX - Z2.)
N150 (MIN - Z-5.0625)
N160 B0
N170 G00 G90 G55
N180 G00 G90 X-15. Y0. S350 M03
N190 G43 H47 Z2. M50
N200 G98 G76 X-15. Y0. Z-5.0625 R.1 I-.03 F1.5
N210 X-5. Y0.
N220 X5. Y0.
N230 X15. Y0.
N240 G80
N250 G91 G28 Z0. M09
N260 M05
N270 G00 G90 G56
N280 G00 X15. Y0. S350 M03
N290 G43 H47 Z2. M50
N300 B180
N310 G98 G76 X15. Y0. Z-5.0625 R.1 I-.03 F1.5
N320 X5. Y0.
N330 X-5. Y0.
N340 X-15. Y0.
N350 G80 M09
N360 G91 G28 Z0.
N370 M05
N380 G90
N390 M30

 

The B location has changed, I want it to be back before the xy move.

 

Any ideas, it looks like my rotary settings are good any help would be appreciated.

 

Greg

Link to comment
Share on other sites

Question: before and after what? Did you modify the format statement in the post to eliminate decimal output of the rotary axis? If so and that's the only modification you made, I don't understand why the placement of the code would change.

Also, it seems odd that the machine won't read decimal output for the B-axis. What if you need it to rotate 180.75 degrees?

Link to comment
Share on other sites

**********************save a copy of the post before any changes******************************

In the post, the Format Assignment section for the B-axis tells the B how to be output. It assigns a format statement that defines how things will be output: leading zeros, trailing zeros, 3 or 4 place decimals, etc....

Look for the Format Assignment section to see which Format Statement the B-axis is assigned to. Then look at the Format Statement section to see which one you need to change it to.

Before changing, I usually copy/paste the original line directly below itself and comment it out with a # before editing. That way, you can always go back to the original, if needed.

Link to comment
Share on other sites

I just changed this:

index       : 0     #Use index positioning, 0 = Full Rotary, 1 = Index only

This is a switch in the post that changes to a whole different section for rotary output. That explains the rotary command moving to a different line. With index = 1, rotary output is handled by 'pindex' and if index = 0, is handled by 'pcout' or 'pfcout'

Link to comment
Share on other sites

First off, I would highly suggest getting the MP Post documentation guide. It's great, even though i don't understand most of it. Your reseller should be able to hook you up. I did download it from somewhere. I believe there was a link on the forum to it, but i just can't remember exactly where. It has section dealing specifically with formatting.

I will try to post up an example soon, so you can see where to look. Your post may be different.

Link to comment
Share on other sites

Ok, so the following is the Format Statement "table". Below that are the Format Assignments for some output of things like X, Y, Z, A, etc....

The third column in the format assignment table tells which format statement is being used the c-axis output is the one you'll be looking for. I'm not sure how many you'll have to change, but probably the ones in bold.

Try copying those lines directly below themselves and comment them out with a # sign in the front.

Then, change the 11 to a 4. You may have to create a new Format Statement for the inc position, though. I don't see one for Integer with delta.

Try the first one and see if it works, but the incremental one will have to be and incremental (delta) statement.

 

 

 

# Format statements - n=nonmodal, l=leading, t=trailing, i=inc, d=delta

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

#Default english/metric position format statements

fs2 1 0.7 0.6 #Decimal, absolute, 7 place, default for initialize

fs2 2 0.4 0.3 #Decimal, absolute, 4/3 place

fs2 3 0.4 0.3d #Decimal, delta, 4/3 place

#Common format statements

fs2 4 1 0 1 0 #Integer, not leading

fs2 5 2 0 2 0l #Integer, force two leading

fs2 6 3 0 3 0l #Integer, force three leading

fs2 7 4 0 4 0l #Integer, force four leading

fs2 9 0.1 0.1 #Decimal, absolute, 1 place

fs2 10 0.2 0.2 #Decimal, absolute, 2 place

fs2 11 0.3 0.3 #Decimal, absolute, 3 place

fs2 12 0.4 0.4 #Decimal, absolute, 4 place

fs2 13 0.5 0.5 #Decimal, absolute, 5 place

fs2 14 0.3 0.3d #Decimal, delta, 3 place

fs2 15 0.2 0.1 #Decimal, absolute, 2/1 place (feedrate)

fs2 16 1 0 1 0n #Integer, forced output

fs2 17 0.2 0.3 #Decimal, absolute, 2/3 place (tapping feedrate)

 

 

 

 

 

fmt N 21 n$ #Sequence number

fmt X 2 xabs #X position output

fmt Y 2 yabs #Y position output

fmt Z 2 zabs #Z position output

fmt X 3 xinc #X position output

fmt Y 3 yinc #Y position output

fmt Z 3 zinc #Z position output

fmt A 11 cabs #C axis position

fmt A 14 cinc #C axis position

fmt A 4 indx_out #Index position

fmt R 14 rt_cinc #C axis position, G68

fmt I 3 iout #Arc center description in X

fmt J 3 jout #Arc center description in Y

fmt K 3 kout #Arc center description in Z

fmt R 2 arcrad$ #Arc Radius

fmt F 9 feed #Feedrate

fmt P 11 dwell$ #Dwell

fmt M 5 cantext$ #Canned text

fmt F 2 pitch #Tap pitch (units per thread)

Link to comment
Share on other sites

This is what I have:

fmt  A  11  cabs        #C axis position
fmt  A  14  cinc        #C axis position
fmt  A  4   indx_out    #Index position
fmt  R  14  rt_cinc     #C axis position, G68

 

I changed the 11 to 4 and nothing seemed to change.

 

Here is a sample program of the problem that I'm having, I marked the locations with good and bad. It seems quite a bit messed up.

%
O0000 (TEST)
(CUSTOMER- )
(PROJECT-)
(DRAWING NO--REV-A)
(OPERATION- )
(MATERIAL-4140)
(CYCLE TIME-)
(PROGRAMMER-)
(MASTERCAM FILE- PM678UU0201_REV2_HITACHI.MCX-5)
(COMP TYPE-)
(DATE- FEB-07-11)
(TIME- 10:39)

(TOOL LIST) 
(T51|QUAD DRILL INGERSOLL|H51|D0 |D0.8750" |DRILL/CBORE)
(T52|INGERSOL 1" DRILL|H52|D0 |D1.0000" |DRILL/CBORE)
(T50|HERTELL DRILL CARBIDE|H50|D0 |D0.6562" |DRILL/CBORE)
(T10|CHAMPHER MILL FAST|H10|D10|D0.8420" |R0.0150|DRILL/CBORE)
(OVERALL MAX - Z4.)
(OVERALL MIN - Z-2.7)

(PROGRAM START)
N100 G00 G17 G20 G40 G49 G80 G90 G56
N110 G00 G91 G28 Z0.
N120 T51
N130 M06 (QUAD DRILL INGERSOLL)
N140 (MAX - Z4.)
N150 (MIN - Z-2.25)
N160 B180 (GOOD B VALUE LOCATION)
N170 G00 G90 G56
N180 G00 G90 X-18.875 Y-4.125 S2500 M03
N190 G43 H51 Z4. M50 T52
N200 G98 G81 X-18.875 Y-4.125 Z-2.25 R.1 F8.
N210 X-11.125 Y-4.125
N220 X-8.875 Y-4.125
N230 X-1.125 Y-4.125
N240 X1.125 Y-4.125
N250 X8.875 Y-4.125
N260 X11.125 Y-4.125
N270 X18.875 Y-4.125
N280 G80
N290 G91 G28 Z0. M09
N300 M05
N310 G00 G90 G55
N320 G00 X18.875 Y-4.125 S2500 M03
N330 G43 H51 Z4. M50
N340 B0 (BAD B VALUE LOCATION)
N350 G98 G81 X18.875 Y-4.125 Z-2.25 R.1 F8.
N360 X11.125 Y-4.125
N370 X8.875 Y-4.125
N380 X1.125 Y-4.125
N390 X-1.125 Y-4.125
N400 X-8.875 Y-4.125
N410 X-11.125 Y-4.125
N420 X-18.875 Y-4.125
N430 G80 M09
N440 G91 G28 Z0.
N450 M05
N460 M01
N470 T52
N480 M06 (INGERSOL 1" DRILL)
N490 (MAX - Z4.)
N500 (MIN - Z-1.735)
N510 B90 (GOOD B VALUE LOCATION)
N520 G00 G90 G57
N530 G00 G90 X-5.7038 Y1.5283 S2500 M03
N540 G43 H52 Z4. M50 T50
N550 G98 G81 X-5.7038 Y1.5283 Z-1.735 R-.025 F10.
N560 X-5.7038 Y-1.5283
N570 X-4.1755 Y-4.1755
N580 X-1.5283 Y-5.7038
N590 X1.5283 Y-5.7038
N600 X4.1755 Y-4.1755
N610 X5.7038 Y-1.5283
N620 X5.7038 Y1.5283
N630 X4.1755 Y4.1755
N640 X1.5283 Y5.7038
N650 X-1.5283 Y5.7038
N660 X-4.1755 Y4.1755
N670 G80
N680 G91 G28 Z0. M09
N690 M05
N700 G00 G90 G58
N710 G00 X5.7038 Y1.5283 S2500 M03
N720 G43 H52 Z4. M50
N730 B270 (BAD B VALUE LOCATION)
N740 G98 G81 X5.7038 Y1.5283 Z-1.735 R-.025 F10.
N750 X5.7038 Y-1.5283
N760 X4.1755 Y-4.1755
N770 X1.5283 Y-5.7038
N780 X-1.5283 Y-5.7038
N790 X-4.1755 Y-4.1755
N800 X-5.7038 Y-1.5283
N810 X-5.7038 Y1.5283
N820 X-4.1755 Y4.1755
N830 X-1.5283 Y5.7038
N840 X1.5283 Y5.7038
N850 X4.1755 Y4.1755
N860 G80 M09
N870 G91 G28 Z0.
N880 M05
N890 M01
N900 T50
N910 M06 (HERTELL DRILL CARBIDE)
N920 (MAX - Z4.)
N930 (MIN - Z-2.7)
N940 G00 G90 G58
N950 G00 G90 X10.25 Y-4.125 S3300 M03
N960 G43 H50 Z4. M50 T10
N970 G98 G81 X10.25 Y-4.125 Z-2.7 R-1.275 F33.
N980 X10.25 Y4.125
N990 X-10.25 Y4.125
N1000 X-10.25 Y-4.125
N1010 G80
N1020 G91 G28 Z0. M09
N1030 M05
N1040 G00 G90 G57
N1050 G00 X-10.25 Y-4.125 S3300 M03
N1060 G43 H50 Z4. M50
N1070 B90 (BAD B VALUE LOCATION)
N1080 G98 G81 X-10.25 Y-4.125 Z-2.7 R-1.275 F33.
N1090 X-10.25 Y4.125
N1100 X10.25 Y4.125
N1110 X10.25 Y-4.125
N1120 G80 M09
N1130 G91 G28 Z0.
N1140 M05
N1150 M01
N1160 T10
N1170 M06 (CHAMPHER MILL FAST)
N1180 (MAX - Z4.)
N1190 (MIN - Z-1.75)
N1200 G00 G90 G57
N1210 G00 G90 X-10.25 Y-4.125 S3500 M03
N1220 G43 H10 Z4. M47 T51
N1230 G98 G81 X-10.25 Y-4.125 Z-1.75 R-1.275 F15.
N1240 X-10.25 Y4.125
N1250 X10.25 Y4.125
N1260 X10.25 Y-4.125
N1270 G80 M09
N1280 G91 G28 Z0.
N1290 M05
N1300 G90
N1310 M30
%

Link to comment
Share on other sites

You say nothing changed, but those B-values are whole integers with no decimal point and no trailing zeros. Your first post had the decimal point in it. Did you just hand edit those or did they post that way?

Why, exactly, are those values bad? Are they at the wrong location, rotation angle or will the machine not read them?

I'm hoping I can help you figure this out, but it may be over my head.....

Did you have any luck downloading the MP Post Documentation, by the way? It's quite confusing, but will help out a little at a time.

Link to comment
Share on other sites

index       : 0     #Use index positioning, 0 = Full Rotary, 1 = Index only

 

I only changed the above in my post, it was 0 full rotary and it post with a decimal but if it's 1 index only it has no decimal which I want but it puts it in the wrong location on some of them.

 

With the above setting to 1 it always posted my B value like so,

N160 G00 G90 G55 B0.
N170 G00 G90 X18.125 Y-3.875 S600 M03
N180 G43 H5 Z2. M08

 

I want it to be exactly the same just no decimal.

 

I did download that pdf and I'm currently reading it between programming jobs, a little over whelming at times but I am understanding more. The biggest problem is I learn it fix the problems and not touch it again for a good long time and forget what I've learned.

Thanks for the help, we'll figure this thing out sooner or later.

Link to comment
Share on other sites
index : 0 #Use index positioning, 0 = Full Rotary, 1 = Index only

 

I suggest putting the above switch back to where it was. Getting rid of the decimal point will be the easy part. Getting the "B" output where you want it in the NC code will be much harder than just getting rid of the decimal point. What post/version are you using?

Link to comment
Share on other sites

Keith that sounds like good advice.

 

To be honest I don't know how to use it, I've played with it twice but wasn't sure what I was doing. I am reading the pdf that was posted earlier in this thread and I see that they cover the debugger in it.

Link to comment
Share on other sites

Oh ya....

# Post Name           : MPMASTER-Hurco VMX50
# Product             : MILL
# Machine Name        : MACHINE
# Control Name        : CONTROL
# Description         : IHS MASTER GENERIC MILL G-CODE POST
# 4-axis/Axis subs.   : YES
# 5-axis              : NO
# Subprograms         : YES
# Executable          : MP v9.10
# Post Revision       : 9.1.03069

 

That's what I'm using.

Link to comment
Share on other sites

Find the section in your post labeled 'ptlchg$'

 

In that section, you will see a line that says 'pindex'

 

It should come before the line that has 'pwcs' or 'pfwcs' in it.

 

Now, do the same thing in section 'ptlchg0$'

 

It should look something like this:

 

pbld, n$, t$, "M06", e$

ptoolcomment

comment$

pindex

pcan1, pbld, *sgcode, "G40", *sgabsinc, pfwcs, "X0.", e$

pbld, pcout, e$

pbld, *sgcode, pfxout, pfyout, strcantext, e$

pbld, "G43", *tlngno$, pfzout, e$

 

Hope this helps a little.

Link to comment
Share on other sites

9.1? or are you using X4, X5? I don't believe V9 had debugger like X and above.

 

go to "MCAMX Control Panel Applet" found in start menu or control panel. Select post support, enable post debugger.

 

Now when you go to post code like normal you will see a little red bug in lower left corner. select that rather than post button. This will launch the debugger. You may want to select only a few ops to post out the more operations the longer it will take. once debugger is up and running select "run" (the play icon). this will get you started. you may need to sort your windows to see them better.

 

 

Link to comment
Share on other sites

I believe I've seen a training video on the debugger that's quite helpful. I'll try to locate it for you. They key is finding where the post is sending out the information for the B-axis moves and what string or variable it's using. Then you have to format it to output with no decimal, as a whole integer. Keith is right, though. I think changing the post to its virgin state and hand-editing would be best, for now.

Link to comment
Share on other sites

Yeah, too obvious for me. It's on the Mastercam.com website > Multimedia > Tutorial Videos. It's the first one on top. There's a few in it that show you different things and how parts of the Debugger work. Give that a look, when ya have time.

I know how frustrating it can be when you need to figure something out, but don't have "time" when there's a crap-load of work to get done!

Link to comment
Share on other sites

I went from this...

 

N200 G98 G83 X0. Y-12. Z0. R.1 Q.1 F3.8
N210 X0. Y-12. C30.
N220 X0. Y-12. C60.
N230 X0. Y-12. C90.
N240 X0. Y-12. C120.
N250 X0. Y-12. C150.

 

to this...

 

N200 G98 G83 X0. Y-12. Z0. R.1 Q.1 F3.8
N210 X0. Y-12. C30
N220 X0. Y-12. C60
N230 X0. Y-12. C90

 

by changing this...

 

fmt  C  11   cabs    	#C axis position

 

to this...

 

fmt  C  4   cabs    	#C axis position

 

I saw you already tried that but you saw no changes..........

Are you 100% certain you are editing the right post?

Find the psof postblock in the post and put this line in it (pbld, "alskdjf;alsjdf", e$)

 

psof$        	#Start of file for non-zero tool number
 	pbld, ";alskdjf;alsjdf", e$
 	ptravel
 	pwritbuf5
 	pcuttype
 	toolchng = one
 	if ntools$ = one,
   	[

 

whatever you put inside the quotes doesn't matter, you should see it up near the top of your posted code the next time you post something... here is what I get...

 

%
OT
( DNCID T )
( FILENAME C:\NEW_FP\COMMUNIC\DAEWOO1\T.NC)
( PROGCAT DAEWOO #1 )
(CUSTOMER - AGC)
(P/N = 5307175SK01)
(REV = N/C)
(A-1 OP # 70)
(MCX FILE  - \\T\)
(POSTED  - FEB-08-2011 08:55)
(T1   -  NO. 74 DRILL    	- H1   - D1   - D0.0225")
(VENDOR INFO: )
;alskdjf;alsjdf<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<this tells me for sure i am playing with the correct post.
(MAX PROGRAM DEPTH- Z4.)

 

 

also, you have to save the post file every time you make changes for them to take effect... any luck with the debugger?

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