3 ce interface description, 1 ce program, 2 ce data format – Rainbow Electronics 71M6542G User Manual

Page 125: 3 constants, Ce interface description, Ce program, Ce data format, Constants, Table 78. standard ce codes

Advertising
background image

v1.1

© 2008–2011 Teridian Semiconductor Corporation

125

5.3

CE Interface Description

5.3.1 CE Program

The CE performs the precision computations necessary to accurately measure energy. These computations
include offset cancellation, phase compensation, product smoothing, product summation, frequency
detection, VAR calculation, sag detection and voltage phase measurement. All data computed by the CE
is dependent on the selected meter equation as given by EQU[2:0] (I/O RAM 0x2106[7:5]).

The CE program is supplied by Teridian as a data image that can be merged with the MPU operational
code for meter applications. Typically, the CE program provided with the demonstration code covers
most applications and does not need to be modified. Other variations of CE code are available from
Teridian. The descriptions provided in this section apply to the CE code revisions shown in

Table 77

.

Please contact the local Teridian representative to obtain the appropriate CE code required for a specific
application.

Table 77. Standard CE Codes

Device

Local Sensors

Remote Sensor

71M6541D/F

CE41A01 (Eq. 0 or 1)

CE41B016601

CE41B016201

(Eq. 0, 1 or 2)

71M6542F

CE41A01 (Eq. 0 or 1)

CE41A04 (Eq. 2)

5.3.2 CE Data Format

All CE words are 4 bytes. Unless specified otherwise, they are in 32-bit two’s complement format
(-1 = 0xFFFFFFFF). Calibration parameters are defined in flash memory (or external EEPROM) and
must be copied to CE data memory by the MPU before enabling the CE. Internal variables are used in
internal CE calculations. Input variables allow the MPU to control the behavior of the CE code. Output
variables are outputs of the CE calculations. The corresponding MPU address for the most significant
byte is given by 0x0000 + 4 x CE_address and by 0x0003 + 4 x CE_address for the least significant byte.

5.3.3 Constants

Constants used in the CE Data Memory tables are:

• Sampling Frequency: F

S

= 32768 Hz/13 = 2520.62 Hz.

• F

0

is the fundamental frequency of the mains phases.

• IMAX is the external rms current corresponding to 250 mV pk (176.8 mV rms) at the inputs IA and IB.

IMAX needs to be adjusted if the pre-amplifier is activated for the IAP-IAN inputs. For a 250 µ

Ω shunt

resistor, IMAX becomes 707 A (176.8 mV rms / 250 µ

Ω = 707.2 A rms).

• VMAX is the external rms voltage corresponding to 250 mV pk at the VA and VB inputs.
• N

ACC

, the accumulation count for energy measurements is SUM_SAMPS[12:0] (I/O RAM 0x2107[4:0],

0x2108[7:0]).

• The duration of the accumulation interval for energy measurements is SUM_SAMPS[12:0] / F

S

.

• X is a gain constant of the pulse generators. Its value is determined by PULSE_FAST and PULSE_SLOW

(see

Table 83

).

• Voltage LSB (for sag threshold) = VMAX * 7.879810

-9

V.

The system constants IMAX and VMAX are used by the MPU to convert internal digital quantities (as
used by the CE) to external, i.e., metering quantities. Their values are determined by the scaling of the
voltage and current sensors used in an actual meter. The LSB values used in this document relate digital
quantities at the CE or MPU interface to external meter input quantities. For example, if a SAG threshold
of 80 V rms is desired at the meter input, the digital value that should be programmed into SAG_THR (CE
RAM 0x24)
would be 80 Vrms * SQRT(2)/SAG_THR

LSB

, where SAG_THR

LSB

is the LSB value in the

description of SAG_THR (see

Table 84

).

Advertising