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

Reading a Logix Tag into Node-RED on a Raspberry Pi Without Writing Code

plc programming logix tag node red raspberry pi no code 1 plc

A Node-RED Logix tag read takes one install script, one palette install and two dialogs on a Raspberry Pi 4: Zone7_Speed from a 5069-L306ER appears in the debug sidebar as 30.0, and none of it involves typing a line of code. The node that does it is node-red-contrib-cip-ethernet-ip 1.1.3, installed from the palette manager, configured … Read more

Timestamping PLC Data on a Raspberry Pi: Which Clock Wins and Why Your Trend Repeats an Hour

plc programming plc data timestamps raspberry pi clocks repeated hour 1 plc

At 02:30 on Sunday 25 October 2026 a logger in Berlin writes a row, and sixty minutes later it writes another row stamped 02:30, and the trend viewer draws the second hour on top of the first. Meanwhile the controller it reads from keeps its own idea of the time as a LINT of microseconds … Read more

Modbus TCP from a Raspberry Pi: Register Offsets, and Why Your Value Is One Address Out

plc programming modbus tcp raspberry pi register offset 1 plc

read_holding_registers(40011, count=2) comes back with exception code 02, read_holding_registers(11, count=2) decodes to -2.4e-41, and the 230.5 V the meter shows on its own display is sitting at address 10. That is the Modbus TCP register offset, and it is the fault everybody hits on their first evening with pymodbus 3.15.0 and a power meter on … Read more

Polling an S7-1200 from a Raspberry Pi with snap7: DB Numbers, Optimized Access and the PUT/GET Checkbox

plc programming s7 1200 raspberry pi snap7 put get 1 plc

A snap7 S7-1200 read – plc.db_read(12, 0, 12) against a CPU 1214C – returns twelve bytes on the bench and an exception on the machine, and the difference is two checkboxes in TIA Portal, neither of them on the Pi. python-snap7 3.1.2 talks the S7 protocol to TCP port 102 in pure Python, so there … Read more

Reading a CompactLogix Tag from a Raspberry Pi with pycomm3

Raspberry Pi, switch and CompactLogix 5380 on one subnet, with the IP plan, the EtherNet/IP port and the direction of the request marked

Four lines of Python on a Raspberry Pi 4 read a CompactLogix tag – a REAL out of a 5069-L306ER – and nothing at either end is licensed. pycomm3 1.2.16 speaks EtherNet/IP to TCP port 44818 itself, which takes the OPC server, the Windows box it used to live on and the licence out of … Read more

Docker on a Plant-Floor Raspberry Pi: Restart Policy, Log Rotation and the Container That Filled the Card

The card's layout: the containers JSON log with no cap, overlay2 growing with every pull, named volumes holding the data, the journal capped at 10 % of the filesystem, image metadata

A Docker Raspberry Pi that stopped logging on a Sunday had /var/lib/docker/containers/3f9a…/3f9a…-json.log at 22 GB when du got to it, and the file belongs to a container whose only job was to reconnect to a broker that had been down since Thursday. Docker’s default log driver is json-file, its default max-size is unlimited, and a … 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