S7-300 Level and volume

allannissen

Member
Join Date
Sep 2011
Location
Denmark
Posts
5
Hi

I'm trying to make a monitoring block for our tanks onboard the oilrig I'm working on.
I'm pretty new into working with S7 but so far I've managed to read the analogue input value, scale it and present it in a DB where my HMI software can read it.

L PIW288
ITD
DTR
L 2.764800e+004
/R
L 8.500000e+004
*R
L 0.000000e+000
+R
RND
T DB13.DBD10
This scales the input to height in centimeter. Max height of liquid is 8.5 meters.

L PIW288
ITD
DTR
L 2.764800e+004
/R
L 7.130910e+004
*R
L 0.000000e+000
+R
RND
T DB13.DBD 8
This scales the input to volume in m3. Max volume of tank is 713.091 m3.

The sensor is a hydrostatic sensor, installed a few centimeters from the bottom of the tanks.

Some of our tanks stores fuel or other liquids with different specific gravity than water.
How can I add that to the scaling?
My idea was that on the HMI, the user can input the density, which will be written to a db as INT (ie. 1023 for saltwater or 860 for diesel). And then the value should be read from the db, maybe converted (not sure to what) and used in the scaling.

Thanks in advance.

Allan
 
Hi

I'm trying to make a monitoring block for our tanks onboard the oilrig I'm working on.
I'm pretty new into working with S7 but so far I've managed to read the analogue input value, scale it and present it in a DB where my HMI software can read it.

L PIW288
ITD
DTR
L 2.764800e+004
/R
L 8.500000e+004
*R
L 0.000000e+000
+R
RND
T DB13.DBD10
This scales the input to height in centimeter. Max height of liquid is 8.5 meters.

L PIW288
ITD
DTR
L 2.764800e+004
/R
L 7.130910e+004
*R
L 0.000000e+000
+R
RND
T DB13.DBD 8
This scales the input to volume in m3. Max volume of tank is 713.091 m3.

The sensor is a hydrostatic sensor, installed a few centimeters from the bottom of the tanks.

Some of our tanks stores fuel or other liquids with different specific gravity than water.
How can I add that to the scaling?
My idea was that on the HMI, the user can input the density, which will be written to a db as INT (ie. 1023 for saltwater or 860 for diesel). And then the value should be read from the db, maybe converted (not sure to what) and used in the scaling.

Thanks in advance.

Allan

Your idea sounds OK to me.
Something like this:
LiquidLevel = WaterLevel*1000.0/(HMIvalue converted to REAL)

Kalle
 
Multiply the volume value by the bulk density to get a value in k/litres. So 700 M/3 X 0.82 = 574 thousand litres for diesel.

The density input could be a text input to keep it simple for the operators.
 
One advice is to start working with REALs throughout your programs.
Modern PLCs are much much more faster for processing REALs so there is little reason to start with INTs with implied decimals. Your programs becomes simpler and more readable. If it also involves an HMI it is even more so. Then you have to do the implied decimals twice. Thats twice the work and double the risk for programming errors.

I suggest, use FC105 SCALE to get the analog input to the 1st engineering value (pressure), then use the list of densities to convert it to the 2nd engineering value (level).
 
Ok, I think I have the result I want now.
I've made an FC with 5 networks.
Netw.1:Converting the density to REAL
Netw.2:Converting the analog input to REAL
Netw.3:
L #Liquidlevel
L 1.000000e+000
*R
L #Densityreal
/R
T #Liquidlevelwithdensity

Netw.4 and 5 uses the result of Netw. 3 to calculate height and volume and transfer to DB.

I know there must be many ways of doing it, but does this look ok?

Jesper: I'll give it a try.
 

Similar Topics

Hello everyone and thanks for checking my post. I’m a beginner in PLC programming (still in school) and I’m tasked with doing a monitoring of a...
Replies
4
Views
2,279
Hi guys..... Someone can provide a sample code for Simatic S7-300 (CPU315 DP/PN)about the system control to manage in the boiler the drum level...
Replies
0
Views
3,451
Can S7-300 do multi-level loop? I don't know where is wrong, I cannot do that. Is there somebody used that fuctions before? Thanks in advance.
Replies
11
Views
2,264
Newbie to level control/somewhat familiar with this PLC. I'm Trying to figure out how to set up a basic level control using s7-300 PID Block...
Replies
12
Views
13,649
Have a system that has been running for over a year and all of a sudden getting a ExcessiveVelocityFault on one of the drives when the MSO command...
Replies
2
Views
138
Back
Top Bottom