Skip to main content
1-Visitor
March 18, 2014
Solved

Rounding parameter values set with relations

  • March 18, 2014
  • 2 replies
  • 2872 views

Does anyone know if it's possible to round values created with relations?

What I am doing is setting my speeds and feeds with relations. It works fine but it looks strange to see these numbers in the RPM column.

parameters.JPG

what i was wondering is there a way to round these values to eliminate everything after the decimal.

I have looked but I don't see anything on how to either round the value or strip everything after the decimal in the relations.

Thanks


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
Best answer by John.Pryal

Hi, i think there are a couple of ways you can achieve your goal. First, set the parameter type to integer, or, floor the value of the parameter in your relation. I am no expert when it comes to writing relations, but, either of these seemed to do the trick.

spindle_speed=floor(34.23x56.2+0.5,0)

or with integer value

sp_1=floor(34.23x56.2+0.5,0)

hope this helps

John

parameter.PNG

2 replies

1-Visitor
March 18, 2014

Hi, i think there are a couple of ways you can achieve your goal. First, set the parameter type to integer, or, floor the value of the parameter in your relation. I am no expert when it comes to writing relations, but, either of these seemed to do the trick.

spindle_speed=floor(34.23x56.2+0.5,0)

or with integer value

sp_1=floor(34.23x56.2+0.5,0)

hope this helps

John

parameter.PNG

1-Visitor
March 18, 2014

Thanks John,

That did the trick.

Parameter1.JPG