CAN001 message object allocation

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
How can I affect the assignment of the first message object assigned to a CAN node?
It seems that the first logic message object assihgned to the first CAN001 instanze it MO 0
and for the second instance it is MO 13 (CAN001_Handle1.FirstMOMapping = 13).

I like to change it to lets say 32. What can I do (besides running a script after generating DAve code)?
0 Likes
4 Replies
AngelB
Employee
Employee
Hello Heinz,

In your application, the CAN001_Handle1.FirstMOMapping = 13 indicates that the LMO1 is assigned to the hardware MO 13, the second instance (LMO2) has to be the MO 14.

It is possible to select easily the hardware assignment for the Logical MO configured in the App. But in order to make it easier to integrate the configuration with the FIFO mode of the module, it has limitations:
- The numbers of the Hardware MOs have to be consecutive.
- You should assign always the higher LMO number, the rest will be assigned automatically.

For example, you can change the second LMO in your application (LMO2) to MO 32, but take in account that the first (LMO1) will be automatically assigned to the MO 31. If you assign the LMO2 to MO 60, the LMO1 will be automatically assigned to MO 59...

To do that, you should make right click in the CAN001 App View and then click in "Manual Resource Assignment", in "Resource Name" select the higher LMO number and in "Resource List" the hardware MO number that you would like to assign. One assigned click Solve and Save.
In order to see the MO assigned you can go to "Resource Mapping Information" tool (multicolored bottom in the taskbar).


Best regards,
Angel
0 Likes
Not applicable
Hello Angel,
I followed your advice. Unfortunately message1 is still mapped to can/0/mo13.
This is the same as can be seen in the source code of CAN001_Conf.c

Heinz
0 Likes
Not applicable
Hi Heinz,

If you have more than 1 message objects assigned to 2nd instance of CAN001, assign the higher message object with the higher message object number.
I've tried with 2 message objects in CAN001_1 and assigned "message2" with "/can/0/mo/32". The message1 is mapped to "/can/0/mo/31".

703.attach704.attach

However, if you just have only 1 message object assigned to 2nd instance of CAN001. You will always get "can/0/mo13" being mapped. I will check this and get back to you.

Best regards,
Sophia
0 Likes
Not applicable
sophia wrote:
Hi Heinz,
....

However, if you just have only 1 message object assigned to 2nd instance of CAN001. You will always get "can/0/mo13" being mapped. I will check this and get back to you.



That is the situation I have. Thanks for taking care.
Heinz
0 Likes