How to Prevent Flow Control Frames in CANoe
There are two diagnostic channels available in CANoe:
- built-in diagnostic channel
- CAPL Callback Interface (CCI) in combination with the Transport Protocol (TP) DLL
The diagnostic windows (Diagnostic Console, Fault memory, Session Control and OBD-II window) are always using the built-in diagnostic channel. Test Modules and Test Units are able to be used both ways alternatively. While CANoe versions up to 9.0 SPx mandatorily need the CCI for simulating ECU diagnostics, CANoe 10.0 and higher also offers the built-in diagnostic channel for simulation nodes.
Unfortunately it is not possible to prevent the sending of Flow Control Frames within the built-in diagnostic channel as soon as it was opened once e.g. by sending a diagnostics request from the Diagnostics Console. But with the CCI in combination with the TP DLL you can prevent Flow Control Frames issued by a Network Node. Please find below a description how to achieve this with a Network Node simulating a diagnostics tester.
- Add the necessary TP DLL to the Network Node first.
- Choose Configuration… from the context menu:
- Select the tab Components and add the DLL (osek_tp.dll) to the node.
The DLL resides in the EXEC32-folder of your CANoe installation:
- Add the following CAPL code to the node:
// Include file for the CAPL Callback Interface (CCI)
// Define constants necessary for the CCI reference implementation
char gECU="Tester"; // Node Qualifier
int cIsTester=1; // This is a tester node
diagSetTarget("ECU"); // Set the target ECU
// Connect the diagnostics channel defined by CCI to the ECU
// (alternatively, this could be done by simply sending a diagnostics request)
if (diagConnectChannel()!=0) write("Error when trying to connect the Diag channel!");
else write("Diag Channel connected!");
// Prevent Flow Control Frames. gHandle is defined in the CCI
// Network node used as diagnostics tester is completely quiet from here ==> a segmented response from the ECU cannot be received anymore
write("FlowControl switched off for tester node!");
on key 'd'
// Activate Flow Control Frames again before resuming diagnostics
write("FlowControl activated again!");
// Diagnostics communication to be added here, e.g. sending a diagnostics request to ECU
Now the Tester Node will not send Flow Control Frames anymore.
Please complete all required fields. Fields marked with * are required.