cancel
Showing results for 
Search instead for 
Did you mean: 
Security Alert Log4j Security Vulnerability. Click here to know more.
cancel
Showing results for 
Search instead for 
Did you mean: 

Rounding parameter values set with relations

SteveLucas
13-Aquamarine

Rounding parameter values set with relations

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.
1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

2 REPLIES 2

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

View solution in original post

SteveLucas
13-Aquamarine
(To:John.Pryal)

Thanks John,

That did the trick.

Parameter1.JPG

Announcements