Inventor General Discussion

Inventor General Discussion

Reply
Distinguished Contributor
robmatthews
Posts: 373
Registered: ‎07-12-2007
Message 1 of 9 (1,135 Views)
Accepted Solution

Unable to Parse Equation

1135 Views, 8 Replies
05-25-2011 04:22 PM

G'day all. Firstly, WHY does this form not save a draft???  AARRGGGHHHH!!!

 

Anyway.

 Inventor 2010.

 

I am designing part of a tray conveyor. The trays stay horizontal through multiple tiers of the conveyor, changing leading edge with trailing edge at each tier change, but the right edge is always on the right. I'm working on the disharge.

 

I want to drive the position of one tray, and have two others also move, one of which will go from left to right, around the sprocket PCD, and thence right to left.

 

I have constrained the three trays to the origin workplanes rather than to a curve since Transitional constraints are so flakey.

 

I have set up some parameters to calculate the values of the x- and y-co-ordinates of each of the trays. I only want tray 2 to go around the turn. See attached screen shots, and assy. I have set some switches to determine where tray 2 will be: pre turn, on turn, or post turn, based on position of tray 1, location of the turn, and the tray pitch. The switches will evaluate to either 1 or 0, and will be multiplied by the location factor. You'll see that, hopefully.

 

The problem is that one parameter consistently fails to parse. All dimensions and units are correct, so far as i can see, but stlil it fails.

 

It should be T2x (Tray2 X-Co-ord) =  if_T2_Pre_Turn * ( Pitch + T1x ) + if_T2_On_Turn * ( TurnStart+T2TurnX )

 

but when i add the final (shown) term, the "+T2TurnX", it fails.

You can see how T2TurnX is calculated in the parameter table. I have tried using Degrees instead of radians, but still...

 

Can anyone shed some light for me please?

=============================================
This is my signature, not part of my post.

Nevermind

 

I've got it

 

The error message should be more specific: "Cyclical Dependency" or something

 

The equation for T2TurnX uses TurnAngle and what is the very first parameter in the equation for TurnAngle?

 

Obviously you couldn't put anything with TurnAngle into the equation for T2x

 

You'll have to rethink what you are trying to do - plus there has to be an easier way to accomplish this, a real tray isn't positioned by a formula.

*Expert Elite*
dan_inv09
Posts: 2,318
Registered: ‎12-12-2006
Message 2 of 9 (1,119 Views)

Re: Unable to Parse Equation

05-25-2011 05:18 PM in reply to: robmatthews

temp works?

 

How does

if_T2_On_Turn * (TurnStart + T2TurnX)

or

if_T2_On_Turn * temp

work?

 

I had some stuff a while ago where it would not accept some formulas I was cutting and pasting, after many minutes and hair pulling I just typed the whole thing in and it worked. But I could swear that I had to resort to cutting and pasting because I was having trouble getting it to work when I tried typing it.

 

And you could try a restart and/or reboot.

Distinguished Contributor
robmatthews
Posts: 373
Registered: ‎07-12-2007
Message 3 of 9 (1,114 Views)

Re: Unable to Parse Equation

05-25-2011 07:29 PM in reply to: dan_inv09

Thanks for the reply, Dan.

 

I actually ran into this issue yesterday, so i slept on it (as did my computer, turned off overnight), so a reboot has been done.

 

Temp evaluates fine.

 

But then if i try to incorporate temp into the T2x equation, it fails.

 

Or are you asking how the evaluation of the "if statements" work? "sign" returns a 0 if the argument <=0, and 1 if the argument >0, so when the "if variable" is 0, then that term that is multiplied evaluates to 0. Sorry, not a very clear explanation. I found this methodlogy (and nomenclature) in the pdf referred to here:http://forums.autodesk.com/t5/Autodesk-Inventor/IF-statement-in-IV-parameters/m-p/1030021

 

My feeling is that the problem is something to do with the angle and the sin/cos evaluation.

 

 

=============================================
This is my signature, not part of my post.
Distinguished Contributor
robmatthews
Posts: 373
Registered: ‎07-12-2007
Message 4 of 9 (1,077 Views)

Re: Unable to Parse Equation

05-26-2011 02:57 PM in reply to: robmatthews

Does anyone else have an idea to fix this? What have i done wrong?

 

Is this a softaware limitation; in that i have the inputs buried too deep; to find the results?

 

