Dpid element type

Discussion about recent product features & solutions!
2 posts • Page 1 of 1
Lbortolozzo
Posts:20
Joined: Tue Oct 03, 2017 12:33 pm

Dpid element type

Post by Lbortolozzo »

Hello,

WinCC OA Best Practice Question Here.

I have recently noticed the dpid datapoint element type in the para, and have started using it when I need to store a datapoint inside another element.

However, I have noticed that when you delete the linked datapoint the dpid is reduced to just the bracketed section {e.g (Type: 37 Sys: 1 Dp: 94 El: 1 : 0..0) } and I think this could cause unusual behaviour in any linked scripts, it would be better if it just returned an empty string.

So I just wanted to ask whether it is better to use the dpid type or better to just store the datapoint name as a string and check that it exists inside scripts? And any other pros and cons of this type?

Regards,
Louis

Gertjan van Schijndel
Posts:634
Joined: Mon Aug 02, 2010 10:37 am

Re: Dpid element type

Post by Gertjan van Schijndel »

In both cases 'dpExists' should be used to check if the datapoint actually exists.

The benefit of the dpid type is that it is actually a datapoint identifier and you can see in the para that the datapoint element does not exist (anymore). But the main benefit is with drivers, which normally do not have a complete datapoint container, so it does not require additional handling for conversion to/from strings.

2 posts • Page 1 of 1