If
- Last UpdatedNov 22, 2022
- 1 minute read
- PI System
- PI Manual Logger 2017 R2
- Visualization
Syntax
If(Condition, TrueResult, ElseResult)
Arguments
|
Argument |
Data Type |
Description |
|---|---|---|
|
Condition |
Boolean |
Valid expression that will evaluate to or . |
|
TrueResult |
Any |
Any expression that will be returned when Condition argument evaluates to . |
|
ElseResult |
Any |
Any expression that will be returned when Condition argument evaluates to False. |
Returns
Returns the value of the TrueResult argument if the Condition argument is "", and returns the value of the ElseResult argument if the Condition argument is "."
Examples
If(CurrentValue("TI001.ML") < 32,CollectNow(),Skip())
This example prompts for data collection when the current value of the TI001.ML tag is less than 32; otherwise the tag is not prompted for collection.