User Tools

Site Tools


dictionary:unitinformation:futurevalue

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
dictionary:unitinformation:futurevalue [2023/02/13 14:52] – created - external edit 127.0.0.1dictionary:unitinformation:futurevalue [2023/05/20 15:11] (current) – [Notes:] added enumeration link James Sentman
Line 1: Line 1:
-====Future Value====+=====Future Value=====
 In the ON and OFF script of a unit a call to the [[valueof|value]] verb will return the current value of the unit, not the new value being set. In order to see what the future value of the unit will be you need to use the Future Value verb. In the ON and OFF script of a unit a call to the [[valueof|value]] verb will return the current value of the unit, not the new value being set. In order to see what the future value of the unit will be you need to use the Future Value verb.
  
-===Usage:===+====Usage:====
 **future value**\\ **future value**\\
 returns a real number that will be the value of unit after the new command is received. returns a real number that will be the value of unit after the new command is received.
  
-===Notes:=== +<code> 
-see also: [[changefuturevalue|change future value]]+  if (future value) > 300 then 
 +     write log “Error in reading, setting to current value” color red 
 +     change future value to (value of (thisUnit)) 
 +  else 
 +     write log “Reading Appears Valid, continue" 
 +  end if 
 +</code> 
 + 
 +====Using with Enumerated Values:==== 
 + 
 +For Units with Enumerated Values you can use the optional “for” parameter to the [[dictionary:unitinformation:enumeratedvalue|enumerated value]] verb to get the enumeration for the future value. Without the “for" parameter it will return the enumeration for the current value and not the new value. By passing the future value, or any number within range, the correct enumeration can be read. 
 + 
 +<code> 
 +  write log “new enumerated value will be “ & (enumerated value for (futureValue)) 
 +</code> 
 + 
 + 
 +====Notes:==== 
 +  * [[changefuturevalue|change future value]] 
 +  * [[dictionary:unitinformation:enumeratedvalue|Enumerated Value Verb]]
dictionary/unitinformation/futurevalue.1676299926.txt.gz · Last modified: 2023/02/13 14:52 by 127.0.0.1