From 757eb732d47b428a029ab38b50a163968e9fae9b Mon Sep 17 00:00:00 2001 From: paulorb Date: Wed, 18 Sep 2024 19:50:36 +0400 Subject: [PATCH] Improved documentation --- README.md | 12 ++++---- docs/getting-started/operations.md | 48 ++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6dcb8ed..8e6643b 100644 --- a/README.md +++ b/README.md @@ -23,12 +23,12 @@ Please see the [project website](https://paulorb.github.io/modbus-simulator-cli/ The table below shows the supported registers and which datatype and simulation operation can be performed for each register. -| Register | Datatype | Operations | -|------------------------|------------------------|---------------------------------------------| -| Coils (0x) | BOOL | Set, IfEqual | -| Input register (1x) | BOOL | Set, IfEqual | -| Discrete Input (3x) | INT16 | Set, Add, Sub, Random, Linear, Csv, IfEqual | -| Holding Registers (4x) | INT16, UINT16, FLOAT32 | Set, Add, Sub, Random, Linear, Csv, IfEqual | +| Register | Datatype | Operations | +|------------------------|------------------------|----------------------------------------------------------------| +| Coils (0x) | BOOL | Set, IfEqual, IfGreater, IfLess | +| Input register (1x) | BOOL | Set, IfEqual, IfGreater, IfLess | +| Discrete Input (3x) | INT16 | Set, Add, Sub, Random, Linear, Csv, IfEqual, IfGreater, IfLess | +| Holding Registers (4x) | INT16, UINT16, FLOAT32 | Set, Add, Sub, Random, Linear, Csv, IfEqual, IfGreater, IfLess | ## Quick Start 1. Compile with gradle and generate fat Jar diff --git a/docs/getting-started/operations.md b/docs/getting-started/operations.md index 647e2f1..67de971 100644 --- a/docs/getting-started/operations.md +++ b/docs/getting-started/operations.md @@ -156,6 +156,54 @@ Example using a parameter as a value Please note the **symbol** and **value** datatype needs to match. + +## If greater +Used for comparison, every operation inside the ifGreater body will be executed + +``` + + 0 + +``` + +Both **symbol** and **value** are mandatory fields. Both can have an atomic value or a reference to a symbol (which can refer to a register or a parameter) + +Supported registers: HOLDING_REGISTER, INPUT_REGISTER, COIL and PARAMETER + +Example using a parameter as a value +``` + + 0 + +``` + +Please note the **symbol** and **value** datatype needs to match. + + + +## If less +Used for comparison, every operation inside the ifLess body will be executed + +``` + + 0 + +``` + +Both **symbol** and **value** are mandatory fields. Both can have an atomic value or a reference to a symbol (which can refer to a register or a parameter) + +Supported registers: HOLDING_REGISTER, INPUT_REGISTER, COIL and PARAMETER + +Example using a parameter as a value +``` + + 0 + +``` + +Please note the **symbol** and **value** datatype needs to match. + + ## Trace Trace operation provides a tool for debugging, by printing (tracing) the current