The old 06-tests, with paths retargeted and both tools proven to run.
Verified end to end during the move - fake_plc.py served on a spare port
and verify_modbus.py read it:
read : 69/69 points OK
writable : 15/15 RW points OK
PASS : the runtime matches the register map
fake_plc.py --expect was BROKEN by the PS_* removal in the previous
commit: it fell back to the scada_tag column, which no longer exists, and
died with KeyError. It now uses ci_item, so the names it prints are the
CI Server items an operator actually sees. Regenerated
expected_readings.txt; fake_values.json came back byte-identical, which
confirms the seed really is deterministic as the docstring claims.
README corrections:
- default host was dev-ubuntu; now 10.0.0.17, with the container
fallback for when that address is not routable
- said 11 RW points; there are 15 (11 control + 4 simulation)
- the 'reading the output' section described the FIELD build - tripped
pumps, alarm word 16500, seeded %MW defaults - as though it were what
you would see. The deployed PLC runs the SIMULATION build. Both are
now shown side by side, with the simulation column marked as the one
that is live.
- says plainly that none of the 20 acceptance tests are implemented
here: this harness verifies the contract, not the behaviour
- adds a caution against running fake_plc.py on port 502 of the live
host, where the real PLC is serving and CI Server is polling
53 lines
3.3 KiB
Text
53 lines
3.3 KiB
Text
Expected CI Server readings while fake_plc.py is serving (seed 20260814)
|
|
|
|
ITEM ADDRESS RAW SHOULD READ NOTE
|
|
------------------------------------------------------------------------------
|
|
PU301.RUN_CMD FC01:0 1 1
|
|
PU302.RUN_CMD FC01:1 0 0
|
|
PU303.RUN_CMD FC01:2 1 1
|
|
PU301.RUNNING FC01:3 0 0
|
|
PU302.RUNNING FC01:4 1 1
|
|
PU303.RUNNING FC01:5 1 1
|
|
PU301.AVAILABLE FC01:6 0 0
|
|
PU302.AVAILABLE FC01:7 0 0
|
|
PU303.AVAILABLE FC01:8 0 0
|
|
STN.IN_AUTO FC01:9 1 1
|
|
STN.HIGH_LEVEL FC01:10 1 1
|
|
STN.SPILL_ACTIVE FC01:11 0 0
|
|
PU301.TRIPPED FC01:12 1 1
|
|
PU302.TRIPPED FC01:13 1 1
|
|
PU303.TRIPPED FC01:14 0 0
|
|
STN.LEVEL FC03:0 12124 202.1 %
|
|
STN.INFLOW FC03:1 20837 7501.3 m3/h
|
|
STN.DISCHARGE FC03:2 6350 2286.0 m3/h
|
|
STN.PUMPS_RUNNING FC03:3 3 3 count
|
|
STN.SPEED FC03:4 376 75.2 %
|
|
STN.TIME_TO_SPILL FC03:5 32767 32767 s 32767 - the 'drawing down' sentinel
|
|
STN.TIME_TO_LSHH FC03:6 26213 26213 s
|
|
STN.NET_ACCUM FC03:7 -981 -353.2 m3/h NEGATIVE - proves the point is signed
|
|
PU301.RUN_HOURS FC03:8 21439 21439 h
|
|
PU302.RUN_HOURS FC03:9 4852 4852 h
|
|
PU303.RUN_HOURS FC03:10 16665 16665 h
|
|
STN.VOL_TO_SPILL FC03:11 8878 8878 m3
|
|
STN.STATE FC03:12 5 5
|
|
PU301.STATE FC03:13 1 1
|
|
PU302.STATE FC03:14 2 2
|
|
PU303.STATE FC03:15 2 2
|
|
STN.DUTY_PUMP FC03:16 1 1
|
|
STN.ALARM_WORD FC03:17 42435 42435 bit15 set - proves the point is UNSIGNED
|
|
STN.CMD_ACK FC03:20 80 80
|
|
SP.MODE FC03/FC06:1024 3 3
|
|
SP.CMD_WORD FC03/FC06:1025 65 65
|
|
SP.CMD_PARAM FC03/FC06:1026 5 5
|
|
SP.LEVEL_SP FC03/FC06:1027 16343 272.4 %
|
|
SP.START_DUTY FC03/FC06:1028 28156 469.3 %
|
|
SP.START_P2 FC03/FC06:1029 11569 192.8 %
|
|
SP.START_P3 FC03/FC06:1030 23382 389.7 %
|
|
SP.STOP_ALL FC03/FC06:1031 6795 113.3 %
|
|
SP.HIGH_ALARM FC03/FC06:1032 18519 308.7 %
|
|
SP.MIN_SPEED FC03/FC06:1033 232 46.4 %
|
|
SP.SERVICE_HRS FC03/FC06:1034 13745 13745 h
|
|
SIM.INFLOW FC03/FC06:1044 22258 8012.9 m3/h
|
|
SIM.SCENARIO FC03/FC06:1045 5 5
|
|
SIM.RESET FC03/FC06:1046 4 4
|
|
SIM.TIME_SCALE FC03/FC06:1047 129 129 x
|