Translations:Битовые операции/36/en

Материал из WebHMI Wiki
Перейти к: навигация, поиск

Then the script that will handle all these situations and generate the necessary flags in their places can look like this:

allAlerts = {          -- регистр    бит - код ошибки    тип операции
              {srcAlias = "pv1Status", bits = {[1] = 1}, checktype = "bit9"},
              {srcAlias = "vfdStatus_1", bits = {[2] =  10, [3] = 20, [4] = 30, [5] = 40}, checktype = "=="},
              {srcAlias = "vfdStatus_2",   bits = {[6] =  10, [7] = 20, [8] = 30, [9] = 40}, checktype = "=="},
              {srcAlias = "pv1ZoneHumidity", bits = {[10] = 90}, checktype = ">="}
 }