I have troubles with making IO visible on the HMI.
Normally, I would connect the IO modules to a PLC variable, which makes it available on the HMI.
In the project I am working on right now we only have a c++ program. For connecting the IO, I have declared multiple Ports in Cpp. These are then connected to the IO ports in PLCNext --> Portlist.
If connected there, it seems to me that the process data item of the IO module can't be linked to a PLC Variable. It is also not possible to check the HMI-tag in the portlist, since it is a read-only field. That brought me to the next option: configuring in Cpp. I have added 'Ehmi' to the attributes, which checks the tag behind the Port in the Portlist. But I still couldn't select the Port on the HMI. That is possibly because of this:
[quote]Ehmi | The variable is visible for the PLCnext Engineer HMI.
( Note: This attribute is currently not implemented. Implementation is planned.) [/quote]
[url="https://www.plcnext.help/te/Programming/Cpp/Cpp_program_structure/IComponent_and_IProgram.htm"]IComponent_and_IProgram[/url]
So what would be the easiest way to solve this problem? When is it possible to get the ports available with the Ehmi Attribute?
Arne
[quote]I have added 'Ehmi' to the attributes, which checks the tag behind the Port in the Portlist. But I still couldn't select the Port on the HMI. That is possibly because of this:
[quote]Ehmi | The variable is visible for the PLCnext Engineer HMI.
( Note: This attribute is currently not implemented. Implementation is planned.)[/quote][/quote]
Yes, it is because of that, and I am afraid that we don't have any information about when this will be implemented (sorry).
I can see the problem you're having. Here is one suggestion:
OUT ports can send data to more than one IN port (just right-click the OUT port in the Port List, and select "Duplicate OUT Port"). So you can connect an input from an I/O module (i.e. an OUT port) to multiple IN ports, whether those IN ports are on C++ or IEC program instances.
On the other hand, each IN port can only receive data from one OUT port, for reasons that I hope are obvious. In that case, every output on an I/O module (i.e. an IN port) that is driven by an OUT port on a C++ program instance, can only be connected to that one OUT port. But, the OUT port on the C++ program instance could also be connected to another IN port, perhaps on an IEC program instance.
After getting your head around the above, if you find that it's not possible to mark one of your IN or OUT ports with the HMI attribute, it should be possible to duplicate any OUT port and connect it to another IN port, maybe an IN port on a "Dummy" IEC program instance that only has a variable table. Those IN port variables can be marked with the HMI attribute, and so can be displayed on HMI pages.
I know this is a clunky solution, so if it doesn't work for you please let us know and I can ask around for better ideas.
Hmm, allright. Thanks for the quick answer! If this is the only working solution I will deal with it. I did thought about this myself, but it looked a bit odd to me. So if anyone has a better solution it would be great. But for now I will try this and update the post after the weekend.
I have a vague recollection that the Ehmi attribute actually does make a C++ port variable accessible through the REST interface, but the variable doesn’t appear in the Data Dictionary which is why it’s not selectable in the HMI editor. I can find out for sure tomorrow, but if it’s possible for you to test this you might be able to confirm this.
> when i go to a variables rest endpoint, I get
> ""value": null"
> Not sure if I am doing something wrong but the changing value of the variable does not come through.
>
>