Function Run1LPFCommand: FAULTLOCATOR

 

Function Function Run1LPFCommand( sInput$ ) As Long

Purpose: Run OneLiner commands: Faults  | Fault Locator.

Works in:                             OneLiner.  

Parameters:     

sInput       [in] XML string, or full path name to XML file, containing XML node as described in Remarks section below.

Return value:

1               Success

0               Failure

Remarks: sInput must include XML node FAULTLOCATOR with attributes in the list below (* denotes required entries, [] denotes default value).

       REPORTPATHNAME  (*) full valid path to report file

       RELAYGROUP1             (*) Relay group 1 location string (OneLiner Help section 10.2)

BNO1;'BNAME1';KV1;BNO2;'BNAME2';KV2;'CKT';BTYP; 

       PHASORSET1         (*) Recorded fault voltage and current phasor data at relay group 1 (Va_m Va_a Vb_m Vb_a Vc_m Vc_a Ia_m Ia_a Ib_m Ib_a Ic_m Ic_a)

       PHASORSET3         Recorded phasor data (pre-fault) at relay group 1 (Va_m Va_a Vb_m Vb_a Vc_m Vc_a Ia_m Ia_a Ib_m Ib_a Ic_m Ic_a)

       FLTR                              Maximum fault impedance [30]

       ENDOPEN              Simulate remote end open: [0] -False; 1 - TRue

       RELAYGROUP2             Relay group 2 (Remote) location string

       PHASORSET2         Recorded fault voltage and current phasor data at relay group 2 (Va_m Va_a Vb_m Vb_a Vc_m Vc_a Ia_m Ia_a Ib_m Ib_a Ic_m Ic_a)

       ERRORMETHOD       Algorithm selection flag: an integer number with corresponding binary bits set or reset accordingly: 1- Auto; 2- Impedance; 3- Reactance; 4- Takagi; 5- Modified Takagi; 6- Novosel; 7- Eriksson. For example if you want to use Auto, Reactance and Modified Takagi, then the  flag is 1+2^2+2^4=21. If no flag is given, all applicable algorithms will be selected by default.   

Example:                                                                                          

 

Sub main()

   xml$ = xmlMakeNode ( "FAULTLOCATOR" )

   Call xmlSetAttribute( xml, "REPORTPATHNAME", sReportFile )

   Call xmlSetAttribute( xml, "RELAYGROUP1", "1228; '732_MITSUE E'; 240.; 1260; '809_LOU CREE'; 240.; '1'; 1;" )

   Call xmlSetAttribute( xml, "PHASORSET1", "141.014 142.426 59.2049 0 62.9214 280.56 85.9079 239.439 2261.95 -50.2205 2216.97 174.78" )

   Call xmlSetAttribute( xml, "ERRORMETHOD", "21" )

   If "Y" <> InputBox( xml, "Continue?", "Y" ) Then Stop

   If 1 = Run1LPFCommand( xml ) Then

    Print "Success"

   Else

    Print "Failure: " & ErrorString()

   End If

End Sub