A.1 the fphxnumval( ) function, The fphxnumval( ) function – Micromod Micro-PWC: 53PW6000 MicroPWC Configuration Guide User Manual

Page 360

Advertising
background image

Micro-PWC CONFIGURATION GUIDE

340 Appendix A - Excel Functions

The fphxnumval( ) Function

Function Name

fphxnumval( ) - get values from the Historical database (integer)

Synopsis:

int fphxnumvals(tag, stime, etime, n_vals)

Description

The

fphxnumvals() function is used in the spreadsheet as a formula. The user can specify the

number of values to be obtained from the Historical database (for a specified tag) using the n_vals
argument. A starting and ending time further define the data to be obtained. For the specified
tagname, this function will return the specified number of values, or (if fewer values exist for the
specified time period in the Historical database) the maximum number of values available.

The actual number of values obtained for the time period specified is returned. Once data has
been obtained using the fphxnumval function, the fphxgetd function (refer to

The fphxgetval( )

Function

) can be used to return the actual data values to the spreadsheet.

Inputs

Outputs

None.

Returns

Number of values retrieved from the historical database.

Example

The following example gets the first 30 values (or as many as are available if less than 30 values
exist) for the tagname FIC101 from the Historical database, for the last 24 hours. Cell A3 contains
the Time/Date of the previous day.

Parameter

Description

tag

The tagname for which the values will be obtained from the
Historical database.

stime

The Starting Time and Date in spreadsheet format (refer to
the

Microsoft Excel

manual for information on spread-

sheet format).

etime

The Ending Time and Date in spreadsheet format.

n_vals

The number of values to be obtained from the Historical data-
base. If a positive number (n) is used, the first n values
between the specified start time (stime) and end time (etime)
will be obtained; if a negative number (-n) is used, the last n
values between stime and etime will be obtained. A number
must be specified for the n_vals argument; there is no
default.

Advertising