diff --git a/power-supply/power_supply.cpp b/power-supply/power_supply.cpp
index 931a3e0..1598c56 100644
--- a/power-supply/power_supply.cpp
+++ b/power-supply/power_supply.cpp
@@ -352,28 +352,40 @@
 {
     using namespace witherspoon::pmbus;
 
-    // Check for an output overcurrent fault.
-    if ((statusWord & status_word::IOUT_OC_FAULT) &&
-        !outputOCFault)
+    if (outputOCFault < FAULT_COUNT)
     {
-        util::NamesValues nv;
-        nv.add("STATUS_WORD", statusWord);
-        captureCmd(nv, STATUS_INPUT, Type::Debug);
-        auto status0Vout = pmbusIntf.insertPageNum(STATUS_VOUT, 0);
-        captureCmd(nv, status0Vout, Type::Debug);
-        captureCmd(nv, STATUS_IOUT, Type::Debug);
-        captureCmd(nv, STATUS_MFR, Type::Debug);
+        // Check for an output overcurrent fault.
+        if ((statusWord & status_word::IOUT_OC_FAULT))
+        {
+            outputOCFault++;
+        }
+        else
+        {
+            if (outputOCFault > 0)
+            {
+                outputOCFault = 0;
+            }
+        }
 
-        using metadata = org::open_power::Witherspoon::Fault::
-                PowerSupplyOutputOvercurrent;
+        if (outputOCFault >= FAULT_COUNT)
+        {
+            util::NamesValues nv;
+            nv.add("STATUS_WORD", statusWord);
+            captureCmd(nv, STATUS_INPUT, Type::Debug);
+            auto status0Vout = pmbusIntf.insertPageNum(STATUS_VOUT, 0);
+            captureCmd(nv, status0Vout, Type::Debug);
+            captureCmd(nv, STATUS_IOUT, Type::Debug);
+            captureCmd(nv, STATUS_MFR, Type::Debug);
 
-        report<PowerSupplyOutputOvercurrent>(metadata::RAW_STATUS(
-                                                     nv.get().c_str()),
-                                             metadata::CALLOUT_INVENTORY_PATH(
-                                                     inventoryPath.c_str()));
+            using metadata = org::open_power::Witherspoon::Fault::
+                    PowerSupplyOutputOvercurrent;
 
-        faultFound = true;
-        outputOCFault = true;
+            report<PowerSupplyOutputOvercurrent>(
+                    metadata::RAW_STATUS(nv.get().c_str()),
+                    metadata::CALLOUT_INVENTORY_PATH(inventoryPath.c_str()));
+
+            faultFound = true;
+        }
     }
 }
 
@@ -479,7 +491,7 @@
     readFailLogged = false;
     inputFault = false;
     powerOnFault = 0;
-    outputOCFault = false;
+    outputOCFault = 0;
     outputOVFault = false;
     fanFault = false;
     temperatureFault = false;
diff --git a/power-supply/power_supply.hpp b/power-supply/power_supply.hpp
index eefefff..5e7bee7 100644
--- a/power-supply/power_supply.hpp
+++ b/power-supply/power_supply.hpp
@@ -165,12 +165,12 @@
         bool inputFault = false;
 
         /**
-         * @brief Set to true when an output over current fault is detected
+         * @brief Indicates output over current fault if equal to FAULT_COUNT
          *
-         * This is the "IOUT_OC_FAULT" bit in the low byte from the STATUS_WORD
-         * command response.
+         * @details This is incremented when the "IOUT_OC_FAULT" bit in the low
+         *          byte from the STATUS_WORD command response is on.
          */
-        bool outputOCFault = false;
+        size_t outputOCFault = 0;
 
         /**
          * @brief Set to true when the output overvoltage fault is detected
