Variables
- Last UpdatedJul 05, 2024
- 2 minute read
Application Calculation Engine (ACE) Variables
|
Variables |
Description |
|---|---|
|
output |
A numeric variable whose values are written into the ACE output point. |
|
input1, input2, ... inputX |
The value of the input parameters. Note: The values of the constants, PubSub topics, or database points defined in the ACE Config Editor must be numeric. |
|
args[0..n] |
The array of argument objects that correspond to the output and inputs. Input parameters indices start at 1. The output point is referenced using a index of 0. Each object has the following properties that can be read, but should never be written to:
|
Examples
Simple calculation:
output = (input1 / input2) + input3
Complex Procedure:
Dim pumpPtnum as integer = args(1).PointNumber
Dim pumpState as integer = input1
Dim tankLevel as integer = input2
If (( pumpState = GetStatusByName(pumpPtnum,"OPEN") ) and (tankLevel > 100)) Then
WriteEventSummary("status", pumpPtnum, "ACE: Turning pump off as the tank level is too high")
Fnput("status", pumpPtnum, "Command CLOSE")
End If