-> Hier kostenlos registrieren
Moin Zusammen,
ich habe 64 Bit Struct oder Array (32 Bit Fehler+32Bit Meldungen).
Der Code, den ich unten geschrieben habe, überprüft alle Bits.
Wie kann ich erreichen, dass nur die Fehlerbits geprüft werden?
DB:
Variable Array[0..63] of Bool
Variable_1 Array[0..63] of Bool
Variable_2 Array[0..63] of Bool
Variable_3 Array[0..63] of Bool
Variable_4 Array[0..63] of Bool
Variable_5 Array[0..63] of Bool
Variable_6 Array[0..63] of Bool
Hat Jemand eine andere Idee?
VG
Excliss
ich habe 64 Bit Struct oder Array (32 Bit Fehler+32Bit Meldungen).
Der Code, den ich unten geschrieben habe, überprüft alle Bits.
Wie kann ich erreichen, dass nur die Fehlerbits geprüft werden?
DB:
Variable Array[0..63] of Bool
Variable_1 Array[0..63] of Bool
Variable_2 Array[0..63] of Bool
Variable_3 Array[0..63] of Bool
Variable_4 Array[0..63] of Bool
Variable_5 Array[0..63] of Bool
Variable_6 Array[0..63] of Bool
Code:
#i := 0;
#Byte := 0;
#Bit := 0;
FOR #i := #IN1 TO #IN2 BY 1 DO
#ErrorNumber := 0;
#Byte := #i / 8; // Bytenummer berechnen
#Bit := #i MOD 8; // Bitnummer berechnen
#fehlerTrue := WORD_TO_BLOCK_DB(#DBNr).DX(#Byte, #Bit);
IF #fehlerTrue THEN
#ErrorNumber := #i + #Fehlerbereiche;
RETURN;
END_IF;
END_FOR;
Hat Jemand eine andere Idee?
VG
Excliss