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:

mpmaster g10 output!


Recommended Posts

Jason, I would have to see your postblock for your preloadwcs section or your variable formatting to see how they are buffering the cab$ (rotation value), but for the example above, you would exchange the "B0" with *cabs9 (or whatever variable traps rotation.

 

else, 
                       [ 
                       b9_pwcs = p_wcs - 6 
                       if use_g10 = 1, 
               [ 
               n$, "G90", "G10", "L20", "P", *b9_pwcs, "(""G54.1 P",*b9_pwcs,")", *b9_tox, *b9_toy, *b9_toz, *cabs9, e$ ##  WAS **********  "B0.", e$ <<<<---------HERE
               ] 
               if use_g10 = 2, 
               [ 
               n$, "G90", "G10", "L20", "P", *b9_pwcs, "(""G54.1 P",*b9_pwcs,")", *b9_tox, *b9_toy, *b9_toz, *srot_label, no_spc$, "0", e$ 
               ] 
                       ] 
       ] 
               ] 
       idx9 = idx9 + 1 
       rc9 = 1 
       ]

Link to comment
Share on other sites

Robert

 

I have put my post on the ftp server in the text and post files folder and called it "copy of mpmaster".

 

looked for the output for the rotary output but thinking i have been looking at this for too long and getting nowhere!!!

any help would be appreciated.

Link to comment
Share on other sites

Robert, tried post and is outputting only B90.0 or B270.0! where do you capture the real mcx b figure from as that is what i want on the G10 line!

getting the b figures right in rest of prog is fine as i have replaced Pfcout with "B0.0", "(MCX B OUTPUT = ", *cabs, ")" or something along those lines!

Link to comment
Share on other sites

Jason, I tried that post I put up on a file I have with multiple rotations, and they all came out properly in the G10 statements.

How are you setting up views? My defs have top=B0, not the front=B0 set up.

Also, the way you are resetting the cabs may be interfering..

But It didn't seem to affect my part.

 

Here is the posted code I get set up like above. Untouched out of MCX4 MU3 except the <<<<<<<-------HERE comments at the G10 to highlight

And the ****** to remove Customer name

Also, note that your post does not sort the G10 statements in order of offset, as It posted in the order I have the rotations in my toolpath: B0, B180, B90, B270

 

