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

Mapping I/O variables directly to modbus register

  • domi-nik - 2023-04-14


    i'm currently working on mapping I/Os (From a PFC200 -> 750-1405 card) to the PLCs modbus.
    In the 1405s settings I have created my variables, when I want to use them in the Modbus Slave Device mapping using Application.Var I get the error: "'var' is already defined in 'IoConfig_Globals_Mapping'. Can I not map them directly? It does work if I use a variable in between those but that doesn't seem elegant.


  • TimvH

    TimvH - 2023-04-15

    This is like creating two variables with the same name, so that doesn't work.
    A possible solution could be:
    - Double click on your device (where you also set the communication)
    - Go to PLC settings
    - At the Additional Settings - Enable symbolic access for IOs
    Now if your I/O module is named _750_1405, you can map the inputs directly on a Modbus output register: Application._750_1405.Digital_Inputs_0_15

  • domi-nik - 2023-04-21

    Alright, that was kinda what I had thought what would be the underlying problem. This seems like a good solution however, thanks!


Log in to post a comment.