I am a beginner in CAPL script. I am writing a script to send a 8 byte message with a frame id (PID). When i run the script in canoe, ECU does not give a response.Every thing in the setup and database is correct. There is a problem in script. Below is the script.
/*@!Encoding:1252*/
variables
{
linmessage 0x11 Request;
linmessage 0x25 Response;
linmessage 0x01 Initiate_wake_up;
byte WakeUpFrame = 0x3E;
byte Request_Header = 0x11;
byte Response_Header = 0x25;
}
void Util_SendHeader(byte frameID)
{
Request.MsgChannel = 1;
Request.ID = frameID;
Request.RTR=1;
output(Request);
}
void Wake_Up_Frame()
{
Util_SendHeader (WakeUpFrame);
Request.byte(0)=0x00;
Request.byte(1)=0x00;
Request.byte(2)=0x00;
Request.byte(3)=0x00;
Request.byte(4)=0x00;
Request.byte(5)=0x00;
Request.byte(6)=0x00;
Request.byte(7)=0x00;
Request.rtr=0;
output(Request);
}
on key 'q'
{
Wake_Up_Frame();
Request.byte(0) = 0x00;
Request.byte(1) = 0x0A;
Request.byte(2) = 0x00;
Request.byte(3) = 0x00;
Request.byte(4) = 0x00;
Request.byte(5) = 0x00;
Request.byte(6) = 0x00;
Request.byte(7) = 0x00;
Util_SendHeader (Request_Header);
Request.rtr=0;
output(Request);
Util_SendHeader (Response_Header);
}
Please help me.