Opcua Key Client Development Kit

1. Install Anaconda3-5.0.1-Windows-x86_64
Note: Add python instruction to the PATH environment variable

Not checked by default

2. To install the OPC UA reference library, you need to network
pip install freeopcua -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install opcua-client -i https://pypi.tuna.tsinghua.edu.cn /simple

3. Modify the IP address and port number of the parameter "opc.tcp://192.168.1.107:4862" according to the actual OPC UA server

4. Ensure that my_cert.der, my_private_key.pem, OpcuaClientWithKey.py are in the same directory, and run OpcuaClientWithKey.py
python OpcuaClientWithKey.py

5. Activate WINCC project, OPCUA service will start automatically

6. The first time you visit WINCC's OPCUA server with security authentication, an error will be reported. You need to manually cut the WINCC rejected (rejected) certificate to the trusted certificate folder, which will take effect immediately without restarting WINCC.

Rejected certificate directory
C:\Program Files (x86)\Siemens\WinCC\opc\UAServer\PKI\CA\rejected\certs

Trusted certificate directory
C:\Program Files (x86)\Siemens\WinCC\opc\UAServer\PKI\CA\certs
7. Run OpcuaClientWithKey.py again and print successfully: Node(TwoByteNodeId(i=85))

From WINCC through the opcua protocol, you can get the variable
opcua client development kit with key, including source code, operating document:
https://pan.baidu.com/s/1BXVpA4gpT4LVOkSJPKOMiQ
extraction code: 6xew

Guess you like

Origin blog.csdn.net/weloveut/article/details/105749156