%
O5051 (1)
(MCX FILE  - R*****************\TESTPOST.MCX)
(PROGRAM   - 1.NC)
(DATE  	- APR-20-2011)
(TIME  	- 6:24 AM)
(T14  - TITEX .5313 3XD DRILL 140 DEG [2.36LOC] [2.5 EXT] - H14  - D14  - D0.5313")
(T16  - TITEX .4063 3XD DRILL 140 DEG [2.24LOC] [2.5 EXT] - H16  - D16  - D0.4063")
(T15  - TITEX .4687 3XD DRILL 140 DEG [2.36LOC] [2.5 EXT] - H15  - D15  - D0.4687")
(T17  - TITEX .3465 8XD DRILL 140 DEG [3.75 LOC] [4.25 EXT] - H17  - D17  - D0.3460")
(T18  - TITEX .5313 8XD DRILL 140 DEG [5.24 LOC] [5.75 EXT] - H18  - D18  - D0.5313")
(T19  - TITEX .4063 12XD DRILL 140 DEG [6.2 LOC] [7.0 EXT] - H19  - D19  - D0.4063")
(T20  - TITEX .5313 12XD DRILL 140 DEG [7.16 LOC] [7.5 EXT] - H20  - D20  - D0.5313")
(T21  - TITEX .4687 12XD DRILL 140 DEG [6.22 LOC] [2.5 EXT] - H21  - D21  - D0.4687")
(T22  - .545 RGH REAMER FACTORY LEAD [1.875 LOC] [7.0 EXT] - H22  - D22  - D0.5450")
(T23  - .4845 RGH REAMER FACTORY LEAD [1.437 LOC] [3.0 TOOL EXT] - H23  - D23  - D0.4845")
(T26  - .422 RGH REAMER FACTORY LEAD [1.437 LOC] [7.25 TOOL EXT] - H26  - D26  - D0.4220")
(T28  - .361 RGH REAMER FACTORY LEAD [1.437 LOC] [4.5 EXT] - H28  - D28  - D0.3610")
(T24  - .5625 FINISH REAMER FACTORY LEAD [1.875 LOC] [7.0 EXT] - H24  - D24  - D0.5625")
(T25  - .5000 FINISH REAMER FACTORY LEAD [1.437 LOC] [3.0 TOOL EXT] - H25  - D25  - D0.5000")
(T27  - .4375 FINISH REAMER FACTORY LEAD [1.437 LOC] [7.25 TOOL EXT] - H27  - D27  - D0.4375")
(T29  - .375 FINISH REAMER FACTORY LEAD [1.437 LOC] [4.5 EXT] - H29  - D29  - D0.3750")
G0 G17 G20 G40 G80 G90
G90 G10 L20 P1 ( G54.1 P1 ) X3.6175 Y4.6181 Z.26 B0. <<<<<<<<<-----------------HERE
G90 G10 L20 P2 ( G54.1 P2 ) X-3.6175 Y4.6181 Z-.26 B180. <<<<<<<<<-----------------HERE
G90 G10 L20 P3 ( G54.1 P3 ) X-.26 Y4.6181 Z3.6175 B90. <<<<<<<<<-----------------HERE
G90 G10 L20 P4 ( G54.1 P4 ) X.26 Y4.6181 Z-3.6175 B270. <<<<<<<<<-----------------HERE
G91 G30 Z0.
(PRE DRILL FOR .5625 HOLE - NEARSIDE LEFT)
N1 T14 M6 (TITEX .5313 3XD DRILL 140 DEG [2.36LOC] [2.5 EXT])
M11 (UNLOCK)
M08
M50
G0 G17 G90 G54.1 P1 B0.
M10 (LOCK)
X-13.588 Y6.256 S1921 M3
G43 Z9. H14 T16
G94
G98 G73 Z4.7093 R5.5 Q.1594 F9.22
G80
M09
M5
G91 G30 Z0.

Link to comment
Share on other sites

Robert,i have tried my file with multiple rotation(drilling holes around centreline of pallet) which i started on the front veiw(b0)and right=b90 etc.

this is posted code i get less resseting the cabs:

%

O0000 (T)

(PROGRAM - T.NC)

(DATE - APR-20-2011)

(TIME - 3:16 PM)

(T5 - 4MM SPOTDRILL - H5 - D5 - D5.500mm)

(T35 - 3.9MM DRILL - H35 - D35 - D3.900mm)

(T36 - 8 X 32 ROLL TAP - H36 - D36 - D4.100mm)

(T37 - 3.3MM DRILL - H37 - D37 - D3.300mm)

(T38 - 6 X 32 ROLL TAP - H38 - D38 - D3.800mm)

(T39 - 4.3MM DRILL - H39 - D39 - D4.300mm)

N5 G0 G17 G21 G40 G80 G90

N10 G90 G10 L2 P1 ( G54 ) X0. Y0. Z0. B90.

N15 G90 G10 L2 P2 ( G55 ) X0. Y0. Z0. B270.

N20 G90 G10 L2 P3 ( G56 ) X0. Y0. Z0. B270.

N25 G90 G10 L2 P4 ( G57 ) X0. Y0. Z0. B270.

N30 G90 G10 L2 P5 ( G58 ) X0. Y0. Z0. B270.

N35 G90 G10 L2 P6 ( G59 ) X0. Y0. Z0. B270.

N40 G90 G10 L20 P1 ( G54.1 P1 ) X0. Y0. Z0. B270.

N45 G90 G10 L20 P2 ( G54.1 P2 ) X0. Y0. Z0. B270.

N50 G90 G10 L20 P3 ( G54.1 P3 ) X0. Y0. Z0. B270.

N55 G90 G10 L20 P4 ( G54.1 P4 ) X0. Y0. Z0. B90.

N60 G90 G10 L20 P5 ( G54.1 P5 ) X0. Y0. Z0. B90.

N65 G91 G30 Z0.

N70 T5 M6 (4MM SPOTDRILL)

N75 M11 (UNLOCK)

N80 G0 G17 G90 G54 B0. X112.219 Y4.848 S6000 M3

N85 M10 (LOCK)

N90 G43 Z250. H5 M8 T35

N95 G94

N100 G98 G81 Z138.376 R142.376 F600.

N105 X45.544

N110 X-21.131

N115 G80

N120 M11 (UNLOCK)

N125 G55 B-45. X35.96 Y4.793

N130 M10 (LOCK)

N135 Z250.

N140 G98 G81 Z134.653 R138.653 F600.

N145 X10.56

N150 X-14.096

N155 G80

N160 M11 (UNLOCK)

N165 G56 B-88.5 X-5.338 Y4.763

N170 M10 (LOCK)

N175 Z250.

N180 G98 G81 Z164.526 R168.526 F600.

N185 X-94.746

N190 G80

N195 M11 (UNLOCK)

N200 G57 B-178.5 X142.142 Y4.762

N205 M10 (LOCK)

N210 Z250.

N215 G98 G81 Z102.461 R106.461 F600.

N220 G80

N225 M11 (UNLOCK)

N230 G58 B-178.711 X92.236 Y4.763

N235 M10 (LOCK)

N240 Z250.

N245 G98 G81 Z120.267 R124.267 F600.

N250 G80

N255 M11 (UNLOCK)

N260 G59 B-178.5 X51.972 Y4.763

 

this is what i was hopping for:

 

%

O3313(***********

(DRAWING NUMBER : **********DRILLING)

(ISSUE/REV NUMBER : CHECK)

 

G0G90G80G40G94G49G17G21

 

G10G90L2P1X-365.0Y-167.191Z-949.866B0.

G10G90L2P2X-365.0Y-167.191Z-949.866B-45.

G10G90L2P3X-365.0Y-167.191Z-949.866B-88.5

G10G90L2P4X-365.0Y-167.191Z-949.866B-178.5

G10G90L2P5X-365.0Y-167.191Z-949.866B-178.711

G10G90L2P6X-365.0Y-167.191Z-949.866B-178.5

G10G90L20P1X-365.0Y-167.191Z-949.866B-178.147

G10G90L20P2X-365.0Y-167.191Z-949.866B-176.697

G10G90L20P3X-365.0Y-167.191Z-949.866B-175.487

G10G90L20P4X-365.0Y-167.191Z-949.866B-180.

G10G90L20P5X-365.0Y-167.191Z-949.866B-270.

 

M1

 

M161(PALLET 1)

IF[#147NE1]THEN#3000=123(PALLET ERROR)

 

T5M6(4MM SPOTDRILL )

 

G0G90G54X112.219Y4.848S6000M3

M11

B0.( MASTERCAM B AXIS OUTPUT = B0.)

M10

G17

G43Z350.0H5M8

T35

G98G81Z138.376R142.376F600.

X45.544

X-21.131

G80

G17

G55X35.96Y4.793

M11

B0.0( MASTERCAM B AXIS OUTPUT = B-45.)

M10

Z350.0

G98G81Z134.653R138.653F600.

X10.56

X-14.096

G80

G17

G56X-5.338Y4.763

M11

B0.0( MASTERCAM B AXIS OUTPUT = B-88.5)

M10

Z350.0

G98G81Z164.526R168.526F600.

X-94.746

G80

G17

 

this is same file posted from x3 of which post has many problems!!!!

Link to comment
Share on other sites

I believe it is due to our different setups.

There are variables, m1$ thru m9$ that do the trig for the angles.

They set up the b9_cabs value to post the B angle in G10.

I don't have time to go thru, because I would have to set up a machine to front=B0 and time constraints.

 

You will want to go thu this matrix and get the correct combination to change two lines in the pwritbuf9 post block below that contain the m vector variables:

My values, m7$ and m9$ are for top=B0

Try m4$ and m6$ first

 

 

Here is the postblock:

pwritbuf9 # Write the workoffset and origins to buffer 9 - called from pwrtt$ 
   	#--------------- Initialize variables 
   	size9 = rbuf(9,0) 
   	rc9 = 1 
   	new_x = 0 
   	new_y = 0 
   	new_z = 0 
   	new_workofs = 0 

   	while rc9 <= size9, # Determine if current workoffset/origin is unique 
   	[ 
   	b9_tox = rbuf(9,rc9) 
   	b9_cabs = atan2 (m7$, m9$) ########### HERE
   	if b9_tox <> tox$, new_x = new_x + 1 
   	if b9_toy <> toy$, new_y = new_y + 1 
   	if b9_toz <> toz$, new_z = new_z + 1 
   	if b9_workofs <> workofs$, new_workofs = new_workofs + 1 
   	] 

   	if new_x = size9 | new_y = size9 | new_z = size9 | new_workofs = size9, # If current workoffset/origin is unique, write to buffer 9 
   	[ 
   	b9_tox = tox$ 
   	b9_toy = toy$ 
   	b9_toz = toz$ 
   	b9_workofs = workofs$ 
   	b9_cabs = atan2 (m7$, m9$)########### HERE

   	b9_tox = wbuf(9,wc9) 
   	] 

 

 

 

 

Here is the matrix:

 

m1-m9.jpg

Link to comment
Share on other sites
  • 2 weeks later...
  • 8 months later...

Robert,

 

this is what i get, please help

 

G90 G10 L2 P1 X0. Y21. Z-25.138 B0 (G54 B0.)

G90 G10 L2 P1 X0. Y21. Z-25.138 B0 (G B0.)

G90 G10 L2 P1 X0. Y21. Z-25.138 B0 (G B0.)

G90 G10 L2 P2 X0. Y6. Z-25.138 B0 (G55 B0.)

G90 G10 L2 P2 X0. Y6. Z-25.138 B0 (G B0.)

G90 G10 L2 P2 X0. Y6. Z-25.138 B0 (G B0.)

G90 G10 L2 P3 X0. Y21. Z-25.138 B0 (G56 B90.)

G90 G10 L2 P3 X0. Y21. Z-25.138 B0 (G B90.)

G90 G10 L2 P3 X0. Y21. Z-25.138 B0 (G B90.)

G90 G10 L2 P4 X0. Y6. Z-25.138 B0 (G57 B90.)

G90 G10 L2 P4 X0. Y6. Z-25.138 B0 (G B90.)

G90 G10 L2 P4 X0. Y6. Z-25.138 B0 (G B90.)

G90 G10 L2 P5 X0. Y21. Z-25.138 B0 (G58 B180.)

G90 G10 L2 P5 X0. Y21. Z-25.138 B0 (G B180.)

G90 G10 L2 P5 X0. Y21. Z-25.138 B0 (G B180.)

G90 G10 L2 P6 X0. Y6. Z-25.138 B0 (G59 B180.)

G90 G10 L2 P6 X0. Y6. Z-25.138 B0 (G B180.)

G90 G10 L2 P6 X0. Y6. Z-25.138 B0 (G B180.)

G90 G10 L20 P1 X0. Y21. Z-25.138 B0 (G54.1 P1 B270.)

G90 G10 L20 P1 X0. Y21. Z-25.138 B0 (G54.1 P1 B270.)

G90 G10 L20 P1 X0. Y21. Z-25.138 B0 (G54.1 P1 B270.)

G90 G10 L20 P2 X0. Y6. Z-25.138 B0 (G54.1 P2 B270.)

G90 G10 L20 P2 X0. Y6. Z-25.138 B0 (G54.1 P2 B270.)

G90 G10 L20 P2 X0. Y6. Z-25.138 B0 (G54.1 P2 B270.)

M1

 

 

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

# Buffer 9 Read / Write Routines - G10 coordinate list

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

pwritbuf9 # Write the workoffset and origins to buffer 9 - called from pwrtt$

#--------------- Initialize variables

size9 = rbuf(9,0)

rc9 = 1

new_x = 0

new_y = 0

new_z = 0

new_workofs = 0

 

while rc9 <= size9, # Determine if current workoffset/origin is unique

[

b9_tox = rbuf(9,rc9)

b9_cabs = atan2 (m7$, m1$)

if b9_tox <> tox$, new_x = new_x + 1

if b9_toy <> toy$, new_y = new_y + 1

if b9_toz <> toz$, new_z = new_z + 1

if b9_workofs <> workofs$, new_workofs = new_workofs + 1

]

 

if new_x = size9 | new_y = size9 | new_z = size9 | new_workofs = size9, # If current workoffset/origin is unique, write to buffer 9

[

b9_tox = tox$

b9_toy = toy$

b9_toz = toz$ -29.138

b9_workofs = workofs$

b9_cabs = atan2 (m7$, m1$)

b9_tox = wbuf(9,wc9)

]

 

 

preadbuf9 # Write the G10 workoffset list - called from psof

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

# Determine largest workofs output - b9_test = largest workofs used

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

#--------------- Initialize variables

size9 = rbuf(9,0)

rc9 = 1

wc9 = 1

b9_test = -1

 

while rc9 <= size9,

[

b9_tox = rbuf(9,rc9)

if b9_workofs > b9_test, b9_test = b9_workofs

]

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

# Ouptut the G10 list in order

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

#--------------- Initialize variables

size9 = rbuf(9,0)

rc9 = 1

wc9 = 1

idx9 = 0

b9_tox = 0

b9_toy = 0

b9_toz = 0

b9_workofs = 0

 

while idx9 <= b9_test,

[

while rc9 <= size9,

[

b9_tox = rbuf(9,rc9)

if b9_workofs = idx9,

[

p_wcs = b9_workofs + 1

if b9_workofs < 6,

[

b9_pwcs = p_wcs + 53

if use_g10 = 1,

[

n$, "G90", "G10", "L2", *p_wcs, *b9_tox, *b9_toy, *b9_toz, "B0.", "(G", b9_pwcs, *b9_cabs, no_spc$, ")", e$

]

if use_g10 = 2,

[

n$, "G90", "G10", "L2", *p_wcs, *b9_tox, *b9_toy, *b9_toz, *srot_label, no_spc$, "0", "(G", b9_pwcs, *b9_cabs, no_spc$, ")", e$

]

]

else,

[

b9_pwcs = p_wcs - 6

if use_g10 = 1,

[

n$, "G90", "G10", "L20 P", *b9_pwcs, *b9_tox, *b9_toy, *b9_toz, "B0.", "(G54.1 P", *b9_pwcs, *b9_cabs, no_spc$, ")", e$

]

if use_g10 = 2,

[

n$, "G90", "G10", "L20 P", *b9_pwcs, *b9_tox, *b9_toy, *b9_toz, *srot_label, no_spc$, "0", "(G54.1 P", *b9_pwcs, *b9_cabs, no_spc$, ")", e$

]

]

]

]

idx9 = idx9 + 1

rc9 = 1

]

"M1", e$

Link to comment
Share on other sites
  • 3 months later...
Guest ick

You have setup guys? :unsure:

We have guys that will enter anything but the right numbers.

That is why I do the calcs inside the post.

As long as fixture stackups are held, these G10 numbers are "good to go".

I give them a dimension or two to prove, but they change NOTHING.

Link to comment
Share on other sites
  • 1 month later...

Hi, I tried your way and it came aout only the

 

(***********************************************)

(*********** WORK COORDINATES START **********)

G11

 

I hope I"m not asking for too much and if I do I'm appologize for it.

Is it possible that you can post the entire post processor for everyone

us can understand it easier of which where these clauses to be input at

certain location instead of guessing?

 

 

 

Best regards,

Steven.L

 

#######################

Link to comment
Share on other sites
  • 2 weeks later...
  • 3 weeks later...

Where do you put this postblock in which section? I"m confused can you be more pacific?

 

 

All of my programs output G10 values. I use buffers to sort and output them

The end up like so in the program:

(***********************************************)

(*********** WORK COORDINATES START **********)

G90 G10 L20 P1 X-5.56 Y-12.3871 Z2.8 B0. ( B0. )

G90 G10 L20 P2 X-2.8 Y-12.3871 Z-5.56 B0. ( B90. )

G90 G10 L20 P3 X5.56 Y-12.3871 Z-2.8 B0. ( B180. )

G90 G10 L20 P4 X2.8 Y-12.3871 Z5.56 B0. ( B270. )

G90 G10 L20 P5 X-1.9516 Y-12.3871 Z5.9114 B0. ( B315. )

G90 G10 L20 P6 X5.9114 Y-12.3871 Z1.9516 B0. ( B225. )

 

G11

(*********** WORK COORDINATES END **********)

 

 

Here are the post blocks to get it.

A preloadwcs in psof starts it...

 

 

 

# --------------------------------------------------------------------------
# Buffer 6 - G10 work offset preloads write, sort, read, output routines
# --------------------------------------------------------------------------
#This section is designed to write the work offsets preloads to a buffer file, then sort them
#into accesding order and eventually output the preloads to the NC output files. These sections
#only get called if the use_g10wcs flag is on.
# Work offset preload buffer

test : 0 	#Result variable
cnt1 : 0 	#Loop counter number 1 for sort
cnt2 : 0 	#Loop counter number 2 for sort
wc6	: 1 	#Initial count for write buffer 6	
rc6	: 1 	#Initial count for read buffer 6
size6 : 0 	#Buffer 6 size


tox3 = tox6 	#Figures X Offset from machine zero
toy3 = toy6 - 25.5905 #Figures Y Offset from machine zero
toz3 = toz6 	#Figures Z Offset from machine zero

fmt W 4 workofs6 #Buffer 6
fmt P 4 pofs6 	#Buffer 6
fmt X 2 tox6 	#Buffer 6
fmt Y 2 toy6 	#Buffer 6
fmt Z 2 toz6 	#Buffer 6
fmt B 15 cabs6 	#Buffer 6
fmt X 2 tox3 	#Buffer 2 X Offset from machine zero
fmt Y 2 toy3 	#Buffer 2 Y Offset from machine zero
fmt Z 2 toz3 	#Buffer 2 Z Offset from machine zero


workofsn : 0 #Temporary data for swap in buffer2
pofsn	: 0 #Temporary data for swap in buffer2
toxn 	: 0 #Temporary data for swap in buffer2
toyn 	: 0 #Temporary data for swap in buffer2
tozn 	: 0 #Temporary data for swap in buffer2
coutn	: 0 #Temporary data for swap in buffer2

fbuf 6 0 6 0 0	#Buffer 6

# --------------------------------------------------------------------------
preloadwcs #Output G10 preloads from Buffer6
#This postblock is called from the PSOF postblock and is designed to output the WCS
#preloads to the beggining of the NC output file and only if the use_g10wcs flag is
#active.
pg10sort #Sort preload buffer in accesnding order before output

#read preload buffer and output preloads 	
rc6 = 1
size6 = rbuf (six, 0)
#"(***********************************************)", e$
*e$
"(***********************************************)", e$
"(*********** WORK COORDINATES START **********)", e$
while rc6 <= size6,
[
workofs6 = rbuf (six, rc6)
#"workofs6 = " *workofs6, e$ #debug
#"*pofs6 = ", *pofs6, e$ #debug

if workofs6 < 6,
	[
	pofs6 = pofs6 + 6
	pbld, n$, *sgabsinc, "G10", "L2", *pofs6, *tox3, *toy3, *toz3,
"(", *cabs6, ")" e$ #Offsets G54 - G59
	]
else, pbld, n$, *sgabsinc, "G10", "L20", *pofs6, *tox3, *toy3, *toz3, "B0.", "(", *cabs6, ")", e$
#Extended offsets g54.1 P1 - P48
]
*e$
"G11", e$

"(*********** WORK COORDINATES END **********)", e$

pg10sort 	#Sort preload work offsets in accending order
#This postblock is designed to sort the wcs preload buffer in accending order. This
#postblock is called
#from the preloadwcs postblock. DO NOT MODIFY this post block unless you are
#absolutely sure of what you
#are doing.
rc6 = 1
size6 = rbuf (six, 0)

cnt1 = 1 #intialize counters
cnt2 = 1 #intialize counters

while cnt1 < size6, 	#loop 1 - loop 1 time less than the size of the buffer
[
size6 = rbuf (six, 0)
while cnt2 <= size6 - cnt1, 	#loop 2 - loop 1 less every time
[
rc6 = cnt2 	#set buffer read counter to current loop counter value
#(Current record to read)
workofs6 = rbuf (six, rc6) 	#Read current and next record from buffer
workofsn = rbuf (six, rc6)
if workofsn < workofs6, 	#Check and swap records if next offset is less
#than current
[
wc6 = cnt2 	#initalize write counter to current loop counter value
#(current record to write)	
workofsn = wbuf (six, wc6)	#Swap records by writing back into buffer.
#Next into current, current into next
workofs6 = wbuf (six, wc6)
]
cnt2 = cnt2 + 1 	#increment loop counter 2
]
cnt2 = 1 	#Reset loop counter 2 to start at record 1
cnt1 = cnt1 + 1 	#increment loop counter 1
]

pg10wcs_writbuf 	#Buffer 6 works offset preload buffer
#This postblock is called from pwrtt and only if the use_g10wcs flag is active.
#This postblock is designed to write out the WCS and tool origin information to the
#preload buffer. The preload buffer will be scanned and checked to see if the WCS was
#already
#written to the buffer, if not the wcs is written to the buffer.
test = 0
size6 = rbuf(six, 0) #Get size of buffer

#read buffer and compare current workofs value with one read from buffer.
#If current workofs matches one already in buffer set flag to not process.

while rc6 <= size6,
[
workofs6 = rbuf (six, rc6)
if workofs$ = workofs6, test = 1
]

#If workofs doesn't match one in the buffer, write it to the buffer
# with the P value and tool origin.	

if test = 0,
[
cabs6 = atan2 (m7$, m9$)
workofs6 = workofs$
pofs6 = workofs$ - 53
if workofs6 < 54, pofs6 = workofs$ -5 #Extened offsets P1 - P48
tox6 = tox$
toy6 = toy$
toz6 = toz$
#cabs6 = cout
workofs6 = wbuf (six, wc6)
]
rc6 = 1	#reset read counter for next pass 	

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