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..
-------------------------------------------------------
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 [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
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
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
RE: post proc custom command help
the first one of your second reply works great.....