Skip to content

Commit 757eb73

Browse files
committed
Improved documentation
1 parent 8a73fbf commit 757eb73

File tree

2 files changed

+54
-6
lines changed

2 files changed

+54
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ Please see the [project website](https://paulorb.github.io/modbus-simulator-cli/
2323
The table below shows the supported registers and which datatype
2424
and simulation operation can be performed for each register.
2525

26-
| Register | Datatype | Operations |
27-
|------------------------|------------------------|---------------------------------------------|
28-
| Coils (0x) | BOOL | Set, IfEqual |
29-
| Input register (1x) | BOOL | Set, IfEqual |
30-
| Discrete Input (3x) | INT16 | Set, Add, Sub, Random, Linear, Csv, IfEqual |
31-
| Holding Registers (4x) | INT16, UINT16, FLOAT32 | Set, Add, Sub, Random, Linear, Csv, IfEqual |
26+
| Register | Datatype | Operations |
27+
|------------------------|------------------------|----------------------------------------------------------------|
28+
| Coils (0x) | BOOL | Set, IfEqual, IfGreater, IfLess |
29+
| Input register (1x) | BOOL | Set, IfEqual, IfGreater, IfLess |
30+
| Discrete Input (3x) | INT16 | Set, Add, Sub, Random, Linear, Csv, IfEqual, IfGreater, IfLess |
31+
| Holding Registers (4x) | INT16, UINT16, FLOAT32 | Set, Add, Sub, Random, Linear, Csv, IfEqual, IfGreater, IfLess |
3232

3333
## Quick Start
3434
1. Compile with gradle and generate fat Jar

docs/getting-started/operations.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,54 @@ Example using a parameter as a value
156156
Please note the **symbol** and **value** datatype needs to match.
157157

158158

159+
160+
## If greater
161+
Used for comparison, every operation inside the ifGreater body will be executed
162+
163+
```
164+
<ifGreater symbol="TEMPERATURE_MOTOR5" value="-12.5">
165+
<set symbol="MOTOR5_RPM">0</set>
166+
</ifGreater>
167+
```
168+
169+
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)
170+
171+
Supported registers: HOLDING_REGISTER, INPUT_REGISTER, COIL and PARAMETER
172+
173+
Example using a parameter as a value
174+
```
175+
<ifGreater symbol="TEMPERATURE_MOTOR5" value="PARAM_DEFINED_TEMPERATURE">
176+
<set symbol="MOTOR5_RPM">0</set>
177+
</ifGreater>
178+
```
179+
180+
Please note the **symbol** and **value** datatype needs to match.
181+
182+
183+
184+
## If less
185+
Used for comparison, every operation inside the ifLess body will be executed
186+
187+
```
188+
<ifLess symbol="TEMPERATURE_MOTOR5" value="-12.5">
189+
<set symbol="MOTOR5_RPM">0</set>
190+
</ifLess>
191+
```
192+
193+
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)
194+
195+
Supported registers: HOLDING_REGISTER, INPUT_REGISTER, COIL and PARAMETER
196+
197+
Example using a parameter as a value
198+
```
199+
<ifLess symbol="TEMPERATURE_MOTOR5" value="PARAM_DEFINED_TEMPERATURE">
200+
<set symbol="MOTOR5_RPM">0</set>
201+
</ifLess>
202+
```
203+
204+
Please note the **symbol** and **value** datatype needs to match.
205+
206+
159207
## Trace
160208

161209
Trace operation provides a tool for debugging, by printing (tracing) the current

0 commit comments

Comments
 (0)