1 # collection of compound functions which can be realized with THAT
4 define openamp (weight*: variable-1, …) -> output
5 isum (weight*: variable-1, …) -> output
9 define idivide (numerator, denominator) -> -quotient
10 openamp (numerator, product) -> -quotient
11 multiply (-quotient, denominator) -> product
13 # Integration extension
14 define iintegrate (weight*: variable-1, …, ic: variable-IC, limit: gt0) -> variable-n
15 iintegrate (weight*: variable-1, …) -> variable-n
16 diode (cat:variable-n) -> DA
18 # diode and connect used to limit the result to values >0
20 # Building an additional integrator with the help of an openamp
21 define iintegrate.additional (variable) -> integral
22 openamp variable -> integral
24 capacitor.100nF (integral) -> cp
25 # NB: The 100 nF capacitor is available on a THAT. This capacitance corresponds to those of the SLOW settings. In order to use the standard time constant an external 1 nF capacitor has to be used.
28 define isum (weight*: variable-1, …, /divisor) -> -result
29 isum (weight*: variable-1, …) -> -result
30 connect (-result, …) -> IN