Attention
IronPLC can only run very simple programs. The steps described are accurate but many language features are not yet supported.
LIMIT¶
Clamps a value to a specified range.
IEC 61131-3 |
Section 2.5.1.5.5 |
Support |
Supported |
Signatures¶
# |
Input (MN) |
Input (IN) |
Input (MX) |
Return Type |
Support |
|---|---|---|---|---|---|
1 |
|
|
|
|
Supported |
2 |
|
|
|
|
Supported |
3 |
|
|
|
|
Supported |
4 |
|
|
|
|
Supported |
5 |
|
|
|
|
Supported |
6 |
|
|
|
|
Supported |
7 |
|
|
|
|
Supported |
8 |
|
|
|
|
Supported |
9 |
|
|
|
|
Supported |
10 |
|
|
|
|
Supported |
Description¶
LIMIT(MN, IN, MX) clamps IN to the range [MN, MX]. The
function returns:
MN if IN < MN
MX if IN > MX
IN otherwise
The behavior is undefined if MN > MX.