Skip to content

Commit 321042c

Browse files
committed
Updated documentation with linear operation
1 parent ee19d36 commit 321042c

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docs/getting-started/operations.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,25 @@ Supported registers: **HOLDING_REGISTER**, **INPUT_REGISTER**
5959

6060
*For **INPUT_REGISTER** type *FLOAT32* is not supported!*
6161

62+
63+
## Linear
64+
Generates new values following a linear equation (ax + b)
65+
66+
```
67+
<linear symbol="TEMPERATURE_MOTOR1" a="3" b="2" startX="0" endX="12" replay="true" step="1.5"/>
68+
<linear symbol="TEMPERATURE_MOTOR2" a="3" b="2" startX="12" endX="0" replay="true" step="1.5"/>
69+
```
70+
71+
Both **symbol** , **startX** , **endX**, **a**, **b** and **step** are mandatory fields. Both values can be of type *FLOAT32* , *INT16* which must
72+
follow the same type of the specified **symbol** definition.
73+
**step** must be a positive value of type INT16 or FLOAT32
74+
75+
On the first example (xml above) x is starting in 0 and going up until 12 (<=) with a step of 1.5
76+
so the x values for the equation will be [0 1.5 3 4.5 6 7.5 9 10.5 12].
77+
78+
Second example is the oposite, note that startX is greater than endX, so the x values applied on this equation will be
79+
[12 10.5 9 7.5 6 4.5 3 1.5 0], also note that the **step** is positive, what is different is the **startX** and **endX** to indicate order.
80+
81+
Supported registers: **HOLDING_REGISTER**, **INPUT_REGISTER**
82+
83+
*For **INPUT_REGISTER** type *FLOAT32* is not supported!*

0 commit comments

Comments
 (0)