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

Page 362

Advertising
background image

Micro-PWC CONFIGURATION GUIDE

342 Appendix A - Excel Functions

The fphxgetval( ) Function

Function Name

fphxgetval() - get a single value from the Historical database

Synopsis

fphxgetval(index, type)

Description

The

fphxgetval() function is used in a spreadsheet formula in conjunction with the function

fphxnumval. The user must configure the spreadsheet to first call the

fphxnumval() function,

which retrieves all the values from the Historical database during a specified time period, and
returns the number of values retrieved for the time period specified.

The individual values can be placed in cells using the fphxgetval function. The user supplies an
index number from 1 to

n (where n is the number of values returned by the fphxnumval()

function), and the type of data to be retrieved (a string value, a double value, or the time the value
was collected).

Inputs

Outputs

None.

Returns

The type of data requested.

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. The second
function call will return the third of these values as a double precision value. Cell A3 contains the
Time/Date of the previous day.

Parameter

Description

index

The index is a number from 1 to n (where n is the number of
values returned by the fphxnumval function).

type

The type argument specifies the type of the data to be
returned. The type is represented by a letter:

d - return a double precision value.
s - return a string value.
t - return the time the value was collected.

Advertising