beautypg.com

6 mapi_getvoltagecurrent(), Mapi_getvoltagecurrent() – Maxim Integrated 78M6612 M-API Library User Manual

Page 31

background image

UG_6612_036

78M6612 M-API Library User Guide

Rev. 1.00

31

4.4.6 MAPI_GetVoltageCurrent()

Purpose

Get the current values of Voltage and Current . This function can be useful for
determining referenced voltage and current values for calibration. Follow the
steps below for a sample usage of this API:

1. Call MAPI_CalSetGet() to get default calibration values.

2. Call MAPI_GetVoltageCurrent() to get current Voltage and Current.

3. Set new parameters with call to MAPI_CalSetGet().

4. Call MAPI_Calibrate() to start the calibration.

5. As a check call MAPI_GetVoltageCurrent() to confirm new calibrated

values.

Synopsis

void MAPI_GetVoltageCurrent( OUT struct VIT_t *VIT_Params);

Where VIT_t is defined as:

struct VIT_t

{

Unsigned char Channel;
float Current_I;

float Current_V;

};

Parameters

Channel

Input parameter.
Channel/outlet number (1 or 2) where present Current value will be
read.

Current_I

Output parameter.

Present value of Current (in mAmps) for the specified outlet.

Current_V

Output parameter

Present value of Voltage for Voltage A (in mVolts).

Return Codes None.