Cool Tool - Feeder Manager Phase Mismatch Labeltext Expression

Version 2

    This labeltext expression shows Phase Designation vs. the Feeder Manager maintained FeederInfo field. Useful for finding phase errors, mismatches, and deenergized features.

     

    Function FindLabel ([PHASEDESIGNATION],[FEEDERINFO]) 'Note: Uncheck the Display Coded Value Description checkbox

     

    'Note: FindLabel shows PHASEDESIGNATION first, then "-", then FEEDERINFO (e.g. A-A)

    'Created by J. Dirkman, 29 Nov 2007

     

    if [PHASEDESIGNATION] = "1" and [FEEDERINFO] = "4" then 'C and C - good

      FindLabel = "C-C"

    elseif [PHASEDESIGNATION] = "1" and [FEEDERINFO] = "68" then 'C and C - loop

      FindLabel = "<CLR red='255'>C-C Loop</CLR>"

    elseif [PHASEDESIGNATION] = "1" and [FEEDERINFO] = "132" then 'C and C - multifeed

      FindLabel = "<CLR red='255'>C-C Multifeed</CLR>"

    elseif [PHASEDESIGNATION] = "1" and [FEEDERINFO] = "196" then 'C and C - loop and multifeed

      FindLabel = "<CLR red='255'>C-C Loop and Multifeed</CLR>"

     

    elseif [PHASEDESIGNATION] = "2" and [FEEDERINFO] = "2" then 'B and B - good

      FindLabel = "B-B"

    elseif [PHASEDESIGNATION] = "2" and [FEEDERINFO] = "66" then 'B and B - loop

      FindLabel = "<CLR red='255'>B-B Loop</CLR>"

    elseif [PHASEDESIGNATION] = "2" and [FEEDERINFO] = "130" then 'B and B - multifeed

      FindLabel = "<CLR red='255'>B-B Multifeed</CLR>"

    elseif [PHASEDESIGNATION] = "2" and [FEEDERINFO] = "194" then 'B and B - loop and multifeed

      FindLabel = "<CLR red='255'>B-B Loop and Multifeed</CLR>"

     

    elseif [PHASEDESIGNATION] = "3" and [FEEDERINFO] = "6" then 'BC and BC - good

      FindLabel = "BC-BC"

    elseif [PHASEDESIGNATION] = "3" and [FEEDERINFO] = "70" then 'BC and BC - loop

      FindLabel = "<CLR red='255'>BC-BC Loop</CLR>"

    elseif [PHASEDESIGNATION] = "3" and [FEEDERINFO] = "134" then 'BC and BC - multifeed

      FindLabel = "<CLR red='255'>BC-BC Multifeed</CLR>"

    elseif [PHASEDESIGNATION] = "3" and [FEEDERINFO] = "198" then 'BC and BC - loop and multifeed

      FindLabel = "<CLR red='255'>BC-BC Loop and Multifeed</CLR>"

    elseif [PHASEDESIGNATION] = "3" and [FEEDERINFO] = "2" then 'BC and B - bad

      FindLabel = "<CLR red='255'>BC-B</CLR>"

    elseif [PHASEDESIGNATION] = "3" and [FEEDERINFO] = "4" then 'BC and C - bad

      FindLabel = "<CLR red='255'>BC-C</CLR>"

     

    elseif [PHASEDESIGNATION] = "4" and [FEEDERINFO] = "1" then 'A and A - good

      FindLabel = "A-A"

    elseif [PHASEDESIGNATION] = "4" and [FEEDERINFO] = "65" then 'A and A - loop

      FindLabel = "<CLR red='255'>A-A Loop</CLR>"

    elseif [PHASEDESIGNATION] = "4" and [FEEDERINFO] = "129" then 'A and A - multifeed

      FindLabel = "<CLR red='255'>A-A Multifeed</CLR>"

    elseif [PHASEDESIGNATION] = "4" and [FEEDERINFO] = "193" then 'A and A - loop and multifeed

      FindLabel = "<CLR red='255'>A-A Loop and Multifeed</CLR>"

     

    elseif [PHASEDESIGNATION] = "5" and [FEEDERINFO] = "5" then 'AC and AC - good

      FindLabel = "AC-AC"

    elseif [PHASEDESIGNATION] = "5" and [FEEDERINFO] = "69" then 'AC and AC - loop

      FindLabel = "<CLR red='255'>AC-AC Loop</CLR>"

    elseif [PHASEDESIGNATION] = "5" and [FEEDERINFO] = "133" then 'AC and AC - multifeed

      FindLabel = "<CLR red='255'>AC-AC Multifeed</CLR>"

    elseif [PHASEDESIGNATION] = "5" and [FEEDERINFO] = "197" then 'AC and AC - loop and multifeed

      FindLabel = "<CLR red='255'>AC-AC Loop and Multifeed</CLR>"

    elseif [PHASEDESIGNATION] = "5" and [FEEDERINFO] = "1" then 'AC and A - bad

      FindLabel = "<CLR red='255'>AC-A</CLR>"

    elseif [PHASEDESIGNATION] = "5" and [FEEDERINFO] = "4" then 'AC and C - bad

      FindLabel = "<CLR red='255'>AC-C</CLR>"

     

    elseif [PHASEDESIGNATION] = "6" and [FEEDERINFO] = "3" then 'AB and AB - good

      FindLabel = "AB-AB"

    elseif [PHASEDESIGNATION] = "6" and [FEEDERINFO] = "67" then 'AB and AB - loop

      FindLabel = "<CLR red='255'>AB-AB Loop</CLR>"

    elseif [PHASEDESIGNATION] = "6" and [FEEDERINFO] = "131" then 'AB and AB - multifeed

      FindLabel = "<CLR red='255'>AB-AB Multifeed</CLR>"

    elseif [PHASEDESIGNATION] = "6" and [FEEDERINFO] = "195" then 'AB and AB - loop and multifeed

      FindLabel = "<CLR red='255'>AB-AB Loop and Multifeed</CLR>"

    elseif [PHASEDESIGNATION] = "6" and [FEEDERINFO] = "1" then 'AB and A - bad

      FindLabel = "<CLR red='255'>AB-A</CLR>"

    elseif [PHASEDESIGNATION] = "6" and [FEEDERINFO] = "2" then 'AB and B - bad

      FindLabel = "<CLR red='255'>AB-B</CLR>"

     

    elseif [PHASEDESIGNATION] = "7" and [FEEDERINFO] = "7" then 'ABC and ABC - good

      FindLabel = "ABC-ABC"

    elseif [PHASEDESIGNATION] = "7" and [FEEDERINFO] = "71" then 'ABC and ABC - loop

      FindLabel = "<CLR red='255'>ABC-ABC Loop</CLR>"

    elseif [PHASEDESIGNATION] = "7" and [FEEDERINFO] = "135" then 'ABC and ABC - multifeed

      FindLabel = "<CLR red='255'>ABC-ABC Multifeed</CLR>"

    elseif [PHASEDESIGNATION] = "7" and [FEEDERINFO] = "199" then 'ABC and ABC - loop and multifeed

      FindLabel = "<CLR red='255'>ABC-ABC Loop and Multifeed</CLR>"

    elseif [PHASEDESIGNATION] = "7" and [FEEDERINFO] = "1" then 'ABC and A - bad

      FindLabel = "<CLR red='255'>ABC-A</CLR>"

    elseif [PHASEDESIGNATION] = "7" and [FEEDERINFO] = "2" then 'ABC and B - bad

      FindLabel = "<CLR red='255'>ABC-B</CLR>"

    elseif [PHASEDESIGNATION] = "7" and [FEEDERINFO] = "3" then 'ABC and AB - bad

      FindLabel = "<CLR red='255'>ABC-AB</CLR>"

    elseif [PHASEDESIGNATION] = "7" and [FEEDERINFO] = "4" then 'ABC and C - bad

      FindLabel = "<CLR red='255'>ABC-C</CLR>"

    elseif [PHASEDESIGNATION] = "7" and [FEEDERINFO] = "5" then 'ABC and AC - bad

      FindLabel = "<CLR red='255'>ABC-AC</CLR>"

    elseif [PHASEDESIGNATION] = "7" and [FEEDERINFO] = "6" then 'ABC and BC - bad

      FindLabel = "<CLR red='255'>ABC-BC</CLR>"

     

    elseif [PHASEDESIGNATION] = "1" and [FEEDERINFO] = "8" then 'Deenergized and FeederID is null

      FindLabel = "<CLR red='255'><BOL>C-Deenergized</BOL></CLR>"

    elseif [PHASEDESIGNATION] = "2" and [FEEDERINFO] = "8" then 'Deenergized and FeederID is null

      FindLabel = "<CLR red='255'><BOL>B-Deenergized</BOL></CLR>"

    elseif [PHASEDESIGNATION] = "3" and [FEEDERINFO] = "8" then 'Deenergized and FeederID is null

      FindLabel = "<CLR red='255'><BOL>BC-Deenergized</BOL></CLR>"

    elseif [PHASEDESIGNATION] = "4" and [FEEDERINFO] = "8" then 'Deenergized and FeederID is null

      FindLabel = "<CLR red='255'><BOL>A-Deenergized</BOL></CLR>"

    elseif [PHASEDESIGNATION] = "5" and [FEEDERINFO] = "8" then 'Deenergized and FeederID is null

      FindLabel = "<CLR red='255'><BOL>AC-Deenergized</BOL></CLR>"

    elseif [PHASEDESIGNATION] = "6" and [FEEDERINFO] = "8" then 'Deenergized and FeederID is null

      FindLabel = "<CLR red='255'><BOL>AB-Deenergized</BOL></CLR>"

    elseif [PHASEDESIGNATION] = "7" and [FEEDERINFO] = "8" then 'Deenergized and FeederID is null

      FindLabel = "<CLR red='255'><BOL>ABC-Deenergized</BOL></CLR>"

     

    elseif [PHASEDESIGNATION] = "1" and [FEEDERINFO] = "0" then 'Deenergized and FeederID is null

      FindLabel = "<CLR red='255'><BOL>C-Deenergized</BOL></CLR>"

    elseif [PHASEDESIGNATION] = "2" and [FEEDERINFO] = "0" then 'Deenergized and FeederID is null

      FindLabel = "<CLR red='255'><BOL>B-Deenergized</BOL></CLR>"

    elseif [PHASEDESIGNATION] = "3" and [FEEDERINFO] = "0" then 'Deenergized and FeederID is null

      FindLabel = "<CLR red='255'><BOL>BC-Deenergized</BOL></CLR>"

    elseif [PHASEDESIGNATION] = "4" and [FEEDERINFO] = "0" then 'Deenergized and FeederID is null

      FindLabel = "<CLR red='255'><BOL>A-Deenergized</BOL></CLR>"

    elseif [PHASEDESIGNATION] = "5" and [FEEDERINFO] = "0" then 'Deenergized and FeederID is null

      FindLabel = "<CLR red='255'><BOL>AC-Deenergized</BOL></CLR>"

    elseif [PHASEDESIGNATION] = "6" and [FEEDERINFO] = "0" then 'Deenergized and FeederID is null

      FindLabel = "<CLR red='255'><BOL>AB-Deenergized</BOL></CLR>"

    elseif [PHASEDESIGNATION] = "7" and [FEEDERINFO] = "0" then 'Deenergized and FeederID is null

      FindLabel = "<CLR red='255'><BOL>ABC-Deenergized</BOL></CLR>"

     

    else 'all other cases

      FindLabel = "<CLR red='255'><BOL>Use FM Translator</BOL></CLR>"

    end if

    End Function