Specifications
4 CAN I/O Support
4-30
least two instances of this block have to be used, each defining the
corresponding identifier range.
Identifiers — The fourth control (edit field) is used to define the identifiers of
the CAN-messages retrieved by this block. It has to be a row vector where the
elements define a set of either Standard or Extended identifiers. Each element
has to be in the range between 0 and 2031 for Standard identifiers or 0 and
2
29
- 1 for Extended identifiers. The number of identifiers for each CAN port in
a model per physical CAN board cannot exceed 200 (restriction of the
firmware’s dynamic object mode). The number of elements defined here, define
at the same time the number of output ports of the block. The block icon
displays the selected identifier at each output port. Each output port will
output the data frame being retrieved along with the CAN message. The signal
leaving each output port is a scalar of type double representing the maximum
size of 8 bytes of a CAN message’s data frame.
Output port options — The fifth control (popup menu) lets you define which
type of retrieved data is output at each output port. Three different types of
data can be output, which are data frame, status and timestamp. The status
information is of type double and is identical to the return value of function
CANPC_read_rcv_data (…) described in the Softing user manual. Refer to the
manual for more information. The timestamp information is of type double and
outputs the latest time at which a CAN message with the corresponding
identifier has been received. This time information in seconds (with a
resolution of 1 microsecond) can be used to implement timeout-logic within
your model. The popup menu lets you select which output information is output
at each output port of the block. If
Data is selected each output port signal is a
scalar only. If
Data – Status is selected each output port signal is a vector with
two elements, where the first element contains the data frame and the second
element the status information. If
Data – Status – Timestamp is selected each
output port signal is a vector with three elements, where the first element
contains the data frame, the second element the status information, and the
third element the timestamp.
Generate interrupts — The sixth control (check box) lets you define if the
CAN messages defined in this instance of the block will initiate an interrupt
from the CAN board each time they are received. If checked this allows driving
the model (target application) execution controlled by CAN messages.
Sample time — The seventh control (edit field) defines the sample time at
which the Send block is executed during a model (target application) run.