4.6. Finally something interesting.

We already know more or less how the parameters from the browser software and we have seen some examples of formulas. But we can not really do still nothing worth attention, we can make the parameters whose values depend on from the time that the parameters assume the values dependent on the medium for which it count, but it is still not enough.

We need the ability to appeal in our formulas to other parameters SZARP program. By other parameters mean here both parameters collected SZARP in the database as well as other definable parameters.

Quick example, let's parameter:

v = p("xxxx:Network:External temperature controller, t, pt)

Notatka: Text p (...) does not enter to get the desired effect, in the parameter editing, click on the button <W> and illustrated list select outside temperature graph, and we'll get it for what it is.

We introduce a new parameter, and we see that this parameter is our faithful a copy of the parameter 'external temperature'.

What's going on here?

Here, the parameter canceled the value of another parameter. It just makes design p ("xxxx: Network:External temperature controller, t, pt), namely the function p function retrieves the value of the parameter p, adopt it three parameters:

In the second and third argument comes exactly the same as discussed in the two the preceding paragraphs. To retrieve the value of the parameter you need to specify about what time and by which we mean the average, in the same way as defined This draw3 when asked about the value of our parameter.

In our call to p ("xxxx: Network:External temperature controller, t, pt), as the time we have given the value of the variable t, and the average value of the variable Fri So we said that we want to get the value of the outside temperature for such a moment in time and the average of the parameter which we asked browsing program. If you are reading program will ask - I want to average 10 minute for your parameter for the hours 8:40 - this is our parameter returns the 10-minute average outdoor temperature for 8:40.

We could also write eg p ("xxxx: Network:External temperature controller, t, PT_MONTH) then, regardless of what kind of medium-browsing program will ask us, we will pay the average monthly value.

Armed with verage speed of the grid:this knowledge, we can now do more interesting parameters, such trivial parameter counting the average speed of the grid:

v = (p ("xxxx: Boiler 3: Controller:Speed left the grid", t, pt) + p ("xxxx: Boiler 3:Driver speed grilled right", t, pt)) / 2

This parameter specifies the recommended opening the zone:

local v1 = p("xxx:Boiler 1:Controller:The length of the combustion zone", t, pt)
if v1 < 3
 then
  v = 0
 else
  if v1 > 4
   then
    v = 100
   else
    v = (v1 * 100) % 300
  end
end