Include Engineering Unit in Alarm Message

Hi,

I am trying to read in a parameter the Eng. Unit of an analogue input using a CALC function block and referencing to MODULE/AI1/OUT_SCALE.UNITS. I would expect that the return will be the engineering unit (e.g. kg) of the AI function block, instead is an integer. Does anyone know how can I do this?

Thanks!

  • I am curious what are you try to get accomplished within your CALC logic?

    I don't believe that you will be able to reference the text "kg" within the calc block logic but if you open the file DVData\download\EUDT.scr with Notepad, you can find the associated integer number with the EU that you want and then write your logic using these numbers.

    Example:

    (MODULE/AI1/OUT_SCALE.UNITS = 1088) would be your check for kg

    Word of Caution: All the values will be the same except Custom Engineering Units which could be different numbers depending on how they were added or imported into the DeltaV system. If you only have one system then you should be fine but if you have a development/simulation system as well, these numbers might be different on each system depending on how the custom EUs were added.

    Regards,

    Matt

  • In reply to Matt Stoner:

    Matt's question is of utmost importance.  The right solution requires an explanation of the needed functionality.

    I'd like to caution using the *.SCR files.  These are internal files of the DeltaV system and are not documented.  I've used them myself, but I don't expect them to remain unchanged or even persist from revision to revision.  

    EU information is intended for Operators and are primarily used by Operator stations.  In DeltaV Operate, reading the EU units will result in the text value being returned.  

    If you are looking to see if a Units parameter is correctly set, you could configure a Scaling Parameter and set it to the KG units.  Then you could compare the AI scaling to this reference parameter.  The reference parameter name could be assigned restricted security access so it does not get changed.  This way you set the reference using engineering tools without having to look up integers in a system file.

    Note that you cannot programmatically access these .SCR files from controller code.

    Andre Dicaire

  • In reply to Youssef.El-Bahtimy:

    Hi guys,

    I once had Exactly the same problem as Anca when I tried to decode the EU of an analogue value for generic operator messaging purposes.

    I used what you might consider a sledge hammer approach to break the nut! But never the less supported by Emerson!

    My solution was to create a simple function in a composite embedded in the Phase/EM/CM. I read the .UNITS value (X) as an integer and passed that to an input parameter of the composite, 1 scan later the function returned the string value from a simple lookup calc block into the composites string output parameter.

    I didn't decode the thousands of possible EU values available, just those that my configuration used. If a value of X was entered that wasn't in my lookup calc I simply returned the string value "EU value X not know" this then allowed the lookup table to be expanded. The reality is a single project only uses a small number of the available EU.

    I didn't try to utilise any Emerson unsupported methods, always best steering away from those as there is potential that DeltaV implementation changes and those methods suddenly stop working after an upgrade.

    Good luck,

    Neil.