xPC Target    

Introduction

This chapter describes the alternative First In First Out (FIFO) CAN drivers provided with xPC Target. The standard CAN drivers, for the CAN boards from Softing GmbH, program the CAN board firmware to run in Dynamic Object Buffer (DOB) mode. This mode is best suited for real-time environments where it is mandatory that the driver latency time is time deterministic. Actually, running the firmware in Dynamic Object Buffer mode would always be the best choice, but this mode has the undesired side effect of high driver latency times.

Disadvantages of Dynamic Object Buffer mode -- These latency times are mainly defined by the reaction time of the board firmware. In the case of the Softing boards, the latency time is the same for sending and receiving, messages with a fixed value of about 40us. If your xPC Target application has to send and receive a larger number of CAN messages, the overall latency time can quickly become high and may make it impossible to run the application at the desired base sample time.

For example, assuming that a specific xPC Target application has to get data from 12 CAN identifiers and has to transmit data by using 8 CAN messages, the total number of CAN board read and write accesses adds up to 20. This results in a total CAN I/O latency time of

With such an application, base sample times below 800us are impossible even if the dynamics of the corresponding Simulink model are simple and would only need 20us of computational time.

Advantages of Dynamic Object Buffer mode -- However, even if the CAN I/O latency time in the Dynamic Object Buffer mode is high, the benefit of this mode is that the latency time stays constant almost independent of the traffic volume on the CAN network. This leads to the conclusion that the Dynamic Object Buffer mode is best suited for xPC Target applications which only have to deal with a smaller subset of all CAN messages going over the CAN network.


  CAN I/O Support for FIFO FIFO Mode Drivers for CAN Boards from Softing