configure CAN to send different IDs

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

configure CAN to send different IDs

ソリューションへジャンプ
791件の閲覧回数
MaMM
Contributor III

Hi.

I'm trying to send different IDs thorugh the same CAN PORT in simulink (s32k39 board), and I cannot find how to assign different buffers to each ID. If I use the same configuration for different IDs thorugh CAN, I can read the messages but at double rate of the frequency I have selected.

For example, if I configure 100ms as base task time, and I add two simulink blocks to send CAN Messages, I can see on the USB to CAN tool both message but at 200 ms. If I use only one sending block, I can see 1 message at 100ms, so I suppose that another can_buffer must be used, but I cannot find where to change it.

An example of a .mdl with several ID configured thorugh the same port will be appreciatted.

Miguel.

タグ(1)
0 件の賞賛
返信
1 解決策
774件の閲覧回数
Adrian_Gherca
NXP Employee
NXP Employee

Hello,

Here are two methods to send out CAN messages with multiple IDs using the MBDT blocks:

First method:
1) In your configuration project (S32 Configuration Tool or EB tresos), under Can_43_FLEXCAN\CanConfigSet\CanHardwareObject, increase the value of Can Hw Object Count to the desired number of Tx messages:
Adrian_Gherca_2-1737387835414.png

2) In the Simulink model add the same number of Can_Write blocks, each block with a different value for the Pdu ID input:

Adrian_Gherca_3-1737388017462.png

Second method:
1) Make sure that multiple TRANSMIT objects exist in the configuration project under Can_43_FLEXCAN\CanConfigSet\CanHardwareObject. If necessary, press the "+" symbol and create more at the end of the list:

Adrian_Gherca_6-1737388568483.png

2) Select a different Hardware Object for each one of the Can_Write blocks:

Adrian_Gherca_7-1737390660109.png

 


 

 

 

 

 






元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
761件の閲覧回数
MaMM
Contributor III

Thanks a lot. Both solutions work perfectly.

Miguel.

0 件の賞賛
返信
775件の閲覧回数
Adrian_Gherca
NXP Employee
NXP Employee

Hello,

Here are two methods to send out CAN messages with multiple IDs using the MBDT blocks:

First method:
1) In your configuration project (S32 Configuration Tool or EB tresos), under Can_43_FLEXCAN\CanConfigSet\CanHardwareObject, increase the value of Can Hw Object Count to the desired number of Tx messages:
Adrian_Gherca_2-1737387835414.png

2) In the Simulink model add the same number of Can_Write blocks, each block with a different value for the Pdu ID input:

Adrian_Gherca_3-1737388017462.png

Second method:
1) Make sure that multiple TRANSMIT objects exist in the configuration project under Can_43_FLEXCAN\CanConfigSet\CanHardwareObject. If necessary, press the "+" symbol and create more at the end of the list:

Adrian_Gherca_6-1737388568483.png

2) Select a different Hardware Object for each one of the Can_Write blocks:

Adrian_Gherca_7-1737390660109.png

 


 

 

 

 

 






0 件の賞賛
返信