DeltaV Live and THISUSER Privileges information

In DeltaV Operator you can use THISUSER/USER_CAN[AREA_NAME][LOCK_NAME] to determine whether the logged-on user has the required User lock for the Area as the result will be True if it is so. How do you go about it in DeltaV Live? Should it still work as per DeltaV Operate? I noticed that DeltaV Live had a function ENV.IsAdminUser() to replace THISUSER/IS_ADMIN_USER.

  • So to answer my own question: In DeltaV Live you can use the following to use the USER_CAN:
    DLSYS['THISUSER/USER_CAN[' + AreaStringName + '][' + LockStringName + ']'].STR
    Very important, the parameter Type must be String, Not Numeric or anything else.
  • In reply to EvertZwarts:

    EvertZwarts, did you find this in documentation )DeltaV BOL or Graphics Studio BOL)? I'm trying to find where this is documented. Or did you discover this by trying the DVSYS commands?

    Andre Dicaire

  • In reply to Andre Dicaire:

    DVSYS object in Live is exactly for this purpose. From BOM "The DVSYS object works only with parameter paths that use DeltaV Operate parameter field path syntax; therefore, the DVSYS object should be used only with graphics configuration that has been converted from DeltaV Operate. For configuration that has been created in Graphics Studio, the DLSYS object and its functions should be used."
  • In reply to Virginijus Vaiciulis:

    Thankyou Virginijus, but EvertSwarts indicates he used "DLSYS". And for new systems, they too would use DLSYS, and not DVSYS. So my question remains, is this syntax documented for DeltaV Live DeltaV or Graphic Studio BOL?

    Andre Dicaire

  • In reply to Andre Dicaire:

    Andre, it is not explicitly document like that in DeltaV BOL. "THISUSER/USER_CAN[AREA_NAME][LOCK_NAME]" is documented in DeltaV Graphics BOL obviously.

    I used trail an error to get a "True" value out of the expression which is DLSYS['THISUSER/USER_CAN[' + AreaStringName + '][' + LockStringName + ']'].STR. The one that I tested at first was DLSYS['THISUSER/USER_CAN[AREA_A][Alarms]'].STR, Note that "AreaStringName" and "LockStringName" are made up by me to imphesize that it must be of string type. It did say DeltaV Live Help that "If the parameter field path can be read as either a number, Boolean, or string, the .STR suffix should be used to return the string value."

    The thing that got me stuck was that I added "comment" in the expression as well. When you type"//" the text color changed to green after that which I wrongfully assumed was igonered. But it is Not. I got "??????????" this the whole time. Be weary of putting comment in the DeltaV Live code. I created a text box instead to document the changes I make for each Faceplate. GEM's are more trickey, you have to hide the text to with a visibilty varialble.
  • In reply to EvertZwarts:

    I'm having trouble making this work. Here is my syntax for User Lock 02:
    DLSYS['THISUSER/USER_CAN[' + 'AREA_A' + '][' + 'User Lock 02' + ']'].STR

    It verifies just fine, but when I use it as a datailink the result is '????????'
  • DLSYS.Read('THISUSER/USER_CAN.B_CV[AREA HERE][LOCK HERE]')
  • In reply to John Giegel:

    Where are you putting this reference?

    Kyle's format is correct except remove the .B_CV for animations on a display.

    If you are trying to use this in a script then you will need to use DLSYS.ReadAsync('THISUSER/USER_CAN[AREA_A][User Lock 02]')
  • In reply to Matt Stoner:

    I am trying to use it for visibility on some text and datalinks. I can use Kyle's syntax as a datalink and I get a 1 or 0. I haven't figured out how to make your example work for the visibility animation. I even tried Kyle's syntax this way:
    DLSYS.Read('THISUSER/USER_CAN.B_CV[AREA_A][User Lock 02]')==1.
  • In reply to John Giegel:

    In my experience for USER_CAN (and this was from DeltaV v10 using Operate), the lock name could not contain spaces. E.g., USER_CAN[AREA_A][Control] would work, but USER_CAN[AREA_A][Can Control] would not (note that "Can Control" is a made up lock for this example). I *think* a co-worker has verified that this is still an issue in DeltaV v14 Operate, but I'm not sure.
  • In reply to John Giegel:

    Remove the ==1 if this is on a Visibility Animation
  • In reply to SBPosey:

    In DeltaV Live I have not observed spaces as a problem. For example I have used the default Restricted Control lock with syntax like this.
  • In reply to Kyle Walker:

    Yes! Thank you Kyle. DLSYS.Read('THISUSER/USER_CAN.B_CV[AREA_A][User Lock 02]') works for visibility animation.