Mon Jun 25 2012

LRC init.message

Value, in hexa, for LRC of init.message, (type message I),  is 5E ?

Thanks,

 


   RE: Hematology Analyzer Report Post
Tue Feb 04 2014Reply from Rajesh
avatar placemark

Would like to know how this value has been arrived. The LRC value for "I" message( without images ) calculated as per ADVIA 2120 Tech Spec( manual ) gives a different value. Please provide the exact algorithm in arriving at the value 5E.


Report Post
Mon Jun 27 2016Reply from hamza.kifouche10@gmail
avatar placemark

LRC est la verification

convertez tout le message sauf STX et ETX et LRC en binaire

chaque partie sur un byte

fait le XOR

si le resulta different de 03h ne fait rien sinon changez vers 7ah


Report Post
Thu Dec 03 2020Reply from vijendrakarkala_9027
avatar placemark

Its just Xoring.

public static int calculateCheckSumFromAllBytes(byte[] byteArray) {
        int calculatedByXOR = 0;
        for (int i = 0; i             byte c = byteArray[i];
            calculatedByXOR ^= c;
        }
        if (calculatedByXOR == ASCII.ETX) {
            calculatedByXOR = 0x7F; //127
        }
        return calculatedByXOR;

}


Report Post

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Please review our Privacy Policy for more details.
I Agree