Access BLOCK_ERR individual bits in control studio

Hello all,

I am trying to find a way to access the BLOCK_ERR bits in a module. I can access them from DeltaV Operate using BLOCK_ERR.F_CV[XX] where XX is the bit I am trying to access. I can access them from the module by doing a Boolean fan out from the BLOCK_ERR parameter. This is a rather inelegant way of accomplishing what I am desiring, since the particular bit I am trying to access is bit 13. it leaves a rather large block in my module that is performing a very small function. Does anyone have any other suggestions, or know of a way to rescale a block in control studio vertically smaller than its visible parameters?

Thank You in advance for the help.

  • Depends on what you are trying to do.  One way is to use a CND block and do a Bitwise AND with the corresponding integer.  

    '^/BLOCK_ERR.CV' && expt(2,13);

    The result is true only if the 13th bit in Block Err is set.

    If you want to know if two or more bits are set, you could do this for each bit of interest and combine the result using OR.

    '^/BLOCK_ERR.CV' && expt(2,1) OR

    '^/BLOCK_ERR.CV' && expt(2,8) OR

    '^/BLOCK_ERR.CV' && expt(2,13)

    You could use an integer representing these three bits i.e. 2 + 256 + 8192 = 8450

    ('^/BLOCK_ERR.CV' && 8450) >0

    The value returned from the Bitwise AND will depend on the number of the bits that are true, but will be 0 if none of them are true.

    Add a comment to explain the value you are using so the next person looking at this doesn't have to wonder.

    Now if you are wanting to create an alarm or alert, you can use the Mask option by creating an alarm that reference the BLOCK_ERR option bitstring parameter, and the alarm will provide a button to define the mask, where you can select which of the bits will set the alarm.  

    Andre Dicaire