EasyManua.ls Logo

Siemens Simatic S7-400 - Page 81

Siemens Simatic S7-400
136 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Programming the OPC UA client blocks
5.1 Program blocks for the OPC UA client
CP 443-1 OPC UA
Operating Instructions, 01/2017, C79000-G8976-C427-02
81
Creating the SFCs in STEP 7 Professional
1. Create the system functions by opening an organization block in the block directory of the
CPU, for example OB1.
2. In the block catalog that is displayed by opening OB1, expand the corresponding block
group.
You will find the SFCs in the following block folders:
BLKMOV (SFC20): "Simple instructions" group > "Move" folder
TIME_TCK (SFC64): "Extended instructions" group > "Date and time" folder
LGC_GADR (SFC 49): "Extended instructions" > "Addressing" folder
RDSYSST (SFC 51): "Extended instructions" group > "Diagnostics" folder
3. Drag the SFCs to the network of the organization block and supply the parameters of the
SFCs.
Calling the program blocks and their interaction
Note
General notes on the program blocks and instance DBs
Each program block must be called cyclically until the status parameter “Done” or "Error"
changes to 1.
Within a session only a single block can be called at any one time. Different blocks can only
be processed one after a
nother in a session.
In the properties of the instance DBs of the FBs listed above, always enable the option "Non
-
Retain" so that the data of the instance DBs is correctly initialized after STOP > START
(SIMATIC Manager > select block > shortcut menu "Obje
ct properties" > "General -Part 2"
tab).
With UA_Connect you establish a connection from the CP as OPC UA client to a UA server
and open a session. The block must be called for every connection to a UA server. When
necessary for more than one connection to a UA server, the block can be called more than
once with different Instance DBs. You can use this, for example, to read via one connection
and to write via another connection or to read or write different data via multiple connections.
For connections to more than one UA server, the UA_Connect block must be called several
times with different input parameters. As a UA client, the CP can establish connections to up
to five UA servers.
To query the name space index of a name space URI of the UA server, call a
UA_NamespaceGetIndex within a session. To query multiple name space URIs you can call
the block more than once with different input parameters.
To create a handle list as preparation for the read and write services call up
UA_NodeGetHandleList. The block is called separately with suitable information at the
“NodeIDs” input parameter for each target node.
Following this you can use the blocks UA_ReadList und UA_WriteList to read and write the
data of the items. You can call these two blocks as often as necessary within a session.

Table of Contents

Other manuals for Siemens Simatic S7-400

Related product manuals