Factorysql data refresh problem, keeps writing same values

Ok, I think I understand. The problem is that the group is set up to log constantly, irregardless of what is going on with the data. When the connection to WinCC is lost, the data will no longer be good, but the group doesn’t (currently) know that, and continues to log.

You have a few options:

  1. Select the “Store OPC quality code” option on the group to store the current aggregate quality of the items in the table. You can use this after the fact to only query data that is “good” - integer value 192. This will result in more logged data, but you’ll be able to see when the values when from good to bad and back. You can later delete non-good values.

  2. Create a trigger so that only good data is logged. This is probably the best option, if your group does not already have a trigger:
    i) Create a copy of one of your OPC items in the group.
    ii) Edit that copy, and change the “Property” from “Value” to “Quality”. The data type should be Integer.
    iii) Set the item to “read only”. It is only useful as the trigger, so it doesn’t need to be stored in the database. You may also change the name of the item to something more identifiable, like “trigger”.
    iv) On the Trigger tab of the group, select “execute group on trigger”. Select your trigger item. Select the 3rd trigger condition and set: “is active = 192, non-active != 192”.

You may now start your group. The group will execute constantly while the quality is good, but will not log data when the quality is bad, which should happen when the OPC server is not available, or there is some other problem, like a device not being available.

Hope this helps,