Hello,
I wanted to use methods on the HMI, but I heard that it's not possible (yet).. (Thread: https://www.plcnext-community.net/en/discussions-2-offcanvas/use-functionblock-methods-directly-on-ehmi.html)
So I was trying to make a workaround today. What I wanted to do is define FB1 globally. I am able to go to the PLCvariables and create a variable FB1. (The type is not in the dropdown list, but if I write it manually it is not giving an error..) But when I'm trying to use it in a program, it gives me errors that the local variable does not excist.
I can create the local variable with the same name, but then the global variable is unused. It's also not possible to change the usage of the variable in the program to something else then local. Is it possible to declare it globally?
The main goal of the way I try to program is OOP. I thought the methods could really help me out with that. But since the HMI is not able to use them, I have to make a link between variables of the HMI and the FB1. I've done this with a struct, defined as InOut. The FB1 communicates via the InOut with all values, which are stored in the GDS. After this I wanted to declare the FB1 globally. These are all workarounds, so I would prefer a different solution..
Does anybody has some experience with OOP in PLCnext Engineer?
Arne...