Floor
- Last UpdatedJan 11, 2023
- 1 minute read
- PI System
- PI Server 2024 R2
- PI Server
Return the nearest integer less than or equal to x.
Syntax
Floor(x)
Arguments
-
x
Integer or a real number, or an attribute whose value evaluates to a number at time of evaluation
Returns
The nearest integer less than or equal to x
Exceptions
Returns an error if x is a digital state, time expression, time interval or a string
Notes
Unit of measure of the argument, if it exists, is carried over to the result
Example
-
Floor(3.14)
[Returns 3]
-
Floor(-3.14)
[Returns -4]
-
Floor(TagVal('att1', '*'))
[Return the nearest integer less than or equal to the current value of 'att1']