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

Creating custom device for Modbus RTU slave

dmcclean
2015-05-22
2017-11-13
  • dmcclean - 2015-05-22

    Is it possible to create a custom device file to describe the registers available in a Modbus RTU slave? If so, how is it done?

    We use a lot of Automation Direct GS2 series VFDs, and I would like to spend the effort on creating a device description so that I can do each project more easily.

     
  • Anonymous - 2015-05-29

    Originally created by: scott_cunningham

    That would be nice - I hope it is so. In the meantime, you can create a structure with name:register pairings to make your life a bit easier (e.g. Read(Register.CmdSpeed)). Or even a complete FB with properties for each register handling read/write requests implementing the structure. At least then you have a module you can export/import (or save as library) for future reuse.

     
  • DavidCozens - 2017-11-13

    At the simplest it is possible to have a custom device descriptor with a name associated with some or all of the registers and coils on the slave making integration easier - no more looking up register addresses.

    The next level of integration can pre-define channels. i.e. as soon as the device is added to a project then the Channels are already defined, all thet is required is for the parameters to be mapped into the application.

    A further level of integration allows the installation of the device to add a library to the Library Manager, and create a function block in the IOConfigGlobals and map parameters from the defined channels into the function block. If this is done for all required parameters then all that is required to use the device is to add it to the project and then use variables directly in the application.

    In all of these cases it is then possible to modify the pre-defined channels and mappings and to add more channels as required in the same way as for any CODESYS device.

    https://www.cososo.co.uk/contact/

     

Log in to post a comment.