EasyManua.ls Logo

Siemens SIMATIC ET 200AL - Page 877

Siemens SIMATIC ET 200AL
1585 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...
OPC UA communication
9.3 Using the S7-1500 as an OPC UA server
Communication
Function Manual, 12/2017, A5E03735815-AF
191
Program structure
The program is divided into the following sections:
1. Calling the "OPC_UA_ServerMethodPre" instruction to determine if the server method
was called by a client.
2. If the server method was called, the server method is executed. It defines the actual
functionality when the method is called by an OPC UA client.
3. When the server method has been completed, the instruction
"OPC_UA_ServerMethodPost" is called. This section informs the operating system that
the server method has been executed.
Declaration
The following figure shows the declaration of local tags for the example program:
Figure 9-15 Declaration of local variables
SCL program
The following program shows how you use OPC UA instructions to provide a method for
OPC UA clients that is executed in your user program (server method).
Calling the "OPC_UA_ServerMethodPre" instruction
First the "OPC_UA_ServerMethodPre" instruction is called to query at the operating system
as to whether the server method was called by a OPC UA client (lines 2 to 5).
If the server method was called, the tag "#Method_Called" is "TRUE" (in line 3).
If the "OPC_UA_ServerMethodPre" instruction was also executed successfully (#Pre_Done =
TRUE), line 10 sets the tag "#Started" to "TRUE".

Table of Contents

Other manuals for Siemens SIMATIC ET 200AL

Related product manuals