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
How to read Items from OPC UA?
August 5, 2022
11:48, EEST
Avatar
CC
Member
Members
Forum Posts: 8
Member Since:
August 4, 2022
sp_UserOfflineSmall Offline

I couldnt find any example of how to read one exact Item from my Server. So how would you read a specific Item which lets say has the ID 1.

August 8, 2022
9:57, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 983
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

Please clarify what you mean, a term “one item from server” doesn’t mean anything in OPC UA.

Just to doublecheck even though you used UA in the title, are you actually trying to connect to a OPC Classic Server and not OPC UA Server (these are basically 2 completely different technologies; like there are gateways to convert things, but our java-based SDK is only for OPC UA)?

Assuming the term was just used in a more generic interpretation (or based on the Classic background) and we are talking about OPC UA, note that in OPC UA there are Nodes which are defined via unique NodeId and then each node has an number of Attributes (of which the NodeId is one as well). Thus you will know or look up the NodeId and then with that you can select an attribute of the node when reading.

So, assuming you mean e.g. the Value Attribute of a node, then you would use one of the UaClient.readValue(…) methods with the NodeId, or readAttribute if something else than Value.

August 10, 2022
14:34, EEST
Avatar
CC
Member
Members
Forum Posts: 8
Member Since:
August 4, 2022
sp_UserOfflineSmall Offline

Hey, i am talking about the OPC UA Server. The problem i have right now is that i cant read any Node or any attribute even though i know the nodeID. I dont really understand what to give into ( new NodeID(i, x) ). So my question now is what is i and x. I think that i must be the identifier of the nodeid or am i wrong?

August 10, 2022
14:38, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 983
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Did you already read the tutorials that come with the SDK?

Also, please use e.g. https://www.prosysopc.com/products/opc-ua-browser/ first to look around the address space “tree”, it might make more sense after that.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
18 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

ibrahim: 75

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 685

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6259

Newest Members:

fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com, aytule, rashadbrownrigg, christi10l, ahamad1, Flores Frederick, ellenmoss

Moderators: Jouni Aro: 1009, 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