OPC UA connection problem

Hello, I’m establishing a SCADA connection via OPC UA using symbol configuration.
CPU: 750-8112
Fw: 28

The connection occasionally drops, and I have to restart OPC via WBM to regain access.

Is there a place on the CPU side where OPC can be configured?
The SCADA unit told me I need to check the maximum number of sessions.

Hi hkn_blt.

If you have the ability to convert your application to our newest release of Codesys (3.5 - Service pack 21 - Patch 5) and Firmware 31. Please give this a try, as there has been several improvements to OPC-UA.

Best Regards Jan

I have a very similar issue as well. My PLC is a 750-8212 with firmware 30. I’ve trued OPC UA on firmware 26, 28, 29 and 30 as well as several versions of Codesys. The problem has persisted through all versions with no improvement.

The problem lies in the way how they pfc200 series handles his cycle times.

I’ve had a application with about 10 OPC-tags which was running fijne

Once I had more tags the PFC started to crash, the more OPC tags the faster it went into crash.

Ik have moved my Scalda tags to Modbus which works great without crashes.

I don’t want to migrate to Modbus. There are many tags in the project. Is there a library where I can manage OPC settings? Because I can’t modify the settings.

Hello, I’ve had great success in terms of stability with the following configuration under /etc/codesys3.d/CODESYSControl_User.cfg.

[CmpOPCUAServer]
MaxSessions=32
SessionTimeout=60000
SchedulerResolution=20
ItemMinSamplingRate=500
WorkerTaskDynamic=0
WorkerTasksMax=20
MaxQueueSize=100
Priority=50

[CmpOPCUAStack]
TraceLevel=1023
MaxBufferSize=16777216
MaxMessageSize=2097152

Ever since I set these parameters I have experienced no crashes on the PLC. From my experience a stable network connection is also required. Make sure that your network has no packet loss and there’s enough bandwidth to support the OPC UA server communication.


Hello,

Unfortunately, I am also having problems with an OPC interface. I have several 750-8213 units running firmware version 31.

Could you please tell me where you got the configuration parameters? I am only familiar with the standard ones and cannot find the settings you are using. I would like to test them out when I get the chance.

Did you compare with default settings?
For me helps only this value, because by default sampilngrate is 100 ms.

And OPC Server triggered sampling when you write value in the programm, usually it happens every cycle, yes?
Also for some OPC tags I create program that called only once per second.
but this is not comfortable..

Yes, as far as I understand, ItemMinSamplingRate defines how frequently the server replies to read/write requests to clients.

So if it is set to 500ms, like in my example, it means that the client can only get served every 500ms. Essentially, the server checks every 500ms if there is a read/write request in any of its open channels and if there is, the data gets written/read according to the request.

Even if you write a value, the change will only show up at the next browse of the server. You can check this with UAexpert for example, a written datapoint usually won’t update immediately (unless you accidentally time it just as the server is about to update) on the PLC because it has to wait for the server to update.
If the OPC UA client is set to request data at faster intervals, the “excess” requests get dropped.
In my case I have the client set to browse data every 1000ms so the setting is only really there as a safeguard.

Hello,

I have to be honest, a much more knowledgeable person told me about these settings but from what I have been told these are standard parameters of the OPC UA SDK version that Wago uses for their PLCs.

You are able to use these settings by adding the appropriate lines from my previous post to the config file at /etc/codesys3.d/CODESYSControl_User.cfg on the PLC you are using.

Hm, before I set subscription in the OPC Client 1000 ms, and Queue Size was 10 by default.
And what I see in the response? I saw 10 values in the one reply from PLC, because Sampling rate was 100 ms.

Then I changed Sampling Rate to 500 ms, and Queue Size to 1.

I mean that OPC Client can have different subscription with different Rate, but OPC Server provides “new” data depending in Sampling Rate to 500 ms