×
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

post proc custom command help

post proc custom command help

post proc custom command help

(OP)
i have a custom command which sets the tool length compensation number to be the same as the tool number, it goes as follows:
-------------------------------------------------------
global mom_tool_number
global mom_tool_adjust_register
global mom_cutcom_adjust_register

set mom_tool_adjust_register $mom_tool_number
set mom_cutcom_adjust_register $mom_tool_number
-------------------------------------------------------

can someone please show me how to put an IF -> ELSE
statement in, so if i want to specify a different length offset number, i can...
I tried myself, but can't get it working..

RE: post proc custom command help

if {..} {..} else {..}

if [info exists mom_tool_adjust_register] {
   if {$mom_tool_adjust_register != 0} {
      set mom_tool_adjust_register $mom_tool_number
   }
}

RE: post proc custom command help

(OP)
thanks for the reply,
 but that still doesn't seem to work, even tho i've input a number into the adjust register of that turning tool, it's still output it as the tool number.
Any idea why ??

RE: post proc custom command help

Check the variables used in the def file and change the logic a bit if you didn't to:

global mom_tool_number mom_tool_adjust_register

if [info exists mom_tool_adjust_register] {
   if {$mom_tool_adjust_register == 0} {
      set mom_tool_adjust_register $mom_tool_number
   }
} else {
   set mom_tool_adjust_register $mom_tool_number
}

if this does not work then it could be that the mom_tool_adjust_register is changed after you did. Sometimes it is only possible to change the output with your own variables e.g.

global Tool
global mom_tool_adjust_register
global mom_tool_number

if [info exists mom_tool_adjust_register] {
   if {$mom_tool_adjust_register == 0} {
      set Tool(AdjustRegister) $mom_tool_number
   }
} else {
   set Tool(AdjustRegister) $mom_tool_number
}
 

RE: post proc custom command help

(OP)
not altogether sure what you mean by using my own variable, but, thanks, i'll try that.

RE: post proc custom command help

(OP)
Thanks very much,
 the first one of your second reply works great.....

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