Skip to content

Commit

Permalink
Improved documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
paulorb committed Sep 18, 2024
1 parent 8a73fbf commit 757eb73
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
48 changes: 48 additions & 0 deletions docs/getting-started/operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

```
<ifGreater symbol="TEMPERATURE_MOTOR5" value="-12.5">
<set symbol="MOTOR5_RPM">0</set>
</ifGreater>
```

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
```
<ifGreater symbol="TEMPERATURE_MOTOR5" value="PARAM_DEFINED_TEMPERATURE">
<set symbol="MOTOR5_RPM">0</set>
</ifGreater>
```

Please note the **symbol** and **value** datatype needs to match.



## If less
Used for comparison, every operation inside the ifLess body will be executed

```
<ifLess symbol="TEMPERATURE_MOTOR5" value="-12.5">
<set symbol="MOTOR5_RPM">0</set>
</ifLess>
```

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
```
<ifLess symbol="TEMPERATURE_MOTOR5" value="PARAM_DEFINED_TEMPERATURE">
<set symbol="MOTOR5_RPM">0</set>
</ifLess>
```

Please note the **symbol** and **value** datatype needs to match.


## Trace

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

0 comments on commit 757eb73

Please sign in to comment.