3 library parameters, 1 global symbols, 2 formulae for scaled parameters – Maxim Integrated 78M6612 M-API Library User Manual
Page 7: Library parameters, Global symbols, Formulae for scaled parameters

UG_6612_036
78M6612 M-API Library User Guide
Rev. 1.00
7
1.3 Library Parameters
This section describes critical constants and variable parameters of the MAPI library and their
recommended usage.
1.3.1 Global Symbols
The following symbols are fixed constants for the MAPI v2.00 firmware library:
Samples
: 1806
FS
: 3641
POWERSCALE
: 2.3439E-06
VRMS_MSCALE
: 9.6827E-05
IRMS_MSCALE
: 2.4207E-05
The following variables are unique to the sensor configuration and represent the real world values
mapped to the upper range of the 78M6612 analog front end.
IMAX
: 52 Amps for 4mOhm shunt
VMAX
: 471.5 Volts
1.3.2 Formulae for Scaled Parameters
The measurement outputs (and respective alarm thresholds) for the M-API library are stored in a raw
format to preserve native resolution of the computed measurements. When using API calls to access or
fetch measurement data, the values are automatically scaled and converted according to the data types,
below.
I
rms
= float(Val)* IRMS_MSCALE* IMAX*
√(FS/Samples)
V
rms
= float(Val)* VRMS _MSCALE* VMAX*
√(FS/Samples)
Watts
= float(Val)* POWERSCALE*IMAX*VMAX/1000
Frequency
= integer(Val)/100
Val
: library data
In some rare cases, when raw measurement data (Val) is directly accessed without going through the
library, which is not recommended, scaling to and from real world or usable values must be done using
the formulae above.