DeltaV Operate error: The maximum length of a string has been exceeded [SOLVED]

What is the best practice to handle the following situation:

With class-based development and generic faceplate for data arrays, I have a situation where some external references are set to #IGNORE, and the results are stored in a Floating-point array. The idea being that you don't need to make a custom faceplate based on how many array parameters you are using. Everything works fine for the parameters we are using with valid values and scales.

The unused array elements contain a value of 3.40282e+38 (due to using #IGNORE) and I am attempting to display it in the faceplate, but it randomly produces the following error in DeltaV operate: The maximum length of a string has been exceeded.

The text animation is configured as follows:

  • Data Source = @MOD@/(array element).A_CVDECPT[OUT_31_SCALE]
  • Caption > Data Conversion = Format
  • Caption > Output Error Mode = Use Error Table (have also tried toggling this to 
  • Type = Alpha-Numeric
  • Lines = 1
  • Chars/Line = 8 (have also tried 32 with no change)

From what I can see, this is no different than out-of-the-box faceplates, etc. I'm not sure if the data type (16-bit float) has anything to do with it.

To re-iterate, this is working great as a flexible solution where the class instance can be configured with up to 50 references, and the unused references set to #IGNORE but my faceplate generates an error (randomly). I just want to apply a best practice to configure this animation not to raise an error message in Operate mode, ideally without needing to use script, etc. so if a programmer wants to use this parameter in future, they only need to configure an external reference and the associated scale parameter, and the faceplate will accommodate it.

While a number of work-arounds would work (like point to a dummy_0 parameter instead of using #IGNORE) I am interested to know if the iFix/graphics can be configured to handle this situation better.

Any suggestions? Thanks community!

8 Replies

  • Add [_NOT_CONFIG_OK_] to the end of the animation which ignores giving errors otherwise you will have to add some determination on how many you have and update the datasource animation with VB logic to keep errors from occurring.

    In the animation window if you click the "..." button for the Expression Builder, then click the DeltaV Tab and then select the Help on Display Parameters you will find information on this and other data modifiers that are available.

  • In reply to Matt Stoner:

    Hey Matt, thanks for the response. I will try it, but just to follow up: I thought [_NOT_CONFIG_OK_] is only to deal with when a parameter doesn't exist at all (parameter has a status of "not configured"). In my case the parameter exists, but its very large value is causing a different error (string length exceeded). Also would this suggestion be a best practice to use on 100's of datalinks? Please note I am not changing array dimensions so the parameters always exist. Thank you!
  • In reply to Dave Grubwieser:

    It is also for array elements as well as fields that don't exist...so if you are referencing am ARRAYPARAM[1][5] and the array is only 1x4 that is still like a parameter not existing because you are referencing something that doesn't exist.
  • In reply to Matt Stoner:

    Totally agree with you. The array part of my problem was a bit of a red herring. Since I am not changing the array dimensions, the array element always exists. I'm always referencing a valid array element. The problem is the value being too big. I'm thinking my problem is that iFix is trying to show this: "3.40E+38" as this: "340282000000000000000000000000000000000" in which case I need more characters for my max string length.
  • My understanding of the format of the DataSource is that the value will be displayed with the number of decimal points specified by the scaling parameter OUT_31_SCALE. What is the decimal places setting and the EU0 and EU100 of this parameter? Is this scale parameter used for all array elements or is there one for each? (31 in the name suggests there are more)
  • In reply to Cedric Dawnhawk:

    Hey there. You are correct , there's an OUT_1_SCALE through OUT_50_SCALE.

    Here's a small snippet of my logic (not showing the array here but that is besides the point) . In a nutshell my generic faceplate wants to display, for example, OUT_50.A_CVDECPT[OUT_50_SCALE] in a datalink, and not generate an error when the value in OUT_50 is really large (since the external reference parameter it gets its value from = #IGNORE)

    Here's the configuration of my datalink/animation. I've tried increasing the string length to 64 characters, and got the idea from your post to set my scale to zero decimal places.

    Here's the online value and the error message that is displayed:

    Maybe what I'm trying to do is a bit ridiculous, but if there was a way to avoid an error message popping up without doing any extra work, that would be super useful. Using #IGNORE as a default value for external references in class instances, and setting up a generic scaled datalink using A_DECPT[xxx] that could fail when encountering that really large value but without the pesky error popup...

    Also, I did try adding [_NOT_CONFIG_OK_] and I'm still getting the string length exceeded error.

    Thank you!

  • In reply to Dave Grubwieser:

    I experimented a bit and found that if you use the .A_CVDECPT[scale parameter] field then the system formats the number (without using scientific notation) using the number of decimal points specified by scale parameter. If the resulting string is longer than 11 characters then the “The maximum length of a string ...” error message appears. The 11 character limit includes the decimal point (if present) and a leading - sign (if present).  The limit is is unrelated to any datalink settings.

    As an example 10000000 formatted using 2 dp gives 10000000.00 which is just acceptable. Change the number of decimal points to 3 or make it negative and an error appears as there are now 12 characters.

    So as this limit appears to be internal and 3.40282E+038 has rather more than 11 characters then I don’t think you can use the .A_CVDECPT[scale parameter] field.

    If it is not essential to control the decimal points, then simply using .A_CV is a possibility. This seems to also enforce a width of about 11 characters but if the number is large or small then it automatically changes to scientific notation (eg 3.40282E+038). The accuracy of other numbers seems to be limited to a total of 7 figures eg 76.9231 or 769.231.

    The other choice is using .F_CV and specifying a numeric format in the datalink that sets the number of decimal points. However unless you have an extremely large limit on the maximum character length then at some point the number won’t fit in and will be truncated at left or right, depending on the text alignment. You could suppress this by animating the datalink to only be visible for numbers up to a limit.

    There is a way to format all numbers large or small in scientific notation but this doesn’t look good for small ones. eg 50 appears as 5.00e+001.

  • In reply to Cedric Dawnhawk:

    Thanks so much for helping to figure that out. Your answer is so informative and helpful.

    As it is beneficial/convenient/flexible for our purposes to keep all the customization of formatting in the scaling parameters, the two options I'm leaning towards are:
    1) replacing the #IGNORE references with a "DUMMY_0" reference, so the faceplate would just show 0.0 as a default, and we could add some visibility animation as well if we wanted to.
    2) an ACTION block already takes care of moving the data into the array, so I could add a test for 3.40282E+038 and transfer a default value like 0 instead.

    I have a few other situations where those options might not work, so I'll consider a few of the ideas you suggested.

    At the end of the day, if I put that huge number into the array it will be a problem for the datalink, and solving that problem for the very large number won't even be useful, so preventing the number from being in the array is my best bet. Since the array itself is for display purposes only, masking the data won't be a concern either.

    I appreciate you educating me on the topic to get a better understanding. Hopefully this helps others down the road too. Thanks again!