12.4.35.6   %ROTATEPLUS

Increment tag by specified amount, percentage , tag value or script variable until OutpHi (output high span) reached then resets counter to OutpLo (output low span) plus the delta of the last increment above OutpHi. It carries over and difference between OutpHi and the last increment calculation. Repeats continuously. Similar to LOOPPLUS, but when OutpHi reached, next value is not necessarily equal to OutpLo.  This makes for smother animation of rotation if the increment is not an even multiple of the output span.

SETVAL {counter=%ROTATEPLUS 1}          # increments tag named counter by 1 until

# OutpHi reached then resets to

# OutpLo plus whatever remainder

# in the increment above OutpHi.

# Repeats.

SETVAL {tag2=%ROTATEPLUS 1%}            # increments tag2  by 1 percent of output.

# span until OutpHi reached

# then resets counter to OutpLo

# plus whatever remainder in the

# increment above OutpHi. Repeats.

SETVAL {tag2=%ROTATEPLUS @tag1}      #  increments tag2  by  value of tag1

# until OutpHi reached

# then resets counter to OutpLo

# plus whatever remainder in the

#  increment above OutpHi. Repeats.

SETVAL "tag2=%ROTATEPLUS $var"          #  increments tag2  by  value of script

#  variable named var until OutpHi 

# then resets counter to OutpLo

# plus remainder in the

# increment above OutpHi. Repeats.

# double quotes forces valuation

# of variable var

 

# Tcl

SETVAL "tag2=%ROTATEPLUS $x" 

 

 

Rem VB Script

Dim x

SETVAL "tag2=%ROTATEPLUS " & Cstr(x) 

 

// JScript

var x, tagnvalue

tagnvalue = "tag2=%ROTATEPLUS ";

tagnvalue += x;

SETVAL(tagnvalue);