Check to see if you have the option "Access MyMachine /OPC UA 6FC5800-0AP67-0YB0" activated (Startup->Licenses). If the license is not enabled the license will need to be purchased from Siemens.
FIG above: Activate License
FIG above: Configure OPC UA
Note: The steps below are typically auto-filled when the license is activated. Just verify they have been populated and that the Activate OPCUA option has been turned on.
IP Address is automatically set according to the HMI configuration,
Enter 4840 in field Port (1)
Enter a username for the Administrator (2) of the OPC UA server on the controller, such as OPCUAUSER
Enter and confirm the password for this user (3). such as OPCUAPWD1
Check ‘Activate OPC UA’, click [OK].
Important note: Please ensure that the date and time on your HMI is correct, otherwise certificate based OPC UA authentication does not work!