4 Replies Latest reply on Apr 12, 2011 5:24 PM by Jerry Steiger

    Reusing same variable used in 2 equations - 'ladder scenario'

    Mohamad Farhan Jasni

      Hi everyone,

       

      I'm modelling a grating panel which consists of I profile load bars with round spacer bars running longitudinally. Essentially, this is pretty similar to a ladder setup.

       

      I've set up two equations:

       

      1) Number of load bar instances, which is driven by the overall length of the spacer bars (Similar to rungs and ladder bars respectively).

       

      2) Spacer bar end spacing, so that the two ends are equally spaced.

       

      However, I get this error message:

       

      "The variable Bar end spacing @Boss-Extrude3 is already used in the earlier equation and is getting modified. Please reorder or change the equations to avoid multiple rebuilds."

       

      Any suggestions on how to resolve this? I basically want to specify just the overall length of the spacer bars and have load bar instances calculated as well as have the end spacings equal.

       

      Thanks in advance.

       

       

      SW2010 SP5.0

        • Re: Reusing same variable used in 2 equations - 'ladder scenario'
          Raghavendra Bhagavan.S.M

          Hello Mohammed !

           

          Have you tried DriveWorks express for the same. I would say that would be more easy and interactive to build the models

           

          Just my two cents !

           

          Cheers !
          Raghu.

          • Re: Reusing same variable used in 2 equations - 'ladder scenario'
            Jerry Steiger

            Mohamad,

             

            I've hardly ever used equations, but I seem to recall that the order of the equations is important. Are your equations listed in the equation editor in the order you put them in your post? If so, I don't see how you could be getting the error message you are getting. If you have them reversed, then it makes sense, and you just need to change the order.

             

            Jerry Steiger

              • Re: Reusing same variable used in 2 equations - 'ladder scenario'
                Mohamad Farhan Jasni

                Thanks for the input guys,much appreciated.

                 

                Jerry: I've tried rearranging the order of my equations but still encounter the same problem.I think the problem lies with the fact that both the equation outputs also serve as equation parameters at the same time (See below).

                 

                "Bar Instances@LPattern2"=(("Grating Width@Boss-Extrude3"-(2*"Bar end spacing@Boss-Extrude3"))/"Bar Spacing@LPattern2")+1

                 

                "Bar end spacing@Boss-Extrude3"=("Grating Width@Boss-Extrude3"-(("Bar Instances@LPattern2"-1)*"Bar Spacing@LPattern2"))/2

                 

                 

                Raghu: I didn't use Driveworks because I just thought it'd be faster to setup one equation to achieve what I need instead of setting up driveworks.

                 

                For now, I think I can live with using just the one equation to calculate the "Bar Instances" and work out the "Bar end spacing" manually. But it sure would be convenient if these could be done automatically.

                  • Re: Reusing same variable used in 2 equations - 'ladder scenario'
                    Jerry Steiger

                    Mohamad,

                     

                    Right, you figured out what the problem was; you need to get the bar end spacing out of the first equation, or bar instances out of the second. It will require you to think out exactly what you want more carefully. If there is a minimum end spacing, then you can use that in the first equation. I would think that you would have to use INT to get an integer value, but maybe the equation editor is smart enough to know that instances have to be an integer.

                     

                    Jerry Steiger