Connecting a Python OPC UA Client to an S7-1500: Certificates, Security Policy and the Anonymous Login That Fails

The CPU's OPC UA server settings drawn as field and value: server on, port 4840, None off, Basic256Sha256 Sign and Encrypt on, trusted clients pi1-logger.der, automatic accept off, guest off, user logger, runtime licence

BadIdentityTokenRejected is the answer an OPC UA server gives when the secure channel is up, the client certificate is trusted, and the session request arrives with no user in it, and on an S7-1500 with guest authentication off that is exactly where a first Python OPC UA client stops. It is the third of four … Read more

Writing a Setpoint Back to the PLC from a Pi: The Handshake That Stops It Being a Safety Problem

The write path from dashboard to Pi to CompactLogix, with the panel selector switch drawn as a hard-wired input beside the controller and no safety tag anywhere on the path

A pycomm3 write of 95.0 to Line4_SP on a CompactLogix comes back to the Raspberry Pi with no error, and the line is now running at 95 % because nothing between the driver and the tag asked whether it should. A read-only logger becomes a control path the first time somebody puts a slider on … Read more

Advertisement