T30 display and opcua connection issues

Hi everybody,

I need to change the vnc server address on a T30 display that is used as a vnc viewer, and I’m using opcua with AsOpcUac library to do that ( I honestly don’t know if there are other ways).

The procedure I use is the followin:

  • set ip address of the vnc server
  • save configuration
  • load configuration (needed to make the changes active)

when I set load configuration there’s a reset/restart of some type and the connection is lost, but this is normal.

Problem is that for about 12 seconds it’s impossible to connect anymore. I can try to connect continuously but it’s impossible to connect and I keep getting error 2147811328. If I wait those 10-15 seconds, the connection works perfectly.

why is that?

I double checked with UAExpert, just to rule out actual issues on the opcua connection, but with it works good. when I call load config, it takes 5-6 seconds to reconnect and that’s it.

These are the FB parameters:

	SessionConnectInfo_0.SecurityMsgMode  := UASecurityMsgMode_None;
    SessionConnectInfo_0.SecurityPolicy   := UASecurityPolicy_None;
    SessionConnectInfo_0.TransportProfile := UATP_UATcp;
    SessionConnectInfo_0.UserIdentityToken.UserIdentityTokenType := UAUITT_Anonymous;
    SessionConnectInfo_0.SessionTimeout    := T#3s;
    SessionConnectInfo_0.MonitorConnection := T#3s;
	
	UA_Connect_0(
		SessionConnectInfo 	:= SessionConnectInfo_0,
		Timeout 			:= T#3s 
	);
	
	UA_Connect_0.ServerEndpointUrl := CONCAT('opc.tcp://', Configuration.display_address_ip); 
	UA_Connect_0.ServerEndpointUrl := CONCAT(UA_Connect_0.ServerEndpointUrl, ':');
	UA_Connect_0.ServerEndpointUrl := CONCAT(UA_Connect_0.ServerEndpointUrl, Configuration.display_address_port);

Thanks

Hi,

it could be a “normal” TCP protocol behavior based on so-called half-open TCP connections and / or TCP timeout handling in the TCP stacks when connections are interrupted without closing the TCP channels before by a valid 3-way handshake (e.g. by reconfigurations / device reboots or similar).
In such cases, it can take some time until both communication partners have closed the “outdated” TCP channels on their side and re-opened a valid connection.

But it’s hard to say if this is really the reason behind, this could only be investigated when having a complete TCP trace of the issue.

Nevertheless, I have some more questions about the issue that I’ve not understood completely yet:

  • when changing the IP address of the VNC server, then the IP address of the PLC itself also changes, or (as the VNC server resides on the PLC)? How and when is that done?
  • which connection cannot be established for at least 12 seconds? Only the OPC UA connection (which is a TCP client on the PLC), or also the VNC connection (which is a TCP server on the PLC)?
  • I haven’t found any information about error 2147811328, where is this error thrown, from which function block?
  • what image version do you use on the T30 panel, and what Automation Runtime version in the PLC?

Best regards!

Hi @alexander.hefner thank you for your answer.

Here are my answers to your questions:

  • the display is only a vnc viewer, so when I change its vnc server, it just points to another device and not to the plc anymore. basically during normal working conditions it could switch between the plc and another device, and the only solution I found to do that is by using opcua.
  • only the opcua connection does not work. the vnc switches immediately and I can work normally on the new device the vnc switched to.
  • that error is thrown by UA_Connect, for what I found it’s generic “low level communication error”.
  • display firmware: 1.7.1 , AR I4.93

I just noticed that the problem almost disappears with an older display firmware, very strange.

I already reported the issue to my local B&R support team, still waiting for their answer

Hi,

okay, thanks for your response!

From what you described, for me it sounds indeed most probably to a half-open TCP or similar (one side of the TCP channel doesn’t closes the connection completely).

One thing could be worth an additional test (I can’t see in your code snippet if a UA_Disconnect is called somwhere already):
After VNC settings changes are applied via OPC UA, try to call UA_Disconnect and check if UA_Disconnect also returns an error code. If not, try calling UA_Connect again after the UA_Disconnect call has finished to reestablish the connection to the UA server.

Please keep us updated here in the Community with the local support teams response and your findings, thanks!

Best regards!

Hi,

sorry I missed your reply. I tried what you said but UA_disconnect does not work because the connection is dropped as soon as the load config is called.

So if I try to call it after the load config, it fails and I get a 2684878848 error.

Local support team is investigating the issue since 2 weeks but apparently they are not able to replicate the issue so maybe it’s just my display that is faulty.. I also tried to update to the latest firmware but I don’t see any changes.