wrps-demo-kit/03-plc/register-map.csv
Clio Liu dca7797d68 feat(plc): ST sources, generators and the Modbus contract
The PLC program from the old repo's 04-plc/, flattened into one folder and
checked against the running system.

Verified during the move:
  - build.py regenerates register-map.csv byte-identically (69 points)
  - polled the live PLC: the SIMULATION build is what is deployed and
    running, %MW21=2 wet weather, values moving, run hours accumulating
  - addresses, %MW HR1024 segmentation and %QW17/%QW7 signedness all
    match the map

Corrections against the old repo:
  - 10_globals.st header cited WRPS-CTL-002 (the FDS); it means CTL-003
  - build.py wrote the map to its parent directory; now beside itself
  - deploy/README.md was a single-file folder; now DEPLOY.md
  - dropped the empty editor-devices/remote/
  - README no longer claims the simulation build is uncompiled - it is
    the one running

Two open items are now stated plainly rather than buried:
  - none of the 20 acceptance tests in CTL-003 have ever been run
  - the OpenPLC Editor lived only on the retired dev-ubuntu host, so
    there is currently NO route to deploy a new program (DEPLOY.md 0)

Documents the setpoint distinction: IO_MUX seeds %MW defaults once at
first scan, operators retune them live, and that tuning exists only in
the container volume - a restart reverts it.
2026-09-02 15:48:49 +10:00

70 lines
3.9 KiB
CSV

iec_address,modbus_object,modbus_address,tag,description,units,scaling,access
%IW0,Input register,0,LIT-101,Wet well level,mm,1,R
%IW1,Input register,1,FIT-201,Inlet flow,L/s,x10,R
%IW2,Input register,2,FIT-301,Discharge flow,L/s,x10,R
%IW3,Input register,3,PIT-302,Manifold pressure,kPa,1,R
%IW4,Input register,4,PIT-311,PU-301 discharge pressure,kPa,1,R
%IW5,Input register,5,PIT-321,PU-302 discharge pressure,kPa,1,R
%IW6,Input register,6,PIT-331,PU-303 discharge pressure,kPa,1,R
%IW7,Input register,7,VE-314,PU-301 bearing vibration,mm/s,x10,R
%IW8,Input register,8,VE-324,PU-302 bearing vibration,mm/s,x10,R
%IW9,Input register,9,VE-334,PU-303 bearing vibration,mm/s,x10,R
%IX0.0,Discrete input,0,LSHH-102,High high level (TRUE = wet),,,R
%IX0.1,Discrete input,1,LSLL-103,"Low low level (TRUE = wet, FALSE = dry)",,,R
%IX0.2,Discrete input,2,LSH-104,Spill detected (TRUE = spilling),,,R
%IX0.3,Discrete input,3,TE-312,PU-301 motor thermal (TRUE = healthy),,,R
%IX0.4,Discrete input,4,TE-322,PU-302 motor thermal (TRUE = healthy),,,R
%IX0.5,Discrete input,5,TE-332,PU-303 motor thermal (TRUE = healthy),,,R
%IX0.6,Discrete input,6,MSE-313,PU-301 seal leak (TRUE = leak),,,R
%IX0.7,Discrete input,7,MSE-323,PU-302 seal leak (TRUE = leak),,,R
%IX1.0,Discrete input,8,MSE-333,PU-303 seal leak (TRUE = leak),,,R
%IX1.1,Discrete input,9,XA-502,Mains healthy (TRUE = healthy),,,R
%QX0.0,Coil,0,PU-301,Run command,,,R
%QX0.1,Coil,1,PU-302,Run command,,,R
%QX0.2,Coil,2,PU-303,Run command,,,R
%QX0.3,Coil,3,PU-301,Running,,,R
%QX0.4,Coil,4,PU-302,Running,,,R
%QX0.5,Coil,5,PU-303,Running,,,R
%QX0.6,Coil,6,PU-301,Available,,,R
%QX0.7,Coil,7,PU-302,Available,,,R
%QX1.0,Coil,8,PU-303,Available,,,R
%QX1.1,Coil,9,STN,Station in auto,,,R
%QX1.2,Coil,10,STN,High level alarm,,,R
%QX1.3,Coil,11,STN,Spill active,,,R
%QX1.4,Coil,12,PU-301,Tripped,,,R
%QX1.5,Coil,13,PU-302,Tripped,,,R
%QX1.6,Coil,14,PU-303,Tripped,,,R
%QW0,Holding register,0,STN,Wet well level,mm,1,R
%QW1,Holding register,1,STN,Inflow,L/s,x10,R
%QW2,Holding register,2,STN,Total discharge flow,L/s,x10,R
%QW3,Holding register,3,STN,Pumps running,count,1,R
%QW4,Holding register,4,STN,Common drive speed,Hz,x10,R
%QW5,Holding register,5,STN,Time to spill weir (32767 = drawing down),s,1,R
%QW6,Holding register,6,STN,Time to LSHH (32767 = drawing down),s,1,R
%QW7,Holding register,7,STN,Net accumulation (signed),L/s,x10,R
%QW8,Holding register,8,PU-301,Run hours,h,1,R
%QW9,Holding register,9,PU-302,Run hours,h,1,R
%QW10,Holding register,10,PU-303,Run hours,h,1,R
%QW11,Holding register,11,STN,Volume remaining to spill,m3,1,R
%QW12,Holding register,12,STN,Station state (enum 3.1),,1,R
%QW13,Holding register,13,PU-301,Pump state (enum 3.2),,1,R
%QW14,Holding register,14,PU-302,Pump state (enum 3.2),,1,R
%QW15,Holding register,15,PU-303,Pump state (enum 3.2),,1,R
%QW16,Holding register,16,STN,"Current duty pump (0 = none, 1-3)",,1,R
%QW17,Holding register,17,STN,Alarm bitmask (section 6) - READ AS UNSIGNED,,1,R
%QW20,Holding register,20,STN,Command acknowledge (echoes %MW1),,1,R
%MW0,Holding register,1024,STN,"Station mode: 1 = auto, 2 = off",,1,RW
%MW1,Holding register,1025,STN,Command word (section 3.3),,1,RW
%MW2,Holding register,1026,STN,Command parameter (pump number),,1,RW
%MW3,Holding register,1027,STN,Level control setpoint,mm,1,RW
%MW4,Holding register,1028,STN,Start duty level,mm,1,RW
%MW5,Holding register,1029,STN,Start pump 2 level,mm,1,RW
%MW6,Holding register,1030,STN,Start pump 3 level,mm,1,RW
%MW7,Holding register,1031,STN,Stop all level,mm,1,RW
%MW8,Holding register,1032,STN,High level alarm,mm,1,RW
%MW9,Holding register,1033,STN,Minimum drive speed,Hz,x10,RW
%MW10,Holding register,1034,STN,Service interval,h,1,RW
%MW20,Holding register,1044,SIM,SIM ONLY: manual inflow (mode 0),L/s,x10,RW
%MW21,Holding register,1045,SIM,SIM ONLY: scenario 0=man 1=diurnal 2=wet 3=ref,,1,RW
%MW22,Holding register,1046,SIM,"SIM ONLY: write 1 to reset scenario, self-clearing",,1,RW
%MW23,Holding register,1047,SIM,SIM ONLY: time scale 1-120,x,1,RW