How to acces variables from HMI

Hello, I have some functionblock inputs and I want the HMI to be able to change those inputs. So I made External Variables in a program and wired them to an output port. I think I am able to change those externals now. Is this the best way to do this? If I set those variables as Local, I am able to check the ‘hmi’ box behind the variable. When do I want to use this instead? Thanks, Arne

Hello Arne,

using FB local variables as HMI Variables mostly makes sense if you want to create multiple instances of the same “Page”.

You can then access them like this in you eHMI page. “ProgramInstance.FBInstance.VariableName”

So lets say you have two Pumps each uses the same eHMI Template.
You do not want to create VariableName1 and VariableName2 to connect them but do something like this “PumpFB_Main.Flow” “PumpFB_Backup.Flow”
Copy the Page and simply replace PumpFB_Main with PumpFB_Backup… This is also in preperation to the Automation modules Feature that will come in one of the next Versions. where you will be able to combine IO + FBinstance + HMI Page to a “module” that can be instantiated.

hope this helps kind regards, Oliver