Scada-LTS icon indicating copy to clipboard operation
Scada-LTS copied to clipboard

Fixed using setTimeout in common.js

Open Limraj opened this issue 3 years ago • 0 comments

Description It should not overwrite the timeout until the first timeout finishes executing the code.

To Reproduce

  1. Create virtual datasource ds_1 with update 500ms;
  2. Add datapoint dp_1(binary, alternate) in ds_1;
  3. Create graphical view gv_1, add component 'simple point' with dp_1, and click save view;
  4. You can see that the refreshing of the values ​​is not regular -> error;

edit: Binary points blocked due to overlapping of refresh and value periods, refresh always hit 1, which looked like a bug, so it looks like a point is stuck. This can be verified on the point of the numeric, random type, here this problem does not occur.

However, there is the problem of completely blocking the refresh, among others on watchlists, which also applies to numeric points. This solution precludes the use of the nondeterministic setTimeout method. It depended on whether the view was refreshed or not, while the browser can block the execution of this function, as a result, the refreshing of the datapoints is blocked, while refreshing such a view restores the refreshing. The problem is nondeterministic.

Links https://developer.mozilla.org/en-US/docs/Web/API/setTimeout

Spec

  • Scada Version: 2.6.11

Limraj avatar Feb 23 '22 20:02 Limraj