I have a requirement where business users would like to know status of instruments associated with a Well on a periodic basis. The Number of instruments associated with wells could be variable. An Instrumentation's status depends upon number of instruments associated with the well and should consider working only and only if all instruments are working. An instrument is consists of two meter that gets temperature and pressure in two PI Tags. We have following model for a Well. It has two instrumentation named as PTG1 and PTG2. The overall status of PTG is being represented by a tag DID_PTG_P20_PQ-C3_STATUS. This tag would show if all instrumentation are working or not.
Well Name Instrumentation Tags Status Tags
PQ-C3 PTG Overall PTG Status DID_PTG_P20_PQ-C3_STATUS
PQ-C3 PTG1 DID_PTG1_P20_PQ-C3_STATUS
PQ-C3 Pressure M00_PQC3WABP.PV DID_M00_PQC3WABP.PV_STATUS
PQ-C3 Temp M00_PQC3WABT.PV DID_M00_PQC3WABT.PV_STATUS
PQ-C3 PTG2 DID_PTG2_P20_PQ-C3_STATUS
PQ-C3 Pressure M00_PQC3PI01.PV DID_M00_PQC3PI01.PV_STATUS
PQ-C3 Temp M00_PQC3TI01.PV DID_M00_PQC3TI01.PV_STATUS
DID_PTG_P20_PQ-C3_STATUS = DID_PTG1_P20_PQ-C3_STATUS && DID_PTG2_P20_PQ-C3_STATUS
Where DID_PTG1_P20_PQ-C3_STATUS = DID_M00_PQC3WABP.PV_STATUS && DID_M00_PQC3WABT.PV_STATUS
Where DID_M00_PQC3WABP.PV_STATUS = True if value of M00_PQC3WABP.PV pi tag comply with all business rules and DID_M00_PQC3WABT.PV_STATUS = True if value of M00_PQC3WABT.PV pi tag comply with all business rules.
DID_PTG2_P20_PQ-C3_STATUS = DID_M00_PQC3PI01.PV_STATUS && DID_M00_PQC3TI01.PV_STATUS
Where DID_M00_PQC3PI01.PV_STATUS = True if value of M00_PQC3PI01.PV pi tag comply with all business rules and DID_M00_PQC3TI01.PV_STATUS = True if value of M00_PQC3TI01.PV pi tag comply with all business rules.
We have defined a few ACE Calculations and they are working fine. As you can see that we may have different variation such as a well with two PTG, a well with three PTG and so on....
I am not sure how can I work on variable inputs to ACE Module? In other words when I add an ACE Module in Visual Studio it pop up an screen that force user to select Alias or tags that are going to be used in that module. Here what I am trying to achieve is to write only one ACE calculation that would serve all possible variation somehow. Any idea would be appreciated. I am not thinking of using PISDK inside Ace module.
For time being I added a few ACE Calculations that are addressing all scenarios however that would not be the solution when some more instrumentations are added or removed.
Thanks and regards,