Example

Top  Previous 

 

Examples


 

Example1:

 

Every 200ms,  Action1:  we will transmit single Data frame with 11 bits's standard CAN ID=68, and DLC=3,  the first Data is byte "0x83",   the second  Data (uint16) is "0x7832" (Little-Endian).

Action2:  we will transmit RTR frame with 29 bits's extended CAN ID=86

 

Please see screenshot of model below:

 

 

txCANBus_example1

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

 

 

 

Example2:

 

Every 500ms, we will transmit long frames with 7 data items, each item will change to "int32". First frame number is 0, and the last frame DLC=8.   The 7 data items are "12340, 2345, 3456, 4567, 5678, 6789, 7890". CAN Bus ID is standard "678".

 

Please see screenshot of model below:

 

txCANBus_example2

 

 

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