Example

Top  Previous 

 

Examples


 

Example1:

 

The following model will detect CAN Bus communication fault:

 

CAN_ComFault_example1

 

 

We will Enable CAN Bus RxWatchdog in CAN_setup block.  Please see parameters settings in "CAN_setup" block below:

 

 

CAN_ComFault_example1setup

 

So if we don't send out data frame with CAN ID=234 from external CAN Bus device, we will get value 1 from Display block (Communication fault).

However, if we send out data frame with CAN ID=234 and Data1=0 (first byte in data field: RxWatchdog counter) and DLC=1 every 330ms from external CAN Bus device, we will get value 0 from Display block (Communication normal).

 

Please open "your CAN Controller library folder"/examples/example1_CAN_ComFault.slx  (You must change USB serial Port number in CAN_setup block according to your physical USB port number)