ph_addtoglobal PowerHome formula function
Description
Adds a numeric value to an existing global variable that currently contains a numeric value
Syntax
ph_addtoglobal ( id, value )
Argument Description
id String. representing the ID of the global variable.
value Long. The double value to add to the global variable.
Return value
Double. Returns the new value of the global variable. Returns 0 if an error occurs.
Examples
The following examples demonstrate typical syntax/usage for this function.
• ph_addglobal("MOTIONCOUNT",1)
• ph_addglobal("LOOPCNT", [LOCAL1])   {NOTE: the LOCAL variable MUST contain a numeric value or a syntax error will occur. See next line for better syntax.}
• ph_addglobal("LOOPCNT", ph_getvar_n(1,1))   {ph_getvar converts the contents of LOCAL1 value into a numeric value}