rounded to two decimal points

milhaushk

Member
Join Date
Nov 2005
Location
HK
Posts
5
Hi i have number in (Step7 PLC-300) real with decimal point 65.5845632 and i nead round onli two decimal poind 65.58 for HMI.
Thank You for help.
 
How to do it:
Multiply the number by 100
Copy it to a DINT (32 bit integer) (This will strip the decimal)
Copy it to a FLOAT or REAL (sorry don't know Siemens) (So you can have the decimal back)
Divided by 100

Sorry long way around the barn but it would work. You could make the equivalent of and AOI then you just have the number in and the number out.
 

Similar Topics

We have constructed a new vibrator control station with local pots on the panel and remote pots on a wireless system. We are running 6 AB 525...
Replies
5
Views
704
I have a new machine coming that requires ~3 X 480V/277V 60HZ AC. They have also asked for 3 WIRE + GRD (SOLIDLY GROUNDED WYE SOURCE ONLY). What...
Replies
9
Views
2,606
Don't understand why K25 (decimal 2.5) is being rounded to 3 in D331. Does D331 need to be a float to hold that value?
Replies
6
Views
1,695
I have a piece of equipment being installed that is IT ungrounded by design. I'm wondering what protective measures can be taken for transient...
Replies
1
Views
1,607
Would you ground 1 side of a 220V control circuit to make a neutral? I am doing a 110V control panel that has 3 pumps running at 480V 3 phase and...
Replies
16
Views
4,743
Back
Top Bottom