hist_latest

hist_latest — gives the latest value in a history

Syntax

hist_latest (hist_task, history)
    

Parameters

hist_task

The task object corresponding to the Cascade Historian. See locate_task in the Gamma manual.

history

The name of the history to be queried.

Returns

An instance of the HI_stVALUE class containing the (value, xaxis) data. Otherwise returns nil and sets _last_error_ to the error string returned by the Cascade Historian.

Description

This function returns the value for the last data item in the history. This item may be either in a file or in memory.

This function corresponds to the latest command, and the Cogent C API function HI_Latest.

Example

Gamma> a = hist_latest (tsk, "p3");
{HI_stVALUE (value . 38.2) (xaxis . 973636953.463209)}
Gamma> a.value;
38.2
Gamma> a.xaxis;
973636953.463209