catchCANID

Top  Next

catchCANID


catch special CAN Bus frame

Since R2019b

 

Library: CAN Bus Controller ( Dafulai Electronics) /catchCANID

 

 

catchCANID

 

 


 

Description


 

This block catches your interesting CAN Bus frame. The  interesting CAN Bus frame is divided into 2 different types. Type 1 is that we only care CAN ID. Type 2 is that we care not only CAN ID but also first byte of data field (the frame number of long data frames).

This is non-block function. It will return immediately no matter whether it catch your interesting CAN bus frame.  The output port "Got" (logical value) will tell you whether catch your interesting CAN Bus frame.

 

Notes: long data frames means that CAN ID is the same, and the first byte of data field is frame number (starting from 0 or 1). So data field of each frame only has 7 bytes truly data, Total maximum data Qty= 7 x 256 (first frame No=0)=1792 bytes Or  Total maximum data Qty= 7 x 255 (first frame No=1)=1785 bytes

 

Parameters


 

Please double click this block to open parameters dialog below:

 

catchCANID_parameter1

 

 

Let us explain parameters.

 

 

Object ID for multiple CAN Bus controllers — In one PC, we may use multiple CAN bus controllers, this is for identifying each one we use. It must match the same parameter in CAN_setup block.

 

Catch CAN ID — It is CAN bus frame's CAN ID you want to catch. It is scalar.

 

Extended — true means "Catch CAN ID" is 29 bits of extended. Otherwise, it is 11 bits of standard.

 

Catch last frame only — true means we catch the CAN Bus data frame which CAN ID is specified in above parameters, and also which is the last frame of long data frames. Otherwise, we only care CAN ID/Extended.

 

The last frame number — The frame number of the last frame in long data frame.

 

 

 

Ports


 

Input

 

None

 

Outport


 

Got — "logical" scalar. True means we caught our interesting CAN Bus frame.

 

Examples