Activating OPC UA on PLC causes exception

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