DeltaV Live Contextual Displays dealing with potentially missing parameters

Hello.  We're starting down the road of building out support for DeltaV Live from some of our custom Operate solutions, beginning with faceplates.  In Operate, we'd use [_NOT_CONFIG_OK_] somewhat liberally to protect from errors being thrown if a faceplate was opened on a module that didn't have a particular datalink's source implemented.  And visibility too of course.  In Live, I see that I can use the DLSYS.Exists() function to deal with visibility, but what's the best mechanism to reproduce the effect of [_NOT_CONFIG_OK_] for a data source expression?  Currently, my context display works fine, but I'd sure prefer it that it didn't cause the operator to see the little broken heart toolbar icon light up when he uses it.

Thanks!

-Daniel

  • For these situations you would use the format DLSYS.CondRead('TAG/PARAMPATH',ValueToReturnIfNotExist)
  • In reply to Matt Stoner:

    Keep in mind the value returning has a type (i.e. String, Number, etc)
  • In reply to Matt Stoner:

    Thanks Matt. So what's the expression look like if I'm doing this in a data link's Expression field? The CondRead is returning a data value from the read, correct? But I suspect the datalink's expression field is wanting a DLSYS reference to a tag. I want to conditionally set the datasource to a static value (zero) when the parameter isn't present, while also hiding the datalink, to avoid the errors being thrown. I'm just getting into this, so my apologies if I'm just not understanding your answer. :) Or is there a better way to do what I'm trying to do?
  • In reply to Daniel Parrish:

    Yes the ValueToReturnIfNotExist is what is returned if non-existent parameter was attempted and would be configured as 0 for your want, if you want to also hide you would want to put visibility on this or a group to get other associated things together using DLSYS.Exists('TAG/PARAMPATH').

    If you wanted to return a string 0 you would use '0', i.e. DLSYS.CondRead('TAG/PARAMPATH','0')
  • In reply to Matt Stoner:

    Thanks Matt! That was the ticket. It didn't occur to me to use .CondRead, got it stuck in my head that the script for the Expression field was wanting a "reference" to a tag returned, not the value itself, optionally. Nice that it works that way.