<?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>Model-Based Design Toolbox (MBDT)のトピックAny MODBUS-RTU Libraries ? for Model Base Design</title>
    <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Any-MODBUS-RTU-Libraries-for-Model-Base-Design/m-p/1260483#M5961</link>
    <description>&lt;P&gt;Hi Guy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on S32K1xx series to communicate with some sensors via RS485 (LPUART).&lt;/P&gt;&lt;P&gt;Ex. Read Coils, Write Coil, etc.&lt;/P&gt;&lt;P&gt;I am just hoping there should be any public library for such MATLAB Function to start with.&lt;/P&gt;&lt;P&gt;Please help share us start line for this Simulink integration.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance,&lt;/P&gt;&lt;P&gt;Narudol T.&lt;/P&gt;</description>
    <pubDate>Mon, 12 Apr 2021 10:09:04 GMT</pubDate>
    <dc:creator>Narudol-T</dc:creator>
    <dc:date>2021-04-12T10:09:04Z</dc:date>
    <item>
      <title>Any MODBUS-RTU Libraries ? for Model Base Design</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Any-MODBUS-RTU-Libraries-for-Model-Base-Design/m-p/1260483#M5961</link>
      <description>&lt;P&gt;Hi Guy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on S32K1xx series to communicate with some sensors via RS485 (LPUART).&lt;/P&gt;&lt;P&gt;Ex. Read Coils, Write Coil, etc.&lt;/P&gt;&lt;P&gt;I am just hoping there should be any public library for such MATLAB Function to start with.&lt;/P&gt;&lt;P&gt;Please help share us start line for this Simulink integration.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance,&lt;/P&gt;&lt;P&gt;Narudol T.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Apr 2021 10:09:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Any-MODBUS-RTU-Libraries-for-Model-Base-Design/m-p/1260483#M5961</guid>
      <dc:creator>Narudol-T</dc:creator>
      <dc:date>2021-04-12T10:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: Any MODBUS-RTU Libraries ? for Model Base Design</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Any-MODBUS-RTU-Libraries-for-Model-Base-Design/m-p/1261041#M5969</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/129276"&gt;@Narudol-T&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Unfortunately, we do not support Modbus in our MBDT for S32K144 and right now I don't know any C library to recommend to you. Of course, if you find one, we can discuss the implementation using custom code insertion as we did on the BMS.&lt;/P&gt;
&lt;P&gt;Just in small lines, you can keep the UART config block for UART peripheral/pins and clock initialization and the rest of the calls might be done over custom code and uart interrupts.&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Marius&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 07:03:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Any-MODBUS-RTU-Libraries-for-Model-Base-Design/m-p/1261041#M5969</guid>
      <dc:creator>mariuslucianand</dc:creator>
      <dc:date>2021-04-13T07:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: Any MODBUS-RTU Libraries ? for Model Base Design</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Any-MODBUS-RTU-Libraries-for-Model-Base-Design/m-p/1261112#M5971</link>
      <description>&lt;P&gt;Hi Marius&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you, last time with your support now our Kalman SoC state Estimator is success.&lt;/P&gt;&lt;P&gt;Even it is little bit slow, because the current sensor is at 10ms looping.&lt;/P&gt;&lt;P&gt;But I am doing fine tune software later.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regarding this topic, I also saw the same suggested ways of implementation from your code.&lt;/P&gt;&lt;P&gt;(Initialization by Simulink and call LPSPI function from lpspi_driver C header.)&lt;/P&gt;&lt;P&gt;I even try to implement same way but not working in Real-Time Clock module via I2C module and calling LPI2C header which hide inside MBDT.&lt;/P&gt;&lt;P&gt;Anyway, The system was comply sucessfully but nothing working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I adapt to code to be call just direct byte write and read from hardware adress directly and work now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case of UART MODBUS, we use this to read LEL explosive sensor from commericial product via coil read.&lt;/P&gt;&lt;P&gt;I get the attached file from github and try to implement but it is too complex.&lt;/P&gt;&lt;P&gt;Frankly speaking, I am still learning the logic behind the MODBUS protocol yet.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think if we implement the same way as BCC; there is the HAL_UART_Receive function which should be replaced by the lpuart C header function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;1. What function should I initilaze in Simulink ?&lt;/P&gt;&lt;P&gt;2. What header should I call in this case&amp;nbsp; (lpuart_driver.h.. lpuart_hw_access.h...)?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance for your kind support.&lt;/P&gt;&lt;P&gt;Narudol T.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 08:30:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Any-MODBUS-RTU-Libraries-for-Model-Base-Design/m-p/1261112#M5971</guid>
      <dc:creator>Narudol-T</dc:creator>
      <dc:date>2021-04-13T08:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: Any MODBUS-RTU Libraries ? for Model Base Design</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Any-MODBUS-RTU-Libraries-for-Model-Base-Design/m-p/1261199#M5973</link>
      <description>&lt;P&gt;Hi Marius,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry again, after your suggestion, I am trying to implement the way you suggest as attached.&lt;/P&gt;&lt;P&gt;Am I doing wrong with this code ? ( Add modbus_config.h for config driver and call lpuart_driver.h)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And there is&amp;nbsp;Modbus_Master_Millis(void) function which call "HAL_get_tick".&lt;/P&gt;&lt;P&gt;Should NXP have any this tick function as well to replace ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Narudol T.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 10:25:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Any-MODBUS-RTU-Libraries-for-Model-Base-Design/m-p/1261199#M5973</guid>
      <dc:creator>Narudol-T</dc:creator>
      <dc:date>2021-04-13T10:25:33Z</dc:date>
    </item>
  </channel>
</rss>

