Reading values from OPC-UA server|OPC UA Standard|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Reading values from OPC-UA server
Avatar
Anders Pedersen
New Member
Members
Forum Posts: 1
Member Since:
03/12/2020
sp_UserOfflineSmall Offline
1
03/12/2020 - 03:23
sp_Permalink sp_Print sp_EditHistory

Hello, unpaid intern here trying to collect data.

I have to read multiple values coming from a plc, and I have to do it through a hardly documented thirdparty webportal.

I have recieved a pdf with documentation from the PLC running the OPC-UA sever. I have name spaces, identifier types, and identifiers.

 

I think I need to format the variable ID like so:

ns=4;s=P_OPC_UA.weight

 

but the weight node appears to be an array of stuff, 0-6 values. Do I just add a [] at the end after weight;

ns=4;s=P_OPC_UA.weight[4]

like so?

Avatar
Randy Armstrong
Admin
Forum Posts: 1579
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
03/12/2020 - 07:25
sp_Permalink sp_Print

NodeIds are structures – not strings. Any string format depends on the s/w doing the parsing.

That said ‘ns=4;s=P_OPC_UA.weight’ is a UA defined syntax.

If the value is an array there is a separate parameter called IndexRange which is a comma separated list of ranges.

i.e. 2:3,4:5,2:3

where there is 1 entry in the list for each dimension in the array.

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online: Eduardo Pupo
Guest(s) 16
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1445
Posts: 4889