when the command is issued through PC and the response received directly to PC itself. the output parameters and status flags are in response were correct.
the same was repeated with arduino mega, and the response was invalid.
the data frame and the structure of the response received was valid, the data attributes included in it contains error.
void setup(){
Serial.begin(9600);
Serial1.begin(9600);
byte command={0x10,0x13,0x01,0x10,0x1F,0x00,0x53};
for(int i=0;i<sizeof(command);i++){
Serial.write(command*);*
_ Serial1.write(command*);_
_ }_
_}_
void loop(){
_ if(Serial1.available()){_
_ while(Serial1.available()){_
_ Serial.write((char)Serial1.read());_
_ delay(1);_
_ } _
_ }_
_}_
response recived when tried with arduino:
_{10}{1A}{20}{01}{00}{40}{00}{00}{00}{7A}{C3}{00}{00}{5E}{42}{C4}{03}{84}{02}{C0}{57}{05}{3C}{1B}{90}{02}{00}{00}{00}{00}{00}{00}{00}{00}{00}{10}{1F}{05}{E9}_
expected response:
_{10}{1A}{20}{01}{00}{00}{00}{CD}{4C}{E5}{C4}{33}{33}{E3}{41}{42}{04}{FB}{02}{90}{00{4A}{3D}{DB}{24}{00}{00}{00}{00}{00}{00}{00}{00}{00}{00}{10}{1F}{08}{1F}*_