×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

custom command set M8, if no M7 set

custom command set M8, if no M7 set

custom command set M8, if no M7 set

(OP)
I'd like to add a custom command to the post which looks at the start event's in each path, and if there is no thru coolant on (M7) set, will output an M8 instead.
Can someone show me how to do this, thanks....

RE: custom command set M8, if no M7 set

Perhaps this is a silly question, but why not just turn coolant on (M08)in the start event?

And when you want thru (M07), just turn it on instead?

Jay

RE: custom command set M8, if no M7 set

(OP)
it means that i'll have to set a start event of M8 in all toolpaths every time, or set M7 in the odd occasion that i need it, or i'd have to add an M8 to all my template operations, i'd rather get the post to always add an M8 unless an M7 is called for, or i could have a mill control operation in the templates, either way, it's not as good as the custom command in the post..

RE: custom command set M8, if no M7 set

If you do not set anything the mom_coolant_status will be NONE. Check if it is anything other than that and set it to FLOOD or what ever is behind your M8.

jelmerra
www.rouwe-analysis.info

RE: custom command set M8, if no M7 set

(OP)
i'm not sure what you mean?
i want a custom command which will output M8, if a start event of M7 (thru coolant) hasn't been specified , is this possible?

RE: custom command set M8, if no M7 set

Yes it is possible.

e.g.

global mom_coolant_status

if [info exists mom_coolant_status] {
   switch -- $mom_coolant_status {
      "NONE" {
         set mom_coolant_status "FLOOD"
         MOM_force once M_coolant
      }
      default {
         MOM_force once M_coolant
      }
    }
} else {
   set mom_coolant_status "FLOOD"
   MOM_force once M_coolant
}

You could put the above code in a first move or an initial move depending upon where you intend to output the M code.
 
 

RE: custom command set M8, if no M7 set

(OP)
Thank's for your help, we got it to work like this in the end.....

global mom_coolant_status

if { $mom_coolant_status != "THRU" } {
    set mom_coolant_status ON
}


#MOM_output_literal "---------$mom_coolant_status"

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources