0% found this document useful (0 votes)
36 views30 pages

02 en OpcUaDataAccessServer

Uploaded by

hieu.pham99a
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views30 pages

02 en OpcUaDataAccessServer

Uploaded by

hieu.pham99a
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

SIMATIC OPC UA

Web based training


Part 2  S7-1500 OPC UA Data Access Server
Unrestricted © Siemens AG 2019 siemens.com/opcua

Unrestricted © Siemens AG 2019


Agenda

Unrestricted © Siemens AG 2019


S7-1500 OPC UA data access server
Use cases

Vertical line integration: e.g. MES, SCADA

OPC UA OPC UA
server server

Machine Machine

PLC PLC

Unrestricted © Siemens AG 2019


S7-1500 OPC UA Server
Feature Set with TIA V15.1 and FW 2.6

Browsing Read/Write Registered Subscription Methods


Read/Write

Client Client Client Client Client

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

Server Server Server Server Server

High performance Load reduction for Consistent data


Browsing of PLC Acyclic access to
with repeated HMI / monitoring transfer through
data data
acyclic access applications function call

Unrestricted © Siemens 2019


OPC UA address space
NodeId and namespaces

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

Intern © Siemens AG 2019


OPC UA address space
NodeId and Namespaces
NamespaceArray:
• The NamespaceArray shows all namespaces URIs available on the server
• The array index of the Namspace URI is the NamespaceIndex

Intern © Siemens AG 2019


S7-1500 OPC UA server
Functional scope

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

• Browsing of PLC data • Dynamic adaptation of clients to data available on a server

Unrestricted © Siemens 2019


S7-1500 OPC UA Server
Browsing

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

*: Screenshots by Unified Automation - UAexpert

Unrestricted © Siemens 2019


S7-1500 OPC UA Server
Browsing

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

*: Screenshots by Unified Automation - UAexpert

Unrestricted © Siemens 2019


S7-1500 OPC UA Server
Browsing

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”

*: Screenshots by Unified Automation - UAexpert

Unrestricted © Siemens 2019


S7-1500 OPC UA Server
Browsing

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

Unrestricted © Siemens 2019


S7-1500 OPC UA Server
Browsing

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

*: Screenshots by Unified Automation - UAexpert

Unrestricted © Siemens 2019


S7-1500 OPC UA server
Functional scope

Read / Write

OPC UA
server
Read request
Node ID: ns=3; s=“InterfaceData”.”drive1”.”actualSpeed”, Attribute: Value

Read response 100


100
Drive1. Value = “100”, Timestamp = 10/29/2018 3:15pm, Status = Good
actualSpeed Drive1.actualSpeed

Data access

100

Drive1.actualSpeed

• Symbolic read / write access to PLC data

Unrestricted © Siemens 2019


S7-1500 OPC UA server
Functional scope

Registered Read / Write

OPC UA Register Node request


Node ID: s=“InterfaceData”.”drive1”.”actualSpeed”
server Register Node response Node ID = i=“123456789"
Node ID: "123456789“
Memory: 16# ABCD_01234

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

100 Performance enhancement


Drive1.actualSpeed for repeated access

• Repeated read / write access to PLC data

Unrestricted © Siemens 2019


S7-1500 OPC UA server
Functional scope

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)

• Load reduction for monitoring use cases • Absolute filters possible

Unrestricted © Siemens AG 2018


*: Simplified illustration
S7-1500 OPC UA server
Functional scope

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

Maximum sampling queue size: 10 (all CPUs)

Unrestricted © Siemens AG 2018


S7-1500 OPC UA server
Functional scope

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

Unrestricted © Siemens AG 2018


LiveDemo
Browse, Read, Subscribe

LIVE DEMO
Online Support:
C# OPC UA client • Configuration in TIA Portal

• Connect a OPC UA client to the Server

• Browse of Node Ids

• Read of Data

• Registered Read of Data


Drive1.
actualSpeed • Subscription

Restricted © Siemens AG 2019


LiveDemo
Browse, Read, Subscribe

LIVE DEMO
Online Support:
C# OPC UA client • Configuration in TIA Portal

• Connect a OPC UA client to the Server

• Browse of Node Ids

• Read of Data

• Registered Read of Data


Drive1.
actualSpeed • Subscription

Restricted © Siemens AG 2019


S7-1500 OPC UA server
Functional scope

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

• Request based interaction • Consistent data transmission without


with the user program handshakes
Intern © Siemens AG 2019
S7-1500 OPC UA server
Functional scope

Methods

• Request based interaction • Consistent data transmission without


with the user program handshakes
Intern © Siemens AG 2019
LiveDemo
Method implementation

LIVE DEMO
Online Support:
OPC UA method examples

• OPC UA method implementation in TIA Portal

• OPC UA Method Call with a client

Drive1.
actualSpeed

Restricted © Siemens AG 2019


LiveDemo
Method implementation

LIVE DEMO
Online Support:
OPC UA method examples

• OPC UA method implementation in TIA Portal

• OPC UA Method Call with a client

Drive1.
actualSpeed

Restricted © Siemens AG 2019


S7-1500 OPC UA server
General behaviors

Behavior of the OPC UA server:


• Starts - when the server is activated and the project is loaded
OPC UA server
• The server is rebooted each time the CPU is loaded
• Remains activated, even with STOP of the CPU
• Provides PLC tags as the operating mode is being changed
(RUN > STOP)
• Accepts values written by the client
• Server methods in STOP issue error message "16#00AF_0000"

Restricted © Siemens AG 2018


S7-1500 OPC UA server quantity structure
CPU 1516

CPU 1516-3 PN/DP datasheet

Unrestricted © Siemens AG 2019


S7-1500 OPC UA server quantity structure
CPU 1518

CPU 1518-4 PN/DP datasheet

Unrestricted © Siemens AG 2019


Use cases for PLC OPC UA servers

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

Read/writes could be used to do changes on


machine parameters which don't require
consistency

Unrestricted © Siemens AG 2019


Agenda

Unrestricted © Siemens AG 2019

You might also like