Function ComputeRelayTime( ByVal nHandle&, ByRef vdCurMag() as double, _
ByRef vdCurAng() as double, ByRef vdVMag() as double, _
ByRef vdVAng() as double, ByVal dVpreMag#, _
ByVal dVpreAng#, ByRef dTime, ByRef sDevice ) As Long
Purpose: Computes operating time for a fuse, recloser, an overcurrent relay (phase or ground), or a distance relay (phase or ground) at given currents and voltages.
Works in: OneLiner only.
Parameters:
nHandle [in] relay handle
vdCurMag() [in] array of relay current magnitude in: phase A, B, C and if applicable Io currents in neutral of transformer windings P and S.
vdCurAng() [in] array of relay current angles
vdVMag() [in] array of relay voltage magnitude in phase A, B and C
vdVAng() [in] array of relay voltage angle
dVpreMag [in] relay pre-fault positive sequence voltage magnitude
dVpreAng [in] relay pre-fault positive sequence voltage angle
dTime [out] relay operating time in seconds
sDevice [out] relay operation code:
NOP No operation
ZGn Ground distance zone n tripped
ZPn Phase distance zone n tripped
Ix Overcurrent relay operating quantity: Ia, Ib, Ic, Io, I2, 3Io, 3I2
Return value:
1 success
0 failure
Remarks: All calls to this
function must be preceded by a call to ShowFault or PickFault function.
Relay current multiplying factor will be applied to relay current result
from simulation before time calculation.
Example:
Call ComputeRelayTime(nRlyHnd, vdImag, vdIang, vdVmag, vdVang, dVpreMag, dVpreAng, _
dTime#, sDevice$ )
sOutput$ = " T=" & Format(dTime,"0.00") & "(" & sDevice & ")" & _
";Ia=" & Format(vdImag(1),"0.0") & "@" & Format(vdIang(1),"0.0") & _
";Ib=" & Format(vdImag(2),"0.0") & "@" & Format(vdIang(2),"0.0") & _
";Ic=" & Format(vdImag(3),"0.0") & "@" & Format(vdIang(3),"0.0") & _
";IN1=" & Format(vdImag(4),"0.0") & "@" & Format(vdIang(4),"0.0") & _
";IN2=" & Format(vdImag(5),"0.0") & "@" & Format(vdIang(5),"0.0") & _
";Va=" & Format(vdVmag(1),"0.0") & "@" & Format(vdVang(1),"0.0") & _
";Vb=" & Format(vdVmag(2),"0.0") & "@" & Format(vdVang(2),"0.0") & _
";Vc=" & Format(vdVmag(3),"0.0") & "@" & Format(vdVang(3),"0.0")