Strange behavior with reading changed property values from ACE Module

Discussion created by VarbanVarbanov on Mar 14, 2013
Latest reply on Mar 14, 2013 by Gregor

Hi! I have the following problem. I wanted to make an integration test of ACE Module - to test continous work (not only single calculation with the test tool in Visual studio or unit test). So i made a tool which reads input tag values and different sets of configuration properties from file and also the expected results for the output tags. The tool uses PISDK and writes at certain periods input tag values and also sometimes changes the module properties. After a while the tool reads the output tags and compares the values.

First i noticed that even when there is a change in configuration properties these change has no effect on the work of the module unless it is restarted. The properties reading code was in the InitializePIACEPoints() method, so I moved it in ACECalculations() method to ensure this initialization is performed every time when module calculates. But than the following happened: module started to write two values with the same timestamp or difference of an second instead of one - one value is correct according to the value of the property being set and actually is stored in the module (manually cheched), and the other is not correct - it is according to the old property value or sometimes i don't have a clue where it comes from. For exapmle module have schedule period of 1 minute and normally it writes one value every minute. But when the module property is changed and read in ACECalculations() method it start to write two different values one in for example in  12:09:59 and another in 12:10:00. Sometimes the "correct" value which i expect is the first one, sometimes is the second one. And the value which is not correct sometimes seems to be erratic. Also interesting is that if i debug or use test tool in visual studio everything is fine - the module reads the actual value stored in the server and makes correct calculation.

Can somebody explain me this behaviour and can it be avoided?