PLCgen TwinCAT self-certification: Cannot compare type `BOOL` with type `DINT`
Test report
Tool | Version |
---|---|
ESCET | nightly-20241023-115319 |
TwinCAT | v3.1 build 4020.56 |
Test suite | v27 |
Setup of TwinCAT as described here: https://cstweb.wtb.tue.nl/4tc00/twincat/setup.html#twincat-install. Project generated as described here: https://eclipse.dev/escet/cif/tools/plcgen/twincat.html#twincat-usage.
Test case: op_bind_and_prio_bool.cif
Encountered errors
I get 256 instances of the following error.
Cannot compare type 'BOOL' with type 'DINT'
in \Untitled1\POUs\MAIN.TcPOU
at line 5016.
The relevant piece of generated code (for this example error) is
(* Perform update of discrete variable "a.eq_lt01". *)
a_eq_lt01 := a_one < a_one = a_one < a_one;
The corresponding CIF model is
disc int one = 1;
(...)
eq_lt01 := (one < one) = (one < one),