Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
BadEncodingError/BadDecodingError on simple Variable node
August 31, 2020
13:13, EEST
Avatar
Thomas Reuther
Member
Members
Forum Posts: 33
Member Since:
September 18, 2017
sp_UserOfflineSmall Offline

Hello support,

I am just updating my server from Java SDK 3.2.0 to 4.3.0. This server is only used in test environment. For instance it creates nodes which are read by other OPCUA server.
My server contains that simple method to create an instance of BaseDataVariableType. In my test case a value does not matter.

this.rootManager.beginModelChange();
try {
BaseDataVariableTypeNode myNode = this.nodeManager.createInstance(BaseDataVariableTypeNode.class, "ABCD");
myNode.setDataTypeId(Identifiers.Double);
myFolder.addReference(myNode, Identifiers.Organizes, false);
} finally {
this.rootManager.endModelChange();
}

When I use toolkit version 3.2.0 everything is fine. All attributes of this node can be read by any OPCUA client. When I use toolkit version 4.3.0 instead than only a Prosys client can read this node. All other clients return a BadEncongError/BadDecodingError.

The list of clients:
* CTT 1.2.336.254: BadEncodingError
* UA Expert 1.5.1 (base on C/C++ toolkit 1.4.6): BadEncodingError
* Softing dataFeed Client 1.43.0: Session ReadNode error Unexpected error processing response..
* Softing .Net Standard SDK 2.10: BadDecodingError Cannot decode unknown type in Variant object (0x18).
* Unified Automation .Net Toolkit 3.0.4.0: BadDecodingError [TapTcpConnection.OnMessageReceived] Error raising MessageReceived event.|StatusException|Cannot decode unknown type in Variant object (0x18).
* The OPCUA server that wants to read nodes on my server is built using Softing C++ toolkit 5.62.2. It also fails reading my server’s node.

When I use Prosys OPCUA Client 3.2.0 I can sucessfully read all attributes of this node:
* NodeId = “ns=4;s=ABCD”
* NodeClass = Variable
* BrowseName = “4:ABCD”
* DisplayName = “ABCD”
* Description = “”
* WriteMask = 0
* UserWriteMask = 0
* Value = { Value = null, StatusCode = Good, SourceTimestamp = 08/31/20 09:57:38.5400000 GMT, ServerTimestamp = 08/31/20 09:57:38.5220000 GMT }
* DataType = “i=11” (Double)
* ValueRank = -2 (Any)
* ArrayDimensions = null
* AccessLevel = 3 (CurrentRead, CurrentWrite)
* UserAccessLevel = 3 (CurrentRead, CurrentWrite)
* MinimumSamplingInterval = -1.0
* Historizing = false

All attribute values (except timestamps) are the same for toolkit 3.2.0 as well as 4.3.0. The only difference is that I can read my server’s node only with Prosys client.

This affects only nodes created at runtime. Static node created from model (node set file upload) are not affected and can successfully read.
I have no idea why my nodes are treated as erroneous by so many other clients.

Thomas Reuther

August 31, 2020
14:04, EEST
Avatar
Thomas Reuther
Member
Members
Forum Posts: 33
Member Since:
September 18, 2017
sp_UserOfflineSmall Offline

The number “0x18” (= 24) made me think about BaseDataType (i=24). By consulting the Migration doc about “BaseDataType” I read you have changed mapping from “Variant” to “Object”. This suggested me to provide a particulcar value instead of none. I add one line to my code:

myNode.setValue((Double)null);

and now it works.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
36 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 144

rocket science: 88

pramanj: 86

Francesco Zambon: 83

Ibrahim: 78

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 739

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1524

Posts: 6453

Newest Members:

shaylamaggard4, rickyjuarez140, jonathonmcintyre, fannielima, kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1027, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0

Administrators: admin: 1