Add "Examples"
89
Examples.md
Normal file
89
Examples.md
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
# Example Flows
|
||||||
|
|
||||||
|
The rotatingMachine node ships with three example flows, accessible in Node-RED via **Import > Examples > EVOLV**.
|
||||||
|
|
||||||
|
## 01 - Basic Manual Control
|
||||||
|
|
||||||
|
**Dependencies:** EVOLV package only (no dashboard needed)
|
||||||
|
|
||||||
|
Demonstrates all core rotatingMachine functionality using inject nodes:
|
||||||
|
|
||||||
|
- **Mode switching** between auto, virtualControl, and fysicalControl
|
||||||
|
- **Startup/shutdown sequences** with configurable timing (3s startup, 2s warmup, 3s shutdown, 2s cooldown)
|
||||||
|
- **Speed setpoint control** at 30%, 60%, and 100%
|
||||||
|
- **Pressure simulation** with upstream and downstream values
|
||||||
|
- **Emergency stop**
|
||||||
|
- **Maintenance mode** enter/leave
|
||||||
|
|
||||||
|
### How to use
|
||||||
|
|
||||||
|
1. Deploy the flow
|
||||||
|
2. Click **"Set virtualControl"** to enable manual control
|
||||||
|
3. Click **"Startup"** - observe the state transition (idle > starting > warmingup > operational) in the debug panel
|
||||||
|
4. Click **"Set 60%"** to move to 60% speed
|
||||||
|
5. Click **"Sim downstream 1100 mbar"** and **"Sim upstream 200 mbar"** to see flow/power predictions based on the pump curve
|
||||||
|
6. Click **"Shutdown"** to stop
|
||||||
|
|
||||||
|
### What to observe
|
||||||
|
|
||||||
|
- **Port 0 (Process Data):** Shows state, mode, ctrl%, flow (m3/h), power (kW), NCog efficiency
|
||||||
|
- **Port 1 (InfluxDB):** Disabled by default - enable the debug node to see telemetry format
|
||||||
|
- **Port 2 (Parent):** Shows the registerChild message sent on deploy
|
||||||
|
|
||||||
|
**Source:** [01 - Basic Manual Control.json](https://gitea.wbd-rd.nl/RnD/rotatingMachine/src/branch/main/examples/01%20-%20Basic%20Manual%20Control.json)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 02 - Integration with Machine Group
|
||||||
|
|
||||||
|
**Dependencies:** EVOLV package only (no dashboard needed)
|
||||||
|
|
||||||
|
Demonstrates parent-child registration between a machineGroupControl (MGC) and two rotatingMachine pumps.
|
||||||
|
|
||||||
|
- **Auto-registration:** Both pumps register with the MGC via Port 2 on deploy
|
||||||
|
- **Independent control:** Each pump can be started/stopped individually
|
||||||
|
- **Group aggregation:** MGC Port 0 shows aggregated group state
|
||||||
|
- **Pressure simulation:** Inject simulated pressure to Pump 1
|
||||||
|
|
||||||
|
### How to use
|
||||||
|
|
||||||
|
1. Deploy the flow - pumps automatically register with the MGC
|
||||||
|
2. Set Pump 1 to virtualControl, then click Startup
|
||||||
|
3. Set a speed setpoint (75%)
|
||||||
|
4. Set Pump 2 to virtualControl and start it at 50%
|
||||||
|
5. Observe the MGC debug output aggregating both pumps
|
||||||
|
6. Inject downstream pressure on Pump 1 to see curve-based predictions
|
||||||
|
|
||||||
|
### Wiring pattern
|
||||||
|
|
||||||
|
```
|
||||||
|
Pump 1 Port 2 ------> MGC input (registerChild)
|
||||||
|
Pump 2 Port 2 ------> MGC input (registerChild)
|
||||||
|
```
|
||||||
|
|
||||||
|
**Source:** [02 - Integration with Machine Group.json](https://gitea.wbd-rd.nl/RnD/rotatingMachine/src/branch/main/examples/02%20-%20Integration%20with%20Machine%20Group.json)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 03 - Dashboard Visualization
|
||||||
|
|
||||||
|
**Dependencies:** EVOLV + @flowfuse/node-red-dashboard
|
||||||
|
|
||||||
|
Interactive FlowFuse dashboard with:
|
||||||
|
|
||||||
|
- Mode dropdown (auto / virtualControl / fysicalControl)
|
||||||
|
- Startup / Shutdown / Emergency Stop buttons
|
||||||
|
- Numeric speed setpoint input (0-100%)
|
||||||
|
- Upstream and downstream pressure simulation inputs
|
||||||
|
- Real-time line charts: Flow, Power, Control Position, NCog efficiency, State Code, Pressure (up/down/delta)
|
||||||
|
- Text displays for current state, timing, and snapshot summary
|
||||||
|
|
||||||
|
### How to use
|
||||||
|
|
||||||
|
1. Make sure `@flowfuse/node-red-dashboard` is installed
|
||||||
|
2. Deploy the flow
|
||||||
|
3. Open the dashboard at `/dashboard/rotating-machine-basic`
|
||||||
|
4. Use the controls on the left to operate the pump
|
||||||
|
5. Watch the charts update in real-time on the right
|
||||||
|
|
||||||
|
**Source:** [03 - Dashboard Visualization.json](https://gitea.wbd-rd.nl/RnD/rotatingMachine/src/branch/main/examples/03%20-%20Dashboard%20Visualization.json)
|
||||||
Reference in New Issue
Block a user