Intercambio de datos cliente-servidor entre dos PLC de la serie S7-1500 mediante el protocolo OPC UA

Al escribir esta nota, se utilizaron los siguientes materiales:





1. Creación de clientes OPC UA con .NET y 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. Biblioteca cliente OPC UA





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





3. Ayuda en línea Step 7 Professional V15.1





4. Comunicación SIMATIC S7-1500, ET 200MP, ET 200SP, ET 200AL, ET 200pro. Manual de funciones (10/2018 A5E03735815-AG)





5. Sentido común





El protocolo OPC UA (https://ru.wikipedia.org/wiki/OPC_UA) apareció por primera vez en los controladores Simatic en la segunda versión de firmware y en el Paso 7 versión 14. Luego, el controlador solo se pudo configurar como un servidor OPC UA, es decir, un PLC podía responder solicitudes y enviar datos, pero no podía iniciar la comunicación e interrogar a otros participantes de la red.





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





,





, «» .





En total, se ha logrado el objetivo establecido. Intercambio de datos seguro configurado a nivel de PLC, es decir, interacción "horizontal".








All Articles