Skip to content

Add files via upload - #1

Open
neerajjayesh wants to merge 1 commit into
mainfrom
neerajjayesh-patch-1
Open

neerajjayesh wants to merge 1 commit into
mainfrom
neerajjayesh-patch-1

Conversation

@neerajjayesh

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings April 18, 2026 05:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md guide covering GUI controls/shortcuts and Modbus interaction via mbpoll.
  • 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.

Comment thread OT_dashboard/whattodo.md

## 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.

Copilot AI Apr 18, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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.

Copilot uses AI. Check for mistakes.
Comment thread OT_dashboard/whattodo.md
* **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.

Copilot AI Apr 18, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

“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.

Suggested change
* **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.

Copilot uses AI. Check for mistakes.
Comment thread OT_dashboard/whattodo.md
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.

Copilot AI Apr 18, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: “pole” should be “poll” (as in polling registers).

Suggested change
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.

Copilot uses AI. Check for mistakes.
Comment thread OT_dashboard/whattodo.md
Comment on lines +42 to +45
* Read the holding register for **Active Power** (Register offset 1):
```bash
mbpoll localhost -p 5020 -r 1 -t 4 -1
```

Copilot AI Apr 18, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment thread OT_dashboard/whattodo.md
```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`)*

Copilot AI Apr 18, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
*(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`)*

Copilot uses AI. Check for mistakes.
Comment thread OT_dashboard/whattodo.md
Comment on lines +66 to +70
| 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` |

Copilot AI Apr 18, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The register-map table header/rows start with ||, which creates an extra empty column in Markdown renderers. Use a single leading | for each row.

Copilot uses AI. Check for mistakes.
Comment thread OT_dashboard/whattodo.md
* **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.

Copilot AI Apr 18, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
* **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).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants