Difference between revisions of "HANcoder/STM32/Blocks/CAN Send"

From OpenMBD
< HANcoder‎ | STM32‎ | Blocks
Jump to: navigation, search
(Created page with "{{HANcoder/block| info= With this CAN send block you can send a CAN message with a specified identifier on a specified CAN bus. Each time the block is evaluated, a message is...")
 
Line 11: Line 11:
  
 
}}
 
}}
 +
 +
{| class="wikitable"
 +
|-
 +
! style="width:150px" | Parameter
 +
! Description
 +
|-
 +
| CAN channel
 +
| The CAN channel to be used, the E407 and P405 have two CAN channels, the Olimexino has only one.
 +
|-
 +
| Identifier type
 +
| The type of message identifier to be used: either standard(11-bit) or extended(29-bit).
 +
|-
 +
| Input ports
 +
| The number of input ports, the maximum number of bytes in a message is 8 so the maximum number of input ports is also 8. If for example uint16's are used you can only send 4 per message so you can select a maximum of 4 input ports per block.
 +
|-
 +
| Input data type
 +
| The input data type to be used. This assumes all signals in a message have the same datatype. If this is not the case then just use uint8 and do the
 +
processing of the bits and bytes in Simulink.
 +
|-
 +
| Byte order
 +
| Byte order or endianness can be selected. If the checkbox is selected then the Most Significant Byte order, big-endian or Motorola order is used, if not then the Lease Significant Byte, little-endian or Intel order is used.
 +
|-
 +
| Sample time
 +
| Sample time of the block. The Sample time (in seconds) defines the rate at which the block is visited by the real-time scheduler of the target. The value of the Sample time has to be an integer multiple of the base sample time of the model.
 +
|}

Revision as of 09:13, 5 April 2017

Supported Targets: Olimexino, E407, P405

General information about CAN Send

With this CAN send block you can send a CAN message with a specified identifier on a specified CAN bus. Each time the block is evaluated, a message is send containing the input values.

Block

CANSend.png

Mask

CANSendMask.png

Parameter Description
CAN channel The CAN channel to be used, the E407 and P405 have two CAN channels, the Olimexino has only one.
Identifier type The type of message identifier to be used: either standard(11-bit) or extended(29-bit).
Input ports The number of input ports, the maximum number of bytes in a message is 8 so the maximum number of input ports is also 8. If for example uint16's are used you can only send 4 per message so you can select a maximum of 4 input ports per block.
Input data type The input data type to be used. This assumes all signals in a message have the same datatype. If this is not the case then just use uint8 and do the

processing of the bits and bytes in Simulink.

Byte order Byte order or endianness can be selected. If the checkbox is selected then the Most Significant Byte order, big-endian or Motorola order is used, if not then the Lease Significant Byte, little-endian or Intel order is used.
Sample time Sample time of the block. The Sample time (in seconds) defines the rate at which the block is visited by the real-time scheduler of the target. The value of the Sample time has to be an integer multiple of the base sample time of the model.