• Not Answered

Bitstrings for Mode type parameter

Does anyone know where to find the actual bitstrings assigned to the values of the 'Mode' type parameter as I'm struggling to find these in BOL.

There is a line of code in the PCSD modelock composite:

REQ_MODE_TARGET := REQ_MODE_TARGET > AUTO ? REQ_MODE_TARGET | 16 : REQ_MODE_TARGET;

Where REQ_MODE_TARGET is a 'Mode' type parameter. I know the Mode type parameter is a series of bitstrings with each bitstring representing a mode but in order to fully understand what the bitwise OR operator in this expression is actually doing I need to know what the actual bitstring for each respective mode is.

Many thanks

Adrian Taylor

9 Replies

  • If you search in Books Online or "mode constant", the first article that comes up is Constants.  In that article is a table explaining the DeltaV Mode Contants.

    Here is a quick table of the mode constants:

    DeltaV Mode Target Actual
    OOS 1 1
    IMAN   2
    LO   4
    MAN 8 8
    AUTO 16 16
    CAS 48 32
    RCAS 80 64
    ROUT 144 128
  • U can search bitstring in windows..dere is a text file of bitstring 

  • In reply to Sami Uddin :

    The "BitstringTranslations.txt" file you are referencing is located in the the "DeltaV/bin" directory but doesn't contain the information that was requested for the mode values .

    This file can be used when someone wanted to know what IO_OPTS.OPTION8 is (typically when using Bulk Edit), open this file and find that it is associated with "Fail Safe Value On Restart".
  • OK so having seen the mode constants, the use of the bitwise OR operator for modes greater than auto (16) makes sense because if one argument was the actual mode and the other argument was the binary representation of 16, then the bitwise OR operator would essentially add 16 which would convert from the actual to target. (e.g. 32 | 16 = 48).

    I'm still a little confused though because in the code I'm looking at (below) REQ_MODE_TARGET is already a target mode, not an actual mode so it would seem that applying the bitwise OR operator would have no effect. (e.g. 48 | 16 = 48)

    REQ_MODE_TARGET := '/REQ_MODE.TARGET';
    REQ_MODE_TARGET := REQ_MODE_TARGET > AUTO ? REQ_MODE_TARGET | 16 : REQ_MODE_TARGET;
  • In reply to AdrianTaylorUK:

    Where are you seeing this logic?

    I believe that this logic was this way because of previous revisions of DeltaV didn't have the right mode numbers for a custom parameter of Mode Type. This logic doesn't exist anymore in the later PCSD libraries 120 or 130 if you are seeing that in a modelock composite.
  • In reply to Matt Stoner:

    Composite is C_RTO_AO_ML52 (revision 5.21). It is used in _AO_52 class (revision 5.21).
  • In reply to AdrianTaylorUK:

    Yes this has been removed in the latest composite C_RTO_AO_ML.
  • In reply to Matt Stoner:

    Hi Matt.

    I don't suppose you have any more information on the issue with DeltaV not having the right mode numbers for custom parameters of mode type? I'm working on a v14 system, attempting to use MODE.PERMITTED in visibility expressions for faceplate buttons, but only some modes are showing up when the faceplate references a custom parameter - e.g. can see OOS and AUTO, but not RCAS. Same faceplate works OK if referencing a PID mode parameter, though.

    Thanks
    Martin
  • In reply to Martin Rooke:

    I don't remember specifically but I suspect that it has to do with the CAS, RCAS and ROUT Target values because they are different than Actual Values.

    What is your animations for visibility for the non-working mode buttons?
    Where are the module(s) assigned (Proplus, real controller, virtual controller, etc) that are not working as you expect?


    I just verified that the permitted worked for both a Module Level Mode parameter and PID/MODE that was assigned to a virtual controller in 14.3.1 and below is the bits for each target mode.
    MODE.PERMITTED[#]
    OOS - Bit 1
    MAN - Bit 4
    AUTO - Bit 5
    CAS - Bit 6
    RCAS - Bit 7
    ROUT - Bit 8