How change the state of variable in AddIn Runtime service

How change the state of variable in AddIn Runtime service

Hi copa-data,
(working with zenon 8.0, AddIn Runtime service)

i am trying to change the state of variable, specifically the status bit 9 REVISION.
I found in documentation one method of IVariable to set a value with lowerState (http://onlinehelp.copadata.com/help/760/addin/html/Variable-IVariable.htm)

variable.lowerState // 4333568
variable.SetValue(variable.GetValue(0), statusInt, DateTime.Now.Minute, (Int16)DateTime.Now.Millisecond); // statusInt = 4325376
variable.lowerState // still 4333568

Do i something wrong ?? Is there other way how to change a variable state??

Best regards
and thank you for your time.

This is a migrated post! Originally posted on 10.07.2019 by user tsvoboda. Please be aware that information can be outdated.