Échange de données client-serveur entre deux automates de la série S7-1500 à l'aide du protocole OPC UA

Lors de la rédaction de cette note, les matériaux suivants ont été utilisés:





1. Création de clients OPC UA avec .NET et classe d'assistance





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. Bibliothèque cliente OPC UA





https://support.industry.siemens.com/cs/document/109748892/opc-ua-client-library?dti=0&pnid=13716&lc=en-US





3. Aide en ligne Étape 7 Professionnel V15.1





4. Communication SIMATIC S7-1500, ET 200MP, ET 200SP, ET 200AL, ET 200pro. Description fonctionnelle (10/2018 A5E03735815-AG)





5. Bon sens





Le protocole OPC UA (https://ru.wikipedia.org/wiki/OPC_UA) est apparu pour la première fois dans les contrôleurs Simatic dans la deuxième version du firmware et à l'étape 7 version 14. Ensuite, le contrôleur ne pouvait être configuré que comme un serveur OPC UA, c'est-à-dire un API pouvait répondre aux demandes et envoyer des données, mais ne pouvait pas initier la communication et interroger les autres participants au réseau.





- 2018 2.6 Step 7 15.1. CPU OPC UA . , - (-). ( Secure OUC , OUC , , …). , , . , , - , , , , , .





, (S7-1512 FW2.6) OPC UA .





TIA Portal', , . , .





  1. 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.





,





, «» .





Au total, l'objectif fixé a été atteint. Échange de données sécurisé configuré au niveau de l'automate, c'est-à-dire interaction «horizontale».








All Articles