How to bulk find and replace within phase class action expressions

Is there anyway to find and replace specific values within phase class action expressions?  I'm trying to find a way that doesn't require a line by line review and update of each action expression.  There is no find and replace functionality within Control Studio and Books Online states editing FHX files can cause database issues.

5 Replies

  • Looks like no? I came here with same question. Getting back to a DeltaV project after a bunch of years on Rockwell PLCs and these type of pain points become really obvious quickly. Blows my mind that Emerson hasn't made ANY effort to add some basic tools like this or do basic updates to the underlying engine and DB...like the 16 character limit everywhere in this app to this day also blows my mind. I mean it's 2025 not 1996...And I'm a semi-old fart - I hate all the new web/html stuff (Perspective - no thanks!!)...I love me my VBA...I started my career back when DeltaV was at v5.3.2 and was the fresh new thing...but c'mon, you don't need to be a young buck to know >16 characters is the way to go.  Sad to see how much they've let it just sit all these years. I mean I know they have Live and all that (the fancy web stuff the newbies love) but the Explorer/Control Studio/DB side is what really needs some work at this point. I worked with a guy two years back who had done some time in Austin relatively recently, he said all the folks who understand the core engine have retired and there's not much impetus to make updates for fear of breaking it all. Oh well...maybe I'll stop razzing so much on Rockwell for calling PlantPAx a DCS...at least Logix has Find/Replace in their logic editor!

  • In reply to gtkrueger:

    Can't argue with gtkueger... Editing an FHX export is likely your only option. BOL discourages this because that is not the purpose of the FHX Export. Some of the issues are that you can mess up the syntax and create unexpected results. One issue is you can end up with multiple modules referencing a single Embedded block object, which is not supported. On import, as of v12, DeltaV detects this and copies the embedded block to create a unique instance for each module. This resulted in some migration issues that were related to subsequent edits and overrides being lost. Lesson is to not create new modules with embedded blocks in an FHX edit.

    Since you are modifying an item that exists, you won't be creating a new Embedded block, or changing the structure of the FHX, but just changing some text strings, you should be able to make the changes safely. Ideally, you can do this on a development system to confirm all is good on import. Pay attention to the import progress log for any issues. You have to take owner ship of the results as this is not something the GSC/Factory can support. So make sure you back up the database, and are comfortable with the changes. There are edit tools that will allow you to do a difference comparison of the original export to the modified one, I'd look to have that as a tool.

    One last comment. Each item exported has a user and timestamp in the header. On import, if the time stamp matches the items time stamp in the database, it will skip the import of the item, assuming it has not changed. You can modify the time stamp in the FHX (its an integer representing epoch time in seconds after 1971 January 1, or there abouts). increment the value and it will import. Or you can make a cosmetic change in the DeltaV database after the export so it updates its time stamp, changing it from what is in the FHX.

    The DeltaV Live editor has a search and replace tool for the displays. Pretty nice. Similar tool should exist for the control module environment too.

    Andre Dicaire

  • In reply to Andre Dicaire:

    You can also make any change to the username (doesn't have to be a real user either....ie UPDATE_ME) and it will also give you the prompt to update the module. I prefer this method because the time stamp should be the same unless someone has updated that object in the system and you may lose their changes!
  • In reply to gtkrueger:

    Great answer as always Andre.  

    "There are edit tools that will allow you to do a difference comparison of the original export to the modified one, I'd look to have that as a tool."

    > On Windows I use WinMerge to compare text files.  It is free so check it out at winmerge.org

  • I would recommend against trying to edit part of an expression. I would (highly) recommend that the phase class action expression include internal references that may vary from instance to instance. E.g., instead of '/PHASE_CLASS_VAR.CV' := 52; use '/PHASE_CLASS_VAR.CV' := '/PHASE_VAR_SP';. You can then use bulk edit to change the value of PHASE_VAR_SP from instance to instance. Doing this will require changing the class, but future updates and instance-specific values will be made much easier.