| Electronic Components Datasheet Search |
|
AN2512 Datasheet(PDF) 30 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2512 Datasheet(HTML) 30 Page - STMicroelectronics |
|
30 / 38 page ![]() Example of source code AN2512 30/38 long int frac[4]; /* fraction part of energy integrator */ long int integ[4]; /* integer part of energy integrator */ } ENERG; /* definition of variables for internal registers values */ char status[3]; char mode[3]; int freq[3]; int uRMS[3]; int iRMS[3]; int uMOM[3]; int iMOM[3]; long int active0[4]; long int active1[4]; long int reactive[4]; long int apparent[4]; /* allocation for all types of energies */ long int new; /* energy value to be handled */ ENERG *e; /* -> energy integrator */ ENERG ActWB; /* Active wide band energy */ ENERG Reactive; /* Reactive energy */ ENERG ActFund; /* Active fundamental energy */ ENERG Apparent; /* Apparent energy */ /* definition of constant */ #define ELIMIT 0x140000 /* produces 0.01 kWh resolution in case of 128000 pulses per kWh */ /*---------------------------------------------------------------------------------- ROUTINE NAME : EnergyQuant INPUT/OUTPUT : None/None DESCRIPTION : Energy quant computing function (version for signed energy integration). Checks for rollovers and compute quant as difference between new and old value. Returns a negative sign of quant. ----------------------------------------------------------------------------------*/ int EnergyQuant(Long int *new) { long int NewTemp; char i,Temp; |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |