If you do any industrial stuff you eventually come across Modbus.
Been working on a networked sensor system, SCADA stuff expects various protocols.
Modbus on TCP is one of them.
It uses a request, response method.
The client asks the server(sensor) for data from certain registers.
The client can also write to some registers that can turn coils (relays, solenoid, valves etc) on and off.
Make a data.bin binary file with the preamble and data in it .
A simple test, use a modbus terminal on another PC (CAS modbus scanner?).
Run this on the Pi, cat data.bin | nc -l -p 502 > request.txt
Binary files, so hex viewer in MC is useful
In the micropython examples there is a server example.
https://github.com/micropython/micropython/tree/master/examples/networkIt can be turned into a simple modbus server by changing the port to 502 and the CONTENT string contains the data.bin data.
No extra programs, tcz's, libraries, installs needed, just the basic piCore release.
SCADA at home?
Probably not a good idea for reactor control:)
People actually sell SCADA software that runs on Pi's.
SCADA client software for Pi's? not my problem yet:)
Plenty that runs on Windows and cost $$$.
Serial port modbus on Zero's, add a RS485 transceiver and you have really cheap sensor/control server units.
Modbus TCP is easier in a way because error checking is already in the Ethernet packets.
One little step closer to Pi's taking over the World.