dpConnect() or dpQueryConnectAll()

Find and share HowTos to various installations / configurations!
4 posts • Page 1 of 1
nglazov
Posts:3
Joined: Fri Feb 21, 2014 7:19 am

dpConnect() or dpQueryConnectAll()

Post by nglazov »

I need to show on display 30 independently changing values.
What type of subscription should be used:
dpConnect() for each value and setValue for each shape
dpQueryConnectAll() for all values and one setMultiValue for all shapes
?

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: dpConnect() or dpQueryConnectAll()

Post by leoknipp »

Hello,

which solution is the better one depends on how the values are changing and how if this panel is used as a reference in another panel.

If there are only a few values changing more often than the other ones than it can be the better solution to use dpConnect()-functions only with single dp-elements or to make two groups for fast and slow changing dp-elements.
If the values are changing at the same time and sent within one message, a grouped connect may be better.
At the dpConnect()-function you can define several dp-elements. When using a defined list of dp-elements it is better to use a dpConnect() instead of a dpQueryConnectAll().

There is also a function dpQueryConnectSingle() available where you can connect to several dp-elements. At the work-function you only get those dp-elements (+values) which have been changed.

Best Regards
Leopold Knipp
Senior Support Specialist

nglazov
Posts:3
Joined: Fri Feb 21, 2014 7:19 am

Re: dpConnect() or dpQueryConnectAll()

Post by nglazov »

Hi, Leopold!

My panel will be used as reference.
Values ??will change constantly and independently.
?ut displaying a single element value (for example, i need to change color and text of shape) depends on the value of another element, which is also to be displayed.

Is it important for performance to use setValue() or setMultiValue() for changing properties of shapes?

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: dpConnect() or dpQueryConnectAll()

Post by leoknipp »

If you want to change the properties for several graphical objects in one step you have to use the function setMultiValue().
The function setValue() is used when only properties for a single object are changed.

Normally you should do it in one command instead of several calls of the same function in a defined order

Best Regards
Leopold Knipp
Senior Support Specialist

4 posts • Page 1 of 1