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:

POINT operation


Recommended Posts

Hello everyone,

   I have CNC equipment does not like M5 when S is 0.

 

   Suppose I use POINT function (ToolPath ====> POINT), and the codes are:

 

N16(.6220, PIN STOP, CB,)
(2FLTS .250LOC, 2.00LOH)
G0 G17 G40 G49 G80 G90
G53 Z0. M19
T16 M6(PIN STOP WITH RAPID MOVEMENT, CUT#25)
G90 G58 X.621 Y-.2125
G43 H16 Z-.25 T14(DOC= Z-.25)
G90 X.3105
M0(AGAINST STOCK TO PIN STOP HERE)
X.621
G90 G53 Z0. M5 ===================> NO NEED M5 if S = 0
G53 Y0.
G58 X0.

M1

 

 

  I checked POINT function is called as TOOL_OP$ = 19 and I tried as [if tool_op$ = 19, "", else *sm05].  However, it didn't work.

 

  I also tried, [if spindle =0, "", else, *sm05]  AND..... it didn't work.  

 

 

  Please help, thank you.

  • Like 1
Link to comment
Share on other sites

Hello everyone,

   I have CNC equipment does not like M5 when S is 0.

 

   Suppose I use POINT function (ToolPath ====> POINT), and the codes are:

 

N16(.6220, PIN STOP, CB,)
(2FLTS .250LOC, 2.00LOH)
G0 G17 G40 G49 G80 G90
G53 Z0. M19
T16 M6(PIN STOP WITH RAPID MOVEMENT, CUT#25)
G90 G58 X.621 Y-.2125
G43 H16 Z-.25 T14(DOC= Z-.25)
G90 X.3105
M0(AGAINST STOCK TO PIN STOP HERE)
X.621
G90 G53 Z0. M5 ===================> NO NEED M5 if S = 0
G53 Y0.
G58 X0.

M1

 

 

  I checked POINT function is called as TOOL_OP$ = 19 and I tried as [if tool_op$ = 19, "", else *sm05].  However, it didn't work.

 

  I also tried, [if spindle =0, "", else, *sm05]  AND..... it didn't work.  

 

 

  Please help, thank you.

 

Where did you try them? That makes all the difference in how it is going to work. Have you gotten into the habit of using the debugger in run mode yet so you can track down each line of the post and what it is doing? Need to track down a specific section like this then use the run not the Run Turbo mode on the debugger.

  • Like 1
Link to comment
Share on other sites

Where did you try them? That makes all the difference in how it is going to work. Have you gotten into the habit of using the debugger in run mode yet so you can track down each line of the post and what it is doing? Need to track down a specific section like this then use the run not the Run Turbo mode on the debugger.

Hi 5th Axis Consulting,

   Thank you for your respond and I'm apologize for being misplace of explaining things.

 

 

Thank you for your help.

#Launch HTML.set during postinglaunch_set : 0           # Autorun .SET Setup Sheet Template [0=No,1=Yes]sset     : "HTML.SET"      # Name of the .SET Setup Sheet template file to be usedsdll     : ""              # Path/Name of the MP.DLL to be calledspath_in : ""                 # Will be the "path\name" of the NCI input filespath_out : ""                # Will be the "path\name" of the DOC output filespath_set : ""                # Will be the "path\name" of the .SET filesparams : ""                  # Will be the command parameter line passed to the DLLsextdoc  : ".DOC"          # .SET file extensionsspace   : " "             # Contains a SPACE characterssq      : "'"             # Contains a Single Quote charactersdq      : '"'             # Contains a Double Quote characterspoint_stop  : ""# M0 Pin Stop Here ===================================> DEFINED HERE

pncoutput #Movement output

      if spoint_stop <> snull,        [        pbld, no_spc$, *spoint_stop, no_spc$ , "(AGAINST STOCK TO PIN STOP HERE)", e$        spoint_stop = snull        ]
pcant_out       #Canned text - build the string for output

                    [

          if tool_op$ = 19 & can1_flg, spoint_stop = sm00 # M0 Pin Stop Here          else, strcantext = strcantext + sm00          ]
pretract        #End of tool path, toolchange

            pbld, no_spc$, [if gcode$ = 1, sgfeed], [if mi7$ > 1, "G0"], "G90 G53 Z0.", [if speed <> zero, sm05], e$ ===================================> DEFINED HERE

      [if gcode$ = 1, feed], sccomp, psub_end_mny, e$
Link to comment
Share on other sites

Have you tried zero instead of 0? I have seen instances where the MP will not work correctly with a post is 0 is used, but will if the word zero is used. Have you tried that approach yet?

 

 

 

Hi 5th Axix Consulting,

   I have tried these and none of them worked, do you know what I've done wrong?

 

Thank you for your help.

#Custom Defined Variables
spindle: 0pfspindleout: 0spindleout: 0
    pbld, no_spc$, [if gcode$ = 1, sgfeed], [if mi7$ > 1, "G0"], "G90 G53 Z0.", [if spindleout > zero, sm05], e$  ===========> spindleout > zero

        pbld, no_spc$, [if gcode$ = 1, sgfeed], [if mi7$ > 1, "G0"], "G90 G53 Z0.", [if speed> zero, sm05], e$  ===========> speed > zero

 

       pbld, no_spc$, [if gcode$ = 1, sgfeed], [if mi7$ > 1, "G0"], "G90 G53 Z0.", [if pfspindleout> zero, sm05], e$  ===========> pfspindleout> zero

Link to comment
Share on other sites

I am just guessing here, but I think it is likely that the variables speed and/or spindleout is simply not defined when you are in the pretract block

 

If that is indeed the case.. then a simple fix would be to create a new variable that looks at speed where it is actually used in pspindleout and pfspindleout and sets a flag to use later ..

 

I am thinking you create a variable like m5reqd - this will be a toggle to either use or not use m5

 

m5reqd : 0 # Flag

 

then in the two postblocks.. you do this..

 

pspindleout     #Spindle speed and M code output   

      if (speed > zero), m5reqd = 1

      else, m5reqd = 0

      if not((opcode$ = 3 | opcode$ = 16) & nextdc$ = 3 & rigid_tap), speed, spindle

 

 

pfspindleout     #Spindle speed and M code output forced   

      if (speed > zero), m5reqd = 1

      else, m5reqd = 0

      if not((opcode$ = 3 | opcode$ = 16) & nextdc$ = 3 & rigid_tap), *speed, *spindle

 

 

Now you should have a variable m5reqd that is set to 1 if an m5 is nesc and 0 otherwise

 

So now in your pretract .. you can test for the value of m5reqd rather than checking against speed which is not initialized in pretract..

 

Hope this helps.. as I said .. this was based on an educated guess that speed just isn't initialized in pretract.. also.. I haven't tested this..

  • Like 1
Link to comment
Share on other sites

I am just guessing here, but I think it is likely that the variables speed and/or spindleout is simply not defined when you are in the pretract block

 

If that is indeed the case.. then a simple fix would be to create a new variable that looks at speed where it is actually used in pspindleout and pfspindleout and sets a flag to use later ..

 

I am thinking you create a variable like m5reqd - this will be a toggle to either use or not use m5

 

m5reqd : 0 # Flag

 

then in the two postblocks.. you do this..

 

pspindleout     #Spindle speed and M code output   

      if (speed > zero), m5reqd = 1

      else, m5reqd = 0

      if not((opcode$ = 3 | opcode$ = 16) & nextdc$ = 3 & rigid_tap), speed, spindle

 

 

pfspindleout     #Spindle speed and M code output forced   

      if (speed > zero), m5reqd = 1

      else, m5reqd = 0

      if not((opcode$ = 3 | opcode$ = 16) & nextdc$ = 3 & rigid_tap), *speed, *spindle

 

 

Now you should have a variable m5reqd that is set to 1 if an m5 is nesc and 0 otherwise

 

So now in your pretract .. you can test for the value of m5reqd rather than checking against speed which is not initialized in pretract..

 

Hope this helps.. as I said .. this was based on an educated guess that speed just isn't initialized in pretract.. also.. I haven't tested this..

 

 

Hi DJStedMan,

   Thank you for your respond and I tried it worked THANK YOU.....:

# --------------------------------------------------------------------------# Common User-defined Variable Initializations (not switches!)# --------------------------------------------------------------------------

m5reqd : 0 # Flag for M5

pspindleout     #Spindle speed and M code output          if (speed > zero), m5reqd = 1      else, m5reqd = 0      if not((opcode$ = 3 | opcode$ = 16) & nextdc$ = 3 & rigid_tap), speed, spindlepfspindleout     #Spindle speed and M code output forced       if (speed > zero), m5reqd = 1      else, m5reqd = 0         if not((opcode$ = 3 | opcode$ = 16) & nextdc$ = 3 & rigid_tap) & fmtrnd(speed) <> 0, *speed, *spindle
pretract        #End of tool path, toolchange

pbld, no_spc$, [if gcode$ = 1, sgfeed], [if mi7$ > 1, "G0"], "G90 G53 Z0.", [if m5reqd = 1, *sm05] ====> THIS IS IT......

Link to comment
Share on other sites

I am just guessing here, but I think it is likely that the variables speed and/or spindleout is simply not defined when you are in the pretract block

 

If that is indeed the case.. then a simple fix would be to create a new variable that looks at speed where it is actually used in pspindleout and pfspindleout and sets a flag to use later ..

 

I am thinking you create a variable like m5reqd - this will be a toggle to either use or not use m5

 

m5reqd : 0 # Flag

 

then in the two postblocks.. you do this..

 

pspindleout     #Spindle speed and M code output   

      if (speed > zero), m5reqd = 1

      else, m5reqd = 0

      if not((opcode$ = 3 | opcode$ = 16) & nextdc$ = 3 & rigid_tap), speed, spindle

 

 

pfspindleout     #Spindle speed and M code output forced   

      if (speed > zero), m5reqd = 1

      else, m5reqd = 0

      if not((opcode$ = 3 | opcode$ = 16) & nextdc$ = 3 & rigid_tap), *speed, *spindle

 

 

Now you should have a variable m5reqd that is set to 1 if an m5 is nesc and 0 otherwise

 

So now in your pretract .. you can test for the value of m5reqd rather than checking against speed which is not initialized in pretract..

 

Hope this helps.. as I said .. this was based on an educated guess that speed just isn't initialized in pretract.. also.. I haven't tested this..

 

You just helped me solve a problem I was having with  turning off probes. I was using a mi trigger to turn them off. This logic now gives me the way to turn them off when called. Thanks.

Link to comment
Share on other sites

You just helped me solve a problem I was having with  turning off probes. I was using a mi trigger to turn them off. This logic now gives me the way to turn them off when called. Thanks.

Ron,

I do it by having a dedicated tool number for the probe in the library.  That tool number triggers actions in the post: no rotation (for machine tools that don't have prohibit), no coolant, on / off etc.

  • Like 1
Link to comment
Share on other sites

Ron,

I do it by having a dedicated tool number for the probe in the library.  That tool number triggers actions in the post: no rotation (for machine tools that don't have prohibit), no coolant, on / off etc.

 

No Bunno using the tool as the off trigger. It would trigger in a different operations and not the operation it was supposed to. I tried all type of sav and last commands with no luck. This method bridges that gap I was unable to over come in X9. In previous version the Logic worked just fine, but in X9 something changed and the old logic that worked with no problem was no longer working. This method I think will solve the issue. No time to try it now, but like all things on the forum I like it has been copied.

Link to comment
Share on other sites

No Bunno using the tool as the off trigger. It would trigger in a different operations and not the operation it was supposed to. I tried all type of sav and last commands with no luck. This method bridges that gap I was unable to over come in X9. In previous version the Logic worked just fine, but in X9 something changed and the old logic that worked with no problem was no longer working. This method I think will solve the issue. No time to try it now, but like all things on the forum I like it has been copied.

 

So now I have a little idea of what to expect whenever I see X9.

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