Function GetSCCurrent( ByVal hHandle&, ByRef vdOut1() as double, _
ByRef vdOut2() as double, ByVal nStyle& ) As Long
Purpose: Retrieve post fault current for a generator, load, shunt, switched shunt, generating unit, load unit, shunt unit, transmission line, transformer, switch or phase shifter. You can get the total fault current by calling this function with the pre-defined handle of short circuit solution, HND_SC.
Works in: OneLiner only.
Parameters:
nHandle [in] data object handle
vdOut1 [out] current result, real part or magnitude, into equipment terminals
vdOut2 [out] current result, imaginary part or angle in degree, into equipment terminals
nStyle
[in] current result style
=1: output 012 sequence current in
rectangular form
=2: output 012 sequence current in polar form
=3: output
ABC phase current in rectangular form
=4: output ABC phase current in polar
form
Return value:
1 success
0 failure
Remarks: Size of arrays vdOut1 and vdOut2 must be sufficient to store all current results according to the following table:
Output Arrays Generator, load, shunt Line, transformer, phase shifter
vdOut1(1) vdOut2(1) Current Phase A,
B, C or Current Phase: A, B, C or
vdOut1(2) vdOut2(2)
Sequence: zero, pos., neg Seq.: 0,
+, - from Bus 1
vdOut1(3)
vdOut2(3)
vdOut1(4) vdOut2(4) Not used
Transformer only:
Neutral
current of winding on Bus 1
vdOut1(5) vdOut2(5)
Not
used
Current Phase: A, B, C or
vdOut1(6)
vdOut2(6)
Seq.: 0, +, - from Bus 2
vdOut1(7)
vdOut2(7)
vdOut1(8) vdOut2(8) Not
used
Transformer only:
Neutral
current of winding on Bus 2
vdOut1(9) vdOut2(5)
Not
used
3-W Transformer only: Current
vdOut1(10)
vdOut2(10)
Phase: A, B, C or Seq. 0, +, -
vdOut1(11)
vdOut2(11)
from Bus 3
vdOut1(12) vdOut2(12)
Not
used
3-W Transformer only:
Delta
circulating current on Bus 3
Example:
Dim MagArray(12) As Double, AngArray(12) As Double
‘ Get end bus names
If GetData( LineHnd, LN_nBus1Hnd, BusHnd ) = 0 Then GoTo HasError
Bus1ID = FullBusName( BusHnd )
If GetData(LineHnd, LN_nBus2Hnd, BusHnd ) = 0 Then GoTo HasError
Bus2ID = FullBusName( BusHnd )
‘ Must always show fault before retrieving result
If ShowFault( 1, 0, -999, 0, vnShowRelay ) = 0 Then GoTo HasError
‘ Get post fault current
If GetSCCurrent( LineHnd, MagArray, AngArray2, 4 ) = 0 Then GoTo HasError
‘ Show them
Print _
"Current on line: "; Bus1ID & "-"; Bus2ID & " ID= "; LineID$; ": "; Chr(10); _
"I1a = "; Format( MagArray(1), "#0.0"); "@"; Format( AngArray(1), "#0.0"); _
"; I1b = "; Format( MagArray(2), "#0.0"); "@"; Format( AngArray(2), "#0.0"); _
"; I1c = "; Format( MagArray(3), "#0.0"); "@"; Format( AngArray(3), "#0.0"); _
"; I1g = "; Format( MagArray(4), "#0.0"); "@"; Format( AngArray(4), "#0.0"); Chr(10); _
"I2a = "; Format( MagArray(5), "#0.0"); "@"; Format( AngArray(5), "#0.0"); _
"; I2b = "; Format( MagArray(6), "#0.0"); "@"; Format( AngArray(6), "#0.0"); _
"; I2c = "; Format( MagArray(7), "#0.0"); "@"; Format( AngArray(7), "#0.0"); _
"; I2g = "; Format( MagArray(8), "#0.0"); "@"; Format( AngArray(8), "#0.0")