Author Topic: Can Bridge  (Read 1728 times)

Offline F.M.Elettromeccanica

  • PLUS+1 Developer
  • ***
  • Posts: 47
  • Karma: +1/-0
Can Bridge
« on: July 20, 2022, 06:32:13 PM »
Hi all,
using an MC024-130 i have 70 Can messages on Can1 and i wont to bridge them all on Can0.
Is there a component to use 1 time that make transparent can1>>can0?
i wish to avoid to write manually every IDs i need to bridge.
Thanks to all

Offline OneOverS

  • PLUS+1 Developer
  • ***
  • Posts: 12
  • Karma: +2/-0
Re: Can Bridge
« Reply #1 on: July 20, 2022, 07:12:03 PM »
There is not a component, however, you can simply chain together a CAN Rx and a CAN Tx.  The Rx, you just need to have the mask all zero'es.  Then pass the actual ID to the CAN Tx.  Have the Rx Updt bit trigger the Tx bit.  I have not tested exactly this, but I think it should work.

There is one small complication....  You will need to have multiple of these chains...  The reason is that the CAN Rx block in GUIDE kind of "absorbs" the message.  Even with a very fast loop time 1 ms or 5 ms, there will still be several messages than come in each loop.  Each one that comes in would need it's own chain (though the chains are generic - just multiple exact copies).  Just make sure you have "plenty" of them.  How many is plenty?  I'm not sure, it depends on many factors, you would just need to test.  Also, the "protected" bit on the Rx I believe needs to be set to T.

Let us know if you find success!

Offline F.M.Elettromeccanica

  • PLUS+1 Developer
  • ***
  • Posts: 47
  • Karma: +1/-0
Re: Can Bridge
« Reply #2 on: July 22, 2022, 09:25:36 PM »
Thanks a lot for your reply, yes i've done exactly what you said, and it works. I had to use several RxTx chain to lose no messages and a time loop of 5mS.
Playng with mask i succeed to catch some messages, modify them, and then transmitt with a new shape. I seems to work properly, i have to test better during next week.
Great