My goal is to set a string variable in my PLC code via my Twincat Hmi project. Setting a Textbox in the Twincat Hmi is no problem, however setting the string variable in my Plc code via the textbox in the Hmi does not seem to work.
When I tested this, the string variable in my Plc code would not change when I changed the value in the textbox of the Hmi. However, the other way around, when I changed the value in the Plc the value of the textbox would change. But I also hoped that I could change the Plc variable via the Hmi.
Does anyone know what I should be doing differently, in order to realize this goal?
You need to change the binding mode to two-way as explained on InfoSyS:
1 Binding mode: Binding mode determines whether the binding acts in one direction or in both directions.
One-way binding (read-only): The value of the symbol is read.
Two-way binding (read and write access): The value of the symbol is read and the symbol is written when a specific event is triggered.