Author Topic: basic CAN Rx module for 29-bit ID message  (Read 9714 times)

power4

  • Guest
basic CAN Rx module for 29-bit ID message
« on: June 15, 2013, 12:27:00 AM »
Does anyone have successful experience of using basic CAN RX module to receive 29-bit ID message? Receiving 11-bit ID message is fine. Then, I change the extended input to True, and mask to 0x1FFFFFFF, and ID to 0x18EEFF0A. Then, I use CANking to send a message with ID = 0x18EEFF0A. But it seems the RX module does not receive the message properly.

Can anyone please give idea about this?

Thanks!

Offline Richard

  • PLUS+1 Expert
  • ****
  • Posts: 64
  • Karma: +2/-0
    • Textron
Re: basic CAN Rx module for 29-bit ID message
« Reply #1 on: June 18, 2013, 10:39:01 AM »
Can you post a screen shot of your rx logic?

Richard

power4

  • Guest
Re: basic CAN Rx module for 29-bit ID message
« Reply #2 on: June 18, 2013, 04:30:09 PM »
Attached file is a screenshot of my example.

Can you post a screen shot of your rx logic?

Richard


Offline Richard

  • PLUS+1 Expert
  • ****
  • Posts: 64
  • Karma: +2/-0
    • Textron
Re: basic CAN Rx module for 29-bit ID message
« Reply #3 on: June 18, 2013, 06:00:20 PM »
Could it be as simple as you're send tx id is 0x18EEFF0A and the rx id is 0x18EEFF0B?

Brian Bandura

  • Guest
Re: basic CAN Rx module for 29-bit ID message
« Reply #4 on: June 18, 2013, 06:48:51 PM »
You may want to try two different processors. One to send, one to recieve.  I have never been able to send a message and recieve that message on the same processor. When the message is being sent, the can processor does not recieve.

Offline mebib

  • PLUS+1 Developer
  • ***
  • Posts: 18
  • Karma: +0/-0
Re: basic CAN Rx module for 29-bit ID message
« Reply #5 on: June 18, 2013, 07:00:31 PM »
@power4

Did you set up the CANking correct? To send an extendet frame you net to add a "X" at the end of the identyfire. So the correct way to enter the ID is $18EEFF0AX

Hope this will help...

power4

  • Guest
Re: basic CAN Rx module for 29-bit ID message
« Reply #6 on: June 18, 2013, 07:08:00 PM »
My design is actually to use PC to send a CAN message to a controller and once it receives correctly, it will send another CAN frame back to PC. This demo code is just to test CAN Rx, Tx module. On PC, we can use the CANking software to send a frame, and for the Tx module, I did some modification on the default one, since the default Tx module will send frame periodically. In this example, I let it send only when receiving is right. So, the Tx module here just helps to debug the receiving, and Tx can be working separately.

In this example, if I change the extended input to False, and change the ID to, for example, 0x100, it can receive any standard 11-bit frame, because the mask is 0. If I set the mask to be 0x1FF. It can only receive message with ID 0x100.

I just don't know why when I change the extended input to TRUE, and I can not receive anything, even the mask is still 0.


power4

  • Guest
Re: basic CAN Rx module for 29-bit ID message
« Reply #7 on: June 18, 2013, 07:20:37 PM »
I see. I did not put an X at the end of the ID to send an extended frame. In addition, I intended to receive a frame with ID 1 and send another frame with ID 2. But I put the same value for both IDs.

Now, it works after I send a correct frame via CANKing.

Thanks everyone.