Make sure that you have the option "Access MyMachine /OPC UA 6FC5800-0AP67-0YB0" activated (Startup->Licenses). Note: if your machine is an embedded Siemens control with an overlay from another machine tool builder you will need to reach out to that tool builder to activate the OPC UA option as it may interfere with their customizations to the control.
FIG above: Activate License
Start the OPC UA configuration in area [Startup]->[Network]->[OPC UA]
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!