Compiler Error C0585
Message:
Either all generic variables need to be explicitly assigned or none
Possible error cause:
Generic function blocks can be instantiated with parameters both explicitly and implicitly. In an explicit assignment, the parameters are specified in parentheses, as is usually the case with expressions. The order of the parameters can be chosen without restriction. The following applies: Either all parameters are explicitly specified or none. A mixture of explicit and implicit specifications is not permitted and will result in an error.
Error correction:
Specify all parameters in the same way.
inst := POU<(const_1 := 12), 12>;
Message:
Either all generic variables need to be explicitly assigned or none
Correct code:
inst : POU<(const_2 := 12), (const_1 := 12)>;
For more information, see the following: VAR_GENERIC CONSTANT