Add files via upload - #1
neerajjayesh wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an interaction guide for the OT dashboard, documenting GUI shortcuts and Modbus TCP usage so users can operate and probe the simulator consistently.
Changes:
- Added a new
whattodo.mdguide covering GUI controls/shortcuts and Modbus interaction viambpoll. - Documented the current Modbus register map (13 holding registers) and example read/write commands.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ## 2. Modbus TCP Network Interaction (`mbpoll`) | ||
|
|
||
| The UI runs a real network server exposing a standard Modbus TCP interface on `localhost:5020`. You can use external clients to query it or write to it. |
There was a problem hiding this comment.
This says the Modbus server is on localhost:5020, but modbus_server.py binds to 0.0.0.0:5020 (all interfaces). Update the documentation to reflect the actual bind address, or explicitly call out that it may be reachable from other hosts on the network.
| The UI runs a real network server exposing a standard Modbus TCP interface on `localhost:5020`. You can use external clients to query it or write to it. | |
| The UI runs a real network server exposing a standard Modbus TCP interface on `0.0.0.0:5020` (all interfaces). If you are connecting from the same machine, you can use `localhost:5020`; if your network and firewall settings allow it, other hosts on the same network may also be able to reach the server. |
| * **Action**: Toggles the operational mode (Remote SCADA vs. Local Manual). | ||
| * **Effect**: Changes the style of the button and drops a log entry. *(Right now this is just cosmetic and demonstrates event logging, but later stages could use this to lock out the Modbus interface).* | ||
| * **`F10`** | ||
| * **Action**: Toggle the bottom right Modbus monitor panel on or off to inspect the raw hex/decimal values held in the Modbus memory block. |
There was a problem hiding this comment.
“raw hex/decimal values” is misleading: the Modbus Monitor panel renders register numbers and decimal values (plus a decoded human-readable format), but it doesn’t display hex. Please reword to match what the UI actually shows.
| * **Action**: Toggle the bottom right Modbus monitor panel on or off to inspect the raw hex/decimal values held in the Modbus memory block. | |
| * **Action**: Toggle the bottom right Modbus monitor panel on or off to inspect the register numbers, decimal values, and decoded human-readable values held in the Modbus memory block. |
| You can use the open-source CLI tool **`mbpoll`** to interact with the registers: | ||
|
|
||
| ### **Reading Registers** | ||
| You can pole (-1 for single poll) the holding registers (-t 4) to monitor the values externally. This is identical to how a real external HMI or PLC would monitor a substation. |
There was a problem hiding this comment.
Typo: “pole” should be “poll” (as in polling registers).
| You can pole (-1 for single poll) the holding registers (-t 4) to monitor the values externally. This is identical to how a real external HMI or PLC would monitor a substation. | |
| You can poll (-1 for single poll) the holding registers (-t 4) to monitor the values externally. This is identical to how a real external HMI or PLC would monitor a substation. |
| * Read the holding register for **Active Power** (Register offset 1): | ||
| ```bash | ||
| mbpoll localhost -p 5020 -r 1 -t 4 -1 | ||
| ``` |
There was a problem hiding this comment.
The mbpoll examples use -r 1 / -r 2 / -r 7 (offset style), but the rest of the repo documentation and the UI hint use -r 40002, -r 40006, etc. Please standardize on one addressing style (or explicitly explain both) to avoid users reading/writing the wrong registers.
| ```bash | ||
| mbpoll localhost -p 5020 -r 2 -t 4 -1 4880 | ||
| ``` | ||
| *(The `--` flag used in previous examples helps command lines parse negative integers if you ever need to inject them, e.g., `mbpoll ... -- -4880`)* |
There was a problem hiding this comment.
The note about the -- flag says it was used in previous examples, but none of the commands in this doc include it. Either add -- consistently (matching the README/UI examples) or adjust the note to avoid implying it was already used.
| *(The `--` flag used in previous examples helps command lines parse negative integers if you ever need to inject them, e.g., `mbpoll ... -- -4880`)* | |
| *(If you ever need to inject a negative integer, the `--` flag can help command-line parsers treat the value correctly, e.g., `mbpoll ... -- -4880`)* |
| | Offset | Description | Decoding Rule | Modbus Address Format | | ||
| |---------|---------------------|--------------------|-----------------------| | ||
| | `1` | Active Power | MW × 10 | `40001` | | ||
| | `2` | Grid Frequency | Hz × 100 | `40002` | | ||
| | `3` | Power Factor | PF × 100 | `40003` | |
There was a problem hiding this comment.
The register-map table header/rows start with ||, which creates an extra empty column in Markdown renderers. Use a single leading | for each row.
| * **Effect**: You will see warning indicators pulse red/amber, the event log will capture the fault, and affected dials/bars will reflect the compromised values (e.g. if a feeder trips, its status turns red and load drops to 0%). | ||
| * **`F2`** | ||
| * **Action**: Clear active faults. | ||
| * **Effect**: Aborts any active fault injections mid-way, returning the system to a normal active state immediately. |
There was a problem hiding this comment.
The F2 description says clearing faults returns the system to a “normal active state immediately”, but the implementation resets feeders to the baseline where Feeder-3 starts TRIPPED. Please adjust this text to match the actual post-clear state (or clarify what “normal” means here).
| * **Effect**: Aborts any active fault injections mid-way, returning the system to a normal active state immediately. | |
| * **Effect**: Aborts any active fault injections mid-way, returning the system to its baseline simulation state immediately (which may still include Feeder-3 starting in a `TRIPPED` state). |
No description provided.