The keyword %PlcHost% is replaced with the hostname or IP address configured for the target system where the PLC runtime is located by OES when exporting the HMI and DatAccess configuration, not at runtime. It has nothing to do with a PLC variable, and obviously inventing new keywords doesn't work.
Best practice is to configure the hostname instead of the IP address at the target system hosting the PLC. In this case, you can use %PlcHost%. But the way you did it should also work.
... View more