What is an alternative to use dpGet inside a callback function?

dpGet(…) is a blocking function, which should not be used inside callback functions (because it could lead to too much pending runs, which would be thrown away).

 

Option 1, connect to all required values:

            On using dpConnect it is easy to add all required DPEs to the connection list.

Option 2, keep slow changing values on global variables:

            Create a global variable, and do a dpConnect on the additional DPE, the callback should fill the current state to that global variable. Every time that additional state is required, it is just needed to read it from the global variable (instead of doing the dpGet).

Date added:
Last revised:
Hits:
8.015
Version:
ALL Versions
Rating:
Rating: 4.0. 1 vote(s). No rating done at all.
Your vote was '' (0 of 5) You are an anonymous user.
You may log on to do personalized votings
Click the rating bar to rate this item Please log on to do ratings
  • Notification

    FE user cannot be identified! (1403201096)

Tags:
Programming / Scripting