Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Manual Setting of Modbus Register Adresses

sailorXY
2017-02-08
2017-02-10
  • sailorXY - 2017-02-08

    Hello CodeSys Team,

    I built a ModBus test-Server to test our Python Written Modbus Client. The test-Server needs special Adresses for Input registers and Holding registers. Unfortunately the manual settings at the mapped variables in the "Modbus TCP Slave Device E/A Abbild" does not really change the register addresses. I only can set them to a fix value for both (Input and Holding) in the "Allgemein" Settings.

    But I need following addresses:

    Holding register:
    200 - 202
    10400 - 10404

    Input register:
    100 - 103
    10900 - 10910

    How I can do this? In V2.3 i used to simply declare the Words at the given address.

    I attached my project and a simple pymodbus script. In the current configuration it works - but I need the Holding register offset at address 200...

    Thanks in advance for the help
    Mario

    pymodbus_test.py [515 Bytes]

    ModBusTestServer.project [138.23 KiB]

     
  • eschwellinger

    eschwellinger - 2017-02-09

    Hi,
    you could only specify the startadress:

    Holding register:
    200 - 202
    - this is not possible to have gap, they are in one block

    Input register:
    100 - 103
    - this is not possible to have gap here,, they are in one block

    and I do not really understand why you need this.. just pimp you pyton to have this in one block either...?

    BR
    Edwin

    IMG: startAdress.jpg

     
  • sailorXY - 2017-02-09

    Hi Edwin,

    in need the two blocks to simulate 2 different ModBus Server our client needs to connect to. But if it is not possible I will make 2 ModBus-Test-Server.

    But I cannot type the start adresses I need in the fields as you did. The program only accepts 100 as maximum in both fields?

    Seems to me you have another version of the ModBus-Slave? I have this version:

    Name: ModbusTCP Slave Device
    Hersteller: 3S - Smart Software Solutions GmbH
    Kategorien: ModbusTCP Slave GerΓ€t
    Typ: 115
    ID: 0000 0002
    Version: 3.5.9.0
    Bestellnummer: -
    Beschreibung: A device that works as a Modbus TCP Slave.
    Version Konfiguration 3.5.1.0

    best regards
    Mario

     
  • eschwellinger

    eschwellinger - 2017-02-09

    Hi,
    3.5SP10

    BR
    Edwin

     
  • sailorXY - 2017-02-10

    Hi,

    I have 3.5SP9 - do I need to update to get it working?

    best regards
    Mario

     
  • eschwellinger

    eschwellinger - 2017-02-10

    guess yes....

     

Log in to post a comment.