Instruction Manual
UG_6612_036 78M6612 M-API Library User Guide
Rev. 1.00 19
Parameters Operation Input parameter.
WRITE(1) – Set Operation, READ(0) – Get Operation.
Struct _Reg_t When Operation=READ, Output parameter.
When Operation=WRITE, Input parameter.
Address Four-byte address location.
Address where its content will be extracted
(Operation=READ) or stored (Operation = WRITE).
Value Four-byte value to be stored or retrieved. If
Content from Address to be extracted (Operation=READ) or
stored (Operation = WRITE).
TypeSize Type and Size of register’s content. Read-only.
This byte is defined as follows:
Bit 8 Bit 7…4 Bit 3…1
SIGNED: Register
value is a signed
value (1-negative,
0-positive).
TYPE: Register value is one
of the following types. Note
this is a
read-only field used
to determine the type of the
Register content that is
returned (see mapi_t.h):
SIZE
1 – Char, 1-byte
: Indicates
storage size (in
bytes) of register
where:
2 - Integer, 2-byte
4 - Word, 4-byte
INTEGER
FLOAT
IRMS_M
VRMS_M
CONTROL
CONFIG
POWER
ENERGY
FREQ
COUNT
TIMER
STATUS
STRING
0x00
0x10
0x40
0x50
0x60
0x70
0x18
0x28
0x38
0x48
0x58
0x68
0x78
Typically used for
power factor,
phase adjust.
ScaleFactor Output parameter.
This byte indicates presentation format of the register
content defined as follows:
10 – Tenth unit factor.
100 – Hundredth unit factor.
1000 – Thousandth unit factor.
Return Codes MAPI_OK – successful operation.
MAPI_RESTRICTED – specified address is restricted.