SM-630 Fingerprint module

hey fellas.. i'm currently working on a project and i need to deal with above 500 fingerprints..

i took help from http://tutorial.cytron.com.my/2013/01/29/interfacing-fingerprint-reader-integrated-sm630-with-arduino-uno/ but that tut dealed with 5 finger prints only..

for above 500 prints i tried to use fixed and variable part..

  byte addFingerPrint[] = {0x4D, 0x58, 0x10, 0x03, 0x40}; // 5  fixed bytes
  byte varyPart[3], highB = 0x00, lowB = 0x00;                  // 3 variable bytes
  int a2;
  varyPart[0]=highB;
  varyPart[1]=lowB;
  varyPart[2]=0x00;
  a2=0;
  while(a2<5){                                                       //while loop to add fixed bytes to checksum i.e. varyPart[2]
    varyPart[2] = varyPart[2] + addFingerPrint[a2];
    a2++;
  }
  a2 = 0;
  while(a2<2){                                                     //while loop to add variable bytes to checksum i.e. varyPart[2]
    varyPart[2] = varyPart[2]+varyPart[a2];
    a2++;
  }
  Serial.write(addFingerPrint, sizeof(addFingerPrint));   // write the 5 fixed bytes array of the command code
  Serial.write(varyPart, sizeof(varyPart));               // write the 3 variable bytes array of the command code
  delay(1000);
  correctRespond();     //function to check response of sm630
  operationSuccesful();    //function to check succcess of operation

and if operation is successful then lowB++ and highB++

but i m able to add first fingerprint at 0th position only.. then module is not rplying correctly for rest positions.. seems like increment operator is not operating properly..
how could i apply loop to deal with above 500 prints..??

Sanjay391:
and if operation is successful then lowB++ and highB++

I hope you mean:

lowB++;
if (lowB == 0)
    highB++;

yes..

but i m able to add first fingerprint at 0th position only.. then module is not rplying correctly for rest positions.. seems like increment operator is not operating properly..
how could i apply loop to deal with above 500 prints..??

Start with some Serial.print()s so you know what your program IS doing.