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:

Counting points in CHAINING section


Recommended Posts

Hello everyone,
   I've been editing programs from the x-programmers and what had happened is he did not input any OPERATION COMMENT at all.  Is there away that I can call out the TOTAL NUMBER OF POINTS in DRILL toolpath into post?

 

PS: Please see image for more detail.

 

Thank you for all you guys help,
       S.Luong

counting points.png

Link to comment
Share on other sites
On 3/21/2018 at 11:06 AM, Newbeeee™ said:

Interested to know what you're thinking on this - ie why?

Hi Newbeee,
   Most of programmers make mistakes on small things and they are good on the entire programming skill.  Like sometimes they wanted to TAP 2x holes, the typed the note is right but they mistaken programmed only one of the holes.  Sometimes SPOT and DRILL 1x hole but TAP 2x, this causing braking the tap.

  Most likely the setup man can catch but some are not very good to catch other's mistakes.  Therefore, the programmer can go through his program without spending so much time on it, the post will let him know.  Please see my code below here, for better explanation.

============= G-CODES==================

N52( .1250,#4 CNT DRILL, HSS,)
(2FLTS .125LOC, .500RLF, .50STO)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19
G28 Y0. 
G28 X0.
T52 M6(SPOT 1X M3x.5 STI, 3MM LONG, CUT#107) ===================> It says "1X" here
M22(UNLOCK PALLET)
G90 G56 B0. S1500 M3
M21(LOCK PALLET)
X2.017 Y.375(2X SPOTS) ====================> It checks 2x here
G43 H52 Z1. T66 M8(DOC= Z-.015)
Z.125
G99 G81 Z-.015 R.125 F1.
X1.083
G80
Z1.
M9
G91 G28 Z0. M5
G28 Y0.
G28 X0.
M1
(*)
N66( .1200,#31 STUB DRILL, HSS, 118.DEGS,)
(2FLTS 1.000LOC, 1.25STO)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19
G28 Y0. 
G28 X0.
T66 M6(ROUGH DRILLINS M3x.5 STI ROLL TAP, CUT#108)
M22(UNLOCK PALLET)
G90 G56 B0. S1339 M3
M21(LOCK PALLET)
X2.017 Y.375(2X HOLES) ====================> It checks 2x here
(2X SPOTS)
G43 H66 Z1. T64 M8(DOC= Z-.15)
Z.125
(8 PECKS, .0989 FLAT DEPTH)
G99 G83 Z-.15 R.125 Q.02 F2.
X1.083
G80
Z1.
M9
G91 G28 Z0. M5
G28 Y0.
G28 X0.
M1
(*)
N64( .0058,M3x.5 STI ROLL TAP, FLAT BOTTOM, HSS,)
(1FLT .044LOC, .044RLF, .05STO)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19
G28 Y0. 
G28 X0.
T64 M6(TAP 2X M3x.5 STI ROLL TAP, CUT#110)
M22(UNLOCK PALLET)
G90 G56 B0. S254 M3
(RIDGID TAP)
M21(LOCK PALLET)
X2.017 Y.375(2X HOLES) ====================> It checks 2x here
(2X SPOTS)
G43 H64 Z1. T52 M8(DOC= Z-.1)
Z.125
M80 S254
G99 G84 Z-.1 R.125 F5.
X1.083
G80
Z1.
M9
G91 G28 Z0. M5
G28 Y0.
G28 X0.
M1
T52 M6(FIRST PROGRAMMED TOOL)
M30(1,619CHARS - 1.62KB)
%

  • Thanks 1
Link to comment
Share on other sites
On 3/22/2018 at 6:52 AM, jeff.D said:

Yes, the number of entities in an operation is stored in parameter 15083.

Below is an example of how to retrieve that number for the current operation using opinfo ;


points = opinfo(15083, 0)

 

 

Hi Jeff,
   Appreciate your input and I did something similar, not sure which is best.  Would you please explain more?



 

#Region pTotalHoles
#Region pTotalHoles
pTotalHoles
    if TotalHoles = 1 & (tool_typ$ > 2 & tool_typ$ < 10 | tool_typ$ = 20 | tool_typ$ = 22 | tool_op$ = 106 | tool_op$ = 18 | tool_op$ = 100), no_spc$, "(", *TotalHoles, no_spc$, "X HOLE)", e$
    if TotalHoles > 1 & (tool_typ$ > 2 & tool_typ$ < 10 | tool_typ$ = 20 | tool_typ$ = 22 | tool_op$ = 106 | tool_op$ = 18 | tool_op$ = 100), no_spc$, "(", *TotalHoles, no_spc$, "X HOLES)", e$

    if TotalHoles = 1 & (drillcyc$ = 0 | drillcyc$ = 1) & (tool_typ$ = 1 | tool_typ$ = 2 | tool_op$ = 2), no_spc$, "(", *TotalHoles, no_spc$, "X SPOT)", e$
    if TotalHoles > 1 & (drillcyc$ = 0 | drillcyc$ = 1) & (tool_typ$ = 1 | tool_typ$ = 2 | tool_op$ = 2), no_spc$, "(", *TotalHoles, no_spc$, "X SPOTS)", e$
    TotalHoles = 0
	!TotalHoles
#EndRegion pTotalHoles
pparameter$ # Run parameter table
           if prmcode$ = 15083, TotalHoles = rpar(sparameter$, 1)


TotalHoles: 0
fmt "" 4 TotalHoles


#Region Tool change common blocks
ptlchg_com      #Tool change common blocks
    pTotalHoles

ptlchg0$         #Call from NCI null tool change (tool number repeats)
    pTotalHoles
Link to comment
Share on other sites
3 hours ago, PcRobotic said:

Hi Newbeee,
   Most of programmers make mistakes on small things and they are good on the entire programming skill.  Like sometimes they wanted to TAP 2x holes, the typed the note is right but they mistaken programmed only one of the holes.  Sometimes SPOT and DRILL 1x hole but TAP 2x, this causing braking the tap.

  Most likely the setup man can catch but some are not very good to catch other's mistakes.  Therefore, the programmer can go through his program without spending so much time on it, the post will let him know.  Please see my code below here, for better explanation.
 

 

Hmmmmm, I know we all work differently, but you are verifying the full program and comparing to the solid - Yes?

Stuff like this will easily be seen?

IMO...

Link to comment
Share on other sites
33 minutes ago, Newbeeee™ said:

Hmmmmm, I know we all work differently, but you are verifying the full program and comparing to the solid - Yes?

Stuff like this will easily be seen?

IMO...

 

Most of us do "verify" and sometimes we just missed it because the DRILL and the TAP is defined as the same diameter, we can't see the different.  The only 100% sure is to look at the G-CODE as I presented the previous post.

Link to comment
Share on other sites
17 minutes ago, PcRobotic said:

DRILL and the TAP is defined as the same diameter,

you're doing it wrong.:lol:

if you model to the minor, a proper tap dia should show red in verify where a drill will show green.

but by all means add some double check function as you desire. Looking in the operations manager and comparing point counts between drilling and tapping will do the same.

  • Thanks 1
  • Like 1
Link to comment
Share on other sites
47 minutes ago, mkd said:

you're doing it wrong.:lol:

if you model to the minor, a proper tap dia should show red in verify where a drill will show green.

but by all means add some double check function as you desire. Looking in the operations manager and comparing point counts between drilling and tapping will do the same.

Thank you for your suggestion, I'll look into that.

Link to comment
Share on other sites
  • 2 weeks later...
On 3/29/2018 at 10:37 AM, mkd said:

you're doing it wrong.:lol:

if you model to the minor, a proper tap dia should show red in verify where a drill will show green.

but by all means add some double check function as you desire. Looking in the operations manager and comparing point counts between drilling and tapping will do the same.

 

Hi MKD,
   I am having more than 3725 HOLES to drill, sometimes window select will miss couple holes and If I don't make the post spits out the points then I may scrap the part.

   I understand the built in SIMULATION and our part is so many features of which they make computer freezes most of the time. We only "DARE" to use the BACKPLOT.  Your suggest if fully right, in my case we have no choice but only BACKPLOT and make the post counts points for us.


Thank you for your valuable idea,
    S.Luong

Link to comment
Share on other sites
44 minutes ago, PcRobotic said:

 

Hi MKD,
   I am having more than 3725 HOLES to drill, sometimes window select will miss couple holes and If I don't make the post spits out the points then I may scrap the part.

   I understand the built in SIMULATION and our part is so many features of which they make computer freezes most of the time. We only "DARE" to use the BACKPLOT.  Your suggest if fully right, in my case we have no choice but only BACKPLOT and make the post counts points for us.


Thank you for your valuable idea,
    S.Luong

IT sounds like you've spent some time experimenting.:respect:

Have you tried to verify using machine simulation? You now have a choice between Backplot/verify/simulation.

You can get better performance with it by turning off the machine.

 but there is no reason modern hardware should freeze up. If so, upgrade; it's mission critical.

 

  • Like 1
Link to comment
Share on other sites
On 3/29/2018 at 9:30 AM, PcRobotic said:

 

Hi Jeff,
   Appreciate your input and I did something similar, not sure which is best.  Would you please explain more?



 


#Region pTotalHoles

#Region pTotalHoles
pTotalHoles
    if TotalHoles = 1 & (tool_typ$ > 2 & tool_typ$ < 10 | tool_typ$ = 20 | tool_typ$ = 22 | tool_op$ = 106 | tool_op$ = 18 | tool_op$ = 100), no_spc$, "(", *TotalHoles, no_spc$, "X HOLE)", e$
    if TotalHoles > 1 & (tool_typ$ > 2 & tool_typ$ < 10 | tool_typ$ = 20 | tool_typ$ = 22 | tool_op$ = 106 | tool_op$ = 18 | tool_op$ = 100), no_spc$, "(", *TotalHoles, no_spc$, "X HOLES)", e$

    if TotalHoles = 1 & (drillcyc$ = 0 | drillcyc$ = 1) & (tool_typ$ = 1 | tool_typ$ = 2 | tool_op$ = 2), no_spc$, "(", *TotalHoles, no_spc$, "X SPOT)", e$
    if TotalHoles > 1 & (drillcyc$ = 0 | drillcyc$ = 1) & (tool_typ$ = 1 | tool_typ$ = 2 | tool_op$ = 2), no_spc$, "(", *TotalHoles, no_spc$, "X SPOTS)", e$
    TotalHoles = 0
	!TotalHoles
#EndRegion pTotalHoles

pparameter$ # Run parameter table
           if prmcode$ = 15083, TotalHoles = rpar(sparameter$, 1)



TotalHoles: 0
fmt "" 4 TotalHoles



#Region Tool change common blocks
ptlchg_com      #Tool change common blocks
    pTotalHoles

ptlchg0$         #Call from NCI null tool change (tool number repeats)
    pTotalHoles

If that's the only thing in pparameter$ you're introducing quite a bit of overhead.  You can simply add the following line to pTotalHoles;

pTotalholes
     TotalHoles = opinfo(15083, 0) #Get the number of points in the current op.

You can also loop through the posted ops with opinfo to build a table of selected points at the top of your file.

  • Haha 1
Link to comment
Share on other sites
On 4/10/2018 at 9:19 AM, mkd said:

IT sounds like you've spent some time experimenting.:respect:

Have you tried to verify using machine simulation? You now have a choice between Backplot/verify/simulation.

You can get better performance with it by turning off the machine.

 but there is no reason modern hardware should freeze up. If so, upgrade; it's mission critical.

 

I have tried them all, and the issue is the company won't upgrade the computer at all.  We have to keep our job and we have to do whatever it takes to complete the job. 

 

Link to comment
Share on other sites

So Plan B with your verification.

How about post your code, then run it through NCPlot (which is a VERY affordable backplotter) and save the output as a dxf file.

Change the points to say colour red, and import that into your mastercam component file as an overlay and see if all is well?

I can't help thinking that this is all a load of FAFF though...

  • Thanks 1
Link to comment
Share on other sites
4 hours ago, PcRobotic said:

I have tried them all, and the issue is the company won't upgrade the computer at all.  We have to keep our job and we have to do whatever it takes to complete the job. 

 

i had a boss complain i was working off my personal laptop.

 Didn't take long at all to upgrade that POS shop computer when labor/data/His $$$ was visibly on the line.

  • Haha 1
Link to comment
Share on other sites
  • 4 weeks later...
On 4/11/2018 at 2:56 PM, PcRobotic said:

I have tried them all, and the issue is the company won't upgrade the computer at all.  We have to keep our job and we have to do whatever it takes to complete the job. 

 

i can see why your shop doesn't want to upgrade computers. you find workarounds for your problems. 

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