Usage of Single Diagnostic Description to Send Diagnostic Requests to Different Networks

Question:
Is it possible to use a single Diagnostic Description to send Diagnostic requests to different networks?
Answer:
You can use a single Diagnostic Description to send Diagnostic requests to different networks.

Please add the Diagnostic Description in the CANoe configuration (Configuration | Diagnostics/ISO TP…) to both networks as indicated below.
Note that both ECU qualifiers have to differ (e.g. Door/Door2).

With this configuration, you can change between both networks without stopping the measurement using the CAPL functions setBusContext() followed by DiagSetTarget()like shown in the example below:

void MainTest ()
{
  setBusContext(GetBusNameContext( "CAN"));
  DiagSetTarget("Door");
  CheckErrorMemory();
 
  setBusContext(GetBusNameContext( "CAN2"));
  DiagSetTarget("Door2");
  CheckErrorMemory();
 
}



Article ID: 665
Last updated: 2019-09-04
Revision: 1
CANalyzer/CANoe -> Diagnostics -> Diagnostics Description -> Usage of Single Diagnostic Description to Send Diagnostic Requests to Different Networks
https://kb.vector.com/entry/665/