beautypg.com

1 mapi_relayconfig(), Zero crossing and relay control, Mapi_relayconfig() – Maxim Integrated 78M6612 M-API Library User Manual

Page 32

background image

78M6612 M-API Library User Guide

UG_6612_036

32

Rev. 1.00

4.5 Zero Crossing and Relay Control

4.5.1 MAPI_RelayConfig()

Purpose

Read/Write relay configuration values. Relay configuration is applicable to all
channels/outlets.

Synopsis

void MAPI_RelayControl( IN Bool Operation, OUT/IN struct
Relay_Config_t Relay_Config)
;

Where Relay_Config_t is defined as:

struct Relay_Config_t

{

Unsigned Char

Relay_CTL;

Unsigned Integer

SeqDlyTime;

Unsigned Integer

DeEnergizedTime;

Unsigned Integer

EnergizedTime;

Unsigned Char

InvertPNonLatch;

};

Parameters

Operation

Input parameter.

TRUE (1) = set operation. FALSE (0) = get operation,
Relay_Config will all be output parameter.

When Operation = TRUE:

Relay_CTL

Output parameter.
This parameter is output only. It is set via
MAPI_RelayControl()

.

SeqDlyTime

Input parameter.
Set the new Sequence Delay Time in 10ms
units. Delay time is time between turning
Relays ON (close circuit). Default value is 10
100ms.


DeEngergizedTime

Input parameter.
Time in mseconds + 1msecond to delay after
open circuit.


EngergizedTime

Input parameter.
Time in msecond + 1msecond to delay after
close circuit.


InvertPolarity

Input parameter.
Bit 1 = Polarity (0 = non-inverted). Bit 0 =
Latch type (0 = non-latched).

Notes:

Sequence Delay Time will be used between turning relays ON.

Energized Delay Time is used as the delay time to wait
immediately after a zero-crossing before close circuit.

DeEnergized Delay Time is used as delay time to wait
immediately after a zero-crossing before open circuit.

Return Codes None.