Activating OPC UA on PLC causes exception

Hi,
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).

3 Likes

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:
image

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

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

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

Thanks

Could you upgrade to the latest upgrades for T50 and X20CP0482 ?
https://www.br-automation.com/en/downloads/software/automation-studio/hw-upgrades/v43-hw-upgrade-x20cp0482/

https://www.br-automation.com/en/downloads/software/automation-studio/hw-upgrades/v43-hw-upgrade-6ppt50101e-16a/

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 1.8.1.0
But with our without a hub, and with only an OPCUA device connected (no HMI), I still get exceptions.
image

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.

2 Likes

Hi Greg @c595912,

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