FHX to XML converter

Hi

I don't know if this kind of information is allowed in these forums pages.
Feel free to remove this post if I break some forum rules.

I developed a small tool capable of converting FHX file in an XML file.
If you are interested, it is available at: http://www.template.fr/fr/produits/downloads.php
It's free. You just have to signin to be able to download the zip.

I developed this tool because the Emerson one called "FhxToXml.exe" (deltav/bin folder) does not give very stable results ... when it works, sometimes.
It works on FHX files from DeltaV 8, 9, 10 or 11.
Developed using framework 2, it doesn't need anyelse file to run.

Enjoy it.

14 Replies

  • Thank you Jack,

    The problem is that I did not manage to download it. I created a user account, but when I click download and I try to log in I get an error:

    Fatal error: Call to undefined method Login::getLVL() in /public_html/fr/produits/predownload.php on line 69

    Istvan

  • In reply to István Orbán:

    Jack,

    This is a great idea! Any chance you'd consider releasing the source code and making it open source?

  • In reply to István Orbán:

    I got the same error. Not sure what the issue is.

  • In reply to Phil L:

    István, Phil : Sorry for the problem you are experiencing, but dozens of other users was able to download the tool without problem. Have you tried changing the browser you use to ?

    The error of the php page is the test if the login account has been activated.

    So, you have to click the link in the mail you have received immediately after registering. Did you ?

    Tyler : You're the first to share your encouragement, and I thank you.

    No, this tool will stay a compiled tool because it is a part of another project I'm building around FHX auto-generation, analyzing and generate automated documents for monitoring the tracking of procedure variables across the UP and operations.

    I'm a little bit disappointed with and the behavior of users who load the tool and have not enter real Ids when they register.

    I was thinking a long time before deciding to offer this tool for free, rather than a licensed product.

    The next ideas that are being developed will not be freeware, sure.

  • In reply to Jack_France:

    Hi Jack,

    Yes, it was some problem with the activation. I clicked the link in the e-mail again and I logged in before clicking on Download.

    Now it was all OK, I could download it.

    Thank you for the nice tool!

    Are you planning to create another tool to convert xml back to fhx?

    Just for your information, there was a discussion earlier about another conversion tool, maybe you should check it out and share your experiences with the developer: community.emerson.com/.../2087.aspx

    Istvan

  • In reply to István Orbán:

    Hi István

    I'm glad that everything is back in order.

    No reverse tool for two reasons:

    -1 - I do not want to take responsibility for import problem in DB - too risky

    -2 - In the FHX file, some items contain binary data (normal or not, I do not know how) encountered in the definition of material manufacturer. When FHX treatment to XML, these items are treated as abnormalities and resulted in replacement of the symbols (a triangle) and documented comments with binary values ​​encountered.

    These data must be manual processing (if they are interesting).

    Thank you for this previous link about conversion, but sending confidential industrial configuration to the net is risky and is not suitable for large files such as a full DB that can be up to several hundred of Mb.

    I test my converter with full DB export FHX file up to 218 Mb (near 15 minutes treatment).

    When processing large files, we sometimes feel that the tool is fixed (stall) and seems to bug, but to avoid consuming too much memory, it processes with smallest data packets as possible, but it is sometimes necessary to grow its buffer to retrieve very large indivisible sequences, giving the impression of not advancing, but I've never had a crash.

    Finally, about Emerson conversion tools provided (with no result waranty) in the deltav/bin folder, I have never generate a valid XML file with it (truncated datas, no information about successfull or abnormal completition and so on)

  • I know this is a bit of an old thread, but just wanted to post to say I recently downloaded this tool, so the links still work, and its a great tool...so thank you very much for providing it.

    Also, if Jack is still monitoring this thread, I did have a bit of a technical question on how he developed the tool that maybe he could answer, just for my own curiosity's sake...and that is how did he handle the ', ", < and > special characters in his tool? I tried using the Emerson supplied converter tool, which I know from reading other posts is not officially supported for doing non Recipe conversions...and the output from that tool has the &apos;, &gt; etc. escaped characters in the XML, which given DeltaV syntax, makes the output pretty unusable if you have anything with expressions in it. But Jack's tool's output has all those special characters in there (except for the & itself, which still shows up escaped). So I was curious how he managed that.
  • In reply to gtkrueger:

    Hi gtkrueger
    First, many thanks for these encouragement.
    Many people download the tool, but I have no feedback related to the use they make of it or any difficulties encountered.
    It is a pleasure to see that it is useful and appreciated.

    Personally, I have never successly run the Emerson tool which only completes its task once out of ten. It stall as soon as the FHX is too heavy and no detail about error.
    My tool may work on a PP or a station. So I took great care not to overload the memory used to store the strings analyzed.
    The most important problem was the management of quotation marks, "
    The program reads a portion of the text from the FHX and recognize the keywords and associated data. Some of these data are framed by " in the FHX syntax, and some " can also appear inside data itself.
    So I count the " occurrence and try to parse de data after check that the string contain an even count of ".

    The current version 1.1 of the program does not have an optimal management of this search for "and sometimes the search for a complete data area requires a large number of bytes in memory.
    Some expressions (especially towards the end of the FHX) are very long to analyze (for the FHX of an entire database).
    I do not have time to fine-tune this part.

    The second important point is that the program should work without bringing any other file than the executable.
    Therefore, it was necessary to only use the APIs of the version 2 of the framework Microsoft (framework brought by the installation of DeltaV).

    See you!
  • In reply to Jack_France:

    Jack,

    OK...so there is a lot of work going on under the hood in the conversion, I suspected as much, but wasn't sure. So far I haven't seen any issues with the output its producing, but if I find something, I'll let you know.

    As to what I'm using it for, I'm working on a fairly large pharma project, and I've been using it to help with verifying the as-built documents against the code that was delivered to the site. I'm mostly a VBA programmer, and with the XML it's much easier to parse the export to get the information that I need than trying to parse the raw FHX.

    Only suggestion for a minor improvement might be to allow the user to select multiple files at once for conversion in case someone wants to process several smaller exports from a DB instead of working on the whole DB at once.

    Regards,

    Greg
  • In reply to gtkrueger:

    Thanks Greg.

    My tool give correct translation.

    The improvements concern only working time.

    Yes, XML format is very usefull to elaborate working documentation.

    I frequently use it (in Excel VBA) for a large Swiss pharma plant projects to list the recipe parameters and design their flow through the phases; a kind of batch cross-referencing.

    About improvement, yes, I could easily add this kind of option, but if this tool is incorporated to an automation of information processing, it could not stay a freeware.

    I take this opportunity to point out that we will shortly produce a client-server software to establish the cross-referencing of DeltaV modules and Provox points in the iFix displays (DV 8 to 12).

    Currently, the product (called TCR for "Template Cross Reference") works very well, but some improvements are being made to manage, in particular, the impact of the removal of displays on the cross references database.

    I'll give you more information ASAP or contact me for further information.

    Regards.

  • In reply to Jack_France:

    Jack, I use FhxToXml2005.exe and XmlToFhx2005.exe rather than FhxToXml.exe and XmlToFhx.exe without issues. Theese xxxx2005 versions come with a .config file so I guess they are developed using .NET framework v4.0.
    I'm working on Access XML import on FhxToXml2005 created files to obtaing Access database containing deltav configuration. Results are good but I've did not cover any posible deltav item yet.
    I also plan to use XmlToFhx2005.exe to create valid FHX from that access database.
    I'm using XSLT transformations on Access XML import/exports, resulting in very fast import/export with very few VBA scripting.
  • In reply to gamella:

    I have not tested the "2005" version of recent DV versions.
    If it works fine for you, great!

    My tool use only Framework 2 to keep compatibility with DV 8 to 12 (DV 13 not tested yet)

    According me, creating a FHX from an XML one is a false good idea.
    Not secure enough for your database structure.
  • Hello Jack,

    Good to see that you created an fhx to xml converter for the community.

    I also created a compiled (exe) application that directly output to Microsoft Excel and created an HTML file that is open by the default web browser once the operation is complete.

    Regards,
    Neil Castro

    Following is a link to a sample application in case someone in the community is interested.
    https://goo.gl/KpDTJD