02 en OpcUaDataAccessServer
02 en OpcUaDataAccessServer
OPC UA OPC UA
server server
Machine Machine
PLC PLC
Registering Nodes
Publishing
Browse Request
Call Request ( )
R/W Request
R/W Request
Browse Response
Call Response ( )
R/W Response
R/W Response
Node Handles
Sampling
Node ID:
• Items in an OPC UA server are adressed by NodeIds.
• A NodeId is a unique identifier for an item inside a server NodeId
• NodeId = NamspaceIndex + IdentifierType + Identifier
Namespace(Index)
IdentifierType
Namespace:
• A server can holds multiple namespaces Identifier
• Namespaces are adressed with namespace indexes
• The OPC UA foundation namespace has index 0 ns=0;s=ServerState ns=0;i=2259
3 0
String Numeric
ServerState 2259
Browse
OPC UA
server
Browse request
Node ID = 84 (root folder), BrowseDirection = forward
Browse response
Node ID, browse name, display name, node class, type def
*: Screenshots by Unified Automation - UAexpert
Browse
1
Browse request
2
Node ID: ns=0; i=84, BrowseDirection = forward
Browse response
BrowseName NodeID
Objects ns=0; i=85
Types ns=0; i=86
Views ns=0; i=87
1
Browse request
2
Node ID: ns=0; i=85, BrowseDirection = forward
Browse response
BrowseName NodeID
DeviceSet ns=2; i=5001
PlcUAServer ns=3; s=PLC
Server ns=0; i=2253
1
Browse request
2
Node ID: ns=3; s=PLC, BrowseDirection = forward
Browse response
BrowseName NodeID
Counters ns=3; s=Counters
DataBlocksGlobal ns=3; s=DataBlocksGlobal
DataBlocksInstance ns=3; s=DataBlocksInstance
DeviceManual ns=3; s=DeviceManual
*: Screenshots by Unified Automation - UAexpert •••
Unrestricted © Siemens 2019
S7-1500 OPC UA Server
Browsing
1
Browse request
2
Node ID: ns=3; s=DataBlocksGlobal, BrowseDirection = forward
Browse response
BrowseName NodeID
HistoryData ns=3; s=“HistoryData”
InterfaceData ns=3; s=“InterfaceData”
1
Browse request
2
Node ID: ns=3; s=“InterfaceData”, BrowseDirection = forward
Browse response
BrowseName NodeID
drive1 ns=3; s=“InterfaceData”.”drive1”
drive2 ns=3; s=“InterfaceData”.”drive2”
machineInRun ns=3; s=“InterfaceData”.”machineInRun”
timePLC ns=3; s=“InterfaceData”.”timePLC”
*: Screenshots by Unified Automation - UAexpert
1
Browse request
2
Node ID: ns=3; s=“InterfaceData”.”drive1”, BrowseDirection = forward
Browse response
BrowseName NodeID
actualSpeed ns=3; s=“InterfaceData”.”drive1”.”actualSpeed”
excecute ns=3; s=“InterfaceData”.”drive1”.”execute”
isActive ns=3; s=“InterfaceData”.”drive1”.”isActive”
motionSequence ns=3; s=“InterfaceData”.”drive1”.”motionSequence”
*: Screenshots by Unified Automation - UAexpert result ns=3; s=“InterfaceData”.”drive1”.”result”
Unrestricted © Siemens 2019
S7-1500 OPC UA Server
Browsing
1
Browse request
2 Node ID: ns=3; s=“InterfaceData”.”drive1”.”actualSpeed”,
BrowseDirection = forward
Browse response
ArraySize: -1
Read / Write
OPC UA
server
Read request
Node ID: ns=3; s=“InterfaceData”.”drive1”.”actualSpeed”, Attribute: Value
Data access
100
Drive1.actualSpeed
Read request
Node ID: s=“InterfaceData”.”drive1”.”actualSpeed”
Node ID = "123456789“, Attribute: Value Node Handle: "123456789"
100
123456789 100
Read response
123456789
Value = “100”, Timestamp = 10/29/2018 3:15pm, Status = Good
Data access
Subscribe
OPC UA
Subscribe
server Node ID: s=“InterfaceData”.”drive1”.”actualSpeed”, Attribute: Value
Publishing interval: 5s, Sampling interval: 1s
Sampling Queue
Publishing 500
100
100
500 Value = “500”,
“100”, Timestamp = 10/29/2018 3:15pm, Status = Good
Drive1.
Drive1.actualSpeed
actualSpeed Publishing
Sampling
500
100 Load reduction for monitoring use cases
Drive1.actualSpeed (Compared to polling)
Client
OPC UA Server
Subscription Create subscription Parameters defined by the client:
Item 1 Create monitored items
• Queue size
• Sampling interval
Item 2
• Publishing interval
Publish request
Item 3 Publish req.3
req.2
Queue req.1
Config parameters in the server:
req.1
• Min. possible sampling interval
f req.1 Item1
Item2
• Min. possible publishing interval
Sampling Publishing Item3
• Max. number of monitored items
e.g. 500ms e.g. 1000ms
Memory
Memory
Item 1 Item 2 Item 3
Normal behavior of sampling • All items with the same sampling interval are
tsampling tsampling linked to a timer-triggered list
Comm.
Sampling
• The sampling is only excecuted if the previous
Sampling Sampling
tasks sampling task has been finished in time
!
Overload behavior of sampling An overload behavior will cause two publishs
with all items related to the affected sampling interval:
tsampling tsampling
Publishing 1: Publishing 2:
Not executed! Good Good_Overload Good_Overload Good
Comm.
Sampling Sampling This may temporarily cause a high communication load
tasks
LIVE DEMO
Online Support:
C# OPC UA client • Configuration in TIA Portal
• Read of Data
LIVE DEMO
Online Support:
C# OPC UA client • Configuration in TIA Portal
• Read of Data
Methods
OPC UA
server
Drive
Method FB
Call request
Node ID==“instDrive".“Method“,
NodeID “instDrive".“Method“, InputArguments:
InputArguments:[ [DriveSpeed
driveSpeed==“99999”
“1000” ]]
SetDrive
Speed
Call response
OutputArguments: [timeExecuted
OutputArguments: = “11:35“=] “11:30“
[ timeExecuted ] =Status
Status BadInvalidArgument
= Good
RPM: 1000
0
Methods
LIVE DEMO
Online Support:
OPC UA method examples
Drive1.
actualSpeed
LIVE DEMO
Online Support:
OPC UA method examples
Drive1.
actualSpeed
Cloud
Gateway
Methods could be used for consistent data
Data
Server Shopfloor IT which require interaction with the other system.
(e.g. call a method to start a job in a machine)
ReadMachineParam
Subscriptions could be used to monitor
machine data.
OEE
(e.g. monitor changes of OEE data)
OEE
OEE
OEE