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:

Incremental depth warning sign


Recommended Posts

Good morning everyone,
   I am trying to write a warning message if I choose DEPTH as INCREMENTAL because sometimes I make mistake instead of ABSOLUTE.  I wrote a logic warning for it and it didn't work well.  Would you guys tell me what I've done wrong?

 

PS: I did check on the parameter PDF file and it is 15103 but not sure why didn't work.

PARAMETER.PNG.fb8d196ce1b3267df11558e483f0cbcd.PNG


Thank you.

 

 

Capture.thumb.PNG.8a2a7faa68e3ac432aa0886d9b8207ca.PNG

 

======================================

#Misc variables
IncAbsOperationDepth : no$ # Operation full depth


#Region sIncAbsOperationDepth
sIncAbsOperationDepth = "CUT#"+sToolPathNumber+" * Careful, you have INCREMENTAL DEPTH"
                        +no2asc(13)+"TOOL#"+no2str(t$)+" ("+s20001+")"
                        +no2asc(13)
                        +no2asc(13)+"Confirm LINKING PARAMETERS PAGE"
                        +no2asc(13)+"Your INCREMENTAL DEPTH value is= "+no2str(operation_depth)
                        +no2asc(13)+"Your the Z final DEPTH value is= "+no2str(operation_depth+OpTopOfStock)
                        +no2asc(13)
                        +no2asc(13)
                        +no2asc(13)+"                                               OK to proceed posting."
                        +no2asc(13)+"                                               CANCEL to abort posting."
#EndRegion sIncAbsOperationDepth

# --------------------------------------------------------------------------
# Home Position Movement
# --------------------------------------------------------------------------
fmt ""  4 IncAbsOperationDepth

# --------------------------------------------------------------------------
# Rotation direction calculation
# --------------------------------------------------------------------------
ptlchg_errorpop #Pop-up common toolchange errors
if IncAbsOperationDepth = 1 & opcode$ <2, [if mprint(sIncAbsOperationDepth, 2) = 2, exitpost$]


pparameter$ # Run parameter table
if prmcode$ = 15103, IncAbsOperationDepth = rpar(sparameter$, 1) #Check on INCREMENTAL DEPTH

Link to comment
Share on other sites
2 hours ago, Colin Gilchrist said:

if IncAbsOperationDepth = 1 & opcode$ <2, [if mprint(sIncAbsOperationDepth, 2) = 2, exitpost$]

 

 

opcode$ <2

Your 'opcode$ is equal to 1 or 2 , when processing a contour. ( 1 = 2D Contour, 2 = 3D Contour)

 

 

opcode_values.PNG

tool_op 1.PNG

tool_op 2.PNG

tool_op 3.PNG

tool_op 4.PNG

tool_op 5.PNG

tool_op 6.PNG

 

 

Thank you Colin.  How do I excluded all 3D toolpaths, should I use OPCODE or OPID?

 

Thank you for your help.

Link to comment
Share on other sites

You can also set up a multi-check as shown below.

is_drilling_op =
      (
      tool_op$ = 2 |
      tool_op$ = 475 |
      tool_op$ = 37 |
      tool_op$ = 104 |
      tool_op$ = 136 |
      tool_op$ = 306
      )

is_drilling_op will be set to yes$(1) if a condition in the rounded brackets is true.

For this to work, newglobal$ must be set to 1.

  • Thanks 1
Link to comment
Share on other sites
20 hours ago, Colin Gilchrist said:

      if tool_op$ = 3 |
         tool_op$ = 5 |
         tool_op$ = 37 |
         tool_op$ = 201,
           [
           # do something]
           ]
         else,
          [
          # do something else
          ]

If you want more "types", just add a condition 'tool_op$ = xxx |' (notice the pipe symbol is the OR condition.

Thank you Colin, big help from you.

Link to comment
Share on other sites
12 hours ago, jeff.D said:

You can also set up a multi-check as shown below.


is_drilling_op =
      (
      tool_op$ = 2 |
      tool_op$ = 475 |
      tool_op$ = 37 |
      tool_op$ = 104 |
      tool_op$ = 136 |
      tool_op$ = 306
      )

is_drilling_op will be set to yes$(1) if a condition in the rounded brackets is true.

For this to work, newglobal$ must be set to 1.

Thank you Jeff, great input for me to learn.

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