cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Units get lost in subsequnet Formulas

WA_5194990
6-Contributor

Units get lost in subsequnet Formulas

I am using Mathcad Prime Release 8.0 and Datecode8.0.0.0

I have set of formulas with a units. If I change the unit on the result of the first formula the following formulas are loosing their unit.



Here are the errors that I faced
No error message or warning. Inconsistent results.

ACCEPTED SOLUTION

Accepted Solutions
LucMeekes
23-Emerald III
(To:WA_5194990)

1. You have defined F.motor as a function of phi, but it does not depend on phi. Why did you define it so?

2. You have defined F.motor and use an immediate evaluation ( the =   )  at the end of the definition. While that works to display the value, it (too) often leads to problems due to 'side effects', as in this case.

LucMeekes_2-1663142763334.png

 

If you delete the = from the end of the definition of F.motor, the problem is gone.

If you want to see the value of F.motor, type an extra F.motor=, to get:

LucMeekes_0-1663142572446.png

LucMeekes_1-1663142699695.png

 

Success!
Luc

View solution in original post

5 REPLIES 5
LucMeekes
23-Emerald III
(To:WA_5194990)

Please attach the worksheet with your example.

 

Success!

Luc

WA_5194990
6-Contributor
(To:LucMeekes)

Hi Luc,

Here is the MCDX file. When I change the unit from N to kN the units in the subsequent lines get lost. The value is changing as well. I would have expected I can change the unit of the result after the (= sign) independently to any other unit of force.

 

Thank you for responding.

 

 

 

 

ttokoro
20-Turquoise
(To:WA_5194990)

If Fmoter does not depend on φ,

image.pngimage.pngimage.png

LucMeekes
23-Emerald III
(To:WA_5194990)

1. You have defined F.motor as a function of phi, but it does not depend on phi. Why did you define it so?

2. You have defined F.motor and use an immediate evaluation ( the =   )  at the end of the definition. While that works to display the value, it (too) often leads to problems due to 'side effects', as in this case.

LucMeekes_2-1663142763334.png

 

If you delete the = from the end of the definition of F.motor, the problem is gone.

If you want to see the value of F.motor, type an extra F.motor=, to get:

LucMeekes_0-1663142572446.png

LucMeekes_1-1663142699695.png

 

Success!
Luc

WA_5194990
6-Contributor
(To:LucMeekes)

I defined F_motor as a function of phi because I have a major worksheet with phi as a function of time. F_motor will finally calculates the force of a motor depending on time for a swivel movement of 120deg.

 

Lesson learned from your answer: One should not place an equal sign behind the definition of a formula.

 

Thank you very much. That helps.

Announcements

Top Tags