Expressions > Syntax rules > Functions

LOGEVENT function

LOGEVENT(x). Writes the string x to the DeltaV Process History log. LOGEVENT returns a float value of 1.0 if the call succeeded and a value of 0.0 if the call failed.

LOGEVENT takes one parameter (a string containing the information to record) and writes it in the Desc2 field of the process event record associated with this module. The most common use is the establishment of a dynamic reference to a significant and, possibly, transitory event that needs to be recorded.

There is an 125-character limit on the Desc2 field.

In a single module scan, a module with LOGEVENT statements can log up to five events. After this, all other LOGEVENT statements encountered during that scan are discarded.

Syntax:

'float value' := LOGEVENT(String Value);

Example:

'^/ADDED_COL.CV' := LOGEVENT("Added" + '^/ADD_AMT.CV' + "gallons from" + '^COLOR_VLV.$REF);

LOGEVENT can fail if the memory used to hold events to be communicated has been exhausted. The most probable cause is that LOGEVENT is being called more frequently than the capacity for communicating events to other nodes in the system allows.