the trick is set two “ON” states for your led, and toggle between them.
set a led with condition
0; 1; 2 for silver; light green; green.
assume you have multiple led, they should blink at the same time.
step 1, defind a function in formula, which is the value of second of current time.
———
double Second(DateTime dt){
double en_dt = EncodeDate(dt);
double s = Math.Truncate(en_dt * 24 * 60 * 60) % 60;
return s;
}
——–
you can have 1 input channel for device status, e.g. Cnl 1001
0; 1 for off; on
then you setup an other channel for led, e.g. 1002,
set formula
Val(1001)==0?0:Val(1001)+Second(DateTime.Now)%2
then the value will toggle between 1 and 2 every second when the device is on, and remain 0 when the device is off.