Nov 21, 2013
07:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 21, 2013
07:24 AM
Hi,
To implement the CANOPEN I need reconfigure the identifier in the transmission messages.
I try to change the "CAN001_MessageHandle0_2.Identifier=0x180" but it do not work. The message goes with the base ID for that LMO
How can i do it?
I want to use only 1 LMO to receive all messages and 1 LMO to transmit, but i need to change the messages identifier.
I tried this
i configured the LMO_1 to receive and for transmit LMO_2.
TempMsgHandle.Identifier = 0x180
TempMsgHandle.DataLength = 4;
TempMsgHandle.data[0] = (uint8_t) adc_Res.Result;
TempMsgHandle.data[1] = (uint8_t) (adc_Res.Result >> 8);
TempMsgHandle.data[2] = (uint8_t) (adc_Res.Result >> 16);
TempMsgHandle.data[3] = (uint8_t) (adc_Res.Result >> 24);
CAN001_MessageHandle0_2.Identifier=0x180;
status = CAN001_ConfigMsgObj(&CAN001_Handle0, &TempMsgHandle, 2);
status=CAN001_UpdateMODataRegisters(&CAN001_Handle0, 2, TempMsgHandle.DataLength, TempMsgHandle.data);
status = CAN001_SendDataFrame(&CAN001_Handle0, 2);
It doesn´t work 😞
Can anyone help me with this?
Luis Silva
To implement the CANOPEN I need reconfigure the identifier in the transmission messages.
I try to change the "CAN001_MessageHandle0_2.Identifier=0x180" but it do not work. The message goes with the base ID for that LMO
How can i do it?
I want to use only 1 LMO to receive all messages and 1 LMO to transmit, but i need to change the messages identifier.
I tried this
i configured the LMO_1 to receive and for transmit LMO_2.
TempMsgHandle.Identifier = 0x180
TempMsgHandle.DataLength = 4;
TempMsgHandle.data[0] = (uint8_t) adc_Res.Result;
TempMsgHandle.data[1] = (uint8_t) (adc_Res.Result >> 8);
TempMsgHandle.data[2] = (uint8_t) (adc_Res.Result >> 16);
TempMsgHandle.data[3] = (uint8_t) (adc_Res.Result >> 24);
CAN001_MessageHandle0_2.Identifier=0x180;
status = CAN001_ConfigMsgObj(&CAN001_Handle0, &TempMsgHandle, 2);
status=CAN001_UpdateMODataRegisters(&CAN001_Handle0, 2, TempMsgHandle.DataLength, TempMsgHandle.data);
status = CAN001_SendDataFrame(&CAN001_Handle0, 2);
It doesn´t work 😞
Can anyone help me with this?
Luis Silva
5 Replies
Not applicable
Nov 25, 2013
01:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 25, 2013
01:50 AM
Hi Luis Silva,
Why don't you try to change the CAN identifier via register MOARn.ID[28:0]?
BR,
Zain
Why don't you try to change the CAN identifier via register MOARn.ID[28:0]?
BR,
Zain
Not applicable
Nov 25, 2013
09:38 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 25, 2013
09:38 PM
Hi Luis Silva,
In the CAN001_ConfigMsgObj() function, the following parameters will be checked:
1) TempMsgHandle.IDExten =1; // 0 or 1
2) TempMsgHandle.MsgObjEN = CAN001_ENABLE; // must be enabled
3) TempMsgHandle.MsgObjType = (CAN_MsgType)1; // Tx=1 or Rx=0
If one of the above parameters is incorrect, you will get "CAN001_INVALID_INPUT" status return value.
The local parameter TempMsgHandle is undefined after reset. Hence, you need add the above init. parameters before calling CAN001_ConfigMsgObj() function.
Best regards,
Sophia
In the CAN001_ConfigMsgObj() function, the following parameters will be checked:
1) TempMsgHandle.IDExten =1; // 0 or 1
2) TempMsgHandle.MsgObjEN = CAN001_ENABLE; // must be enabled
3) TempMsgHandle.MsgObjType = (CAN_MsgType)1; // Tx=1 or Rx=0
If one of the above parameters is incorrect, you will get "CAN001_INVALID_INPUT" status return value.
The local parameter TempMsgHandle is undefined after reset. Hence, you need add the above init. parameters before calling CAN001_ConfigMsgObj() function.
Best regards,
Sophia
Not applicable
Dec 19, 2013
08:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 19, 2013
08:35 AM
Good afternoon,
this is an interesting thread.
I am similarly wanting to be able to use a single message object for Tx and a single message object for Rx.
I have achieved this for the Tx by using the method outlined above, but how is it possible to have all CAN message IDs go to a single Rx message object? I cannot see a way of doing this, since within DAVE one has to specify a different message object for each CAN message ID one is expecting.
How can this configuration from the DAVE IDE be overwritten (as was done for Tx) so as all CAN message IDs go to a single Rx message object?
Has anyone any advice on how to achieve this?
Thanks,
Steve
this is an interesting thread.
I am similarly wanting to be able to use a single message object for Tx and a single message object for Rx.
I have achieved this for the Tx by using the method outlined above, but how is it possible to have all CAN message IDs go to a single Rx message object? I cannot see a way of doing this, since within DAVE one has to specify a different message object for each CAN message ID one is expecting.
How can this configuration from the DAVE IDE be overwritten (as was done for Tx) so as all CAN message IDs go to a single Rx message object?
Has anyone any advice on how to achieve this?
Thanks,
Steve
Not applicable
Jan 01, 2014
11:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 01, 2014
11:21 PM
Hi Steve,
Perhaps you can try to change the "Standard Acceptance Mask" to 0x000?
BR,
Zain
Perhaps you can try to change the "Standard Acceptance Mask" to 0x000?
BR,
Zain
Not applicable
Feb 13, 2014
09:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 13, 2014
09:38 AM
THANKS, worked well for me 🙂
sophia wrote:
Hi Luis Silva,
In the CAN001_ConfigMsgObj() function, the following parameters will be checked:
1) TempMsgHandle.IDExten =1; // 0 or 1
2) TempMsgHandle.MsgObjEN = CAN001_ENABLE; // must be enabled
3) TempMsgHandle.MsgObjType = (CAN_MsgType)1; // Tx=1 or Rx=0
If one of the above parameters is incorrect, you will get "CAN001_INVALID_INPUT" status return value.
The local parameter TempMsgHandle is undefined after reset. Hence, you need add the above init. parameters before calling CAN001_ConfigMsgObj() function.
Best regards,
Sophia