dpQueryConnectAll() breaks when deleting a datapoint

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
Search

Post Reply
2 posts • Page 1 of 1
siemens_dva
Posts: 11
Joined: Tue May 03, 2016 8:23 am

dpQueryConnectAll() breaks when deleting a datapoint

Post by siemens_dva » Mon Dec 02, 2019 12:46 pm

Hi,

I'm trying to show the user a dynamic list that automatically updates based on changes made to any datapoints of a specific type.

To do that I use dpQueryConnectAll() with the following query:

Code: Select all

 "workFunc", true, "", "SELECT '_original.._value' FROM '*' WHERE _DPT = \"_MyDatapointType\""
This works dandy for creating and updating datapoints. But when I delete a DP the query breaks with the following error message:

Code: Select all

Automatic disconnect of attributes due to config type change, DP: System1:MyDatapoint1.Element1, MAN: (SYS: 1 Event -num 0 CONN: 1)
I guess this is caused because the connected attributes are removed.

How else can I listen to a list of datapoints and react to the deletion of an object?

User avatar
leoknipp
Posts: 2031
Joined: Tue Aug 24, 2010 5:28 pm

Re: dpQueryConnectAll() breaks when deleting a datapoint

Post by leoknipp » Thu Dec 05, 2019 8:21 am

I have tested it but I cannot reproduce it.
The test was done as follows:
-- Created a dp type
-- Created a datapoint
-- Started the dpQueryConnectAll
The work function was called.
-- Deleted the datapoint
-- Created a datapoint
The work function was called again.

If you want to get the information if a datapoint is deleted you can use the sysConnect() function.
For details please have a look at the WinCC OA Documentation.

Best Regards
Leopold Knipp
Senior Support Specialist

Post Reply
2 posts • Page 1 of 1