Activating OPC UA on PLC causes exception

When I activate OPC UA on my X20 CP 0482 project, then transfer to target, my PLC keeps on getting the following exceptions:

Are there additional setup steps I need to implement ?

Hi Greg,

normally, in the first steps there’s nothing more to do. Only activating the OPC UA server and adding a default view should be enough.

I could imagine that the project already has some trouble with memory violation (for example accidently writing arrays or strings above the the variables size), but they haven’t lead yet to a pagefault because the violatrd memory wasn’t used before. But after activating OPC UA, this memory is now used by the OPC UA system which could lead to a pagefault in the OPC UAs memory area.
To check this, I would recommend first to deactivate the whole user code (disabling all tasks), check if pagefault still occurs, if not then activate task by task until it happens again - this qon’t solve the issue but should give you a direction where to start searching for the memory violation root cause.

Also doing a quick test with an new empty project that has only the OPC UA server activated could help to find out if there’s a general issue with the systems configuration setup.

Please see also this post with very good hints how to systematically analyse pagefaults:

Hope that information helps a bit,
Best regards!

1 Like

Also X20CP0482 does not have too much RAM to start with, might also be that it just runs out of RAM. You can easily check the amount of used and available RAM from System Diagnostics Manager or in Automation Studio (Online → Info).


Thank you for your help. I tried an empty project with OPC UA activated, and found that the project and PLC run with no exceptions. When I add a HMI to the hardware configuration I get the exception:

Similar if I add another Ethernet device (OPCUa_any), I get the exception:

If I add a generic ethernet hub to the IF2 port, then the project runs without exceptions:

I would like to find out if there is a problem with the way I’m configuring my network.


Could you upgrade to the latest upgrades for T50 and X20CP0482 ?

I am not exactly sure, which T50 you have.
How many devices are connected to this ETH interface ?
The T50 used does not have a switch, so to connect more components you will need a switch or hub in the configuration.

Thanks for the response @corne.geerts
I upgraded the PLC firmware to
But with our without a hub, and with only an OPCUA device connected (no HMI), I still get exceptions.

The factor that seems to cause the exception is having a Station device ST1 hanging off IF2 and having OPC UA activated on the IF2 interface.

It turns out that the exception was getting caused by the IF2 not finding a valid endpoint.

When I set up an OpcUa_Any device with an endpoint to the IF2 the exception disappeared.


Hi Greg @c595912,

many thanks for sharing your solution, I wasn’t aware of that a any device without configured endpoint will cause that!