Configuration in CoDeSys 2.3 project

Parameter routing requires some configuration in the CoDeSys V2.3 project that will be automatically generated, just the program call to “OPENDEVMOD_PARAM_PRG” must be added to a task. The names of the configuration objects start with the prefix “OPENDEVMOD_”. (For simple applications that uses no other Modbus communication the setting of flag “OPENDEVMOD_ENABLED” is sufficient)

../_images/50d14cd0af5e2f850a33139073bda8cd
../_images/53d03275af5e3b860a331390779dce3b
../_images/90de92a2af5e6dfb0a3313904d695e3b

Global variable lists for constants and variables are used as communication buffer and control variables. The global variables are exported as symbols. They dont`t have to be changed by the user.

../_images/12f08b89af5e92d90a3313903581ea79

The parameter routing is implemented in the library OpenDeviceModbus_AC500_V25.lib.

../_images/ba5b69c5af5ed7280a33139027bd0625

The parameter routing is executed by the program “OPENDEVMOD_PARAM_PRG”. This program must be added to the task that executes the other COM_MOD_MAST and ETH_MOD_MAST/ETHx_MOD_MAST function blocks in the application. It is recommended to use a single task for all Modbus communication. The task cycle time of this task has a significant impact on performance of Modbus communication.