• Not Answered

Methods for Error Handling of Unresolved Parameters

Hello,

I am creating a new version of an AI class with some added functionality and would like to use the same faceplate and detail plate for both classes.  The new class will feature parameters that can be adjusted via in-place data entry on some datalinks added to the detail plate.  Obviously, those datalinks won't resolve when the detail plate is loaded on an instance of the original AI class.  Is there "best" method for handling the errors this creates?

The only idea I have right now is to check the read status of each parameter via an FRSREADVALUE while the detail plate is first loaded, and if the status is bad, set the source to "0" or a dummy parameter.  This isn't ideal because it means that I'll have to configure the datalinks to use such a dummy parameter to begin with, and only correct the parameter path when the parameters exist.  So if the datalink is viewed in configure mode, you'll see the dummy assignment on the datalink custom page.  It would take digging through the graphic script to see what the actual datalink parameters would be.  I've been in situations where graphic components are altered through scripting and it is not an easy thing to troubleshoot if you don't know what's going on.

Thanks in advance for any input you can provide.

3 Replies

  • DeltaV Operate provides a set of data qualifiers that may do what you want.  

    On the Data Link edit dialog select Help on Display parameters

    The section on Datalink Modifiers details some options.  The [_NOT_CONFIG_OK_] modifier  looks like it can prevent unwanted error messages when the faceplate is called on a module that does not have the parameters. 

    Datalink Modifiers

    Datalink modifiers are used to modify the behavior of the DVSYS data server for specific datalinks. Datalink modifiers are enclosed in brackets [ ] and are generally at the end of the datalink specification.
     
    [_NOT_CONFIG_OK_] - This datalink modifier is used to prevent a Not Configured error message from displaying.
    This modifier can be used on any datalink. However, on visible datalinks, the not configured status is noted by showing asterisks ******** where the data value should be. In datalinks that are not visible (such as in expressions), there is no visible indication of the datalink.
    In addition, the Not Configured message can take 7 seconds or longer (on remote systems) to display.
    To prevent unwanted and potentially misleading messages from displaying, include the [_NOT_CONFIG_OK_] modifier on datalinks.
    The [_NOT_CONFIG_OK_] modifier alters the behavior of the DVSYS data server in the following ways:
    • Datalinks with a Not Configured status that are using the [_NOT_CONFIG_OK_] modifier will not show the configuration error dialog.
    • Datalinks with a Not Configured status that are not using the [_NOT_CONFIG_OK_] modifier display the Not Configured message for datalinks with a Not Configured status.
    Note Be sure to use this modifier only as needed as your configuration errors (mis-typed parameter or field names, for example) will be suppressed.
     
    [_LCL_NUM_FMT_] - This datalink modifier formats a numeric text string using separators. It reads the value as ASCII text and uses the machine’s settings for numeric separators. The machine settings are configured for each machine under Control Panel | Regional and Language Options on the Regional Options tab. Use this parameter for reads, not writes.
     
    [_B_CAN_WRITE_] [_CAN_WRITE_] - This datalink modifier returns True if the current DeltaV user has the privilege to write to the datalink. It returns False if the current DeltaV user does not have the privilege to write the datalink.
    The modifier returning True does not guarantee that the write will succeed. It only verifies that the user has the correct privilege to write to a datalink. The write can still fail due to mode or the parameter not being a writable parameter.
     
    [_I_QUALITY_] - This datalink modifier is used to display if datalinks are valid for a module. A quality value of 192 indicates that it is a valid datalink with a good value. A quality of 4 indicates that this data item is not configured.

    Andre Dicaire

  • In reply to Andre Dicaire:

    This help information does not show up in Books On Line, as far as I can find. You need to be in Operate Configure and add a datalink to see this help button.

    Andre Dicaire

  • In reply to Andre Dicaire:

    [_NOT_CONFIG_OK_] seems like exactly what I need, but I am running into a problem while using it.  It's the same problem user TreyB pointed out here.  Sometimes, my datalinks show "*****" and I get no error message.  Other times, it's as if I hadn't used [_NOT_CONFIG_OK_] at all.  I think it may have something to do with the "@MOD@" replacement not retaining the modifier.

    I pasted the datalinks onto an empty test graphic and the modifier works every time, presumably because there is no modification to the datalink string like is done when a faceplate is first loaded.  Furthermore, I copied my detail plate to the main pic directory and created a button to open the copy with frsOpenUserPicture, and the modifier works there too!  In both of those test cases, the datalink strings are still unaltered (something like "DVSYS.@MOD@/PARAM1.F_CV[_NOT_CONF_OK_]"), and I get no error dialogs.  It's only after the "@MOD@" is replaced that I have trouble.