SFC Control Module .FHX Export/Import

Hello,

I'm currently trying to generate copies of a few Command Driven Control Modules; the sequences are quite complex so instead of copy pasting the modules and manually going into each SFC Step to edit the contents, I'm trying to do an .FHX export and carefully search/replace the parameters I need to change. The problem I have encountered is the following:

The field "FUNCTION BLOCK DEFINITION: Name: __#####_#####__" inside the .FHX file, which identifies each SFC-based composite block (COMMAND Block) seems to be auto generated when the Control Module and its components are first created. So even if I was to create a copy of the original Command Driven Control Module, export it as an .FHX, search/replace its contents, and then re-import it, it also updates the contents of the SFC Steps in the original Command Driven Control Module, this makes sense as the Function Block Definition Names of the COMMAND Blocks are the exact same on both Command Driven Control Modules.

I'm curious to know if there a way to uniquely identify the COMMAND Blocks' Function Block Definition Names of the new the module copy? I have not tried to manually change the numbers to something random, as this could cause issues if the Function Block Definition Name is already being used by another module.

Any thoughts, help, or comments would be appreciated.

Thank you,

Jaime M.

  • Hi Jaime

    Matt and Roman gave you good practice to be sure of the result.
    Anyway, if you plan to duplicate and modify FHX file, you have to take some précautions :
    - Inside DV explorer, when you duplicate a SFC (SFC, PLM, ...), what you see in the copied item is an alias of the original.
    So, if you modify it, you will modify the original item too.
    To embed the SFC parts individualy :
    - Open the copy in DV Explorer and practice an very little modification, like a Step or a Transition move graphicaly.
    - Do that in each SFC part. For example, il you copy a PLM, you have SFC for each RUN, ABORT, STOP, ... part
    - When it's done, you can export the copied and mofified module to a FHX file.
    Use a serious text editor to enter and modify the FHX file (for example, Notepad++)
    - In the file, when you have identified the part you want to modify, have a look to the first line :
    It looks like that :
    MODULE TAG="SEQUENCE-EXAMPLE" PLANT_AREA="AREA_A" CATEGORY=""
    user="scott" time=841953881/* "05-Sep-1996 15:04:41" */
    To be sure the import operation to proceed, add 10 seconds to the "time=" parameter.
    The import sofware will see a date that is younger than the last modified module date it knows, so it will ask for import.

    I repeat the recommandations of Matt : Be very attentive and, of course, perform a database backup before import new risky data.
  • In reply to Jaime M.:

    You may not have time now but if you need to make a change you will be making X number of the same change, I would still think it's in your best interest to go the class based route.

    In addition to what Jack has documented, You need to touch every composite that isn't linked that you expect to make changes so don't forget the MONITOR for EM and any composite within these composites as well.

    You don't have to change the time in the FHX, you can leave that the same and just change the User to be different that it currently is and it will prompt on import if you want to update (changing a single character to upper or lower case will do)...say yes on import :)