PI ACE Calculation -help needed

Discussion created by on Jul 21, 2011
Latest reply on Jul 22, 2011 by dtakara

We would like to do a basic ACE calculation In which we have 3 base tags and one output tag.


Basettag1 ,2,3 are getting the data at the same time but values are different. These base tags are basically a different process numbers.


Data flow for these three base tags is not  in good order. We get current feed as well  we get some old data(backfilled data).


so if We have a event for basetag1 at a particular time we will also be having the data for basetag2 ,3 and 4 at the same timestamp because our input source is a flat file system having data in the format below


timestamp  basetag1-value basetag2-value basetag3-value.


We would like to do calculation for all the tags for the same timestamp. We want the ACE logic to be event based , We can set any of the base tag as trigger tag.  Here is the high level algo


1) Trigger the calculation based on any of the base tag.


2) As we enter in to the acecalculation function get the time stamp of the triigger tag


3) get the data for tag2 and tag3  for the timestamp retrunred in step2


4) once we have data for all the tags for same timestamp do the caculation


5) write to output tag value as calculated value and timestamp retruned from step2.


Can we do this using ACE., can anyone having any sample code similar to our requirement.