SCADA Events And Scripts
Less than 1 minute
SCADA Events And Scripts
1. Event Types
| Event | Usage |
|---|---|
| Click | Open dialog, switch page, deliver command, or run script. |
| Value change | Trigger style changes or linkage when a variable changes. |
| Timer | Periodically refresh data or run a script. |
| Page load | Initialize variables, load data, or set default state. |
2. Common Interaction Flow
3. Script Usage
Scripts are suitable for value formatting, simple conditional display, and lightweight linkage. Keep scripts short and deterministic. Complex business logic should be implemented in backend rules or services.
| Scenario | Recommendation |
|---|---|
| Format value | Convert raw number into display text or color. |
| Show or hide | Control component visibility by variable value. |
| Simple linkage | Change style or open a panel when a condition is met. |
| Command preparation | Assemble command parameters before delivery. |
4. Safety Notes
- Add confirmation for commands that affect real devices.
- Do not expose sensitive tokens or private API addresses in page scripts.
- Test scripts with missing, null, and abnormal values.
- Keep permission validation on the backend as well as the frontend.