Anyone from ADesk care to have a look?

=============================================
This is my signature, not part of my post.
Distinguished Contributor
robmatthews
Posts: 373
Registered: ‎07-12-2007
Message 5 of 9 (1,040 Views)

Re: Unable to Parse Equation

05-30-2011 02:19 PM in reply to: robmatthews

Well, I've got to say I'm a (litte) bit surprised about the lack of responses here.

 

It's a non-trivial question, and I've included as much information as possible, with screen-shot and sample set. Is it just in the "too hard" basket?

 

Thanks anyway.

=============================================
This is my signature, not part of my post.
*Expert Elite*
dan_inv09
Posts: 2,318
Registered: ‎12-12-2006
Message 6 of 9 (999 Views)

Re: Unable to Parse Equation

05-31-2011 07:30 AM in reply to: robmatthews

It seems like when I hit reply and have to sign in, it replies to a different post than the one I thought I clicked the reply button for.

 

Anyway

 

Could you check the "Export" boxes for all the variables involved and look at (post a screenshot) of the custom parameters tab just to make sure what all the units are.

 

You said you retyped the whole thing from scratch?

 

Do you type all the variable names or do you pick them from the "List Parameters" pulldown? (Try the other way.)

 

Try another parameter and put in all the numbers instead of the parameters.

 

Try putting the whole thing in one equation.

 

There is something that it doesn't like about the formula and chances are you won't be able to figure out what it was even if you do manage to get it to work. I've had time when it got all whiny about some equation and I've resorted to making sure I have a space before and after everything, tried 0.001 m instead of 1 mm, compiled every parameter into one equation, broken every bit of the equation out into another parameter, basically tried to think of everything I could possibly do to nail it down, and if I do manage to get it to work I haven't got a clue why, so I just put it down very carefully and run like hell. You've just got to keep poking at it.

*Expert Elite*
dan_inv09
Posts: 2,318
Registered: ‎12-12-2006
Message 7 of 9 (990 Views)

Re: Unable to Parse Equation

05-31-2011 08:08 AM in reply to: robmatthews

Nevermind

 

I've got it

 

The error message should be more specific: "Cyclical Dependency" or something

 

The equation for T2TurnX uses TurnAngle and what is the very first parameter in the equation for TurnAngle?

 

Obviously you couldn't put anything with TurnAngle into the equation for T2x

 

You'll have to rethink what you are trying to do - plus there has to be an easier way to accomplish this, a real tray isn't positioned by a formula.

Distinguished Contributor
robmatthews
Posts: 373
Registered: ‎07-12-2007
Message 8 of 9 (955 Views)

Re: Unable to Parse Equation

05-31-2011 03:28 PM in reply to: dan_inv09

Thanks Dan, I really appreciate your persistence. It has out-weighed mine, and it was my issue!

 

Cheers, I think you are spot on. I fully recognise that the trays aren't physically governed by equations, but equally, i know that an equation can be used to describe the motion. And equally, I think Inventor is shaky and flaky with transitional constraints, and it should/could be better. Heck, it might be better in 2011 or 2012 than what I have here.

 

Further to the motion described above, the trays pass under a scraper bar, and the product is displaced (after a "backing-up" period) onto a  take-away conveyor. Obviously, the drop point off the tray changes as the tray moves.

 

Other than Inventor, what program might you use to display movement such as this?

=============================================
This is my signature, not part of my post.
Employee
udayag
Posts: 90
Registered: ‎06-07-2010
Message 9 of 9 (937 Views)

Re: Unable to Parse Equation

05-31-2011 11:28 PM in reply to: robmatthews

As you might have noticed there are three equations each with two of the following three variables: T2x, TurnAngle, and T2TurnX. The obvious thought is to somehow eliminate other variables, so that you can express any of these variables, without involving the other two variables. But there is no closed-form solution to this problem since you end up with an equation involving some angle and its trigonometric function (for example an equation with theta and sin(theta) terms). Inventor cannot be used to solve such equations. To solve such equations you need a single-variable equation solver. Perhaps you could use a “user defined function” to invoke Excel and solve the equation using the “Goal Seek” function.

 

Alternatively, if you were to describe your problem more fully, perhaps someone can offer a simpler problem formulation.

Udaya Gunasena
Fusion Development
Autodesk
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.