Energy consumption step 7 code

Ghourab

Member
Join Date
Jan 2016
Location
South Africa
Posts
30
I had an FC which specialized for computing energy or power consumption by shift - day - year and so on.

this fc is called in a function block to take the flowrate per hour input of the certain computed thing for example kilo watt hour kwh for electric power or cubic meter per hour for gas this value is computed in the fc to gave me consumption per shift day month and year.

the problem is :

the year and sometimes month consumption give right values till a certain no "it is not constant" and after this no. it stop accumulated although all used values are REAL.

I attached a 7 picture on the zip file of the fc code.
 
I wasn't able to open the zip file.

Posting actual the code might make it easier for someone to help you. You can create a library with the relevant blocks and post that or export to an STL source file and post that or use the advanced feature, paste the code in to a post, highlight it and wrap the "code" tags around it.

Nick
 
ya l understand that if a small value no. added to a very high no. it will produce a constant result with no change at the large one also produce wrong values .

so; the question is how to be free from this trouble.
 
you can get more precision from a DINT as you would use all 32 bits. A float is made up of 23 bits of mantissa and 8 bits for the exponent.

You might want to considder altering what you accumulate and how you might handle a roll over.

Nick
 

Similar Topics

Hi there, I have a requirement to display the energy consumption of a given pump following each cycle of a machine. There is no Energy meter...
Replies
8
Views
2,759
Hi, i cant establish communication between fatek plc with an energy meter, both capable for modbus tcp, i did with modscan but fatek plc does not...
Replies
1
Views
149
I want to calculate the energy consumed from instantaneous power. Can this be done using the TOT block with timebase set to Hour?
Replies
2
Views
690
Hi All, We are planning Establish communication between Power Energy Meter (Schneider PM5320) with Rockwell PLC. I am unable to get the Assembly...
Replies
4
Views
751
This is a great group that helps the Energy people to stay informed about Automating the Energy Industry. You are welcome to join...
Replies
0
Views
716
Back
Top Bottom