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

PFC200 & Modbus/Tcp: C0080 error and offset problem

embedded
2016-01-18
2 days ago
  • embedded - 2016-01-18

    Hi,

    1 -> With "CODESYS Control for PFC200 SL, version 3.5.8.0" (and CODESYS V3.5 SP8),
    if I add a modbus/Tcp master and a modbus slave I obtain (see the joined image) twice:
    "C0080: Functionblock 'IoDrvModbusTCP' must be instantiated to be accessed".

    2 -> Furthermore, when I create a channel (item "Canal esclave Modbus") it is impossible to change/choose the "offset"
    of a modbus channel.

    Please do you have a solution?

    Thanks in advance for your help!

    IMG: ModbusMasterTCP.PNG

     
  • eschwellinger

    eschwellinger - 2016-01-19

    Hi,

    "C0080: Functionblock 'IoDrvModbusTCP' must be instantiated to be accessed"
    is an precompile error (wrong message from CODESYS),
    this will be solved to 3.5SP8Patch1 (mid February release)
    This has no functional restriction you could download and use your project without any problem.

    According your modbus problem:
    Which functioncode are you using?
    In my case this works see screenshot.

    BR
    Edwin

    IMG: ModbusFCTCode_addChannel.jpg

     
  • embedded - 2016-01-19

    Edwin,

    Thanks for your answers.

    I want to use the "Function code 6" (Write Single Register).
    Impossible (for me) to add a canal with this function (#6)
    and an "Offset" value to (for example) 0x0001... Very curious!!

    BR

     
  • eschwellinger

    eschwellinger - 2016-01-20

    Hi,

    hm.... here?

    BR
    Edwin

    IMG: offset.jpg

     
  • embedded - 2016-01-20

    Hi Edwin,

    If I add a channel with 0x0010 as offset value, it's Ok!
    The same thing with an offset of 0x0001, it's not Ok,
    in the ModbusChannel window I have "Default"
    in place of my offset (0x0001), and the "OK button" is disabled.

    BR,
    Thierry

    IMG: addcanal.PNG

     
  • eschwellinger

    eschwellinger - 2016-01-20

    Hi,

    ok now I understand.

    You could write into this field your offset by using for example 0x0010
    this will work without problems.

    Selecting this predefined values does not work , sense of that would be if you customize the modbus slave description.
    (Some how not really finished - will add an bugtracker entry for this)

    BR
    Edwin

     
  • embedded - 2016-01-20

    Edwin,

    Ok! Thanks for your help.

    BR,
    Thierry

     
  • vernon.laurence - 2018-12-21

    There seems to be a work around for this.

    Step 1: Create the channel and leave the offset at 0x0000. Click "OK"

    Step 2: Double click on the channel (or select and choose edit). Change the Access Type to any other option. Then set the Offset to "1" and click "OK"

    Step 3: Double click on the channel (or select and choose edit). Change the Access Type back to the original. Then click "OK".

    The offset appears in the base window as 16#0001, but appears in the edit window as "Default". The only difference is you are now able to select "OK" in the edit window. The communications appear to work at offset 1 with this work around.

    @Edwin Schwellinger - Please advise us if and when a permanent fix is found. Thank you

    IMG: Picture_3.png

    IMG: Picture_2.png

    IMG: Picture_1.png

     

Log in to post a comment.