Free trial
version

Processing Sequence and Comments


Processing Sequence

In the Polysun simulation, a year is calculated from January 1st,00:00 to December 31st, 24:00, possibly with an advance that can be selected for the system diagram. The time steps for the simulation have a variable length ranging from one second to max. 4 minutes (during the day) or 12 minutes (at night). For each time step, controllers are processed first, then all elements.

In each time step of the simulation, variables or formulas for the controller are processed in the following order:

  1. Evaluation of time step and time-switch and allocation to variables TS and TC.
  2. Reading of controller inputs and allocation to variables from I1 to I16 or from PI1 to PI16.
  3. Processing of auxiliary variables, starting with the first auxiliary variables and allocation to variables from H1 to H16 or from PH1 to PH16.
  4. Evaluation of the conditions of the state, starting with the first state. The evaluation is interrupted at the first active state. The number of this state is then allocated to the S variables or the previous number is allocated to the PS variable.
  5. Processing of the controller outputs of the active state, starting with the first controller output. Allocation to the variables from O1 to O16 or from PO1 to PO16.

This processing sequence reveals that only variables of the current values which were already processed in the sequence may be read. So, for example, in the formulas for auxiliary variable 3, variables H1 and H2 can be read, not variable H3, H4, etc.; likewise in the formulas for the state, only PS variables can be read, but not S variables and, for example, in the formula for controller output 2 the variable O1 can be read, but not variables O2, O3 and so on.

Comments

Within formulas you will be able to insert comments at any point by positioning them between two hash symbols („#“),

e.g.:  I1 > I2 + 6 #Start-up hysteresis# AND I2 < 70 #Maximum tank temperature#