Template variable without hardware binding
A template variable must contain a hardware binding.
Erroneous code example:
VAR_CONFIG
main.foo.bar AT %IX1.0 : BOOL;
END_VAR
PROGRAM main
VAR
foo : foo_fb;
END_VAR
END_PROGRAM
FUNCTION_BLOCK foo_fb
VAR
bar : BOOL;
END_VAR
END_FUNCTION_BLOCK
In this example the VAR_CONFIG
block declares the bar
variable inside foo_fb
as a
template variable. However bar
does not have a hardware binding. For the example to be
considered valid, bar
should have been declared as e.g. bar AT %I* : BOOL
.