Specifications

5 CAN I/O Support for FIFO
5-2
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.
Sending a CAN message — When sending out a CAN message, the latency
time is the time interval between the time accessing the board in order to
provide all the information of the CAN message to be sent out and the time
the board returns the acknowledgement that the information has been
received by the firmware.
Receiving a CAN message — When receiving a CAN message, the latency
time is the time interval between the time accessing the board in order to ask
for current data (object data) of a certain CAN identifier and the time the
board returns the actual data and other information about the CAN
message.
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
20*40us = 800us
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.