Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

Post Building Help - negative arc value

[ Edited ]

I'm building a post for a machine that requires a negative value for an arc when mom_arc_direction = CLW and positive when direction is CCLW. I tried to put a formula in the expression field of my user defined "R" word, but this did not work.

 

What would be the correct way to do this?

7 REPLIES

Re: Post Building Help - negative arc value

What do you mean by id did nto work - was there an error message?

What expression did you use to replace $mom_arc_radius?

 

Mark Rief
Retired Siemens

Re: Post Building Help - negative arc value

[ Edited ]

TCL ERROR. Invalid address expression. My guess is the formatting is wrong...

 

if{$mom_arc_direction==CLW}{
-$mom_arc_radius
}else{
$mom_arc_radius

}

Solution
Solution
Accepted by topic author rbarn32
‎08-26-2015 04:32 AM

Re: Post Building Help - negative arc value

Assumeing there isn't a toggle to do this.

What I would do...

1) Create a "PB_CMD_RBarn_Set_Arc_direction"

In it, have code like:

global rbarn_arc_factor

if{$mom_arc_direction==CLW}{
set rbarn_arc_factor -1.
}else{
set rbarn_arc_factor 1.
}

2) Is the "R" word, change the value to "user defined, and set it to

 

 "$mom_arc_radius * $rbarn_arc_factor"

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: Post Building Help - negative arc value

Thanks for the reply Ken but I am still getting a TCL error. I had to add "global mom_arc_direction".

global mom_arc_direction
global rbarn_arc_factor

if{$mom_arc_direction==CLW}{
set rbarn_arc_factor -1.
}else{
set rbarn_arc_factor 1.
}

Re: Post Building Help - negative arc value

"doh!" (sorry) I forgot one crucial step:

Add the call to the PB_CMD_* before the block in the arc move event

(so rbarn_arc_factor gets defined before the R word tries to use it)

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: Post Building Help - negative arc value

[ Edited ]

A logical expressin directly in an address is not supported.

I got Ken's custom command to work :*)

 

Custom command in motion block:

global mom_arc_direction
global my_arc_factor

if { $mom_arc_direction == "CLW" } {
set my_arc_factor -1.
} else {
set my_arc_factor 1.
}

 

In R word user defined expression:

$mom_arc_radius*$my_arc_factor

Mark Rief
Retired Siemens

Re: Post Building Help - negative arc value

Thanks Ken, that worked!

Learn online





Solution Information