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
Array with size 1 possible?
June 15, 2016
10:35, EEST
Avatar
Ibrahim
Member
Members
Forum Posts: 76
Member Since:
August 20, 2014
sp_UserOfflineSmall Offline

Hi,
is it possible in OPC UA to read an array of size 1? We had the problem that a Siemens PLC was upgraded with the Simatic Server to OPC UA. Inside the PLC programm it is possible (and sometimes necessary) to create arrays of size 1. Those arrays were no longer arrays in OPC UA and the Java SDK didn’t recognize them as arrays, but as primitive variables.
Question: Is it even possible to read an arrays of size 1?

Thanks

Ibrahim

June 15, 2016
12:45, EEST
Avatar
Heikki Tahvanainen
Moderator
Members

Moderators
Forum Posts: 402
Member Since:
April 17, 2013
sp_UserOfflineSmall Offline

Hello,

Yes, it’s possible to have arrays of size 1 in OPC UA.

In OPC UA, array data types are defined by DataType, ValueRank and ArrayDimensions attributes. As a first step, you should see what values these attributes contain.

June 15, 2016
15:03, EEST
Avatar
Ibrahim
Member
Members
Forum Posts: 76
Member Since:
August 20, 2014
sp_UserOfflineSmall Offline

Hi,
thanks for the quick answer.
I checked the mentioned variable again and its attributes. This are the values:
DataType: Int32
ValueRank: 1
ArrayDimensions: UInt32 Array[1] –> [0] 1

But the strange thing is, that if i call “…isArray()” on this NodeId, i get false… What could be the reason for this? I also tried to write a primitive int value into this NodeId and it worked fine.

Thanks
Ibrahim

June 15, 2016
16:07, EEST
Avatar
Heikki Tahvanainen
Moderator
Members

Moderators
Forum Posts: 402
Member Since:
April 17, 2013
sp_UserOfflineSmall Offline

Hello,

Thank you for the reply. The node attributes have sensible values.

It seems like the server responds with scalar values even though array values should be used. This seems like a purely server side issue, the client SDK should not modify the received values in any way. Also, writing scalar value to this node should fail because the supplied value is not of the same type as the attribute’s value. This check should be done in the server application. You should inform the server vendor about these issues.

Please let us know if you have further comments or questions about this.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
9 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

TimK: 41

Member Stats:

Guest Posters: 0

Members: 684

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

digitechroshni, LouieWreve, Kickbiche, karrimacvitie5, graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma

Moderators: Jouni Aro: 1010, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1