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
cigerxwinchaker@hotmail.com
Member
Members
Forum Posts: 7
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: 801
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
cigerxwinchaker@hotmail.com
Member
Members
Forum Posts: 7
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: 801
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: 267

Currently Online: felisharedden25
11 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 120

pramanj: 86

ibrahim: 74

rocket science: 65

kapsl: 57

gjevremovic: 49

Sabari: 44

Xavier: 42

fred: 41

TimK: 41

Member Stats:

Guest Posters: 0

Members: 3124

Moderators: 17

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1277

Posts: 5457

Newest Members:

felisharedden25, valentinanoblet, XNXXguini, RobertTop, baileyuup3516, Richardlacle, inezwb11, clarissabeasley, raulakhtar528, claritanisbett4

Moderators: Jouni Aro: 942, Otso Palonen: 32, Tuomas Hiltunen: 5, janimakela: 0, Pyry: 1, Terho: 0, Petri: 0, Bjarne Boström: 801, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 25, Teppo Uimonen: 21, Markus Johansson: 41, Niklas Nurminen: 0, Matti Siponen: 209, Lusetti: 0

Administrators: admin: 1