<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: CAN Timing in Model-Based Design Toolbox (MBDT)</title>
    <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/CAN-Timing/m-p/908306#M3253</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/constantinrazvan.chivu"&gt;constantinrazvan.chivu&lt;/A&gt;‌ and &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/gramirezv"&gt;gramirezv&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciate the suggestions, however I would like to determine if a system has failed by raising a flag if no message has arrived from that system after a certain amount of time.&amp;nbsp;I could just compare it to the most recent CAN message received in general (from another system on the bus), but its not that accurate. Do you have any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Fernando&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 May 2019 20:44:40 GMT</pubDate>
    <dc:creator>fernando_barrio</dc:creator>
    <dc:date>2019-05-16T20:44:40Z</dc:date>
    <item>
      <title>CAN Timing</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/CAN-Timing/m-p/908303#M3250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anyway to determine the time since the last CAN message was received?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Fernando&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 May 2019 20:03:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/CAN-Timing/m-p/908303#M3250</guid>
      <dc:creator>fernando_barrio</dc:creator>
      <dc:date>2019-05-10T20:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: CAN Timing</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/CAN-Timing/m-p/908304#M3251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hola Fernando,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't tested this yet, but from what I can see the FCAN_Isr block has the Timestamp output, this should give you the timestamp for each CAN message received depending on the Event you have selected. I assume&amp;nbsp;you are using&amp;nbsp;the "Rx Complete" event. If that's the case, you should be able to read each timestamp and compare with the previous message and determine if it arrived within the time you expected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 May 2019 20:37:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/CAN-Timing/m-p/908304#M3251</guid>
      <dc:creator>gramirezv</dc:creator>
      <dc:date>2019-05-13T20:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: CAN Timing</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/CAN-Timing/m-p/908305#M3252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/fernando.barrios@uwaterloo.ca"&gt;fernando.barrios@uwaterloo.ca&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As always &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/gramirezv"&gt;gramirezv&lt;/A&gt;‌ is right! Sorry for the delayed message. You can compare the timestamp with the previous message timestamp and get the difference. Thanks again Gustavo for the quick reply!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Razvan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2019 15:16:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/CAN-Timing/m-p/908305#M3252</guid>
      <dc:creator>constantinrazva</dc:creator>
      <dc:date>2019-05-16T15:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: CAN Timing</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/CAN-Timing/m-p/908306#M3253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/constantinrazvan.chivu"&gt;constantinrazvan.chivu&lt;/A&gt;‌ and &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/gramirezv"&gt;gramirezv&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciate the suggestions, however I would like to determine if a system has failed by raising a flag if no message has arrived from that system after a certain amount of time.&amp;nbsp;I could just compare it to the most recent CAN message received in general (from another system on the bus), but its not that accurate. Do you have any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Fernando&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2019 20:44:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/CAN-Timing/m-p/908306#M3253</guid>
      <dc:creator>fernando_barrio</dc:creator>
      <dc:date>2019-05-16T20:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: CAN Timing</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/CAN-Timing/m-p/908307#M3254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/fernando.barrios@uwaterloo.ca"&gt;fernando.barrios@uwaterloo.ca&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get where are you coming from now - for this I would suggest you use the &lt;STRONG&gt;Get bus tick&lt;/STRONG&gt; block - you can find it in the &lt;STRONG&gt;Utility Blocks &lt;/STRONG&gt;section. I would suggest you do like this:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;in the CAN callback (the triggered subsystem) you get the current bus tick number (further named &lt;EM&gt;CAN_time&lt;/EM&gt;)&lt;/LI&gt;&lt;LI&gt;in a loop (the one you decide will be responsible for watching for failure of the other system) you can get the current bus tick number (&lt;EM&gt;check_time&lt;/EM&gt;); here all you have to do is convert the bus tick number to us/ms and check if the number is higher than what you want/need. By doing this, every time you get a new message, the CAN_time will update, and so when you get the difference (check_time - CAN_time), this should never be greater than a value that you decide implies the other system's failure (&lt;EM&gt;failure_time&lt;/EM&gt;).&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let us know if you find this approach satisfying.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Razvan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 May 2019 06:40:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/CAN-Timing/m-p/908307#M3254</guid>
      <dc:creator>constantinrazva</dc:creator>
      <dc:date>2019-05-17T06:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: CAN Timing</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/CAN-Timing/m-p/908308#M3255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/fernando.barrios@uwaterloo.ca"&gt;fernando.barrios@uwaterloo.ca&lt;/A&gt;&amp;nbsp;- I'd like to add a suggestion I would make if you're going with this method - you should not waste time computing the values back to us/ms at every check loop; you could just convert beforehand the failure_time to bus ticks, and save it as such in the model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Razvan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 May 2019 06:41:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/CAN-Timing/m-p/908308#M3255</guid>
      <dc:creator>constantinrazva</dc:creator>
      <dc:date>2019-05-17T06:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: CAN Timing</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/CAN-Timing/m-p/908309#M3256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is exactly what I need, thank you for the help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fernando&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2019 17:25:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/CAN-Timing/m-p/908309#M3256</guid>
      <dc:creator>fernando_barrio</dc:creator>
      <dc:date>2019-05-21T17:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: CAN Timing</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/CAN-Timing/m-p/1172473#M5178</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;I need to detect whether I am getting heartbeat of other components that is connected through CAN communication. If not, I should give error after a timeout.&lt;/P&gt;&lt;P&gt;So while I am searching for a solution I have run into that thread. And I just wanted to implement recommended solution by&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/176411"&gt;@constantinrazva&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My block is here as it seems. I have put one Get_Bus_Tick in RX_Complete and One in Subsystem and substracted them to find timedifference. I am taking TIMEOUT as zero everytime.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also attached that part of my model lke and excel file in attachment. You should convert attached file to .slx from xlsx.&lt;/P&gt;&lt;P&gt;How can I solve that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="im_1.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/128153i099E0B95F7577A2A/image-size/large?v=v2&amp;amp;px=999" role="button" title="im_1.png" alt="im_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Also, I have tried another model to try your advised solution. It did not work out. What I am missing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Oct 2020 10:48:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/CAN-Timing/m-p/1172473#M5178</guid>
      <dc:creator>ykarata1</dc:creator>
      <dc:date>2020-10-26T10:48:52Z</dc:date>
    </item>
  </channel>
</rss>

