OPPID plant project synchronize to database error

When plant project  synchronize to database, I get the errors:

8-27-18 11:45:57 LOG_ERROR - Bentley.Plant.CommonTools.Logging - Database Error:
Conversion for instance (InstanceId:0000000198, GlobalId:c6d2282a-9c51-4daa-935d-32497b2c9911) of class INSTRUMENT has failed. Property NAME could not be converted.
Check database columns to ensure field value types match ECProperty value types.
Ex. A string column with only numeric data can go to a double ECProperty. However if the db column has a mixture of alpha and numeric characters, an error will occur.

8-27-18 11:46:04 LOG_ERROR - Bentley.Plant.CommonTools.Logging - Database Error:
Conversion for instance (InstanceId:0000000198, GlobalId:c6d2282a-9c51-4daa-935d-32497b2c9911) of class INSTRUMENT has failed. Property NUMBER could not be converted.
Check database columns to ensure field value types match ECProperty value types.
Ex. A string column with only numeric data can go to a double ECProperty. However if the db column has a mixture of alpha and numeric characters, an error will occur.

I am using the OpenPlant PID V8i (SELECTseries 6) .

I have change the INSTRUMENT NAME to "this.PLANT_AREA & "-" & this.DEVICE_TYPE_CODE & "-" & this.SYSTEM & this.NUMBER" and change the parser regular expression to " ^(?<PLANT_AREA>[\d]{3})-(?<DEVICE_TYPE_CODE>[\w]{2,3})-(?<SYSTEM>[\d]{1})(?<NUMBER>[\d]{3})" use the Class Editor. The INSTRUMENT TAG format is 253-PIT-1009 in my project。

The firs time synchronize to the database, I get no error, and It show correct in the database. But synchronize again,I get the error.

I  change the parser regular expression to " ^(?<PLANT_AREA>[\d]{3})-(?<DEVICE_TYPE_CODE>[\w]{2,3})-(?<SYSTEM>[\d]{1})" , when synchronize to the database, I get no error, but this is not the correct parser regular expression,it will cause other problem in the database.

So it is the property NUMBER ECProperty problem. How to fix the problem? I have try many times, but can not solve the problem. 

I have change the EQUIPMENT, PIPELINE and VALVE name and parser regular expression by the same way, the work correctly.

  • Hello Xi Xi,

    On second time synchronization, what value you are providing on NUMBER property? It should be only Number/digit values, not any Alpha numeric characters present in NUMBER property.

    Please confirm.

    You can also refer below defined similar Wiki Article for Parser Regular Expression.

    Applies To Product(s): OpenPlant PID Version(s): 08.11.10.XXX (SS5) | 08.11.11.XX (SS6) Environment: Windows 7/8.1/10 (64 bit) Area: Customization Subarea…
    Last edited in OpenPlant | AutoPLANT > OpenPlant | AutoPLANT Wiki
    1 comment


    Regards | Jaya

  • Hello Xi Xi,

    Can you have a try on 253-PIT-1109?  I'm guessing if 009 was parsed as number, but 009 is a string instead of number, 9 is a number. 

  • The NUMBER property is 009, the NAME property is 253-PIT-1009  for the example. NUMBER and NAME they are all strings in the database and in the Class Editor. But why they not match. 

    When I delete the record in the database, and synchronize no error. But synchronize again, the same error.

    From the errors, I surpose the problem is NUMBER  in the database can not go to the NUMBER  ECProperty in the dgn file.

     NUMBER is string, but why I get the error “A string column with only numeric data can go to a double ECProperty.”

  • Hello Xi Xi,

    The correct parser would be as follows:

    ^[?\w]*-(?<DEVICE_TYPE_CODE>[?\w]*)-(?<SYSTEM>[\d]{1})(?<NUMBER>.*)

    This will support the following tags and more:

    253-PIT-1009

    1-PI-210000000

    253-PPPP-11

    And more...

    It is important to note that PLANT_AREA, and SYSTEM are "Associated Properties. As such, they write to their own database table and need to be parsed out of the expression. You do have a special case in your expression because SYSTEM precedes NUMBER and their isn't a delimiter between them. Under normal circumstances, a delimiter between all parts of the expression is easy to parse.

    This is why I removed the character counts on DEVICE_TYPE_CODE. Because DEVICE_TYPE_CODE is followed by a dash, there is no need to add character counts. When the expression encounters the dash, it will terminate the DEVICE_TYPE_CODE entry, regardless of the number of characters.

    To break this down.

    [?\w]* - this parses out the PLANT_AREA

    (?<DEVICE_TYPE_CODE>[?\w]*) - parses the characters in device type code. Due to the dash after DEVICE_TYPE_CODE, you can have any number of characters in the device type code.

    (?<SYSTEM>[\d]{1}) - parses out one character for SYSTEM. This is needed because their is not a dash between SYSTEM and NUMBER

    (?<NUMBER>.*) - parses number. Number is the last property in the expression and even though it  is 3 characters, it could be any number of characters.

    You will also need to adjust the tag format in the plant project database. The default for instrument is A-T-N (Plant Area-Device Type Code-Number). This MAY require a new Tag Code for SYSTEM (By default, letter D is the first available character). A tag code for this expression would be A-T-D1N

    A=PLANT_AREA, T=Device Type Code, D=SYSTEM, 1=number of characters for SYSTEM, N=NUMBER.

    One last recommendation is to get a Parser Regular Expression designer tool. I use one from Rad Software. It is Shareware and is free. There are other tools out there and they are all invaluable when ti comes to creating Parser Regular Expressions.

    It can be found here: https://rad-software-regular-expression-designer.software.informer.com/

    I hope this helps,

     

    Tony DeRosa

    Senior Application Engineer

    Bentley Plant