diff --git a/components/modules/Kue705FO.jsx b/components/modules/Kue705FO.jsx
index f6dfacb..cfb4d39 100644
--- a/components/modules/Kue705FO.jsx
+++ b/components/modules/Kue705FO.jsx
@@ -22,6 +22,8 @@ function Kue705FO({
"Schleifenwiderstand [kOhm]"
);
const [isoDisplayText, setIsoDisplayText] = useState("Aderbruch");
+ const [groundFaultDisplayText, setGroundFaultDisplayText] =
+ useState("Erdschluss");
const [loading, setLoading] = useState(false);
const [currentDisplayValue, setCurrentDisplayValue] = useState(
schleifenwiderstand || "0"
@@ -339,6 +341,26 @@ function Kue705FO({
}, [slotIndex, isolationswert]);
//-------------------------------------------------
+ useEffect(() => {
+ if (window.kueGroundFault[slotIndex] === 1) {
+ const intervalId = setInterval(() => {
+ setGroundFaultDisplayText((prevText) =>
+ prevText === "Erdschluss" ? (
+
+ ) : (
+ "Erdschluss"
+ )
+ );
+ }, 2000); // Wechsel alle 2 Sekunden
+
+ return () => clearInterval(intervalId);
+ } else {
+ setGroundFaultDisplayText(isolationswert || ">200"); // Standardwert, wenn kein Erdschluss vorliegt
+ }
+ }, [slotIndex, isolationswert]);
return (
@@ -383,24 +405,30 @@ function Kue705FO({
Alarm
- {/* isoDisplay: Zeigt den Isolationswiderstand oder Aderbruch an */}
+ {/* isoDisplay: Zeigt den Isolationswiderstand, Aderbruch oder Erdschluss an */}
- {/* Aderbruch anzeigen, wenn Aderbruch vorhanden ist isoDisplayText*/}
{window.kueCableBreak[slotIndex] === 1
- ? isoDisplayText
- : isolationswert || ">200"}
+ ? isoDisplayText // Anzeige für Aderbruch, wenn aktiv
+ : window.kueGroundFault[slotIndex] === 1
+ ? groundFaultDisplayText // Anzeige für Erdschluss, wenn aktiv und kein Aderbruch
+ : isolationswert || ">200"}{" "}
+ {/* Standardanzeige für Isolationswert */}
- {window.kueCableBreak[slotIndex] !== 1 && (
-
ISO MOhm
- )}
+
+ {/* Nur anzeigen, wenn kein Alarm aktiv ist */}
+ {window.kueCableBreak[slotIndex] !== 1 &&
+ window.kueGroundFault[slotIndex] !== 1 && (
+
ISO MOhm
+ )}
diff --git a/public/CPLmockData/SERVICE/kueData.js b/public/CPLmockData/SERVICE/kueData.js
index 4e3b64d..d4f429b 100644
--- a/public/CPLmockData/SERVICE/kueData.js
+++ b/public/CPLmockData/SERVICE/kueData.js
@@ -29,7 +29,7 @@ var kueCableBreak = [
0, 0, 1, 1, 1, 1,
];
var kueGroundFault = [
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
];
var kueLimit1 = [