Hello,
I have a text input in my HMI, one “Save” Button and one “Load” Button.
I want the change button to save the text input into a file and the load button to load from the file into the text input in the HMI, but I cannot do that because I can declare my text input variable as either [Global, InputPort] or [Global, OutputPort] in my C# Program.
Is there any way to do that without a second variable?
Thank you once again.
Hello Dimitri,
The global variables, unlike the port-variables and local ones, are accessible throughout the whole project. It means the specific global variable (name) can be declared only once in project.
Because you can start multiple program instances, it is not possible to declare the In- and Outport variables as global variables.
Plese find the C# examples under following link, I think it will help you:
CSharpExamples/PLCnext_CSharpExamples at master · PLCnext/CSharpExamples · GitHub
BR Eduard