In writing this note, the following materials were used:
1. Creating of OPC UA clients with .NET and helper class
https://support.industry.siemens.com/cs/document/109737901/creating-of-opc-ua-clients-with-net-and-helper-class?dti=0&pnid=13716&lc=en-US
2. OPC UA Client Library
https://support.industry.siemens.com/cs/document/109748892/opc-ua-client-library?dti=0&pnid=13716&lc=en-US
3. On-line help Step 7 Professional V15.1
4. SIMATIC S7-1500, ET 200MP, ET 200SP, ET 200AL, ET 200pro Communication. Function Manual (10/2018 A5E03735815-AG)
5. Common sense
The OPC UA protocol (https://ru.wikipedia.org/wiki/OPC_UA) appeared for the first time in Simatic controllers in the second firmware version and in Step 7 version 14. Then the controller could only be configured as an OPC UA server, that is, a PLC could answer requests and send data, but could not initiate communication and interrogate other network participants.
- 2018 2.6 Step 7 15.1. CPU OPC UA . , - (-). ( Secure OUC , OUC , , …). , , . , , - , , , , , .
, (S7-1512 FW2.6) OPC UA .
TIA Portal', , . , .
OPC UA , CPU, OPC UA → Server → General OPC UA Server.
2. OPC UA Simatic , , Runtime licenses → OPC UA . 1500 : , , CPU. S7-1510 S7-1512 «small».
3. Application name OPC UA , . (sampling) (publishing) . , CPU. .
4. . PLC.
5. , . OPC UA Client ( SIOS ). ip — 192.168.43.10 Get Endpoints. « »
, , , , «Connect to selected Endpoints» «Browse nodes». , (Node — «» «» )
Node id ( « »), Ctrl-C
Read/Write, node id Read
3. , , , DayOfWeek OKPumpsAuto.
. , . . OPC UA «, , , ». .
6. « » CPU, Protection&Security → Certificate Manager, Use global settings…
7. Security Settings → Settings. Protect this project. . . , , . Protect :
TIA Portal . , , .
8. , , . , , , « », . CPU, OPC UA → Server →Security
«…» «Server certificate», — «Add new».
, . , , ! :
, , . , . . , OPC UA , , . xml (, nodes) -. — , Accessible from HMI/OPC UA , Writable from HMI/OPC UA . OPC UA ( ). :
CPU OPC UA → Server → Export, «Export OPC UA XML file»
OPC UA , , , . S7-1510 FW2.6.
9. .
10. OPC UA
11. OPC UA
12. , . - - ( ) , . CPU Protection & Security, Add new.. Device certificates, «…» , «Add new» , :
usage , OPC UA Client', Tls.
13. : , — / . () :
PLC_2 → OPC UA communication → Client Interfaces →Add new client interface
«Import interface» XML
Nodes . , — 4 OKPumpsAuto.
Readlist . , . , , . . :
, . . - , . Properties
ip- , 192.168.43.10.
Security .
: Client interface_1_Data Client interface_1_Configuration.
Data, , . .
14. , OPC UA , , . , -. . SCL, , , .
OPC_UA_Connect OB1
. — , , , S7- TIA Portal' PID-. , .
( ) .
Step 7. ( ) , / . Req. ( , ) done err.
, . req ( ), (done) . done, error , connectionid , , - . , Server Endpoint . . , . , .
4 — , . . . .
4 DB2 :
15. OPC UA, . . «, ». OPC UA Client / . , «» . , CPU, OPC UA → Server → Security → Secure channel, Endpoint' «No Security»
Trusted Clients. - (PLC_2). Automatically accept client certificates during runtime. , PLC.
User authentication, , / : user1 / password1.
PLC. PLC, Client interface, Configuration, Security, General :
, — , user1, password1
Automatically accept server certificate during runtime
, « »
(PLC_2), OB1 1..4 , , DB2.
16. , - . OPC UA Client . Endpoint' . Basic256 SignAndEncrypt, user1 password1.
,
, «» .
In total, the set goal has been achieved. Configured secure data exchange at the PLC level, that is - "horizontal" interaction.