Thread Content
As the title suggests, could some expert please explain the algorithm for traffic compensation? 1. Inside the algorithm block, there is an ST segment as follows: FUNCTION_BLOCK PT_FLOW VAR_INPUT IN: FLOAT; (**KPA**) R0: FLOAT; (**kg/M3**) PI: FLOAT; (**MPa**) TI: FLOAT; (**℃**) E: FLOAT; (**coefficient of expansion**) K: FLOAT; (**constant**) END_VAR VAR_OUTPUT OUT: FLOAT; END_VAR VAR TEMP: FLOAT; (****) TEMP1: FLOAT; (****) TEMP2: FLOAT; (****) R1: FLOAT; (**used to calculate specific density**) END_VAR TEMP1 := 273.15 * (PI + 0.1); TEMP2 := 0.10133 * (TI + 273.15); R1 := R0 * TEMP1 / TEMP2; TEMP := SQRT_FLOAT(R1 * IN); OUT := TEMP * K / R0; END_FUNCTION_BLOCK The FBD segment for the flow compensation algorithm uses the above ST segment. Could you please explain how to calculate the instantaneous flow rate?
In the ST paragraph, what does IN mean in TEMP:=SQRT_FLOAT(R1*IN)?
I’m an outsider; I’m just offering some suggestions. In cases related to this area that fall within the scope of software services, they have an obligation to provide training; this is usually specified in the contract. If it’s an issue with the software service, then that’s a problem; it might be a question that can’t be asked. :)
IN is the differential pressure value of the differential pressure transmitter.
This post was last edited by jlshnlhj on 2019-9-13 22:38. IN is the input terminal. The content of the ST section generated a custom module: PT_FLOW. You are to provide the two PT_FLOW modules on the right side of the diagram below. On the left side of this module are the terminals IN, R0, PI, TI, E, and K, while on the right side is the OUT terminal. Where the IN data comes from is clear from the diagram.
The ST paragraph is standard PASCAL language, which feels very familiar! Everyone who has studied PASCAL is familiar with it! VAR_INPUT is used to define input variables, VAR_OUTPUT is used to define output variables, VAR is used to define intermediate variables; the rest are the calculation formulas – the ideal gas law, right?
Why isn’t parameter E used in the algorithm?