How to Send Manually Defined Diagnostic Service Requests Using CAPL
In the Diagnostic Console, it is possible to Create raw values and manually send the new diagnostic requests.
If you want to send additionally defined diagnostics services using CAPL, the best way is to:
- First add an Additional Description to extend your diagnostic description (CDD, ODX/PDX or MDX) with new diagnostics services using a Basic Diagnostics Description.
Note:Additional descriptions are a feature that has been introduced for CANoe 9.0
The following example code shows you how to periodically send such a request using CAPL:
variables
{
mstimer tVoltageRead;
}on timer tVoltageRead
{
diagRequest ECUIdentifier.DID_Voltage_Read req;req.SendRequest();
}on start
{
setTimerCyclic(tVoltageRead, 500);
} - Define the desired services in the Editor and add them to the new created Diagnostics Console.
- In the CAPL Symbol Explorer, the additionally defined services can be found and used in your CAPL Code to send the Request using SendDiagRequest:
Please complete all required fields. Fields marked with * are required.