Application Calculation Engine (ACE) methods
- Last UpdatedApr 24, 2025
- 8 minute read
The Application Calculation Engine (ACE) allows public method calls from several AVEVA Enterprise SCADA assemblies.
The Code Editor methods table below contains only some of the commonly used methods. This table does not include all methods that can be used with the Code Editor.
Note: When running an overload method, use the arrow keys to navigate the display instead of the on-screen arrow buttons.
Code Editor Methods
|
Method |
Description |
|---|---|
|
AlarmDB (tableName, pointName, fieldName, "alarmCategory", "alarmMessage", persistentAlarmBool, flashingBool, OASySDNA.Common. Severity, almPurgeTimeSecs) |
Used when custom alarm generation is needed. It generates an alarm within the Alarm Summary. Note: Using Fldput to write a value to the current value field within a table, for example analog curval, generates alarms when the current value moves into an alarm condition.
|
|
AlarmDB (tableName, pointNum, fieldName, "alarmCategory", "alarmMessage", persistentAlarmBool, flashingBool, OASySDNA.Common.Severity) |
Similar to AlarmDB above, but it accepts a point number (ptnum field value), rather than the point name. |
|
AlarmAPP(string dbname, string ptname, string fldname, string description, string group, string category, string almMsg, persistentAlarmBool, flashingBool, OASySDNA.Common.Severity, short purgeTimer, string dataset, string priorityDisplay) |
Used to generate alarms for changes without having to directly reference a database point. Instead of a point name, it accepts any given string for the dbname, ptname, or fldname. |
|
AlarmSys ("Key", "alarmMessage", persistentAlarmBool, flashingBool, "alarmCategory", OASySDNA.Common.Severity, almPurgeTimeSecs) |
Used to generate a system alarm. The parameters are similar to AlarmDB except for when you define a Key string that is used to differentiate the system alarms. |
|
DNALog.WriteLog (DNALog.LogLevel, "LogMessage") |
Used to write a message into the ACEEngine.log file within the log directory.
|
|
value = Fldget (tableName, pointName, fieldName) |
Used to get a numeric value from a RTDB point.
|
|
value = Fldget (tableName, pointNum, fieldName) |
Similar to previous Fldget, but expects a numeric point number – the point’s ptnum field value, rather than a point name string. |
|
value = FldgetString (tableName, pointName, fieldName) |
Used to get a numeric value from a RTDB point.
|
|
value = FldgetString (tableName, pointNum, fieldName) |
Similar to previous FldgetString, but expects a text point number – the point’s ptnum field value, rather than a point name string. |
|
Fldput (tableName, pointName, fieldName, value) |
Used to put a numeric value into the RTDB point.
|
|
Fldput (tableName, pointNum, fieldName, value) |
Similar to previous Fldput, but expects a numeric point number – the point’s ptnum field value, rather than a point name string. It is recommended to place a try-catch block around the method in order to trap exceptions that may occur during normal operations. (for example, Command failure due to remote offscan, writing new current value failed due to Controller placing the point into manual-override, or command failure due to the command inhibit tag.) If you do not use a try-catch block and an exception is thrown, then the code following the method will not get executed. If the exception is due to a temporary condition, then the ACE code (acecode) will execute again when the ACE Configuration (aceconfig) record execution is next triggered (see Types of execution). If the exception is not due to a temporary condition, then the aceconfig point is disabled, an alarm generated, and an event is logged. |
|
FldputString (tableName, pointName, fieldName, value) |
Used to put a numeric value into the RTDB point.
|
|
FldputString (tableName, pointNum, fieldName, value) |
Similar to previous FldputString, but expects a text point number – the point’s ptnum field value, rather than a point name string. |
|
Fnput (tableName, pointName, "command") |
Sends a command to a point.
|
|
Fnput (tableName, pointNum, "command") |
Similar to previous Fnput, but expects a numeric point number – the point’s ptnum field value, rather than a point name string. |
|
Fnput (tableName, args(<parameterNumber>). PointNumber, "command") |
Execute an fnput command using a parameter's point number. Input parameter numbers start at 1. The output point is referenced using a parameterNumber of 0. |
|
value =GetEnumByName ("enumTypeName", "enumValueString") |
Get the numeric representation for an enumeration description. This method is used to convert from a string description to an enumeration number.
|
|
value = GetMultistateInputByName ("multistatePointName", "stateName") |
Get the numeric input base message offset representation of a multistate point state. This method is used to convert from string to input base message offset, which is a double.
For example: Open.Example:Dim closeVal As Double = GetMultistateInputByName("myMultistate", "CLOSE") Dim openVal As Double = GetMultistateInputByName("myMultistate","OPEN") If (input1 = closeVal) Then output = openValElse output = closeValEnd If |
|
value = GetMultistateInputByName (multistatePtnum," stateName") |
Similar to the previous GetMultistateInputByName method, but this method expects a multistate point number (the multistate ptnum field value) rather than a multistate name string. |
|
value = GetMultistateOutputByName ("multistatePointName", "stateName") |
Get the numeric output base message offset representation of a multistate point state. This method is used to convert from string to output base message offset, which is a double.
|
|
value = GetMultistateOutputByName (multistatePtnum," stateName") |
Similar to the previous GetStatusByName method, but this method expects a status point number (the status ptnum field value) rather than a status name string. |
|
value = GetStatusByName ("statusPointName", "stateName") |
Get the numeric representation of a status point state. This method is used to convert from string to number.
|
|
value = GetStatusByName (statusPtnum,"stateName") |
Similar to the previous GetStatusByName method, but this method expects a status point number (the status ptnum field value) rather than a status name string. |
|
IsOutputFresh = True |
Used to directly set the output point's fresh state to the desired value. In this case, "True". |
|
LastValues (<parameterNumber>) |
The previous value of the specified parameter. 0 is used for the output point and 1-18 is used to specify the associated input parameters. LastValues is a property on the ACEProcedure class and can be used without specifying the class. "Current and last parameter values" under "Examples" shows an example. |
|
Log ("LogMessage") |
Logs the message string to the hot RealTime server's %DNADataRoot%\RealTime\log file. |
|
value = Tnow () |
Get the current time in seconds in Coordinated Universal Time (UTC) (formerly Greenwich Mean Time (GMT)) starting at January 01, 1970. |
|
value = UTCNowSeconds() |
Get the current time in seconds UTC starting at January 01, 1970. |
|
SetFreshFunctionToAND() |
Used to control the ACE's calculation of the output point's fresh state. This function sets the ACE to use an AND function (the default), which sets the output point's fresh state to stale if any input database points are stale. |
|
SetFreshFunctionToOR() |
Used to control the ACE's calculation of the output point's fresh state. This function sets the ACE to use an OR function, which sets the output point's fresh state to fresh if any input database points are fresh. |
|
value = args(<parameterNumber>). Has Dataset |
Parameter Property. True if the parameter has a dataset. |
|
value = args(<parameterNumber>). Has Flags |
Parameter Property. True if the parameter has a flag structure. |
|
value = args(<parameterNumber>). IsFresh |
Parameter Property. True if the parameter was fresh before execution. |
|
value = args(<parameterNumber>).IsInError |
Parameter Property. True if the parameter was in error before execution. |
|
value = args(<parameterNumber>). CurrentValue |
Parameter Property. The current value of the input point. |
|
value = args(<parameterNumber>). IsConstant |
Parameter Property. True if the parameter is a constant numeric value; false if it’s a database point. |
|
value = args(<parameterNumber>). DatabasePathString |
Parameter Property. The path to the database point (for example, analog.ana1.curval). |
|
value = args(<parameterNumber>). Key Name |
Parameter Property. The key name for the database point (that is, ana1). |
|
value = args(<parameterNumber>). PointNumber |
Parameter Property. The database point number for this point. |
|
WriteEvent (DNALog.EventType, "EventMessage.") |
Writes a message to the Windows Event Log.
|
|
WriteEventSummary (tableName, pointName, "message") |
Writes a message to the Historical Event Summary and the spool device associated with the point’s group.
|
|
WriteEventSummary (tableName, pointNum, "message") |
Similar to previous WriteEventSummary but expects a numeric point number, that is to say the point’s ptnum field value, rather than a point name string. |