PLCgen: allow connecting algebraic variables for PLC output ports
Hi all,
For the PLC-code of the lock we want to be able to receive data of the water heights inside and outside a lockhead. Currently we receive this data as input with data type real.
Next we want to send this data out again to our SCADA, to display on the screen. However, we dont want to send this input directly through to the SCADA, but save it first:
This value we write as an output to our SCADA:
However, for the generation of PLC code we receive the following error:
ERROR: The 'CIF name' field containing "SCADAMapping.Bovenhoofd.GelijkwaterSensor.Q_Buitenzijde_Waterniveau" does not indicate an input or discrete variable (third field at line 76 of I/O table file "../PLC-code/io_table.csv").
The generator cannot work with algebraic variables for IO's. Writing the output as a discrete variable does not work for real data type, as it needs to be continuously updated and is not dependent on the trigger of an event.
The question therefore is, what is a feasible solution here? Is there a way to write our model differently to gain the correct result? Or should the generator be adapted to also include algebraic variables for the IO's?
I remember mentioning this question before, but Im not sure if an issue already existed for this.
Addresses #679.