Function Run1LPFCommand: CHECKPRIBACKCOORD

 

Function Function Run1LPFCommand( sInput$ ) As Long

Purpose: Run OneLiner command: Relay | Check primary/backup relay coordination.

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 CHECKPRIBACKCOORD  with attributes in the list below (* denotes required entries, [] denotes default value).

REPORTPATHNAME    (*) Full pathname of report file.

OUTFILETYPE      [2] Output file type 1- TXT; 2- CSV

SELECTEDOBJ      Relay group to check against its backup. Must  have one of following values

“PICKED “ the highlighted relaygroup on the 1-line diagram

“BNO1;'BNAME1';KV1;BNO2;'BNAME2';KV2;'CKT';BTYP;”  location string of the relaygroup. Format description is in OneLiner help section 10.2.

PAIRTYPE           Coordination pair type to check:

[0]         Check group against its backups

1            Check group against groups that it backs up

2            Check all pairs that involve the group

This attribute is ignored if SELECTEDOBJ is not found.

TIERS                [0] Number of tiers around selected object. This attribute is ignored if SELECTEDOBJ is not found.

AREAS               [0-9999] Comma delimited list of area numbers and ranges to check relaygroups agains backup. This attribute is ignored if SELECTEDOBJ is found.

ZONES               [0-9999] Comma delimited list of zone numbers and ranges to check relaygroups agains backup. This attribute is ignored if AREAS or SELECTEDOBJ are found.

KVS                   [0-999] Comma delimited list of KV levels and ranges to check relaygroups agains backup. This attribute is ignored if SELECTEDOBJ is found.

TAGS                 Comma delimited list of tags to check relaygroups agains backup. This attribute is ignored if SELECTEDOBJ is found.

COORDTYPE        Coordination type to check. Must  have one of following values

“0”         OC backup/OC primary (Classical)

“1”         OC backup/OC primary (Multi-point)

“2”         DS backup/OC primary

“3”         OC backup/DS primary

“4”         DS backup/DS primary

“5”         OC backup/Recloser primary

“6”         All types/All types

LINEPERCENT      Percent interval for sliding intermediate faults. This attribute is ignored if COORDTYPE is 0 or 5.

RUNINTERMEOP    1-true; 0-false. Check  intermediate faults with end-opened. This attribute is ignored if COORDTYPE is 0 or 5.

RUNCLOSEIN       1-true; 0-false. Check close-in fault. This attribute is ignored if COORDTYPE is 0 or 5.

RUNCLOSEINEOP  1-true; 0-false. Check close-in fault with end-opened. This attribute is ignored if COORDTYPE is 0 or 5.

RUNLINEEND        1-true; 0-false. Check line-end fault. This attribute is ignored if COORDTYPE is 0 or 5.

RUNREMOTEBUS   1-true; 0-false. Check remote bus fault. This attribute is ignored if COORDTYPE is 0 or 5.

RELAYTYPE         Relay types to check: 1-Ground; 2-Phase; 3-Both.

FAULTTYPE         Fault  types to check: 1-3LG; 2-2LG; 4-1LF; 8-LL; or sum of values for desired selection

OUTPUTALL         1- Include all cases in report; 0- Include only flagged cases in report

MINCTI              Lower limit of acceptable CTI range

MAXCTI              Upper limit of acceptable CTI range

OUTRLYPARAMS   Include relay settings in report: 0-None; 1-OC;2-DS;3-Both

OUTAGELINES      Run line outage contingency: 0-False; 1-True

OUTAGEXFMRS    Run transformer outage contingency: 0-False; 1-True

OUTAGEMULINES  Run mutual line outage contingency: 0-False; 1-True. Ignored if OUTAGEMULINES=0

OUTAGEMULINESGND      Run mutual line outage and grounded contingency: 0-False; 1-True. Ignored if OUTAGEMULINES=0

OUTAGE2LINES    Run double line outage contingency: 0-False; 1-True. Ignored if OUTAGEMULINES=0

OUTAGE1LINE1XFMR  Run double line and transformer outage contingency: 0-False; 1-True. Ignored if OUTAGEMULINES=0 or OUTAGEXFMRS =0

OUTAGE2XFMRS   Run double and transformer outage contingency: 0-False; 1-True. Ignored if OUTAGEXFMRS =0

OUTAGE3SOURCES    Outage only  3 strongest sources: 0-False; 1-True. Ignored if OUTAGEMULINES=0 and OUTAGEXFMRS =0

 

Example:                                                                                          

Sub main()

  sInput$ = "<CHECKPRIBACKCOORD " & _

            "REPFILENAME=""c:\\000tmp\\checkcoord.csv"" " & _

            "OUTFILETYPE=""1"" " & _

            "SELECTEDOBJ=""6; 'NEVADA'; 132.; 8; 'REUSENS'; 132.; '1'; 1;"" " & _

            "COORDTYPE=""6"" " & _

            "OUTPUTALL=""1"" " & _

            "MINCTI=""0.05"" " & _

            "MAXCTI=""99"" " & _

            "LINEPERCENT=""15"" " & _

            "RELAYTYPE=""3"" " & _

            "FAULTTYPE=""5"" " & _

            " />"

  Print sInput

  If Run1LPFCommand( sInput ) Then

    Print "Success"

  Else

    Print ErrorString()

  End If

End Sub