diff --git a/CMS_CORE_Library/S7Net/Nc_S7Net.cs b/CMS_CORE_Library/S7Net/Nc_S7Net.cs index c65eb04..365a31c 100644 --- a/CMS_CORE_Library/S7Net/Nc_S7Net.cs +++ b/CMS_CORE_Library/S7Net/Nc_S7Net.cs @@ -3029,7 +3029,8 @@ namespace CMS_CORE_Library.S7Net // update only given data... foreach (var item in newData) { - newMem[item.Key - 1] = (byte)item.Value; + // algoritmo: valore = (val + 1) % 8, ovvero riflettore 0, 8, 16 --> 1, riflettore 1, 9, 17 --> 2 + newMem[item.Key - 1] = (byte)((item.Value + 1) % 8); } // return as list... currMem = newMem.ToList();