step 7 mathmatical calculations

Join Date
May 2015
Location
london
Posts
1
hello everyone.

I am new to programming and have been asked to find out if the following mathematical calculation is possible on step 7.
I am using a 2 wire AI from a PH sensor to a PIW.

I require :

ph (in)= average of probe over 15 mins=11
ph (out)= average of probe over 15 mins=7

S04= sulphate measurement

S04= 575000*(10^11-14)-(10^7-14)

I don't know if step 7 is even capable of this, however I did see that TIA Portal V12 has a calculate function.

I hope someone can help me , even if it is to tell me it cant do it lol

Thanks in advance

Andy
 
Yes it is possible, but won't be as straight forward as using calculate function.
To calculate average of ph you need store values of ph at selected time interval and then calculate average.

There's no (as far as i know) function for raising numbers to power in TIA portal, but it can be done using ln function.
 
Dear all , good day ,
In this formula some parentheses is missing , otherwise , written in this way, the number 14 is insignificant.
So , you have to restore the formula first of all.
This is correct : 575000*((10^11)-14)-((10^7)-14)
This is another: 575000*(10^(11-14))-(10^(7-14))
Another one : (575000*((10^11)-14))-((10^7)-14)

Ragards.
 
If you are using an S7-300/400, you could also write the code in SCL, and use the ** operator instead of ^ for the power. SCL is often the easiest way to do math.

If you are using a 1200/1500, then use a computer block, as you suggested, with ** for the power. You could also use EXPT if you want, but compute would probably be easier.

This assumes you already have the averages you want to use in the equation. If not, then that is a whole different question.
 

Similar Topics

I am having a step7 v5.4 program where the blocks are encrypted and locked. And the manufacturer is stopped the support. Is there any ways to...
Replies
2
Views
175
Good Morning, Hoping someone with some Siemens experience can give me a hand with this one. Customer has a S7-200 cpu, which has a 6GK7...
Replies
0
Views
246
HI! HOW COULD I OBTAIN THE NAMES OF THE STEPS OF A ROUTINE IN SFC LANGUAGE IN STUDIO5000? Or is there a system variable that gives me those...
Replies
0
Views
339
I'm just trying to figure out the right method of adding a DO card to an existing rack. It's not the *next* open slot, but I have to move the AO...
Replies
5
Views
546
Hi Siemens Experts, I am hoping someone can shed some light on my issue. I have uploaded the code from a S7-300 (317-2PN/DP) using Step 7...
Replies
9
Views
668
Back
Top Bottom