Current Value
  • 02 Feb 2024
  • PDF

Current Value

  • PDF

Article summary

The Current Value function (fnPV) retrieves the current information about the tag.

By default, it will return the last known value of the tag, and update every 60 seconds. To change this, manually specify the Update interval in seconds, or click  to use a cell reference. This setting controls how frequently fnPV will request data from the server.

  • If the timer is enabled, this overrides the timer update interval will make the value always refresh after the given number of seconds.

  • If the timer is not enabled, the value will refresh whenever an action is performed within Excel that causes a sheet re-calculation, but only if the given number of seconds has passed.

If Update interval is set to zero, fnPV will only request data from the server once per session of Excel.

The Return drop-down menu contains options for what type of data the function should return. Some apply to the tag’s most recent value, while others apply to the tag’s attributes.

Value: The value

Time: The value’s timestamp

TimeValue: A 1×2 array with the value’s timestamp at left and the value at right

TimeValueVertical: A 2×1 array with the value’s timestamp at top and the value at bottom

Qual: The value’s OPCHDA quality in decimal format

QualStr: The value’s quality in text format

Desc: The tag’s description

Units: The tag’s units

PlotMin: The tag’s plot min

PlotMax: The tag’s plot max


Was this article helpful?

What's Next