fbpx

Forum

Find answers, ask questions, and connect with our
community around the world.

  • Create Tag for MODBUS via java

    Posted by Bertran Hammad on April 22, 2024 at 7:27 am

    Hi,

    I would create tags for “MODBUS” IO server in JAVA via the classes available in com.ewon.ewonitf package. I guess it could be done as following:

    Code:

    SysControlBlock tagSysControlBlock = new SysControlBlock(SysControlBlock.TAG);

    tagSysControlBlock.setItem(TAG_NAME_KEY, tagName);
    tagSysControlBlock.setItem(TAG_SERVER_NAME_KEY, ioServerName);
    tagSysControlBlock.setItem(TAG_ADDRESS_KEY, ioAddress);
    tagSysControlBlock.setItem(TAG_TYPE_KEY, String.valueOf(tagType));

    tagSysControlBlock.saveBlock(true);

    Would it be a viable way to create tags for “MODBUS” IO server programmatically via JAVA from your perspective?

    There is also a class SCTagUtils in the
    package com.hms_networks.americas.sc.extensions.system.tags, however it
    only supports “MEM” IO server and I guess it is not tended to be
    extended with some extra functionalities.

    Unknown Member replied 1 month ago 2 Members · 1 Reply
  • 1 Reply
  • Unknown Member

    Member
    April 22, 2024 at 8:08 am

    Your approach to creating tags for the “”MODBUS”” IO server in Java looks pretty solid to me! Using the classes available in the com.ewon.ewonitf package seems like a viable way to programmatically create tags for the MODBUS server.I’m not familiar with the SCTagUtils class you mentioned, but if it’s specifically for the “”MEM”” IO server, it makes sense that it wouldn’t support the functionalities you need for MODBUS.If you’re still exploring your options, you might want to check out Java React at https://huntly.ai/employers/developers/full-stack/java-react/ . They could have some useful insights or resources that could help you with your project.

Log in to reply.