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

Photo-Eye Placement on an Accumulation Zone: Distance From the Discharge and What a Long Box Does

Three zones in side view with the eye 150 mm back from the discharge: a stopped 600 mm carton with 750 mm of zone behind it, and a stopped 1219 mm carton with 131 mm

A 42EF retroreflective eye bolted 150 mm back from the discharge roller of a 1.5 m zone stops a 600 mm carton with 750 mm of zone still behind it, and stops a 1219 mm carton with 131 mm. Move the same eye to 50 mm from the discharge and the first carton overshoots into … 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

Firmware Mismatch on a Spare CPU: What Actually Has to Match

plc programming spare cpu firmware mismatch 1 plc

A spare CPU firmware mismatch looks like this: a new 1756-L83E ships at firmware revision 1.xxx, and a project saved from Logix Designer v33 will not download to it until the controller is at some 33.xxx. Those two facts sit on the same page of the ControlLogix 5580 user manual, and between them they are … Read more

Changing an Interface on a Running S7-1500 Without Losing the Values

plc programming s7 1500 interface change in run keep values 1 plc

An optimized block on an S7-1500, or on an S7-1200 at V4.x, is created with a 100 byte memory reserve, which is room for 25 Reals of new Statics before a download in RUN has to reinitialise the instance DB. Whether an S7-1500 interface change makes the load preview put “reinitialize” against the block is … Read more

Advertisement