Pi as Modbus TCP slave. Errors

2019-03-22
2019-03-22
  • hence.persson - 2019-03-22

    Hi.

    When reading the online help it states that the max number of words as a modbus slave is 4096.
    First of all why limit at 4096? I want to be able to adress more than so as the Modbus standard permits that.

    Second in my Raspberry i get an error if i try to use more than 2047 words.
    C0111 Adress out of range.

    If I use 2048 words i dont get an error but it doesnt work, The slave icon is read.
    If I try to use more than 2048 i get the error C0111
    If I try to use 2047 or less then it works.

    Is this a bug? Using latest Codesys both runtime and development.

     
  • hence.persson - 2019-03-22

    More errors cannot add any new IW or QW.. Is it the device description that needs to be edited so i can use more IW and QW and if so how to?

    Copied the device description file and added under this section <ts:section name="memory-layout"> the following lines
    <ts:setting access="visible" type="integer" name="input-size">
    <ts:value>8192</ts:value>
    </ts:setting>
    <ts:setting access="visible" type="integer" name="output-size">
    <ts:value>8192</ts:value>
    </ts:setting></ts:section>

    Now it seems to work as expected. Am I doing something wrong? Is this setting available from the development tool or is the only option to change this in the device description file?

     

Log in to post a comment.