DELTAV -fract function

Olga

Member
Join Date
Aug 2018
Location
Glasgow
Posts
12
Hi!

I'm currently doing a project on DeltaV, and the fract function in my code does funny things.
I have a measurement in MWH which can be eithe a whole number or have 3 decimal places. For example the value of 299.645 MWH is displayed as 299 MWH and 645 KWH. I used trunc and fract functions to separate these into MWH and KWH.

The issue is, when I write a number which decimal place ends with 1-5, the value displayed in the KWH section becomes off by one and the same happens sometimes when I use a random combination of numbers.
For example when I chose the value to be 299.3 MWH it displayed 299 MWH and 299 KWH or when the value was 856.358 MWH it was displayed as 856 MWH and 357 KWH.

The code works correctly most of the time, but some times it gives me a value of KWH which is off by one. Can someone please help me fix this issue?🤞🏻

Many thanks,
Olga
 

Similar Topics

Hello, Does anyone know how to export the EDD files for a device in DeltaV Explorer 12.3? I can export the .fhx, but I have no idea how to get...
Replies
5
Views
79
Hi experts hope you are well. Would any one be able to tell if it is possible to pull data from a Delta V DCS and display it on a TP700 comfort...
Replies
0
Views
434
I have a DeltaV system that I am using to control some powerflex 755 drives over Ethernet/IP. I don't have any experience with DeltaV or any way...
Replies
0
Views
756
One of my customers wants their DeltaV system to communicate with my Compactlogix PLC. Is there any specific hardware (module?) I need on my end?I...
Replies
1
Views
1,161
I have a DeltaV DCS system we are putting together and will pull data from a Allen Bradley Control Logix PLC. I am not sure how that communication...
Replies
0
Views
1,106
Back
Top Bottom